/* =========================================================================
   CASA JATOBÁ - CERNE CONSTRUTORA | ESTILOS PRINCIPAIS
   ========================================================================= */

/* --- VARIÁVEIS CSS --- */
:root {
    /* Paleta de Cores */
    --color-primary: #C5A059;
    /* Jatobá Wood/Gold Accent */
    --color-primary-dark: #A38040;
    --color-dark: #1F2224;
    /* Dark Premium background */
    --color-darker: #131516;
    --color-bg-light: #F9F9F9;
    /* Light sections */
    --color-white: #FFFFFF;

    --color-text: #4A4A4A;
    /* Body text */
    --color-text-light: #7A7A7A;
    --color-heading: #1F2224;
    /* Heading text */

    --color-whatsapp: #25D366;
    --color-whatsapp-hover: #1EBE5C;

    /* Tipografia */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Transições e Sombras */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);

    /* Layout */
    --container-max-width: 1200px;
    --header-height: 100px;
}

/* --- SPLASH SCREEN --- */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-darker);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Garante que o vídeo não seja cortado */
    animation: fadeInSplash 1s ease-out forwards;
}

@keyframes fadeInSplash {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* --- RESET & GLOBAL START --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* 1rem = 16px */
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilitários */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

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

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

.text-accent {
    color: var(--color-primary);
}

.mt-4 {
    margin-top: 2rem;
}

.section-tag {
    display: inline-block;
    text-transform: uppercase;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.section-subtitle,
.section-desc {
    font-size: 1.125rem;
    color: var(--color-text-light);
    max-width: 700px;
    margin-bottom: 2rem;
}

.text-center .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* --- BOTÕES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 500;
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

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

/* Tratamento verde para botao principal do ZAP, mas o primário da empresa é Jatobá. 
Vamos usar primário da empresa. Se quiser o ZAP exato, descomente abaixo: */
/*
.btn-primary { background-color: var(--color-whatsapp); }
.btn-primary:hover { background-color: var(--color-whatsapp-hover); }
*/

.btn-outline {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.125rem;
}

/* --- CABEÇALHO --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
    height: 85px;
}

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

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

.logo-img {
    max-height: 85px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    /* Faz o fundo branco desaparecer em superfícies claras */
    transition: var(--transition-normal);
}

.header.scrolled .logo-img {
    max-height: 70px;
    /* Reduz levemente ao rolar a página */
}

/* Navegação Desktop */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-dark);
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-height);
    background-color: var(--color-darker);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/Casa Jatobá/Whisk_14becc56dac756e8fc34547043e362b7eg.png');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
}

.hero-text-box {
    max-width: 650px;
    color: var(--color-white);
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(197, 160, 89, 0.2);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4.5rem;
    color: var(--color-white);
    margin-bottom: 0.5rem;
    /* Fixed to 0.5rem matching original inline */
    line-height: 1.1;
}

.hero-main-desc {
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    max-width: 600px;
}

.hero-subtitle {
    font-size: 1.15rem;
    /* Fixed to match inline style */
    font-weight: 300;
    color: #e0e0e0;
    margin-bottom: 2.5rem;
    max-width: 500px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-actions .btn {
    flex: 1;
    justify-content: center;
}

.hero-actions .btn-outline {
    border-color: var(--color-white);
    color: var(--color-white);
}

.hero-actions .btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-dark);
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: var(--color-white);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.scroll-down:hover {
    opacity: 1;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-20px) translateX(-50%);
    }

    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

/* --- SOBRE A CASA --- */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-custom-desc {
    font-size: 1.35rem;
    /* Aumentado para equilibrar com a altura da imagem */
    line-height: 1.8;
}

.features-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.features-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.features-list i {
    font-size: 1.25rem;
    margin-top: 4px;
}

.features-list strong {
    display: block;
    color: var(--color-heading);
    font-weight: 600;
    margin-bottom: 4px;
}

.img-placeholder {
    width: 100%;
    height: 500px;
    background-color: #E8E8E8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.img-placeholder::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: 20px;
    bottom: 20px;
    border: 2px solid var(--color-primary);
    border-radius: 8px;
    z-index: -1;
}

/* --- DIFERENCIAIS --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

/* --- GALLERY CAROUSEL --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.card {
    background-color: var(--color-white);
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    text-align: center;
    border-bottom: 3px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--color-primary);
}

.card-icon-wrapper {
    width: 70px;
    height: 70px;
    background-color: rgba(197, 160, 89, 0.1);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem auto;
    transition: var(--transition-normal);
}

.card:hover .card-icon-wrapper {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* --- LOCALIZACAO --- */
.location-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.map-placeholder {
    width: 100%;
    height: 400px;
    background-color: #E2E8F0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    box-shadow: var(--shadow-md);
}

.map-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.location-distances {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--color-bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

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

.distance-item strong {
    font-size: 1.5rem;
    color: var(--color-heading);
    font-family: var(--font-heading);
}

.distance-item span {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* --- CTA FINAL --- */
.cta {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 100px 0;
    position: relative;
    text-align: center;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(197, 160, 89, 0.1) 0%, transparent 70%);
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    color: var(--color-white);
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    opacity: 0.8;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--color-darker);
    color: var(--color-white);
    padding-top: 4rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand .logo {
    display: inline-flex;
    margin-bottom: 1rem;
    background-color: var(--color-white);
    padding: 8px 12px;
    border-radius: 6px;
}

.footer-brand .footer-logo-img {
    mix-blend-mode: normal;
    /* No rodapé, mantemos normal pois está dentro de um fundo branco */
    max-height: 90px;
}

.footer-brand p {
    color: #999;
    max-width: 300px;
}

.footer-col-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-radius: 50%;
    transition: var(--transition-normal);
}

.social-links a:hover {
    background-color: var(--color-primary);
    transform: translateY(-3px);
}

.footer-bottom {
    background-color: #0A0B0C;
    padding: 1.5rem 0;
    color: #777;
    font-size: 0.9rem;
}

/* --- ANIMAÇÕES (Intersection Observer classes) --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.is-visible {
    opacity: 1;
    transform: translate(0);
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 992px) {
    .section {
        padding: 60px 0;
    }

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

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

    .about-container,
    .location-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 75px;
    }

    .header.scrolled {
        height: var(--header-height);
    }

    .logo-img {
        max-height: 55px;
    }

    .header.scrolled .logo-img {
        max-height: 50px;
    }

    .nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: var(--shadow-md);
        gap: 1.2rem;
        text-align: center;
    }

    .nav.active {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        gap: 1.2rem;
    }

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

    .hero {
        padding-top: calc(var(--header-height) + 2rem);
        align-items: flex-start;
        height: auto;
        min-height: 100vh;
        padding-bottom: 4rem;
    }

    .hero-content {
        padding: 0 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.8rem;
        margin-bottom: 0.5rem;
    }

    .hero-main-desc {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .hero-price-box {
        width: 100% !important;
        margin-top: 1rem;
        text-align: center !important;
        border-left: none !important;
        border-bottom: 4px solid var(--color-primary) !important;
        align-items: center !important;
        display: flex;
        flex-direction: column;
    }

    .hero-price-box>div,
    .hero-price-box p {
        justify-content: center !important;
        align-items: center !important;
    }

    .about-custom-desc {
        font-size: 1.05rem;
        /* Mantém o padrão compacto em celulares */
    }

    .hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }

    .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hide-on-mobile {
        display: none !important;
    }

    .gallery-grid {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 1.5rem;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
    }

    .gallery-grid .card {
        flex: 0 0 75vw;
        min-width: 0;
        scroll-snap-align: center;
        padding: 0.5rem !important;
        /* Adjust padding to look better as a card holding image */
    }

    /* Esconder a barra de rolagem (opcional para ficar clean) */
    .gallery-grid::-webkit-scrollbar {
        display: none;
    }

    .gallery-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .location-distances {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

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

    .footer {
        padding: 4rem 0 2rem;
    }
}

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

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

    .logo-img {
        max-height: 48px;
    }
}

/* --- MODAL IMAGE --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s ease;
}

.modal-close:hover {
    color: var(--color-primary);
    transform: scale(1.1);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--color-white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    z-index: 2005;
}

.modal-nav:hover {
    background: var(--color-primary);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}