:root {
    --bg-color: #ffffff;
    --bg-secondary: #f9f9f9;
    --text-main: #1d1d1f;
    --text-muted: #6e6e73;
    --accent: #0071e3;
    --accent-light: #e8f2ff;
    --white: #ffffff;
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.05);
    --shadow-bold: 0 10px 40px rgba(0,0,0,0.1);
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Header offset */
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-color);
    padding-top: 80px; /* Offset for fixed header */
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.dark-section {
    background-color: var(--bg-secondary);
}

/* Nav */
#main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-weight: 400;
    font-size: 1.45rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0;
    color: var(--text-main);
    text-transform: lowercase;
}

.logo b {
    font-weight: 700;
    color: #ef4444;
    text-transform: uppercase;
}

.logo span.com {
    font-weight: 300;
    opacity: 0.6;
    font-size: 0.9rem;
    margin-top: 4px;
}


nav a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    margin: 0 1.2rem;
    font-weight: 400;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent);
}

.nav-cta {
    background: var(--text-main);
    color: white !important;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Hero */
.hero {
    min-height: 100vh;
    padding-top: 80px; /* Offset for fixed header */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?q=80&w=2070&auto=format&fit=crop') center/cover no-repeat;
    position: relative;
    color: white;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-fallback {
    background: linear-gradient(135deg, #1d1d1f 0%, #434343 100%) !important;
}

.map-placeholder {
    color: #ccc;
    font-size: 3rem;
    background: #f5f5f7;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.btn-primary {
    background: var(--white);
    color: var(--text-main);
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, background 0.3s;
    display: inline-block;
}

.btn-primary:hover {
    transform: scale(1.05);
    background: var(--bg-secondary);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.main-text h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.rich-text {
    font-size: 1.15rem;
    color: var(--text-muted);
    white-space: pre-line;
}

/* Stat Cards */
.quick-stats {
    display: grid;
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.price-highlight {
    background: #1d1d1f;
    color: white;
}

.price-highlight i {
    color: #ef4444 !important;
}

.price-highlight label {
    color: rgba(255,255,255,0.6);
}

.stat-card i {
    color: var(--accent);
    margin-bottom: 1rem;
    width: 24px;
    height: 24px;
}

.stat-card span {
    display: block;
    font-size: 1.8rem;
    font-weight: 600;
}

.stat-card label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 360 Viewer Section */
.recorrido-section {
    padding: 4rem 0;
    background: #000;
    color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.section-header h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

#viewer-container {
    width: 100%;
    height: 70vh;
    min-height: 450px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

#panorama {
    width: 100%;
    height: 100%;
}

.viewer-overlay {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 40px;
    z-index: 100;
    min-width: 300px;
}

/* Privacy Blur Style */
/* Viewport Fog (Full Screen Censorship) */
#viewport-blur {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    background: rgba(255,255,255,0.2);
    z-index: 2000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pnlm-privacy-block {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50% !important;
    width: 60px !important;
    height: 60px !important;
    margin-left: -30px !important;
    margin-top: -30px !important;
    cursor: default !important;
}

.pnlm-privacy-block.large {
    width: 200px !important;
    height: 200px !important;
    margin-left: -100px !important;
    margin-top: -100px !important;
}

.pnlm-privacy-block.fullscreen {
    width: 1000px !important;
    height: 1000px !important;
    margin-left: -500px !important;
    margin-top: -500px !important;
    border-radius: 0 !important;
    transform-origin: center center;
    transition: transform 0.1s linear;
}

.overlay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.scene-switcher {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
}

.scene-switcher option {
    background: #222;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.feature-col h4 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.feature-col ul {
    list-style: none;
}

.feature-col li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.feature-col li::before {
    content: "•";
    color: var(--accent);
    font-weight: bold;
    margin-right: 1rem;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 4rem;
    border: 2px dashed #eee;
    border-radius: var(--radius);
}

.gallery-item {
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    background: #f5f5f7;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    transition: background 0.2s, color 0.2s;
}

.page-btn:hover {
    background: #e5e5ea;
}

.page-btn.active {
    background: var(--text-main);
    color: white;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.lightbox.hidden {
    opacity: 0;
    pointer-events: none;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 3010;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    font-size: 2.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 5px;
    z-index: 3010;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    background: rgba(0,0,0,0.5);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
}

/* Location Card */
.location-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-bold);
}

.location-info {
    padding: 4rem;
}

.location-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.travel-time {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    font-size: 1.1rem;
}

.btn-waze {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #000;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-waze:hover {
    transform: translateY(-3px);
}

.location-visual {
    background: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-placeholder {
    color: #ccc;
    font-size: 4rem;
}

/* Footer */
footer {
    background: var(--text-main);
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 4rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* Loader */
#full-page-loader {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#full-page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Fixes */
@media (max-width: 768px) {
    .content-grid, .location-card, .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 { font-size: 2.5rem; }
    #main-nav nav { display: none; }
    .location-info { padding: 2rem; }
}

/* Floating WhatsApp */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 2500;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-whatsapp:hover {
    transform: scale(1.15) rotate(5deg);
}

.floating-whatsapp img {
    width: 35px;
    height: 35px;
}

/* iOS Pseudo-Fullscreen Fix */
#viewer-container.pseudo-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    background: #000;
}

#viewer-container.pseudo-fullscreen #panorama {
    height: 100% !important;
}

#viewer-container.pseudo-fullscreen .overlay-row {
    padding-top: env(safe-area-inset-top, 20px);
}

.custom-fs-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.custom-fs-btn:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.9);
}

/* Hide native FS button on iOS if we are using the custom one */
.pnpm-ios-hide .pnlm-fullscreen-toggle-button {
    display: none !important;
}
