/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1e3c72;
    --secondary-blue: #2a5298;
    --light-blue: #4a90e2;
    --white: #ffffff;
    --black: #000000;
    --dark-gray: #1a1a1a;
    --light-gray: #f8f9fa;
    --shadow: rgba(30, 60, 114, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.2);
    --gradient-primary: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-blue), var(--light-blue));
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Poppins', sans-serif;
    --navbar-height: 64px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark-gray);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animaciones Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(-10%, -10%) translateY(0px);
    }
    33% {
        transform: translate(-8%, -12%) translateY(-5px);
    }
    66% {
        transform: translate(-12%, -8%) translateY(-3px);
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    animation: slideInFromTop 0.8s ease-out;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px var(--shadow);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo Styles */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo-img {
    height: 48px;
    width: auto;
    display: block;
}

.nav-logo-text {
    display: none;
}

.nav-logo h2 {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.8rem;
}

.nav-logo span {
    color: var(--secondary-blue);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--primary-blue);
    margin: 3px 0;
    transition: var(--transition);
}

/* Sección Hero */
.hero-section {
    min-height: calc(60vh - var(--navbar-height, 96px)); /* fallback */
    min-height: calc(60svh - var(--navbar-height, 96px)); /* Safari iOS */
    min-height: calc(var(--vh, 1vh) * 60 - var(--navbar-height, 96px)); /* fallback JS */
    min-height: calc(60dvh - var(--navbar-height, 96px)); /* navegadores modernos preferido */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* anclar arriba */
    align-items: center;
    background: var(--gradient-primary);
    overflow: hidden;
    padding-top: var(--navbar-height, 96px);
}

/* hero-background se define más abajo para evitar duplicados */

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 60, 114, 0.05);
    z-index: 1;
}

.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 3;
    max-width: 900px;
    padding: 3rem 2rem;
    animation: fadeInUp 1s ease-out;
    margin-top: 0;
    position: relative;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.title-line {
    display: block;
    animation: fadeInLeft 1s ease-out;
}

.title-line:nth-child(2) {
    animation-delay: 0.2s;
}

.title-line.highlight {
    background: linear-gradient(45deg, var(--white), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation-delay: 0.4s;
    padding-bottom: 0.1em;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-buttons {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255,255,255,0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Proyectos Destacados */
.featured-projects {
    width: 100%;
    padding: 4rem 2rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-top: 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.section-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Carrusel */
.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.carousel {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    padding: 0 1rem;
}

.project-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    animation: fadeInUp 1s ease-out;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.project-image {
    height: 300px;
    position: relative;
    overflow: hidden;
}

/* Imágenes en tarjetas de proyectos */
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    position: relative;
}

.project-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.project-details {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--secondary-blue);
}

.project-details span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow);
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: -25px;
}

.carousel-btn.next {
    right: -25px;
}

/* Ocultar flechas en dispositivos táctiles (sin importar el ancho) */
@media (pointer: coarse) {
    .carousel-btn {
        display: none !important;
    }
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--white);
    transform: scale(1.2);
}

/* Sección Proyectos */
.projects-section {
    position: relative;
    padding-top: calc(var(--navbar-height, 96px) + clamp(48px, 8vh, 96px));
    padding-bottom: clamp(48px, 8vh, 96px);
    background: var(--gradient-primary);
    color: var(--white);
}

.projects-section .section-header h2 {
    color: var(--white);
}

.projects-section .section-header p {
    color: var(--white);
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--primary-blue);
    background: transparent;
    color: var(--primary-blue);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    animation: fadeInUp 1s ease-out;
}

.project-item {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
    transition: var(--transition);
    position: relative;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-dark);
}

.project-item .project-image {
    height: 250px;
    position: relative;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 60, 114, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--primary-blue);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    transform: scale(1.1);
    background: var(--primary-blue);
    color: var(--white);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.price {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.available {
    background: #e8f5e8;
    color: #2e7d32;
}

.status.construction {
    background: #fff3e0;
    color: #f57c00;
}

.status.sold {
    background: #ffebee;
    color: #c62828;
}

/* Sección Contacto */
.contact-section {
    position: relative;
    padding-top: calc(var(--navbar-height, 96px) + clamp(48px, 8vh, 96px));
    padding-bottom: clamp(48px, 8vh, 96px);
    background: var(--gradient-primary);
    color: var(--white);
}

.contact-section .section-header h2,
.contact-section .section-header p {
    color: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    animation: fadeInLeft 1s ease-out;
}

.info-card:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.15);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--white);
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.info-content p {
    opacity: 0.9;
    line-height: 1.6;
}

/* Formulario de Contacto */
.contact-form-container {
    animation: fadeInRight 1s ease-out;
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.2);
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    pointer-events: none;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group select:focus + label,
.form-group select:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    background: var(--primary-blue);
    padding: 0 10px;
    border-radius: 5px;
    color: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Contact Section */
@media (max-width: 992px) {
  .contact-content {
    grid-template-columns: 1fr;
    gap: clamp(20px, 4vw, 32px);
    margin-top: clamp(16px, 4vw, 24px);
  }
  .contact-section {
    padding-top: calc(var(--navbar-height, 96px) + clamp(32px, 6vh, 64px));
    padding-bottom: clamp(32px, 6vh, 64px);
  }
  .contact-form {
    padding: clamp(16px, 4vw, 24px);
  }
  .contact-section .section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .info-icon {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
  .info-card {
    padding: 1rem;
    gap: 0.75rem;
  }
  .contact-content {
    gap: clamp(16px, 5vw, 24px);
  }
  .form-group {
    margin-bottom: 1.25rem;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 12px;
    font-size: 0.95rem;
  }
  .contact-section .section-header h2 {
    font-size: clamp(22px, 6vw, 28px);
  }
  .contact-section .section-header p {
    font-size: clamp(14px, 4.5vw, 16px);
  }
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Ocultar carrusel en index para que el primer scroll muestre el footer */
#inicio .featured-projects { display: none !important; }

/* Restablecer hero a pantalla completa y sin espacio inferior */
.hero-section {
  min-height: calc(100dvh - var(--navbar-height, 96px) + 128px);
  margin-bottom: 0;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 1024px) {
  .hero-section { min-height: calc(100dvh - var(--navbar-height, 70px) + 96px); }
}
@media (max-width: 768px) {
  .hero-section { min-height: calc(100dvh - var(--navbar-height, 60px) + 72px); }
}

/* Centrar contenido del hero */
.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 0;
  margin-bottom: 0;
  transform: translateY(-4vh);
}
@media (max-width: 1024px) {
  .hero-content { transform: translateY(-3vh); }
}
@media (max-width: 768px) {
  .hero-content { transform: translateY(-2vh); }
}

/* Ocultar carrusel en index para que el primer scroll muestre el footer */
#inicio .featured-projects { display: none !important; }

/* Sobre Nosotros */
.about-section {
  position: relative;
  padding-top: calc(var(--navbar-height, 96px) + clamp(48px, 8vh, 96px));
  padding-bottom: clamp(48px, 8vh, 96px);
  background: var(--gradient-primary);
  color: var(--white);
}
.about-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto clamp(24px, 4vh, 40px);
}
.about-header .section-title {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 700;
  letter-spacing: 0.5px;
}
.about-header .section-subtitle {
  font-size: clamp(16px, 2.4vw, 18px);
  opacity: 0.9;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 24px);
}
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: clamp(16px, 2.8vw, 24px);
}
.about-card h3 {
  font-size: clamp(18px, 2.6vw, 22px);
  margin: 8px 0 10px;
}
.about-card p {
  font-size: clamp(14px, 2.2vw, 16px);
  line-height: 1.6;
  opacity: 0.92;
}
.about-icon {
  font-size: clamp(24px, 4.5vw, 32px);
  color: #4aa8ff;
}

/* Imagen inferior en Sobre Nosotros */
.about-image { 
  margin-top: clamp(24px, 6vh, 48px);
}
.about-image img {
  width: 100%;
  height: clamp(480px, 70vh, 1000px);
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* Footer */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section h3 span {
    color: var(--light-blue);
}

.footer-section h4 {
    color: var(--light-blue);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--light-blue);
}

/* Footer desktop: 3 columnas simétricas */
@media (min-width: 992px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    align-items: start;
  }
  .footer-section {
    text-align: center;
  }
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--light-blue);
    transform: translateY(-3px);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Override final para móviles/tablet: formulario debajo de info */
@media (max-width: 992px) {
  .contact-section .contact-content {
    grid-template-columns: 1fr;
  }
}

/* Ajustes específicos para la sección Proyectos */
.projects-section .project-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.projects-section .project-details span {
    margin-bottom: 0;
}

.projects-section .btn {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: 0 10px 27px var(--shadow);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-section {
        padding-top: var(--navbar-height, 70px);
        min-height: calc(100vh - var(--navbar-height, 70px)); /* fallback */
        min-height: calc(100svh - var(--navbar-height, 70px)); /* Safari iOS */
        min-height: calc(var(--vh, 1vh) * 100 - var(--navbar-height, 70px)); /* fallback JS */
        min-height: calc(100dvh - var(--navbar-height, 70px)); /* navegadores modernos preferido */
        justify-content: center; /* centrar verticalmente en móviles */
    }
    .hero-content {
        padding: 2rem 1rem;
        margin-top: 0;
        text-align: center; /* asegurar centrado horizontal */
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding-top: var(--navbar-height, 60px);
        min-height: calc(100vh - var(--navbar-height, 60px)); /* fallback */
        min-height: calc(100svh - var(--navbar-height, 60px)); /* Safari iOS */
        min-height: calc(var(--vh, 1vh) * 100 - var(--navbar-height, 60px)); /* fallback JS */
        min-height: calc(100dvh - var(--navbar-height, 60px)); /* navegadores modernos preferido */
        justify-content: center; /* centrar verticalmente en móviles pequeños */
    }
    .hero-content {
        padding: 1.5rem 1rem;
        margin-top: 0;
        text-align: center;
    }
}

/* Imagen de fondo del hero */
.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 60, 114, 0.7);
    z-index: 2;
}

/* Fondo cuadriculado como respaldo */
.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0; /* llenar siempre el viewport */
    height: 100vh; /* fallback */
    height: 100svh; /* Safari iOS */
    height: 100dvh; /* navegadores modernos preferido */
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="0.6"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    background-size: 72px 72px;
    background-position: center;
    pointer-events: none;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 60, 114, 0.05);
    z-index: 1;
}

.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 2;
    max-width: 900px;
    padding: 2rem 1.5rem;
    animation: fadeInUp 1s ease-out;
    margin-top: 0; /* Subir aún más texto y botones */
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.title-line {
    display: block;
    animation: fadeInLeft 1s ease-out;
}

.title-line:nth-child(2) {
    animation-delay: 0.2s;
}

.title-line.highlight {
    background: linear-gradient(45deg, var(--white), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation-delay: 0.4s;
    padding-bottom: 0.1em;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255,255,255,0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Proyectos Destacados */
.featured-projects {
    width: 100%;
    padding: 4rem 2rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-top: 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.section-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Carrusel */
.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.carousel {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    padding: 0 1rem;
}

.project-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    animation: fadeInUp 1s ease-out;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.project-image {
    height: 300px;
    position: relative;
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    position: relative;
}

.project-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.project-details {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--secondary-blue);
}

.project-details span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow);
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: -25px;
}

.carousel-btn.next {
    right: -25px;
}

/* Ocultar flechas en dispositivos táctiles (sin importar el ancho) */
@media (pointer: coarse) {
    .carousel-btn {
        display: none !important;
    }
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--white);
    transform: scale(1.2);
}

/* Sección Proyectos */
.projects-section {
    position: relative;
    padding-top: calc(var(--navbar-height, 96px) + clamp(48px, 8vh, 96px));
    padding-bottom: clamp(48px, 8vh, 96px);
    background: var(--gradient-primary);
    color: var(--white);
}

.projects-section .section-header h2 {
    color: var(--white);
}

.projects-section .section-header p {
    color: var(--white);
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--primary-blue);
    background: transparent;
    color: var(--primary-blue);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    animation: fadeInUp 1s ease-out;
}

.project-item {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
    transition: var(--transition);
    position: relative;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-dark);
}

.project-item .project-image {
    height: 250px;
    position: relative;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 60, 114, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--primary-blue);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    transform: scale(1.1);
    background: var(--primary-blue);
    color: var(--white);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.price {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.available {
    background: #e8f5e8;
    color: #2e7d32;
}

.status.construction {
    background: #fff3e0;
    color: #f57c00;
}

.status.sold {
    background: #ffebee;
    color: #c62828;
}

/* Sección Contacto */
.contact-section {
    position: relative;
    padding-top: calc(var(--navbar-height, 96px) + clamp(48px, 8vh, 96px));
    padding-bottom: clamp(48px, 8vh, 96px);
    background: var(--gradient-primary);
    color: var(--white);
}

.contact-section .section-header h2,
.contact-section .section-header p {
    color: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    animation: fadeInLeft 1s ease-out;
}

.info-card:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.15);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--white);
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.info-content p {
    opacity: 0.9;
    line-height: 1.6;
}

/* Formulario de Contacto */
.contact-form-container {
    animation: fadeInRight 1s ease-out;
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.2);
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    pointer-events: none;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group select:focus + label,
.form-group select:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    background: var(--primary-blue);
    padding: 0 10px;
    border-radius: 5px;
    color: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Contact Section */
@media (max-width: 992px) {
  .contact-content {
    grid-template-columns: 1fr;
    gap: clamp(20px, 4vw, 32px);
    margin-top: clamp(16px, 4vw, 24px);
  }
  .contact-section {
    padding-top: calc(var(--navbar-height, 96px) + clamp(32px, 6vh, 64px));
    padding-bottom: clamp(32px, 6vh, 64px);
  }
  .contact-form {
    padding: clamp(16px, 4vw, 24px);
  }
  .contact-section .section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .info-icon {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
  .info-card {
    padding: 1rem;
    gap: 0.75rem;
  }
  .contact-content {
    gap: clamp(16px, 5vw, 24px);
  }
  .form-group {
    margin-bottom: 1.25rem;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 12px;
    font-size: 0.95rem;
  }
  .contact-section .section-header h2 {
    font-size: clamp(22px, 6vw, 28px);
  }
  .contact-section .section-header p {
    font-size: clamp(14px, 4.5vw, 16px);
  }
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Ocultar carrusel en index para que el primer scroll muestre el footer */
#inicio .featured-projects { display: none !important; }

/* Restablecer hero a pantalla completa y sin espacio inferior */
.hero-section {
  min-height: calc(100dvh - var(--navbar-height, 96px) + 128px);
  margin-bottom: 0;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 1024px) {
  .hero-section { min-height: calc(100dvh - var(--navbar-height, 70px) + 96px); }
}
@media (max-width: 768px) {
  .hero-section { min-height: calc(100dvh - var(--navbar-height, 60px) + 72px); }
}

/* Centrar contenido del hero */
.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 0;
  margin-bottom: 0;
  transform: translateY(-4vh);
}
@media (max-width: 1024px) {
  .hero-content { transform: translateY(-3vh); }
}
@media (max-width: 768px) {
  .hero-content { transform: translateY(-2vh); }
}

/* Ocultar carrusel en index para que el primer scroll muestre el footer */
#inicio .featured-projects { display: none !important; }

/* Sobre Nosotros */
.about-section {
  position: relative;
  padding-top: calc(var(--navbar-height, 96px) + clamp(48px, 8vh, 96px));
  padding-bottom: clamp(48px, 8vh, 96px);
  background: var(--gradient-primary);
  color: var(--white);
}
.about-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto clamp(24px, 4vh, 40px);
}
.about-header .section-title {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 700;
  letter-spacing: 0.5px;
}
.about-header .section-subtitle {
  font-size: clamp(16px, 2.4vw, 18px);
  opacity: 0.9;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 24px);
}
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: clamp(16px, 2.8vw, 24px);
}
.about-card h3 {
  font-size: clamp(18px, 2.6vw, 22px);
  margin: 8px 0 10px;
}
.about-card p {
  font-size: clamp(14px, 2.2vw, 16px);
  line-height: 1.6;
  opacity: 0.92;
}
.about-icon {
  font-size: clamp(24px, 4.5vw, 32px);
  color: #4aa8ff;
}

/* Imagen inferior en Sobre Nosotros */
.about-image { 
  margin-top: clamp(24px, 6vh, 48px);
}
.about-image img {
  width: 100%;
  height: clamp(480px, 70vh, 1000px);
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* Footer */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section h3 span {
    color: var(--light-blue);
}

.footer-section h4 {
    color: var(--light-blue);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--light-blue);
}

/* Footer desktop: 3 columnas simétricas */
@media (min-width: 992px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    align-items: start;
  }
  .footer-section {
    text-align: center;
  }
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--light-blue);
    transform: translateY(-3px);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}