/* ========================================
   PULSO INMOBILIARIA - PREMIUM DESIGN
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #b71c1c;
    --primary-dark: #7f0000;
    --primary-light: #f05545;

    --neutral-900: #0a0a0a;
    --neutral-800: #1a1a1a;
    --neutral-700: #2d2d2d;
    --neutral-600: #4a4a4a;
    --neutral-500: #6b6b6b;
    --neutral-400: #8f8f8f;
    --neutral-300: #c5c5c5;
    --neutral-200: #e5e5e5;
    --neutral-100: #f5f5f5;
    --white: #ffffff;

    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--sans);
    color: var(--neutral-800);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 6%;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

.label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-heading {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 500;
    line-height: 1.1;
    color: var(--neutral-900);
    margin-bottom: 2rem;
}

/* ========================================
   HEADER / NAVIGATION
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.4s var(--ease-out-expo);
}

.navbar {
    padding: 1.25rem 0;
}

.nav-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 42px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 3rem;
    list-style: none;
    align-items: center;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--neutral-700);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.4s var(--ease-out-expo);
}

.nav-link:hover {
    color: var(--neutral-900);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--neutral-800);
    transition: all 0.3s ease;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    margin-top: 74px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-image {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.7), rgba(183, 28, 28, 0.4)), url('multimedia/imagenes/construccion-casas-campestres/CONSTRUCCION-CASAS-CAMPESTRES-5.jpg');
    background-size: cover;
    background-position: center;
    animation: slowZoom 20s ease-in-out infinite alternate;
}

@keyframes slowZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.05);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 6%;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.3s backwards;
}

.hero-title {
    font-family: var(--serif);
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 500;
    line-height: 1;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    animation: fadeInUp 0.8s var(--ease-out-expo) backwards;
}

.title-line:nth-child(1) {
    animation-delay: 0.4s;
}

.title-line:nth-child(2) {
    animation-delay: 0.5s;
}

.title-line:nth-child(3) {
    animation-delay: 0.6s;
}

.title-line.accent {
    color: var(--primary-light);
    font-style: italic;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    max-width: 600px;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.7s backwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.8s backwards;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s var(--ease-out-expo);
}

.btn-hero.primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(183, 28, 28, 0.3);
}

.btn-hero.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(183, 28, 28, 0.4);
}

.btn-hero.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-hero.secondary:hover {
    background: var(--white);
    color: var(--neutral-900);
    border-color: var(--white);
}

.hero-stats {
    position: absolute;
    bottom: 4rem;
    left: 6%;
    display: flex;
    gap: 4rem;
    z-index: 2;
    animation: fadeInUp 0.8s var(--ease-out-expo) 1s backwards;
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--serif);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1;
}

.stat-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   SERVICES SECTION
   ======================================== */

.services {
    padding: 10rem 0;
    background: var(--neutral-100);
}

.services-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
    align-items: end;
}

.intro-description {
    font-size: 1.125rem;
    color: var(--neutral-600);
    line-height: 1.7;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.service-item {
    display: grid;
    grid-template-columns: 100px 1fr 60px;
    gap: 2rem;
    align-items: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--neutral-300);
    transition: all 0.4s var(--ease-out-expo);
    cursor: pointer;
}

.service-item:hover {
    padding-left: 2rem;
    background: var(--white);
}

.service-num {
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 300;
    color: var(--neutral-400);
    transition: color 0.3s ease;
}

.service-item:hover .service-num {
    color: var(--primary);
}

.service-content h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 0.75rem;
}

.service-content p {
    font-size: 1rem;
    color: var(--neutral-600);
    line-height: 1.6;
}

.service-arrow {
    font-size: 2rem;
    color: var(--neutral-400);
    transition: all 0.3s ease;
}

.service-item:hover .service-arrow {
    color: var(--primary);
    transform: translateX(10px);
}

/* ========================================
   PROJECTS / PHOTO GALLERY SECTION
   ======================================== */

.projects {
    padding: 8rem 0 0;
    background: var(--white);
}

.gallery-header {
    text-align: center;
    margin-bottom: 5rem;
}

/* Masonry-style grid: 3 columns, variable row heights */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 320px;
    gap: 4px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    background: var(--neutral-900);
    cursor: zoom-in;
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s var(--ease-out-expo), filter 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
    filter: brightness(0.88);
}

.gallery-hover {
    position: absolute;
    inset: 0;
    background: rgba(183, 28, 28, 0);
    transition: background 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-hover {
    background: rgba(183, 28, 28, 0.08);
}



/* ========================================
   ABOUT SECTION
   ======================================== */

.about {
    padding: 10rem 0;
    background: var(--neutral-100);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-images {
    position: relative;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.about-img-main,
.about-img-secondary {
    border-radius: 8px;
    overflow: hidden;
}

.about-img-main {
    aspect-ratio: 3/4;
}

.about-img-secondary {
    aspect-ratio: 3/4;
    margin-top: 3rem;
}

.about-img-main img,
.about-img-secondary img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text {
    margin-bottom: 3rem;
}

.about-text p {
    font-size: 1.0625rem;
    color: var(--neutral-600);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.feature-text strong {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-900);
}

.feature-text span {
    font-size: 0.9rem;
    color: var(--neutral-600);
}


/* WhatsApp FAB */
.whatsapp-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 9000;
    text-decoration: none;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 1.05rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-fab:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: white;
}

.whatsapp-icon {
    width: 28px;
    height: 28px;
    fill: currentColor;
}


/* ========================================
   FOOTER
   ======================================== */

.footer {
    padding: 4rem 0 2rem;
    background: var(--neutral-900);
    color: var(--white);
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    height: 50px;
    margin-bottom: 1rem;
}

.footer-tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.footer-col h4 {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-legal {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--white);
}

/* ========================================
   VIDEO SHOWCASE SECTION
   ======================================== */

.video-showcase {
    padding: 10rem 0;
    background: var(--neutral-900);
}

.video-showcase-header {
    text-align: center;
    margin-bottom: 5rem;
}

.video-showcase-header .label {
    color: var(--primary-light);
}

.video-showcase-header .section-heading {
    color: var(--white);
}

.video-showcase-lead {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.video-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 16/9;
    background: var(--neutral-800);
    cursor: pointer;
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease-out-expo);
}

.video-card:hover video {
    transform: scale(1.04);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.92) 0%, rgba(10, 10, 10, 0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    transition: background 0.4s ease;
}

.video-card:hover .video-overlay {
    background: linear-gradient(to top, rgba(10, 10, 10, 0.97) 0%, rgba(10, 10, 10, 0.5) 60%, rgba(183, 28, 28, 0.15) 100%);
}

.video-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.video-title {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.video-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    max-width: 400px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
}

.video-card:hover .video-desc {
    opacity: 1;
    transform: translateY(0);
}

/* Play button on video card */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s var(--ease-out-expo), background 0.3s ease;
    z-index: 3;
    cursor: pointer;
}

.video-play-btn svg {
    margin-left: 3px;
}

.video-card:hover .video-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-card:hover .video-play-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ========================================
   VIDEO MODAL
   ======================================== */

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-out-expo), visibility 0.35s;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.video-modal-container {
    position: relative;
    z-index: 1;
    width: 90vw;
    max-width: 1100px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transform: scale(0.94) translateY(20px);
    transition: transform 0.4s var(--ease-out-expo);
}

.video-modal.active .video-modal-container {
    transform: scale(1) translateY(0);
}

.video-modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.video-modal-content video {
    width: 100%;
    border-radius: 10px;
    display: block;
    background: var(--neutral-900);
    max-height: 62vh;
    object-fit: contain;
}

.video-modal-info {
    padding: 0 0.25rem;
}

.video-modal-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.video-modal-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary-light);
}

.video-modal-counter {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.video-modal-title {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.video-modal-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.video-modal-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.video-modal-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

.video-modal-nav {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.video-modal-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.video-modal-nav:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.video-modal-nav:disabled:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}



/* ========================================
   RESPONSIVE
   ======================================== */


@media (max-width: 1024px) {

    .services-intro,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 260px;
    }

    .gallery-item.tall {
        grid-row: span 1;
    }

    .gallery-item.wide {
        grid-column: span 2;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card.featured,
    .project-card.wide {
        grid-column: span 1;
    }

    .footer-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 74px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 74px);
        background: var(--white);
        flex-direction: column;
        padding: 3rem;
        transition: left 0.4s var(--ease-out-expo);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-stats {
        position: static;
        margin-top: 4rem;
        gap: 2rem;
    }

    .service-item {
        grid-template-columns: 60px 1fr;
        gap: 1.5rem;
    }

    .service-arrow {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .about-images {
        grid-template-columns: 1fr;
    }

    .about-img-secondary {
        margin-top: 0;
    }

    .footer-nav {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .btn-hero {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
}