/* =========================================
   VARIABLES & DESIGN SYSTEM (INTER STYLE)
   ========================================= */
:root {
    /* Colors - Keeping Client Brand but Modernized */
    --color-bg-body: #f5f7fa;
    /* Light Gray Background */
    --color-bg-white: #ffffff;
    --color-white: #ffffff;
    --color-bg-soft: #edf2f7;

    --color-navy: #0a192f;
    /* Primary Brand */
    --color-navy-light: #1e3a5f;
    --color-navy-dark: #020c1b;

    --color-gold: #d4af37;
    /* Accent */
    --color-gold-light: #fdf3d0;

    --color-text-main: #1f2937;
    --color-text-light: #6b7280;
    --color-border: #e2e8f0;

    /* Design Tokens - SUPER APP STYLE */
    --radius-sm: 8px;
    --radius-md: 16px;
    /* Cards Padrão */
    --radius-lg: 24px;
    /* Seções/Cards Destaque */
    --radius-pill: 50px;
    /* Botões */

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 30px rgba(10, 25, 47, 0.1);

    --font-heading: 'Inter', sans-serif;
    /* Inter uses Sans Serif for everything mostly */
    --font-body: 'Inter', sans-serif;

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

a {
    color: inherit;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius-md);
}

.container {
    width: 90%;
    max-width: 1240px;
    /* Wider container for modern look */
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    font-weight: 700;
    letter-spacing: -0.02em;
    /* Tight tracking like Inter */
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}

.section-header {
    margin-bottom: 3rem;
    max-width: 700px;
}

.text-gold {
    color: var(--color-gold);
}

.text-center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   BUTTONS & PILLS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--color-navy);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-gold);
    color: var(--color-navy);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--color-bg-white);
    color: var(--color-navy);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-navy);
    background-color: var(--color-bg-soft);
}

/* =========================================
   HEADER & NAV
   ========================================= */
header {
    background-color: var(--color-bg-white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-navy);
    letter-spacing: -0.03em;
}

.nav-menu ul {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--color-text-main);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--color-gold);
}

.mobile-only-btn {
    display: none;
}

@media (max-width: 768px) {
    .header-btn-desktop {
        display: none !important;
    }

    .mobile-only-btn {
        display: block;
        margin-top: 1rem;
    }
}

/* Desktop Dropdown - Cleaner */
.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(10, 25, 47, 0.12), 0 0 0 1px rgba(10, 25, 47, 0.05);
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.25rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;
    border: none;
    z-index: 1100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    padding: 0.75rem 1rem;
    display: block;
    text-align: left;
    color: var(--color-navy);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 0;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    line-height: 1.2;
}

.dropdown-menu li:first-child a {
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
}

.dropdown-menu li:last-child a {
    border-bottom: none;
    border-bottom-left-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}

.dropdown-menu a:hover {
    background-color: var(--color-bg-soft);
    color: var(--color-gold);
    padding-left: 1.25rem;
    transform: translateX(4px);
}

.dropdown-menu li:not(:last-child) {
    margin-bottom: 2px;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    padding: 4rem 0;
    background-color: var(--color-bg-body);
    overflow: hidden;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.badge {
    background-color: var(--color-gold-light);
    color: var(--color-navy);
    /* Contraste melhorado */
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-image-container {
    position: relative;
    height: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   BENTO GRID (PRODUTOS)
   ========================================= */
.section {
    padding: 5rem 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, minmax(250px, auto));
    gap: 1.5rem;
}

/* Bento Cells */
.bento-card {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-border);
}

/* Featured cards expand */
.card-lg {
    grid-column: span 2;
    background-color: var(--color-navy);
    color: var(--color-white);
}

.card-lg h3,
.card-lg p,
.card-lg div,
.card-lg i {
    color: var(--color-white) !important;
}

.card-lg .icon-box {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-gold) !important;
}

.card-lg .icon-box i {
    color: var(--color-gold) !important;
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: var(--color-bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--color-navy);
    margin-bottom: 1.5rem;
}

.bento-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.bento-card p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.card-arrow {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    /* width: 32px;  Removed fixed width */
    height: 32px;
    padding: 0 1rem;
    /* Added padding for text */
    border-radius: var(--radius-pill);
    /* Changed to pill */
    background-color: var(--color-bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--color-navy);
    gap: 0.5rem;
    /* Space between text and icon */
    font-weight: 600;
    font-size: 0.85rem;
}

.card-lg .card-arrow {
    background-color: var(--color-gold);
    color: var(--color-navy);
}

.bento-card:hover .card-arrow {
    /* transform: rotate(-45deg); Removed rotation because of text */
    background-color: var(--color-navy);
    color: #ffffff !important;
}

.card-lg:hover .card-arrow {
    background-color: var(--color-white);
    color: var(--color-navy) !important;
}

.card-agro:hover .card-arrow {
    background-color: #ffffff !important;
    color: #2e7d32 !important;
    animation: text-blink 1s infinite ease-in-out;
}


/* =========================================
   SERVICES STRIP
   ========================================= */
.services-strip {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    text-align: center;
    margin-top: -2rem;
    /* Overlap effect if needed */
    box-shadow: var(--shadow-soft);
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.service-item:hover {
    background-color: var(--color-bg-soft);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background-color: var(--color-bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-navy);
    transition: var(--transition);
}

.service-item:hover .service-icon {
    background-color: var(--color-navy);
    color: var(--color-gold);
}

.service-item span {
    font-weight: 600;
    font-size: 0.95rem;
}

/* =========================================
   CONTACT & FOOTER
   ========================================= */
.contact-section {
    background-color: var(--color-navy);
    color: var(--color-white);
    border-radius: var(--radius-lg);
    margin: 4rem auto;
    overflow: hidden;
    /* For inner border radius */
    padding: 4rem;
}

.contact-section h2,
.contact-section p,
.contact-section span,
.contact-section div {
    color: var(--color-white);
}

.contact-section i {
    color: var(--color-gold);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--color-white);
    margin-bottom: 1rem;
    font-family: var(--font-body);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--color-gold);
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* =========================================
   MOBILE
   ========================================= */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    width: 24px;
    height: 2px;
    background: var(--color-navy);
    margin: 6px 0;
    border-radius: 2px;
}

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .card-lg {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .hero-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-badges {
        justify-content: center;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu ul {
        display: none;
        /* Mobile menu logic in JS remains */
        flex-direction: column;
        background: var(--color-bg-white);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 2rem;
        box-shadow: var(--shadow-hover);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    .nav-menu.active ul {
        display: flex;
    }

    .bento-grid {
        display: flex;
        flex-direction: column;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-section {
        padding: 2rem;
        width: 100%;
        border-radius: 0;
    }
}

/* =========================================
   CONTRAST FIXES (FINAL OVERRIDES)
   ========================================= */

/* Force white text on Dark Cards */
.card-lg,
.card-lg *,
.card-lg h3,
.card-lg p,
.card-lg i,
.card-lg span,
.card-lg div {
    color: #ffffff !important;
}

/* Restore Gold-colored elements explicitly if needed, but prioritize readability first */
.card-lg .icon-box {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.card-lg .icon-box i {
    color: #d4af37 !important;
    /* Gold */
}

/* Force white text on Contact Section */
.contact-section,
.contact-section *,
.contact-section h2,
.contact-section p,
.contact-section span,
.contact-section a,
.contact-section label {
    color: #ffffff !important;
}

/* Restore Gold icons in Contact */
.contact-section i {
    color: #d4af37 !important;
}

/* Fix Input Text Color (Dark Text on White/Light Input) */
.contact-section input,
.contact-section select,
.contact-section option,
.contact-section textarea {
    color: #333333 !important;
    /* Dark text for typing */
    background-color: #ffffff !important;
    /* White background for inputs */
}

.contact-section input::placeholder,
.contact-section textarea::placeholder {
    color: #888888 !important;
}

/* FIX BUTTON TEXT VISIBILITY */
.contact-section .btn,
.contact-section button {
    color: #0a192f !important;
    /* Navy text on Gold button */
    font-weight: 700 !important;
}

.hero .badge {
    color: #0a192f !important;
    /* Ensure badge text is readable */
}

/* FINAL BUTTON VISIBILITY FIX */
.btn-primary,
a.btn-primary {
    color: #ffffff !important;
}

.btn-primary:hover,
a.btn-primary:hover {
    color: #0a192f !important;
}

/* =========================================
   REAL ESTATE MODULE (IMÓVEIS)
   ========================================= */

/* SEARCH BOX */
.search-box {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    margin-top: 2rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    align-items: end;
}

.form-group label {
    display: block;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-navy);
}

.search-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-body);
    color: var(--color-text-main);
    font-family: var(--font-body);
}

.search-btn {
    width: 100%;
    background-color: var(--color-gold);
    color: var(--color-navy);
}

/* IMÓVEIS GRID */
.imoveis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.property-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.property-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    position: relative;
}

.property-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--color-gold);
    color: var(--color-navy);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.property-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.property-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.property-location {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.property-features {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.property-features span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* DETAILS PAGE */
.gallery-container {
    margin-bottom: 3rem;
}

.gallery-main {
    position: relative;
    height: 500px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
    background: #000;
}

#main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--color-navy);
    transition: var(--transition);
}

.gallery-nav:hover {
    background: white;
}

.gallery-nav.prev {
    left: 1rem;
}

.gallery-nav.next {
    right: 1rem;
}

.gallery-thumbs {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.thumb-img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
}

.thumb-img.active,
.thumb-img:hover {
    opacity: 1;
    border: 2px solid var(--color-gold);
}

.details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

@media (max-width: 900px) {
    .details-grid {
        grid-template-columns: 1fr;
    }

    .gallery-main {
        height: 300px;
    }
}

.features-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    background: var(--color-bg-soft);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--color-gold);
}

.description-box {
    margin-bottom: 2rem;
}

.description-box h3 {
    border-left: 4px solid var(--color-gold);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--color-border);
}

.specs-table td:first-child {
    font-weight: 600;
    color: var(--color-navy);
    width: 40%;
}

.diferenciais-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.diferencial-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.diferencial-item i {
    color: var(--color-gold);
}

/* SIDEBAR STICKY */
.sticky-card {
    position: sticky;
    top: 100px;
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--color-border);
}

.broker-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

/* =========================================
   ADMIN PANEL STYLES
   ========================================= */

.admin-form {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: var(--color-navy);
    font-size: 1.2rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row.four-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.form-group.full {
    width: 100%;
}

.admin-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

.admin-input:focus {
    border-color: var(--color-gold);
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem;
    background: var(--color-bg-body);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.checkbox-grid label:hover {
    background: #eee;
}

.admin-link {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--color-text-main);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

.admin-link i {
    width: 25px;
    text-align: center;
    margin-right: 0.5rem;
}

.admin-link:hover,
.admin-link.active {
    background: var(--color-bg-soft);
    color: var(--color-gold);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    background: #fdfdfd;
}

@media (max-width: 768px) {

    .form-row,
    .form-row.four-col {
        flex-direction: column;
        display: flex;
    }
}

@keyframes text-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}