/* ===== Variables ===== */
:root {
    --green: #003c59;
    --green-light: #0a4d6e;
    --forest: #395f49;
    --sand: #dfd7cd;
    --sand-light: #eae4dc;
    --terracotta: #c2855f;
    --terracotta-dark: #a8714d;
    --cream: #FAF8F5;
    --dark: #3c3c3b;
    --dark-light: #5a5a59;
    --white: #FFFFFF;

    --font-heading: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Lato', -apple-system, sans-serif;

    --nav-height: 72px;
}

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    background: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ===== Utilities ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--terracotta);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--terracotta-dark);
    transform: translateY(-1px);
}

.btn-full {
    width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 600;
    color: var(--green);
    line-height: 1.2;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background: var(--terracotta);
    margin: 20px auto 0;
    opacity: 0.6;
}

.section-subtitle {
    margin-top: 16px;
    font-size: 1.05rem;
    color: var(--dark-light);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--white);
    transition: color 0.3s ease;
}

.nav.scrolled .nav-logo {
    color: var(--green);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-menu a {
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s ease;
    letter-spacing: 0.01em;
}

.nav.scrolled .nav-menu a {
    color: var(--dark-light);
}

.nav-menu a:hover {
    color: var(--white);
}

.nav.scrolled .nav-menu a:hover {
    color: var(--green);
}

.nav-cta {
    padding: 8px 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav.scrolled .nav-cta {
    border-color: var(--terracotta);
    color: var(--terracotta) !important;
}

.nav-cta:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav.scrolled .nav-cta:hover {
    background: var(--terracotta);
    color: var(--white) !important;
}

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

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

.nav.scrolled .nav-toggle span {
    background: var(--dark);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@supports (-webkit-touch-callout: none) {
    .hero-bg { background-attachment: scroll; }
}

@media (min-width: 769px) {
    .hero-bg { background-attachment: fixed; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.15) 40%,
        rgba(0, 0, 0, 0.4) 100%
    );
}

.hero-content {
    position: relative;
    text-align: center;
    color: var(--white);
    padding: 0 24px;
}

.hero-location {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 16px;
    opacity: 0.9;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 16px;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 24px;
}

.hero-price {
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 32px;
    opacity: 0.95;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
}

.hero-scroll span {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero-scroll-line {
    width: 1px;
    height: 40px;
    background: var(--white);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ===== Highlights ===== */
.highlights {
    padding: 64px 0;
    background: var(--white);
    border-top: 3px solid var(--terracotta);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
    text-align: center;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.highlight-icon {
    width: 32px;
    height: 32px;
    color: var(--terracotta);
    margin-bottom: 4px;
}

.highlight-value {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--green);
}

.highlight-label {
    font-size: 0.78rem;
    color: var(--dark-light);
    letter-spacing: 0.03em;
}

/* ===== About ===== */
.about {
    padding: 96px 0;
    background: var(--cream);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
    margin-bottom: 64px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.02rem;
    color: var(--dark-light);
    line-height: 1.75;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-features h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--green);
    margin-bottom: 20px;
}

.feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.95rem;
    color: var(--dark-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--terracotta);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Price callout */
.price-callout {
    background: linear-gradient(135deg, #002a40 0%, var(--green) 60%, #0a4d6e 100%);
    border-radius: 8px;
    padding: 44px 52px;
    box-shadow: 0 8px 32px rgba(0, 60, 89, 0.25);
}

.price-callout-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.price-label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.price-amount {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--white);
}

.price-amount small {
    font-size: 0.5em;
    font-weight: 400;
    opacity: 0.8;
}

.price-mxn {
    display: block;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

/* ===== Gallery ===== */
.gallery {
    padding: 96px 0;
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.gallery-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0) 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ===== Location ===== */
.location {
    padding: 96px 0;
    background: var(--cream);
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.location-text p {
    font-size: 1.02rem;
    color: var(--dark-light);
    line-height: 1.75;
    margin-bottom: 20px;
}

.location-highlights {
    margin-top: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.location-highlight {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.location-highlight strong {
    font-size: 0.95rem;
    color: var(--green);
}

.location-highlight span {
    font-size: 0.85rem;
    color: var(--dark-light);
    line-height: 1.4;
}

.location-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.location-map iframe {
    display: block;
}

/* ===== Contact ===== */
.contact {
    padding: 96px 0;
    background: var(--sand-light);
    position: relative;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.contact-agent {
    padding: 48px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.contact-agent h3 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.agent-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 4px;
}

.agent-group {
    font-size: 1rem;
    color: var(--dark-light);
    margin-bottom: 28px;
}

.agent-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agent-link {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.95rem;
    color: var(--dark-light);
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.agent-link:last-child {
    border-bottom: none;
}

.agent-link:hover {
    color: var(--terracotta);
    padding-left: 4px;
}

.agent-link svg {
    flex-shrink: 0;
    color: var(--terracotta);
}

.contact-form-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.contact-form-wrap .btn {
    padding: 18px 48px;
    font-size: 1.05rem;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(194, 133, 95, 0.3);
    max-width: 100%;
    box-sizing: border-box;
}

.contact-form-wrap .btn:hover {
    box-shadow: 0 6px 24px rgba(194, 133, 95, 0.4);
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(160deg, #002a40 0%, var(--green) 50%, #002a40 100%);
    color: var(--white);
    padding: 56px 0 28px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 28px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.footer-brand p {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.6;
    margin-top: 6px;
}

.footer-links a {
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 2px;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 0.78rem;
    opacity: 0.4;
    letter-spacing: 0.03em;
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 2px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 10;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    padding: 16px;
    z-index: 10;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

    .location-map {
        order: -1;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(250, 248, 245, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu a {
        color: var(--dark) !important;
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: 0.02em;
    }

    .nav-cta {
        border-color: var(--terracotta) !important;
        color: var(--terracotta) !important;
        text-align: center;
    }

    .highlights-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px 16px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contact-agent {
        padding: 28px;
    }

    .contact-form-wrap .btn {
        padding: 16px 32px;
        font-size: 1rem;
    }

    .price-callout {
        padding: 32px 24px;
    }

    .price-callout-inner {
        flex-direction: column;
        text-align: center;
    }

    .location-highlights {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}
