/* style.css */

/* --- Variáveis CSS: Ponto central para personalização --- */
:root {
    --primary-color: #385E2F; /* Verde floresta/oliva - Mais orgânico e sofisticado */
    --secondary-color: #F8F8F0; /* Off-white / Creme claro - fundo suave */
    --accent-color: #A0522D; /* Sela Marrom - detalhes terrosos e de contraste */
    --dark-text-color: #2c2c2c; /* Texto principal escuro, mais suave que puro preto */
    --light-text-color: #f0f0f0; /* Texto claro para fundos escuros */
    --border-color: #e0e0e0; /* Cor de borda padrão */
    --box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); /* Sombra mais pronunciada */
    --light-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Sombra suave */

    --font-heading: 'Cormorant Garamond', serif; /* Fonte para títulos */
    --font-body: 'Inter', sans-serif; /* Fonte para o corpo do texto */

    --header-height: 70px; /* Altura do cabeçalho levemente menor */
    --section-spacing: 60px; /* Espaçamento vertical entre seções reduzido */
    --section-spacing-mobile: 40px; /* Espaçamento vertical em mobile reduzido */
}

/* --- Estilos Base & Reset Mínimo --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark-text-color);
    background-color: var(--secondary-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-bottom: 0.7em; /* Margem padrão para títulos */
    color: var(--primary-color);
    text-align: center;
    font-weight: 700;
}

h1 { font-size: 3.5rem; line-height: 1.1; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.7rem; }
p { margin-bottom: 0.8em; } /* Margem padrão para parágrafos */

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

/* --- Classes Utilitárias Reutilizáveis --- */
.container {
    max-width: 1100px; /* Largura máxima do conteúdo levemente menor */
    margin: 0 auto;
    padding: 0 20px; /* Padding nas laterais reduzido */
}

.section-padding {
    padding: var(--section-spacing) 0;
}

.section-title {
    margin-bottom: 1.5em; /* Margem reduzida */
    position: relative;
    padding-bottom: 8px;
    letter-spacing: 0.05em;
}

.section-title::after {
    content: '';
    display: block;
    width: 70px; /* Largura reduzida */
    height: 3px; /* Espessura reduzida */
    background-color: var(--accent-color);
    margin: 10px auto 0; /* Margem reduzida */
    border-radius: 2px;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* --- Cabeçalho Principal (Header) --- */
.main-header {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 10px 0; /* Padding vertical reduzido */
    position: sticky; top: 0; left: 0; width: 100%;
    z-index: 1000;
    box-shadow: var(--box-shadow);
    animation: fadeInDown 0.5s ease-out forwards;
    height: var(--header-height); /* Altura fixa do cabeçalho */
    display: flex; /* Para centralizar o conteúdo verticalmente */
    align-items: center;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Garante que o conteúdo ocupe a largura total do container */
}

.logo-link {
    display: flex;
    align-items: center;
    color: var(--light-text-color);
    font-size: 1.4rem; /* Tamanho da fonte do logo reduzido */
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.logo-link:hover {
    color: var(--light-text-color);
}

.logo {
    height: 48px; /* Tamanho do logo ajustado */
    margin-right: 8px; /* Margem reduzida */
    border-radius: 50%;
    /* Destaque do Logo */
    filter: drop-shadow(0px 0px 6px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 15px rgba(255,255,255,0.2)); /* Sombra branca para ressaltar */
    transition: filter 0.3s ease;
}

.logo:hover {
    filter: drop-shadow(0px 0px 10px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 20px rgba(255,255,255,0.4));
}

/* Navegação Principal */
.primary-navigation ul {
    display: flex;
    gap: 25px; /* Espaçamento entre os itens do menu reduzido */
}

.primary-navigation a {
    color: var(--light-text-color);
    font-weight: 600;
    padding: 5px 0; /* Padding vertical reduzido */
    position: relative;
    transition: color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase;
    font-size: 0.9rem; /* Fonte levemente menor */
    letter-spacing: 0.06em; /* Letter spacing ajustado */
}

.primary-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 0; height: 2px; /* Altura da linha reduzida */
    background-color: var(--accent-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.primary-navigation a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.primary-navigation a:hover::after,
.primary-navigation a.active::after {
    width: 100%;
}

/* Toggle do Menu Mobile (Hamburger) */
.mobile-nav-toggle {
    display: none;
    background: transparent; border: 0; padding: 8px; cursor: pointer;
    position: relative; z-index: 9999;
}

.mobile-nav-toggle .icon-bar {
    display: block; width: 28px; height: 2.5px; /* Tamanho do ícone reduzido */
    background-color: var(--light-text-color);
    margin: 5px 0; /* Margem reduzida */
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    border-radius: 2px;
}

/* Animação Hamburger para X */
.mobile-nav-toggle[aria-expanded="true"] .icon-bar:nth-child(2) { opacity: 0; }
.mobile-nav-toggle[aria-expanded="true"] .icon-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.mobile-nav-toggle[aria-expanded="true"] .icon-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* --- Seção Herói (Hero) --- */
.hero {
    background: url('hero-bg-new.jpg') no-repeat center center/cover;
    min-height: 35vh; /* ALTURA REDUZIDA drásticamente, mantendo funcionalidade */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light-text-color);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Overlay mais escuro */
    z-index: 1;
}

.hero-content {
    z-index: 2;
    max-width: 800px; /* Largura máxima do conteúdo reduzida */
    padding: 15px; /* Padding reduzido */
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-size: 3rem; /* Título menor para caber no espaço reduzido */
    margin-bottom: 0.2em; /* Margem reduzida */
    line-height: 1.1;
    color: var(--light-text-color);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
    letter-spacing: 0.02em;
}

.hero-subtitle {
    font-size: 1.2rem; /* Subtítulo menor */
    color: var(--light-text-color);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
    max-width: 600px;
    margin: 0 auto;
}


/* --- Seção de Dados (Sobre/Detalhes da Fazenda) --- */
.data-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px; /* Espaçamento reduzido entre as caixinhas */
    align-items: stretch;
}

.data-item {
    background-color: #fff;
    padding: 18px; /* Padding interno reduzido */
    border-radius: 8px; /* Borda levemente menor */
    box-shadow: var(--light-shadow);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 1;
    min-width: 220px; /* Largura mínima ajustada */
    max-width: calc(25% - 7.5px); /* Quatro itens por linha, considerando o gap de 10px */
    position: relative; overflow: hidden;
    border: 1px solid var(--border-color);
}

.data-item:hover {
    transform: translateY(-5px); /* Efeito de elevação sutil */
    box-shadow: var(--box-shadow);
}

.data-item::before {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 4px; /* Largura da linha decorativa reduzida */
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    border-radius: 8px 0 0 8px;
}

.data-item h3 {
    margin-top: 0;
    text-align: left;
    color: var(--primary-color);
    margin-bottom: 8px; /* Margem reduzida */
    font-size: 1.3rem; /* Fonte reduzida */
    line-height: 1.2;
}

.data-item p {
    font-size: 0.85rem; /* Texto menor para caber melhor */
    margin-bottom: 0.3em; /* Parágrafos mais próximos */
    color: var(--dark-text-color);
}
.data-item p strong {
    color: var(--accent-color);
}


/* --- Seção de Produtos --- */
.product-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px; /* Espaçamento reduzido */
    margin-bottom: 20px; /* Margem reduzida */
}

.product-item {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 10px 20px; /* Padding reduzido */
    border-radius: 40px; /* Borda reduzida */
    font-weight: 600;
    font-size: 0.95rem; /* Fonte reduzida */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.product-item:hover {
    transform: translateY(-3px);
    background-color: var(--accent-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.past-products {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-top: 15px; /* Margem reduzida */
    font-size: 0.9rem;
}

/* --- Seção de Galeria (Swiper e Lightbox) --- */
.swiper {
    width: 100%;
    height: 350px; /* Altura da galeria reduzida */
    margin-bottom: 15px; /* Margem reduzida */
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.swiper-slide img {
    display: block; width: 100%; height: 100%;
    object-fit: cover; border-radius: 10px; cursor: pointer;
    transition: transform 0.3s ease;
}

.swiper-slide img:hover { transform: scale(1.03); }

.swiper-button-next, .swiper-button-prev {
    color: var(--primary-color) !important;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 40px; height: 40px; /* Tamanho dos botões reduzido */
    display: flex; justify-content: center; align-items: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.08);
}

.swiper-button-next::after, .swiper-button-prev::after { font-size: 1.4rem !important; }

.gallery-caption {
    text-align: center; font-style: italic; color: #666;
    margin-top: 10px; /* Margem reduzida */
    font-size: 0.85rem;
}

/* Lightbox */
.lightbox {
    display: none; position: fixed; z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%; overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center; justify-content: center; animation: fadeIn 0.3s forwards;
}

.lightbox-content {
    margin: auto; display: block;
    max-width: 90%; max-height: 90%;
    border-radius: 10px; object-fit: contain; box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
}

.lightbox-close {
    position: absolute; top: 20px; right: 30px;
    color: #f1f1f1; font-size: 38px; font-weight: bold; transition: 0.3s; cursor: pointer;
    text-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.lightbox-close:hover, .lightbox-close:focus {
    color: #fff; text-decoration: none; cursor: pointer; transform: scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* --- Seção História --- */
#historia { background-color: #f2f7ed; }
#historia p {
    text-align: center; max-width: 700px;
    margin: 0 auto; font-size: 1rem; line-height: 1.6; /* Fonte e line-height ajustados */
    color: var(--dark-text-color);
}

/* --- Seção Localização --- */
.map-container {
    border-radius: 10px; overflow: hidden; box-shadow: var(--box-shadow);
    margin: 0 auto; max-width: 100%; border: 1px solid var(--border-color);
}

.map-container iframe {
    width: 100%; height: 380px; /* Altura do mapa reduzida */
    border: 0;
}


/* --- Seção Contato --- */
#contato p {
    text-align: center; max-width: 700px;
    margin: 0 auto 15px; /* Margem reduzida */
    font-size: 1rem;
}

.contact-info {
    display: flex; justify-content: center;
    gap: 30px; /* Espaçamento reduzido */
    margin-bottom: 15px; /* Margem reduzida */
    flex-wrap: wrap; font-size: 1.05rem; /* Fonte reduzida */
}

.contact-info p { margin: 0; }
.contact-info a { font-weight: 600; color: var(--primary-color); transition: color 0.3s ease; }
.contact-info a:hover { color: var(--accent-color); text-decoration: underline; }

.authorized-list {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; /* Espaçamento reduzido */
    margin-top: 10px; /* Margem reduzida */
    font-size: 0.95rem; /* Fonte reduzida */
}
.authorized-list li {
    background-color: #e6f0e0;
    padding: 6px 15px; /* Padding reduzido */
    border-radius: 15px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
    box-shadow: var(--light-shadow);
}


/* --- Rodapé (Footer) --- */
.main-footer {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 25px 0; /* Padding reduzido */
    text-align: center;
    font-size: 0.85rem; /* Fonte reduzida */
    box-shadow: inset 0 6px 12px rgba(0,0,0,0.2);
}


/* --- Design Responsivo (Media Queries) --- */

/* Telas Médias (Tablets, Laptops menores) */
@media (max-width: 1024px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.1rem; }
    .hero-title { font-size: 2.6rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .section-padding { padding: 50px 0; }

    .data-item {
        max-width: calc(50% - 7.5px); /* Dois itens por linha */
        padding: 15px;
    }
    .data-item h3 { font-size: 1.2rem; }
    .data-item p { font-size: 0.8rem; }

    .swiper { height: 300px; }
    .map-container iframe { height: 350px; }
}

/* Telas Pequenas (Smartphones na horizontal, Tablets pequenos) */
@media (max-width: 768px) {
    .main-header { padding: 8px 0; height: 60px; } /* Altura do cabeçalho em mobile */
    .logo { height: 40px; }
    .logo-link { font-size: 1.2rem; }

    .primary-navigation {
        inset: 0 0 0 20%; /* Ocupa mais tela em mobile */
        padding: 4rem 1rem; gap: 20px;
    }
    .primary-navigation a { font-size: 1.1rem; padding: 10px 0; }
    .mobile-nav-toggle .icon-bar { width: 25px; height: 2px; margin: 4px 0; }
    .mobile-nav-toggle[aria-expanded="true"] .icon-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .mobile-nav-toggle[aria-expanded="true"] .icon-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    .hero { min-height: 30vh; } /* Altura em mobile */
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .section-padding { padding: var(--section-spacing-mobile) 0; }
    .section-title { font-size: 1.8rem; margin-bottom: 1em; }

    .data-item { max-width: 90%; margin: 0 auto; padding: 15px; }

    .product-item { font-size: 0.9rem; padding: 8px 18px; }
    .swiper { height: 250px; }
    .map-container iframe { height: 300px; }

    .contact-info { gap: 15px; font-size: 0.95rem; }
    #contato p { margin-bottom: 10px; }
    .authorized-list { gap: 5px; font-size: 0.9rem; }
    .main-footer { padding: 20px 0; font-size: 0.8rem; }
}

/* Telas Muito Pequenas (Smartphones na vertical) */
@media (max-width: 480px) {
    .logo-text { display: none; }
    .logo-link { justify-content: center; width: auto; }
    .logo { height: 35px; margin-right: 0; }

    .hero { min-height: 25vh; }
    .hero-title { font-size: 1.8rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .section-padding { padding: 30px 0; }
    .section-title { font-size: 1.5rem; }

    .data-item { padding: 12px; }
    .data-item h3 { font-size: 1.1rem; }
    .data-item p { font-size: 0.75rem; }

    .swiper { height: 200px; }
    .swiper-button-next, .swiper-button-prev { width: 30px; height: 30px; }
    .swiper-button-next::after, .swiper-button-prev::after { font-size: 1.1rem !important; }

    .lightbox-close { top: 15px; right: 20px; font-size: 32px; }
    .map-container iframe { height: 250px; }

    #historia p { font-size: 0.9rem; }
}