:root {
    --navy: #0c1a3d;
    --light-blue: #4b8bf4;
    --white: #ffffff;
    --text-dark: #333333;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;
    --radius-lg: 40px;
    --radius-md: 20px;
    color-scheme: light;
    /* Force light mode on all devices */
}

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

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

.centered-content {
    margin-left: auto;
    margin-right: auto;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: clip;
    /* clip allows sticky to work unlike hidden on iOS */
    background: #F6F1E8;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Keep header clean and make logo visible */
header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    position: sticky;
    top: 0;
    z-index: 9999;
    padding: 18px 6%;
}

.ie-header,
.main-header {
    position: sticky;
    top: 0;
    z-index: 9999;
}

/* Logo sizing */
header img,
.ie-header img {
    height: 58px !important;
    width: auto !important;
    opacity: 1 !important;
    filter: none !important;
    display: block !important;
}

@media (max-width: 768px) {

    header img,
    .ie-header img {
        height: 44px !important;
    }
}

.header-content {
    background: transparent;
    width: 100%;
    max-width: 1200px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: relative;
    margin: 0 auto;
}

.logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--navy);
    flex: 0 0 200px;
    /* Fixed width to balance header */
}

.logo-text {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.1;
}

.logo-subtext {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Links del menú (selector amplio para que funcione aunque cambien clases) */
.ie-header a,
.main-header a,
header a,
nav a {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    opacity: 0.86;
    color: var(--navy);
}

/* Separación entre items (si tu nav usa flex, esto mejora mucho) */
.ie-header nav,
.main-header nav,
header nav,
nav {
    display: flex;
    justify-content: center;
    gap: 22px;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 22px;
}

/* --- DROPDOWN NAVIGATION STRATEGY --- */
.has-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-icon {
    font-size: 0.75em;
    margin-left: 4px;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.has-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--white);
    min-width: 200px;
    padding: 15px 0;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 100;
}

.has-dropdown:hover>.dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Multi-level nested dropdowns */
.dropdown .has-dropdown {
    position: relative;
    width: 100%;
}

.dropdown .has-dropdown>.dropdown {
    top: -15px;
    /* Align with parent li */
    left: 100%;
    /* Sprout to the right */
    transform: translateX(10px) translateY(0);
}

.dropdown .has-dropdown:hover>.dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) translateY(0);
}

.dropdown li {
    width: 100%;
    padding: 0;
    margin: 0;
}

.dropdown a {
    display: block !important;
    padding: 10px 25px;
    text-align: left;
    font-size: 10px !important;
    letter-spacing: 0.15em !important;
    color: var(--navy) !important;
    white-space: nowrap;
}

.dropdown a::after {
    display: none !important;
    /* Hide the underline effect inside dropdown */
}

.dropdown a:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* Hover: subrayado fino institucional */
.ie-header a:hover,
.main-header a:hover,
header a:hover,
nav a:hover {
    opacity: 1;
}

.ie-header a::after,
.main-header a::after,
header a::after,
nav a::after {
    content: "";
    display: block;
    height: 1px;
    width: 0%;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.18);
    transition: width 0.25s ease;
}

.ie-header a:hover::after,
.main-header a:hover::after,
header a:hover::after,
nav a:hover::after {
    width: 100%;
}

/* Active state: si Antigravity añade clase active/current, esto lo deja “Maison” */
a.active,
a.current,
a[aria-current="page"] {
    opacity: 1;
}

a.active::after,
a.current::after,
a[aria-current="page"]::after {
    width: 100%;
    background: rgba(0, 0, 0, 0.28);
}

.contact-btn-container {
    flex: 0 0 200px;
    /* Same fixed width as logo */
    display: none !important;
    justify-content: flex-end;
}

.contact-btn {
    background-color: var(--navy);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(12, 26, 61, 0.2);
}

.contact-btn:hover {
    transform: translateY(-2px);
    background-color: #1a2a4d;
    box-shadow: 0 6px 20px rgba(12, 26, 61, 0.3);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--navy);
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-close {
    display: none;
}

/* Shared Section Styles */
.section-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.section-title.navy {
    color: var(--navy);
}

.section-subtitle {
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    margin-bottom: 50px;
    opacity: 0.8;
}

.section-subtitle.navy {
    color: var(--navy);
    font-weight: 600;
}

/* Detail Pages Text Styling */
.detail-text {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.detail-text p {
    margin-bottom: 20px;
}

/* Hero Guide Section */
.hero-guide {
    padding: 40px 0 0;
    width: 100%;
}

.guide-container {
    background-color: var(--navy);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 80px 40px 120px;
    text-align: center;
    color: var(--white);
    max-width: 1400px;
    margin: 0 auto;
}

/* Service Sections */
.service-section {
    padding: 100px 20px 60px;
    text-align: center;
    width: 100%;
}

/* Grids - REFINED TO ABSOLUTE CENTER */
.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    /* Constrained but wide enough for row */
    margin: 0 auto;
}

#transport-grid {
    max-width: 1100px;
    /* Force Yachts to the second row for a more aesthetic look */
}

/* 3 cards + 2 gaps roughly */
.service-card {
    flex: 0 1 300px;
    text-align: center;
}

.card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.service-card:hover .card-image {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

.card-image.placeholder {
    background-color: #eee;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.service-card h3.navy {
    color: var(--navy);
}

/* Images */
#img-beaches {
    background-image: url('beach.png');
}

#img-restaurants {
    background-image: url('restaurant.png');
}

#img-healing {
    background-image: url('healing.png');
}

.gallery-img {
    width: calc(33.33% - 20px);
    min-width: 300px;
    height: 350px;
    object-fit: cover;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gallery-img:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1024px) {
    .gallery-img {
        width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .gallery-img {
        width: 100%;
    }
}


/* Images - Hospitality (Generated) */
#h-apartment {
    background-image: url('https://images.unsplash.com/photo-1638454668466-e8dbd5462f20?auto=format&fit=crop&w=800&q=80');
}

#h-party {
    background-image: url('h-party.png');
}

#h-villa-rent {
    background-image: url('https://images.unsplash.com/photo-1757439402296-000be181e38b?auto=format&fit=crop&w=800&q=80');
}

#h-villa-sale {
    background-image: url('villa_sale_exterior.png');
}

/* Images - Transport (Stock Fallback) */
#t-airplane {
    background-image: url('https://images.unsplash.com/photo-1540962351504-03099e0a754b?auto=format&fit=crop&w=800&q=80');
}

#t-car {
    background-image: url('https://images.unsplash.com/photo-1767373926801-833d96b26c73?auto=format&fit=crop&w=800&q=80');
}

#t-drive {
    background-image: url('v_class_front.png');
}

#t-ship {
    background-image: url('https://images.unsplash.com/photo-1534447677768-be436bb09401?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
}

#t-yacht {
    background-image: url('yacht_exterior.png');
}

/* Images - Events (Stock Fallback) */
#e-bachelor {
    background-image: url('https://images.unsplash.com/photo-1544161515-4ab6ce6db874?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
}

#e-birthday {
    background-image: url('birthday_villa.png');
}

#e-party {
    background-image: url('party_pool.png');
}

#e-wedding {
    background-image: url('wedding_ceremony.png');
}

/* Images - Tailor (Stock Fallback) */
#l-charting {
    background-image: url('magical_ibiza_charting.png');
}

#l-nightclub {
    background-image: url('nightclub_entrance.png');
}


/* Contact Strip */
.contact-strip-container {
    width: 100%;
    padding: 0;
    margin-top: -50px;
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
    scroll-margin-top: 120px;
}

.contact-strip {
    background-color: var(--light-blue);
    width: 100%;
    max-width: 1000px;
    border-radius: 25px;
    padding: 30px;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 15px 35px rgba(75, 139, 244, 0.4);
    z-index: 10;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--white);
    gap: 10px;
}

.contact-item .icon {
    font-size: 1.8rem;
}

.contact-item a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Footer */
.main-footer {
    padding: 40px 60px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #666;
}

.footer-links a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
}

/* Floating Buttons */
.floating-buttons-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.floating-btn {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 45px;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
    color: white;
}

/* Luxury WhatsApp Button */
.floating-btn.whatsapp {
    background-color: #1C2E4A !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

.floating-btn.whatsapp svg,
.floating-btn.whatsapp i {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* Responsive */
@media (max-width: 768px) {

    /* Mobile Header */
    .header-content {
        padding: 0 20px;
        height: auto;
        min-height: 85px;
        align-items: center;
        justify-content: space-between;
    }

    .logo {
        flex: 1;
    }

    .logo-text {
        font-size: 1rem;
    }

    .mobile-menu-btn {
        display: block;
        position: relative;
        z-index: 1010;
        /* Alta prioridad sobre el logo */
        padding: 10px;
        /* Aumenta el hitbox */
        margin-right: -10px;
        /* Compensa el padding visualmente */
        pointer-events: auto;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        bottom: 0;
        right: -100%;
        width: 65%;
        max-width: 280px;
        height: 100vh;
        background-color: var(--white);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 80px;
        transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 1002;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu * {
        overscroll-behavior: contain;
    }

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

    .mobile-menu-close {
        position: absolute;
        top: 25px;
        right: 25px;
        font-size: 1.8rem;
        color: var(--navy);
        cursor: pointer;
        padding: 10px;
    }

    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(12, 26, 61, 0.4);
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
        backdrop-filter: blur(3px);
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu ul {
        flex-direction: column;
        width: 100%;
        padding: 0 30px 40px 30px;
        /* added bottom padding for scrolling space */
    }

    .nav-menu li {
        font-size: 1rem;
        padding: 15px 0;
        border-bottom: 1px solid #eee;
        width: 100%;
    }

    /* Mobile Dropdown Overrides - ACCORDION ANIMATION */
    .has-dropdown {
        flex-direction: column;
        align-items: flex-start;
    }

    .has-dropdown>a {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    .dropdown {
        position: static;
        box-shadow: none;
        background: transparent;
        padding: 0;
        min-width: 100%;
        transform: none !important;

        display: flex;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
    }

    .has-dropdown.active>.dropdown {
        max-height: 2000px;
        /* Increased heavily to fit all new Experiences links */
        opacity: 1;
        visibility: visible;
        margin-top: 10px;
        padding-left: 15px;
        border-left: 2px solid #eee;

    }

    .has-dropdown.active .dropdown-icon {
        transform: rotate(180deg);
    }

    .dropdown a {
        padding: 10px 0 !important;
        font-size: 1rem !important;
    }

    .contact-btn-container {
        flex: none;
    }

    .contact-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }

    /* Mobile Typography & Spacing */
    .section-title {
        font-size: 1.8rem;
        word-wrap: break-word;
        padding: 0 10px;
    }

    .section-subtitle {
        margin-bottom: 30px;
    }

    .centered-content h1.section-title {
        font-size: 2.2rem !important;
        /* Specificity for homepage hero */
    }

    /* Mobile Sections */
    .service-section {
        padding: 60px 20px 30px;
    }

    .hero-guide {
        padding-top: 20px;
    }

    /* Mobile Contact Strip */
    .contact-strip {
        flex-direction: column;
        gap: 30px;
        padding: 40px 20px;
        border-radius: 15px;
        margin: 0 20px;
        width: auto;
    }

    /* Make tap targets larger for accessibility */
    .contact-item a {
        padding: 10px;
        font-size: 1.05rem;
    }

    .footer-links a {
        padding: 10px;
        display: inline-block;
    }

    /* Gallery & Cards */
    .card-grid {
        gap: 25px;
    }

    .service-card {
        flex: 0 1 100%;
        /* Force full width on mobile */
        max-width: 400px;
        margin: 0 auto;
    }
}

/* ABOUT PAGE EDITORIAL STYLE */
.about-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 100px 40px;
    max-width: 1300px;
    margin: 0 auto;
}

.about-hero-img {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
}

.about-hero-img img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    object-fit: cover;
    aspect-ratio: 3/4;
}

.about-hero-text {
    flex: 1.2;
    min-width: 300px;
}

.about-hero-text h1 {
    font-size: 3.5rem;
    color: var(--navy);
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.about-hero-text h2 {
    font-size: 1.5rem;
    color: #c2a077;
    margin-bottom: 30px;
    font-weight: 300;
    font-style: italic;
    font-family: var(--font-serif);
}

.about-hero-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 40px;
}

.hero-ctas .btn-primary,
.closing-ctas .btn-primary {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--navy);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    transition: background 0.3s;
    margin-right: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--navy);
}

.hero-ctas .btn-primary:hover,
.closing-ctas .btn-primary:hover {
    background-color: #c2a077;
    border-color: #c2a077;
}

.hero-ctas .btn-secondary,
.closing-ctas .btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    background-color: transparent;
    border: 1px solid var(--navy);
    color: var(--navy);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.hero-ctas .btn-secondary:hover,
.closing-ctas .btn-secondary:hover {
    background-color: var(--navy);
    color: #fff;
}

.about-manifesto {
    background-color: #faf9f6;
    padding: 120px 20px;
    text-align: center;
}

.about-manifesto-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-section-title {
    font-size: 2.5rem;
    color: var(--navy);
    margin-bottom: 50px;
    font-weight: 600;
}

.about-manifesto p {
    font-size: 1.4rem;
    line-height: 2.2;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-family: var(--font-serif);
    font-style: italic;
}

.about-credentials {
    padding: 120px 40px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 80px;
    align-items: center;
}

.about-cred-img {
    flex: 1;
    min-width: 300px;
}

.about-cred-img img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.about-cred-list {
    flex: 1.2;
    min-width: 300px;
}

.about-cred-list h3 {
    text-align: left;
    margin-bottom: 40px;
}

.about-cred-list ul {
    list-style: none;
    padding: 0;
}

.about-cred-list li {
    font-size: 1.15rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    padding-left: 35px;
    position: relative;
    line-height: 1.7;
}

.about-cred-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 15px;
    height: 1px;
    background-color: #c2a077;
}

.about-services {
    background-color: #fcfcfc;
    padding: 120px 20px;
}

.about-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-service-card {
    background: #fff;
    padding: 50px 40px;
    border-radius: 0;
    border: 1px solid #f0f0f0;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
}

.about-service-card h4 {
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 25px;
    font-weight: 600;
}

.about-service-card p {
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
}

.about-difference {
    padding: 120px 40px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-difference p {
    font-size: 1.25rem;
    line-height: 2;
    color: var(--navy);
    margin-bottom: 25px;
    font-family: var(--font-serif);
}

.about-closing {
    background-color: var(--navy);
    color: #fff;
    padding: 120px 20px;
    text-align: center;
}

.about-closing p {
    font-size: 1.5rem;
    line-height: 1.9;
    margin-bottom: 50px;
    font-family: var(--font-serif);
    color: #fcfcfc;
    font-style: italic;
}

.about-closing .btn-primary {
    background-color: transparent;
    border: 1px solid #c2a077;
    color: #c2a077;
}

.about-closing .btn-primary:hover {
    background-color: #c2a077;
    color: var(--navy);
}

.about-closing .btn-secondary {
    border-color: #fff;
    color: #fff;
}

.about-closing .btn-secondary:hover {
    background-color: #fff;
    color: var(--navy);
}

@media (max-width: 768px) {
    .about-hero-text h1 {
        font-size: 2.5rem;
    }

    .about-hero-text h2 {
        font-size: 1.2rem;
    }

    .about-manifesto p {
        font-size: 1.1rem;
    }

    .about-cred-list h3 {
        text-align: center;
    }

    .about-closing p {
        font-size: 1.2rem;
    }
}

/* --- JAVASCRIPT ANIMATIONS --- */
.header-content {
    transition: height 0.3s ease, box-shadow 0.3s ease;
}

.main-header {
    transition: top 0.3s ease;
}

/* Scroll Reveal Classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1),
        transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== HOME — CHAPTERS (SOFTER, MORE EDITORIAL) ===== */

.ie-chapters {
    padding: 110px 10% 110px 10%;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.chapter-line {
    width: 44px;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.06);
    margin: 0 auto 26px auto;
}

.ie-chapters h2 {
    font-family: var(--font-serif);
    font-size: 26px;
    letter-spacing: 0.06em;
    font-weight: 500;
    margin-bottom: 14px;
    color: var(--navy);
    text-transform: uppercase;
}

.ie-chapters-intro {
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1.75;
    max-width: 720px;
    margin: 0 auto 44px auto;
    opacity: 0.85;
    color: var(--text-dark);
}

.ie-chapters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    text-align: left;
}

/* Cards: casi invisibles */
.ie-chapter {
    display: block;
    padding: 26px 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.01);
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
    color: inherit;
}

.ie-chapter:hover {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.chapter-kicker {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.55;
    margin-bottom: 12px;
    font-family: var(--font-sans);
    font-weight: 600;
}

.ie-chapter h3 {
    font-family: var(--font-serif);
    font-size: 20px;
    letter-spacing: 0.04em;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--navy);
}

.chapter-copy {
    font-family: var(--font-serif);
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.85;
    margin-bottom: 18px;
}

.chapter-cta {
    font-family: var(--font-sans);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.7;
    display: inline-block;
    font-weight: 600;
    color: var(--navy);
}

/* MOBILE */
@media (max-width: 900px) {
    .ie-chapters {
        padding: 90px 8% 90px 8%;
    }

    .ie-chapters-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ie-chapters h2 {
        font-size: 20px;
    }

    .ie-chapters-intro {
        font-size: 15px;
        margin-bottom: 34px;
    }
}

/* ===== FIX: remove injected extra nav bar (duplicate header) ===== */

.search-bar,
.top-nav,
.topnav,
.secondary-nav,
.utility-nav,
.navbar-secondary,
.header-secondary,
[class*="search-bar"],
[class*="top-nav"] {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Prevent double nav rows */
header nav+nav,
header .nav+.nav {
    display: none !important;
}

/* Clean header base */
header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* Logo ligeramente más grande (ajuste fino) */
header img,
header .logo img,
header .navbar-brand img {
    height: 78px !important;
    width: auto !important;
    transition: all 0.3s ease;
}

/* Darle aire vertical al header */
header {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Hide navy bar by color detection */
div[style*="#0B2A57"],
div[style*="rgb(11, 42, 87)"] {
    display: none !important;
}

/* ===== REMOVE INJECTED SEARCH / TOP NAV BAR ===== */

.search-bar,
.top-nav {
    display: none !important;
}

/* Ensure header stays aligned */
header {
    margin-top: 0 !important;
    position: relative;
    z-index: 10;
}

/* ===== COMPLETELY REMOVE EXTRA BLUE NAV SECTION / INJECTED WIDGETS ===== */

/* Hide any header that isn't our custom one */
header:not(.ie-header):not(.main-header),
nav:not(.nav-menu):not(.footer-links) {
    display: none !important;
}

/* Hide common 3rd-party injected widgets (Elfsight, Powr, site builder banners) */
[class*="elfsight"],
[class*="eapps"],
[class*="powr-"],
[data-elfsight-app] {
    display: none !important;
}

/* Hide any direct child of body that sits above our header (site builder injection) */
body>div:first-child:not(.menu-overlay):not(header):not(main) {
    display: none !important;
}
/* Hide captions under property cards */
.gallery h3,
.gallery h4,
.gallery p,
.property-card h3,
.property-card h4,
.property-card p {
  display: none !important;
}
