/* 
   Tiwana Farms
   Premium, Organic, Earthy Aesthetic 
*/

/* --- CSS Variables --- */
:root {
    --color-primary-dark: #1F3622; /* Deep Forest Green */
    --color-primary: #2A482A;      
    --color-accent: #D4AF37;       /* Warm Gold */
    --color-accent-hover: #b4932d;
    --color-text-dark: #2c2c2c;
    --color-text-light: #f5f5f0;
    --color-bg-light: #FAFAFA;     /* Very subtle off-white / parchment */
    --color-bg-card: #FFFFFF;

    --font-heading: 'Playfair Display', serif;
    --font-subheading: 'Cormorant Garamond', serif;
    --font-body: 'Lato', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    --border-radius: 8px;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

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

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary-dark);
    border: 1px solid var(--color-primary-dark);
}

.btn-secondary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
}

/* --- Header --- */
.site-header {
    background-color: var(--color-bg-light);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo h1 {
    font-size: 2.5rem;
    letter-spacing: 1px;
    color: var(--color-primary-dark);
    margin-bottom: 0.2rem;
    position: relative;
    display: inline-block;
}

/* Subtle feather/farm motif suggestion using CSS */
.header-logo h1::after {
    content: '〰'; 
    position: absolute;
    bottom: -10px;
    right: -20px;
    font-size: 1rem;
    color: var(--color-accent);
    transform: rotate(-15deg);
    opacity: 0.6;
}

.sub-logo {
    font-family: var(--font-subheading);
    font-size: 1.2rem;
    color: var(--color-accent);
    font-style: italic;
    display: block;
}

.header-contact {
    text-align: right;
    font-family: var(--font-body);
}

.header-contact .location {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.header-contact .phone {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
}

.header-contact .phone:hover {
    color: var(--color-accent);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 80vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(20, 30, 20, 0.8) 0%, rgba(20, 30, 20, 0.4) 50%, rgba(20, 30, 20, 0.1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding-left: 8%;
    color: var(--color-text-light);
}

.hero-title {
    font-size: 4rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    font-family: var(--font-subheading);
    font-style: italic;
}

.shop-now-btn {
    font-size: 1.1rem;
    padding: 1rem 3rem;
}

/* --- Products Section --- */
.products-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-light);
}

.section-heading {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-heading h2 {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.divider {
    height: 3px;
    width: 60px;
    background-color: var(--color-accent);
    margin: 0 auto var(--spacing-sm);
}

.section-heading p {
    font-size: 1.1rem;
    color: #666;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.product-card {
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.product-card.giant-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
}

.giant-card .product-image-wrapper {
    padding-top: 0;
    height: 100%;
    min-height: 450px;
}

.giant-card .product-image {
    object-fit: cover;
}

.giant-card .product-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-lg);
    text-align: center;
}

.giant-card .product-title {
    color: var(--color-accent);
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.giant-card .product-desc {
    color: var(--color-text-light);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* 4:3 Aspect Ratio */
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: var(--spacing-md);
    text-align: center;
}

.product-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.product-desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: var(--spacing-md);
    min-height: 45px;
}

/* --- Footer Section --- */
.site-footer {
    position: relative;
    color: var(--color-text-light);
}

.footer-hero {
    position: relative;
    padding: var(--spacing-xl) 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
}

.footer-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(31, 54, 34, 0.85); /* Dark green overlay */
}

.footer-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 var(--spacing-sm);
}

.footer-info h2 {
    color: var(--color-text-light);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-family: var(--font-subheading);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--color-accent);
    margin-bottom: var(--spacing-md);
}

.footer-info address {
    font-style: normal;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.footer-contact-details a {
    color: var(--color-accent);
}

.footer-contact-details a:hover {
    color: #fff;
    text-decoration: underline;
}

.map-placeholder {
    margin-top: var(--spacing-md);
    display: flex;
    justify-content: center;
}

.simple-map {
    width: 300px;
    height: 150px;
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: #ccc;
}

.footer-bottom {
    background-color: #112013; /* Very dark green */
    text-align: center;
    padding: var(--spacing-sm) 0;
    font-size: 0.85rem;
    color: #888;
}

/* --- Banner Notice --- */
.banner-notice {
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
    text-align: center;
    padding: 0.8rem;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 99;
}

/* --- Events Section --- */
.events-section {
    padding: var(--spacing-xl) 0;
    background-color: #f0f2eb; /* Slightly earthier green-grey */
}

.event-card {
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius);
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-left: 5px solid var(--color-accent);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-date {
    display: inline-block;
    color: var(--color-accent);
    font-weight: 700;
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

/* --- Modal & Animations --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    background-color: rgba(0,0,0,0.85); 
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--color-bg-light);
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 700px;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
    transform: scale(0.8) translateY(100px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

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

.close-modal {
    color: #fff;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    border: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    background: var(--color-accent);
}

.modal-media-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Flying effect animation */
    animation: flyIn 3s ease-in-out infinite alternate;
}

@keyframes flyIn {
    0% { transform: scale(1.02) translateY(5px); }
    100% { transform: scale(1.08) translateY(-15px); }
}

.modal-content h3 {
    margin-top: 1.5rem;
    font-size: 2.2rem;
}

.modal-content p {
    padding: 1rem 2rem 2rem;
    color: #555;
    font-size: 1.1rem;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .product-card.giant-card {
        grid-template-columns: 1fr;
    }
    
    .giant-card .product-image-wrapper {
        min-height: 250px;
    }
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .header-contact {
        text-align: center;
        margin-top: var(--spacing-xs);
    }
    
    .hero-content {
        padding-left: 5%;
        padding-right: 5%;
        text-align: center;
        margin: 0 auto;
    }
    
    .hero-overlay {
        background: rgba(20, 30, 20, 0.6);
    }

    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
}
