/* ========================================
   CONTRAVIENTO PINAMAR — Apple-inspired
   ======================================== */

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

:root {
    --white: #fafafa;
    --black: #1d1d1f;
    --gray: #86868b;
    --gray-light: #f5f5f7;
    --warm: #a78b6b;
    --warm-light: #f5efe8;
    --green-wa: #25D366;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--black);
    background: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

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

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

/* ========== NAV ========== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    transition: var(--transition);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.nav-logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: var(--transition);
}

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

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

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav.scrolled .nav-links a {
    color: var(--gray);
}

.nav-links a:hover {
    color: #fff;
}

.nav.scrolled .nav-links a:hover {
    color: var(--black);
}

.nav-cta {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px !important;
    border-radius: 980px;
    backdrop-filter: blur(8px);
}

.nav.scrolled .nav-cta {
    background: var(--black) !important;
    color: #fff !important;
}

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

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    transition: var(--transition);
    border-radius: 2px;
}

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

/* ========== HERO ========== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-slider .swiper-slide {
    overflow: hidden;
}

.hero-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 6s ease-out;
}

.hero-slider .swiper-slide-active img {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12vh;
    z-index: 2;
}

.hero-content {
    text-align: center;
    color: #fff;
}

.hero-content h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.95;
    margin-bottom: 16px;
}

.hero-content h1 span {
    font-weight: 300;
    opacity: 0.9;
}

.hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 32px;
    letter-spacing: 0.01em;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 980px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn {
    background: #fff;
    color: var(--black);
}

.btn:hover {
    background: var(--gray-light);
    transform: scale(1.02);
}

.btn-whatsapp {
    background: var(--green-wa);
    color: #fff;
    font-size: 1.1rem;
    padding: 18px 36px;
}

.btn-whatsapp:hover {
    background: #20bd5a;
    color: #fff;
}

.btn-whatsapp svg {
    width: 22px;
    height: 22px;
}

.btn-email {
    background: var(--gray-light);
    color: var(--black);
}

.btn-email:hover {
    background: #e8e8ed;
}

/* ========== INTRO ========== */
.intro {
    padding: 120px 0;
}

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

.intro-text h2 {
    margin-bottom: 24px;
}

.intro-text p {
    font-size: 1.2rem;
    color: var(--gray);
    line-height: 1.7;
    font-weight: 300;
}

.intro-highlights {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.highlight {
    text-align: center;
}

.highlight-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--warm);
}

.highlight-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 8px;
    font-weight: 400;
}

/* ========== GALLERY ========== */
.gallery {
    padding: 80px 0 120px;
    background: var(--gray-light);
}

.gallery h2 {
    text-align: center;
    margin-bottom: 48px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 8px;
}

.gallery-item {
    overflow: hidden;
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Fotos verticales/problemáticas: ajustar posición */
.gallery-item[data-pos="top"] img { object-position: center top; }
.gallery-item[data-pos="bottom"] img { object-position: center bottom; }

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

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

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

/* ========== SPACES ========== */
.spaces {
    padding: 120px 0;
}

.spaces h2 {
    text-align: center;
    margin-bottom: 72px;
}

/* Tour guiado — filas alternadas */
.space-row {
    display: flex;
    gap: 48px;
    align-items: center;
    margin-bottom: 80px;
}

.space-row:last-child {
    margin-bottom: 0;
}

.space-row--reverse {
    flex-direction: row-reverse;
}

.space-row-photo {
    flex: 1.2;
}

.space-row-photo a {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    height: 520px;
    background: #f5f3f0;
}

.space-row-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.6s ease;
}

.space-row-photo a:hover img {
    transform: scale(1.02);
}

.space-row-text {
    flex: 0.8;
}

.space-row-text h3 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.space-row-text p {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.7;
}

.space-row-text--center {
    text-align: center;
}

.space-cta {
    display: inline-block;
    margin-top: 20px;
    color: var(--warm);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.space-cta:hover {
    opacity: 0.7;
}

/* Dormitorios — 3 fotos en fila */
.space-row--dormitorios {
    flex-direction: column;
    gap: 32px;
}

.space-dormitorios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

.space-dormitorio-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.space-dormitorio-item a {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    height: 400px;
    background: #f5f3f0;
}

.space-dormitorio-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.6s ease;
}

.space-dormitorio-item a:hover img {
    transform: scale(1.02);
}

.space-dormitorio-label {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray);
    letter-spacing: 0.02em;
}

/* Hidden lightbox links — not display:none so GLightbox can find them */
.space-gallery-hidden {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}


/* ========== AMENITIES ========== */
.amenities {
    padding: 100px 0;
    background: var(--gray-light);
}

.amenities h2 {
    text-align: center;
    margin-bottom: 56px;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.amenity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 16px;
    background: #fff;
    border-radius: var(--radius);
    transition: var(--transition);
}

.amenity:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.amenity svg {
    width: 32px;
    height: 32px;
    color: var(--warm);
}

.amenity span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray);
    text-align: center;
}

/* ========== AVAILABILITY ========== */
.availability {
    padding: 120px 0;
}

.avail-box {
    background: var(--black);
    color: #fff;
    border-radius: 24px;
    padding: 64px;
    text-align: center;
}

.avail-box h2 {
    color: #fff;
    margin-bottom: 8px;
}

.avail-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.avail-note {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    margin-bottom: 32px;
}

.avail-note-bottom {
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
}

.avail-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.avail-tab {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    padding: 12px 36px;
    border-radius: 980px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.avail-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
}

.avail-tab--active {
    background: #fff;
    color: var(--black);
    border-color: #fff;
}

.avail-tab--active:hover {
    background: #fff;
    color: var(--black);
}

.avail-month {
    display: none;
}

.avail-month--active {
    display: block;
}

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

.avail-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 32px;
}

.avail-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.avail-badge::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.avail-badge--available::before { background: #34c759; }
.avail-badge--reserved::before { background: #ff3b30; }
.avail-badge--consult::before { background: #ff9f0a; }

.avail-item {
    display: block;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.avail-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.avail-item[data-status="reserved"] {
    opacity: 0.5;
    pointer-events: none;
}

.avail-action {
    display: block;
    margin-top: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #34c759;
    opacity: 0.7;
    transition: var(--transition);
}

.avail-item:hover .avail-action {
    opacity: 1;
}

.avail-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-bottom: 8px;
}

.avail-item[data-status="available"] .avail-status { background: #34c759; }
.avail-item[data-status="reserved"] .avail-status { background: #ff3b30; }
.avail-item[data-status="consult"] .avail-status { background: #ff9f0a; }

.avail-period {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.avail-dates {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}


/* ========== CONTACT ========== */
.contact {
    padding: 120px 0;
    text-align: center;
}

.contact h2 {
    margin-bottom: 16px;
}

.contact-sub {
    color: var(--gray);
    font-size: 1.15rem;
    font-weight: 300;
    margin-bottom: 40px;
}

.contact-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-phone {
    margin-top: 32px;
}

.contact-phone a {
    color: var(--gray);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    transition: var(--transition);
}

.contact-phone a:hover {
    color: var(--black);
}

/* ========== LOCATION ========== */
.location {
    padding: 80px 0 120px;
    background: var(--gray-light);
}

.location h2 {
    text-align: center;
}

.location-sub {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 40px;
}

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

/* ========== FAQ ========== */
.faq {
    padding: 100px 0;
}

.faq h2 {
    text-align: center;
    margin-bottom: 48px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.faq-item summary {
    padding: 24px 0;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--gray);
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    color: var(--warm);
}

.faq-item p {
    padding: 0 0 24px;
    color: var(--gray);
    line-height: 1.7;
    font-size: 0.95rem;
}

.faq-item a {
    color: var(--warm);
    text-decoration: none;
    font-weight: 500;
}

.faq-item a:hover {
    text-decoration: underline;
}

/* ========== PINAMAR INFO ========== */
.pinamar-info {
    padding: 100px 0;
    background: var(--warm-light);
}

.pinamar-info h2 {
    text-align: center;
}

.pinamar-sub {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

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

.pinamar-card {
    background: #fff;
    padding: 32px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.pinamar-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.pinamar-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.pinamar-card p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.pinamar-card a {
    color: var(--warm);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.pinamar-card a:hover {
    text-decoration: underline;
}

/* ========== FOOTER ========== */
.footer {
    padding: 48px 0;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-brand {
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 16px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.footer-social a {
    color: var(--gray);
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--black);
}

.footer-social svg {
    width: 24px;
    height: 24px;
}

.footer p,
.footer-note,
.footer-copy {
    font-size: 0.8rem;
    color: var(--gray);
    opacity: 0.6;
}

.footer-note {
    margin-bottom: 4px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 200px;
    }

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

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 40px;
        gap: 24px;
        transition: right 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        color: var(--black) !important;
        font-size: 1.1rem;
    }

    .nav-cta {
        background: var(--black) !important;
        color: #fff !important;
    }

    .nav-toggle {
        display: flex;
        z-index: 101;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
        background: var(--black);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
        background: var(--black);
    }

    .hero {
        min-height: 100svh;
    }

    .hero-overlay {
        padding-bottom: 15vh;
    }

    .intro {
        padding: 80px 0;
    }

    .intro-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .intro-highlights {
        justify-content: space-around;
    }

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

    .gallery-item--wide,
    .gallery-item--tall {
        grid-column: auto;
        grid-row: auto;
    }

    .space-row,
    .space-row--reverse {
        flex-direction: column;
        gap: 24px;
    }

    .space-row-photo a {
        height: 360px;
    }

    .space-row-text h3 {
        font-size: 1.4rem;
    }

    .space-row-text--center {
        text-align: left;
    }

    .space-dormitorios-grid {
        gap: 8px;
    }

    .space-dormitorio-item a {
        height: 280px;
    }

    .space-dormitorio-label {
        font-size: 0.75rem;
    }

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

    .avail-box {
        padding: 40px 24px;
        border-radius: var(--radius);
    }

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

    .availability,
    .contact,
    .spaces,
    .pinamar-info,
    .faq {
        padding: 80px 0;
    }

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

    .avail-legend {
        flex-wrap: wrap;
        gap: 12px;
    }
}

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

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }

    .amenities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .amenity {
        padding: 24px 12px;
    }

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