@import url('modal.css');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

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

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-primary {
    background-color: #2E7D32; /* Green */
    color: white;
    border: 1px solid #2E7D32;
}

.btn-primary:hover {
    background-color: #1B5E20;
}

.btn-outline {
    background-color: transparent;
    color: #2E7D32;
    border: 1px solid #2E7D32;
}

.btn-outline:hover {
    background-color: #2E7D32;
    color: white;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: none;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #2E7D32;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Header */
.main-header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header.scrolled {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.logo {
    max-width: 100%;
    min-width: 0; /* Allow shrinking in flex container */
}

.logo img, .logo video {
    max-height: 65px;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}


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

.main-nav a {
    font-weight: 500;
    color: #555;
    font-size: 16px;
}

.main-nav a:hover {
    color: #2E7D32;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 600px; /* Changed from height to min-height */
    height: auto;
    padding: 100px 0; /* Add padding to prevent content hitting edges */
    background-image: url('../images/hero-cattle.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(27, 94, 32, 0.8) 0%, rgba(27, 94, 32, 0.4) 60%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn-hero {
    padding: 12px 30px;
    background-color: white;
    color: #2E7D32;
    border: none;
}

.btn-hero:hover {
    background-color: #f0f0f0;
}

.btn-hero-outline {
    padding: 12px 30px;
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-hero-outline:hover {
    background-color: white;
    color: #2E7D32;
}

/* Features Section */
.features {
    padding: 60px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: #333;
    margin-bottom: 50px;
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    text-align: center;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
    margin: 0;
}

/* Flags Section */
.flags-section {
    padding: 40px 0;
    background-color: #f9f9f9;
    text-align: center;
}

.flags-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.flag-img {
    width: min(100%, 180px);
    aspect-ratio: 10 / 7;
    height: auto;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Products Section */
.products-section {
    padding: 80px 0;
    background-color: white;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    height: 200px;
    background-color: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2E7D32; /* Brand color for titles as per mockup style */
}

.product-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-details {
    width: 100%;
    padding: 10px;
    border: 1px solid #2E7D32; /* Blueish in mockup, but sticking to brand green or blue */
    color: #2E7D32; /* Or blue #4A90E2 */
    background: white;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
}
.btn-details:hover {
    background-color: #2E7D32;
    color: white;
}

/* Video Separator */
.video-separator {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
}

.video-separator video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Details */
.product-detail-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.product-detail-image {
    flex: 1;
    min-width: 300px;
}

.product-detail-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-detail-info {
    flex: 2;
    min-width: 300px;
}

.product-detail-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* News Section */
.news-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

/* Footer */
.main-footer {
    background-color: #1B5E20; /* Dark Green */
    color: white;
    padding: 60px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #fff;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255,255,255,0.8);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.3s;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
}

.floating-whatsapp img {
    width: 35px;
    height: 35px;
}

.audio-control {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.audio-control:hover, .audio-control.playing {
    background: rgba(255,255,255,0.1);
    border-color: white;
    color: white;
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Header & Logo Mobile Optimization */
    .header-container {
        flex-wrap: nowrap; /* Prevent wrapping */
        justify-content: space-between;
        padding: 0 10px;
    }

    .logo {
        flex: 0 1 auto; /* Allow shrinking but not growing beyond content */
        max-width: 70%; /* Limit width to avoid pushing menu off-screen */
    }

    .logo img, .logo video {
        max-height: 60px !important; /* Force smaller height for mobile to override global styles */
        width: auto;
        max-width: 100%;
    }

    .main-nav {
        position: fixed;
        top: 80px; /* Adjusted for header height */
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        display: none;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

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

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-content {
        padding: 0 20px;
    }

    .header-cta {
        display: none; /* Hide CTA on mobile header to save space */
    }

    /* Hero Section Mobile Optimization */
    .hero {
        padding: 60px 0; /* Reduced padding */
        text-align: center; /* Center align text on mobile */
    }

    .hero-content {
        width: 100%;
        padding: 0 15px;
    }

    .hero h1 {
        font-size: 2rem; /* Smaller font size */
        word-wrap: break-word; /* Prevent long words from overflowing */
    }

    .hero-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%; /* Full width buttons */
        display: block;
    }

    /* General Layout Fixes */
    .container {
        padding: 0 15px; /* Ensure consistent padding */
        overflow-x: hidden; /* Prevent horizontal scroll within containers */
    }

    /* Force single column for grids on small mobile screens */
    .features-grid, .products-grid, .footer-container {
        grid-template-columns: 1fr; /* Single column layout */
    }
    
    .feature-icon {
        width: 60px; /* Smaller icons on mobile */
        height: 60px;
        margin-bottom: 15px;
    }

    body, html {
        overflow-x: hidden; /* Prevent horizontal scroll globally */
    }

    .floating-whatsapp {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }

    .floating-whatsapp img {
        width: 30px;
        height: 30px;
    }
}

/* Biblical Quote Section */
.biblical-quote {
    background-color: #1B5E20; /* Dark Green matching footer/theme */
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(rgba(27, 94, 32, 0.9), rgba(27, 94, 32, 0.9)), url('../images/hero-fazenda.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

.biblical-quote::before {
    content: '"';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 200px;
    color: rgba(255, 255, 255, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
    pointer-events: none;
}

.biblical-quote blockquote {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.biblical-quote p {
    font-size: 1.8rem;
    font-style: italic;
    font-family: 'Georgia', serif;
    margin-bottom: 25px;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.biblical-quote cite {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    display: inline-block;
}

.biblical-quote cite::before,
.biblical-quote cite::after {
    content: '';
    display: block;
    width: 30px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.5);
    position: absolute;
    top: 50%;
}

.biblical-quote cite::before {
    left: -45px;
}

.biblical-quote cite::after {
    right: -45px;
}

@media (max-width: 768px) {
    .biblical-quote {
        padding: 60px 0;
    }
    
    .biblical-quote p {
        font-size: 1.3rem;
        padding: 0 15px;
    }

    .biblical-quote::before {
        font-size: 150px;
        top: -20px;
    }
}
