/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */
:root {
    --primary-blue: #0A1324;
    --card-bg: #111C2E;
    --white: #FFFFFF;
    --gold: #F2C464;
    --text-gray: #B8C5D6;
}

/* ========================================
   RESET AND BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-blue);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.gradient-text {
    color: var(--gold);
}

/* ========================================
   HEADER COMPONENT
   ======================================== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 19, 36, 0.7);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, background 0.3s ease;
}

#header.hidden {
    transform: translateY(-100%);
}

#header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.header-cnpj {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
}

.btn-cta {
    background: var(--gold);
    color: var(--primary-blue);
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(242, 196, 100, 0.6);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: url('/background (1).jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 19, 36, 0.88);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding: 40px 20px;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: var(--text-gray);
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--gold);
    color: var(--primary-blue);
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 35px rgba(242, 196, 100, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(242, 196, 100, 0.5);
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-secondary:hover {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(242, 196, 100, 0.4);
}

/* ========================================
   COMMON SECTION STYLES
   ======================================== */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    color: var(--white);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 50px;
    font-weight: 300;
}

/* ========================================
   CONSÓRCIOS SECTION
   ======================================== */
.consorcios {
    padding: 100px 0;
    background: var(--primary-blue);
    position: relative;
}

.consorcios-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.consorcio-card {
    background: var(--card-bg);
    border: none;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.consorcio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(242, 196, 100, 0.2);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.consorcio-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--white);
}

.consorcio-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* ========================================
   SOBRE SECTION
   ======================================== */
.sobre {
    padding: 100px 0;
    background: var(--primary-blue);
}

.sobre-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: stretch;
}

.sobre-text p {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--text-gray);
}

.cnpj {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 30px;
}

.mini-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.mini-card {
    background: var(--card-bg);
    border: none;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
}

.mini-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.mini-icon svg {
    width: 100%;
    height: 100%;
}

.mini-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--white);
}

.mini-card p {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.sobre-map {
    display: flex;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.sobre-map iframe {
    width: 100%;
    height: 100%;
    min-height: 450px;
}

/* ========================================
   MODAL COMPONENTS
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

#modal-title,
.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--gold);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--white);
}

.form-group input {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.08);
}

.btn-submit {
    width: 100%;
    background: var(--gold);
    color: var(--primary-blue);
    border: none;
    padding: 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(242, 196, 100, 0.5);
}

/* Vehicle & Property Selection Modals */
.vehicle-selection {
    max-width: 600px;
}

.vehicle-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.vehicle-option-btn {
    background: var(--card-bg);
    border: 2px solid rgba(242, 196, 100, 0.3);
    border-radius: 16px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: var(--white);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 16px;
}

.vehicle-option-btn svg {
    width: 50px;
    height: 50px;
    color: var(--gold);
    transition: all 0.3s ease;
}

.vehicle-option-btn:hover {
    border-color: var(--gold);
    background: rgba(242, 196, 100, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(242, 196, 100, 0.2);
}

.vehicle-option-btn:hover svg {
    transform: scale(1.1);
}

/* ========================================
   FOOTER COMPONENT
   ======================================== */
.footer {
    padding: 60px 0 30px;
    background: var(--primary-blue);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    text-align: center;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 30px;
}

.footer-logo img {
    height: 60px;
    width: auto;
    margin-bottom: 15px;
}

.footer-logo p {
    color: var(--text-gray);
    font-size: 1.1rem;
    font-weight: 300;
}

.footer-social {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 25px;
}

.footer-social a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--white);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(242, 196, 100, 0.3);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* ========================================
   FLOATING ACTION BUTTON
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--gold);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    box-shadow: 0 4px 20px rgba(242, 196, 100, 0.3);
    z-index: 1500;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
}

.whatsapp-float:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(242, 196, 100, 0.6);
}

.whatsapp-float svg {
    width: 22px;
    height: 22px;
    color: var(--primary-blue);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */
@media (max-width: 968px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

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

    .sobre-content {
        grid-template-columns: 1fr;
    }

    .sobre-map {
        height: 400px;
    }

    .whatsapp-float {
        padding: 14px 24px;
        font-size: 14px;
    }
    
    .whatsapp-float svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .section-title {
        font-size: 2rem;
    }

    .consorcios-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .header-cnpj {
        display: none;
    }

    .mini-cards {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .vehicle-options {
        grid-template-columns: 1fr;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 13px;
    }

    .whatsapp-float span {
        display: none;
    }

    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

/* ==================================================
   CORREÇÃO DEFINITIVA DO MODAL NO MOBILE
   ================================================== */
@media (max-width: 768px) {
    /* Libera a rolagem e dá um respiro na tela */
    .modal, [id*="modal"] {
        align-items: flex-start !important; 
        padding: 20px 10px !important; 
        overflow-y: auto !important;
    }

    /* Ajusta a caixa do formulário para caber na tela */
    .modal-content, [class*="modal-content"] {
        width: 100% !important;
        margin: 40px auto !important; /* Empurra um pouco para baixo */
        position: relative !important; /* Segredo para prender o X aqui dentro */
    }

    /* Botão de Fechar preso na quina do modal */
    .close-btn, [id*="close"] {
        position: absolute !important;
        top: -15px !important;
        right: -10px !important;
        font-size: 20px !important;
        color: #0A1324 !important; /* X em azul escuro */
        background-color: #F2C464 !important; /* Fundo da bolinha em dourado */
        width: 35px !important;
        height: 35px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: none !important;
        z-index: 99999 !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.5) !important;
        cursor: pointer !important;
        text-decoration: none !important;
        line-height: 1 !important;
    }
}