/* 
   NORTEN EMPRENDIMIENTOS - Design System 
   Style: Architectural, Minimalist, Sophisticated
*/

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette (Norten Brand Manual) */
    --color-bg: #F2F2F2;
    --color-bg-alt: #FFFFFF;
    --color-text-main: #141414;
    --color-text-muted: #4A4A4A;

    /* Accents */
    --color-primary: #2A5BAD;
    --color-primary-hover: #0D1F3C;
    --color-accent: #2A5BAD;
    --color-accent-hover: #0D1F3C;

    /* Typography */
    --font-heading: 'Open Sans', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Spacing & Utilities */
    --section-padding: 6rem 2rem;
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --border-radius-pill: 50px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Shadows - Premium Feel */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 15px 35px -5px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0,0,0,0.05);

    /* Z-index */
    --z-navbar: 900;
}

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 1.25rem;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.7;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--color-text-main);
}

p {
    color: var(--color-text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* Base Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    z-index: var(--z-navbar);
    transition: var(--transition-smooth);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    padding: 1rem 2rem;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo-wrapper {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 48px;
    transition: var(--transition-smooth);
    /* By default on transparent nav on Blue Hero, invert the logo to white */
    filter: brightness(0) invert(1);
}

.navbar.scrolled .logo-img {
    /* Keep it white but with primary background or revert to blue? Let's just colorize it blue */
    filter: brightness(0) invert(37%) sepia(87%) saturate(1750%) hue-rotate(193deg) brightness(85%) contrast(98%);
    /* This filter makes black approx #246DCA */
}

/* Scroll Progress Bar */
.scroll-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.navbar.scrolled .scroll-progress-container {
    opacity: 1;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--color-accent);
}

/* Primary Button */
.btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-primary);
    color: #fff;
    padding: 0.9rem 2.2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    border-radius: var(--border-radius-pill);
    box-shadow: var(--shadow-sm);
    text-align: center;
    white-space: normal;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Secondary Button */
.btn-secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    color: #fff;
    padding: 0.9rem 2.2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: var(--transition-fast);
    border-radius: var(--border-radius-pill);
    text-align: center;
}

.btn-secondary:hover {
    background-color: #fff;
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Base Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-padding);
}

.bg-alt {
    background-color: var(--color-bg-alt);
}

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

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Reveal classes for intersection observer */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 6rem 2rem 3rem;
    position: relative;
    background: linear-gradient(135deg, #0D1F3C 0%, #2A5BAD 100%);
    overflow: hidden;
}

/* Optional pattern for the hero to make it sophisticated */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.4;
    z-index: 0;
}

.hero-content {
    max-width: 900px;
    z-index: 10;
    position: relative;
}

.hero-logo-big {
    height: 120px;
    margin-bottom: 2.5rem;
    filter: brightness(0) invert(1);
    /* Native CSS animation for LCP */
    opacity: 0;
    animation: fadeUpNative 0.8s ease-out forwards;
}

@keyframes fadeUpNative {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: #fff;
    opacity: 0;
    animation: fadeUpNative 0.8s ease-out 0.2s forwards;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeUpNative 0.8s ease-out 0.4s forwards;
}

.hero-buttons {
    opacity: 0;
    animation: fadeUpNative 0.8s ease-out 0.6s forwards;
}

/* Property Listings / Cards */
.properties-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

.property-card {
    background: var(--color-bg-alt);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    box-shadow: var(--shadow-float);
    transform: translateY(-8px);
    border-color: rgba(36, 109, 202, 0.15);
}

.property-image-wrapper {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.property-card:hover .property-image {
    transform: scale(1.05);
}

.property-badge-vertical {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 45px;
    background-color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0.9;
}

.property-badge-vertical span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--color-text-main);
    letter-spacing: 2px;
    font-size: 1rem;
    text-transform: uppercase;
}

.property-details {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.property-location {
    font-size: 0.8rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.property-name {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.property-address {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.property-description {
    margin-bottom: 2rem;
    flex-grow: 1;
}

.property-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.tag {
    background-color: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius-pill);
    font-weight: 500;
    border: 1px solid rgba(0,0,0,0.05);
}

/* WhatsApp section */
.whatsapp-widget-section {
    padding: 6rem 0;
    display: flex;
    justify-content: center;
    background-color: var(--color-bg-alt);
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Footer (Matching Guarida X minimalist style) */
.footer {
    background-color: #0D1F3C; /* Brand Navy Blue */
    color: #fff;
    padding: 5rem 0 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    margin: 0;
}

/* Media Queries for layout */
@media (min-width: 768px) {
    .hero h1 {
        font-size: 4.5rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 1024px) {
    .property-card {
        flex-direction: row;
    }
    
    .property-image-wrapper {
        width: 45%;
        height: auto;
        min-height: 400px;
    }
    
    .property-details {
        width: 55%;
    }
}

/* ===== NEW COMPONENTS: GRAN DEPSAL ====== */

/* Image Carousel */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    height: 100%;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    cursor: zoom-in;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition-fast);
    z-index: 10;
    color: var(--color-text-main);
}

.carousel-btn:hover {
    background: #fff;
    color: var(--color-primary);
    transform: translateY(-50%) scale(1.05);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: var(--transition-fast);
}

.indicator.active {
    background: #fff;
    transform: scale(1.2);
}

/* Details Grid */
.details-grid-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    background: var(--color-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    border: 1px solid rgba(0,0,0,0.03);
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 1rem;
    color: var(--color-text-main);
    font-weight: 500;
}

.detail-ref {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    font-style: italic;
}

/* Amenities Grid */
.amenities-section {
    margin-bottom: 2rem;
}

.amenities-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--color-text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 0.5rem;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.8rem;
}

.amenities-grid span {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
}

.check-icon {
    color: var(--color-primary);
    font-weight: 800;
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* Modal Lightbox */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.image-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: 300;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
}

.modal-content img {
    margin: auto;
    display: block;
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-float);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {transform:scale(0.9); opacity:0;}
    to {transform:scale(1); opacity:1;}
}

/* Expandable content toggle */
.expand-btn {
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    transition: var(--transition-fast);
}

.expand-btn:hover {
    color: var(--color-primary-hover);
}

.expand-btn .arrow-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.expand-btn.active .arrow-icon {
    transform: rotate(180deg);
}

.expandable-content {
    display: none;
    margin-top: 1rem;
    animation: fadeDown 0.4s ease forwards;
}

.expandable-content.expanded {
    display: block;
}

/* Mobile Overrides (must be at the end for proper cascade) */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
    .property-details {
        padding: 1.5rem 1.25rem;
    }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal Navigation */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 3rem;
    cursor: pointer;
    padding: 1rem;
    transition: var(--transition-fast);
    z-index: 10001;
}

.modal-nav:hover {
    color: #fff;
}

.modal-prev {
    left: 1rem;
}

.modal-next {
    right: 1rem;
}

@media (max-width: 768px) {
    .modal-nav {
        font-size: 2rem;
        padding: 0.5rem;
    }
}
