/* =========================================================================
   Farmers Producer Company - Main Stylesheet
   ========================================================================= */

/* --- Variables & Core Settings --- */
:root {
    /* Color Palette */
    --color-primary: #297347;
    /* Wayanad Hills Logo Green */
    --color-primary-light: #3a9c61;
    --color-primary-dark: #1e5233;
    --color-secondary: #96c93d;
    /* Logo Light Green accent */
    --color-text-main: #333333;
    --color-text-muted: #666666;
    --color-bg-light: #f8f9fa;
    --color-bg-white: #ffffff;
    --color-border: #e2e8f0;

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;

    /* Spacing & Layout */
    --container-max-width: 1200px;
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --box-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08);
}

/* --- Resets --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

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

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

ul {
    list-style: none;
}

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

/* --- Utility Classes --- */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

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

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

.section-subtitle {
    display: block;
    color: var(--color-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

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

.rounded-image {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.shadow-md {
    box-shadow: var(--box-shadow);
}

.shadow-lg {
    box-shadow: var(--box-shadow-lg);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
    cursor: pointer;
    border: 2px solid transparent;
}

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

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

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

.btn-outline:hover {
    background-color: var(--color-bg-white);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.btn-text {
    color: var(--color-primary);
    font-weight: 600;
    padding: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}

.btn-text:hover {
    color: var(--color-primary-dark);
    border-bottom-color: var(--color-primary-dark);
}

/* --- Header & Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--color-bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-speed) ease;
    padding: 15px 0;
}

.navbar.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

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

.logo-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.logo img {
    height: 60px;
    /* Constrain to navbar */
    width: auto;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.1;
    max-width: 250px;
}

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

.nav-menu a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--color-text-main);
    position: relative;
    padding: 5px 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-secondary);
    transition: width var(--transition-speed) ease;
}

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

/* Hamburger Menu (Mobile) */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-primary-dark);
    transition: all var(--transition-speed);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--color-bg-white);
    padding-top: 80px;
    /* Offset nav */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    color: var(--color-bg-white);
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px;
}

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

/* --- About Preview Section --- */
.about-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text,
.about-image-wrapper {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* --- Chairman Section --- */
.chairman-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.chairman-image {
    flex: 0 0 40%;
}

.chairman-content {
    flex: 1;
}

.chairman-content h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.chairman-message {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--color-text-muted);
    border-left: 4px solid var(--color-primary-light);
    padding-left: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.chairman-meta h3 {
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
}

.chairman-designation {
    color: var(--color-secondary);
    font-weight: 500;
}

/* --- Leadership Section --- */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.member-card {
    background-color: var(--color-bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.member-photo img {
    width: 100%;
    aspect-ratio: 1/1;
    /* Square for portraits */
    object-fit: cover;
    object-position: top;
    /* Focus on the face */
    display: block;
}

/* Override for products to keep the 4/3 aspect ratio */
.product-card .member-photo img {
    aspect-ratio: 4/3;
    object-position: center;
}

/* Availability Ribbon Overlay styling */
.product-card {
    position: relative;
    /* Ensure ribbon stays inside card */
    overflow: hidden;
    /* Clip the ribbon edges cleanly */
}

.availability-ribbon {
    position: absolute;
    top: 15px;
    left: -35px;
    background-color: var(--color-primary);
    /* Green brand color */
    color: var(--color-bg-white);
    padding: 5px 40px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: rotate(-45deg);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.member-info {
    padding: 1.5rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.member-name {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.member-role {
    color: var(--color-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.member-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: auto;
    /* Pushes button to bottom */
}

/* Base state for truncating text */
.text-truncate-container {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all var(--transition-speed);
}

/* Expanded state */
.text-expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

/* Styling for the Read More button itself */
.read-more-btn {
    display: inline-block;
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1.5rem;
    text-align: left;
    transition: color var(--transition-speed);
}

.read-more-btn:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .footer-logo-block {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--color-bg-white);
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
}

.footer-brand .footer-logo {
    height: 80px;
    /* Larger fit for footer */
    width: auto;
    object-fit: contain;
    margin-bottom: 10px;
}

.footer-logo-text {
    color: var(--color-primary-dark);
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.2;
}

.footer-about {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

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

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-bg-white);
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
}

.social-icon:hover {
    background-color: var(--color-secondary);
    color: var(--color-bg-white);
}

.footer-links h3,
.footer-contact h3 {
    color: var(--color-bg-white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: var(--color-secondary);
    padding-left: 5px;
}

.footer-contact ul li {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-contact strong {
    color: var(--color-bg-white);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.875rem;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    .about-container,
    .chairman-container {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        /* approx header height */
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--color-bg-white);
        padding: 2rem;
        transition: left var(--transition-speed);
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .nav-menu a {
        font-size: 1.25rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        text-align: center;
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- Floating Contact Icon --- */
.floating-contact-icon {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--box-shadow-lg);
    z-index: 1000;
    transition: all var(--transition-speed);
}

.floating-contact-icon:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-3px);
    color: var(--color-secondary);
}

.floating-contact-icon svg {
    width: 26px;
    height: 26px;
}

@media (max-width: 768px) {
    .floating-contact-icon {
        bottom: 75px;
        right: 10px;
        width: 45px;
        height: 45px;
    }
    .floating-contact-icon svg {
        width: 22px;
        height: 22px;
    }
}

/* --- Floating Partners Panel --- */
.floating-partners-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--color-bg-white);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    border: 1px solid var(--color-border);
}

.partners-title {
    font-size: 0.70rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.partners-logos {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.partners-logos img {
    height: 30px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .floating-partners-panel {
        bottom: 10px;
        right: 10px;
        padding: 5px 8px;
        gap: 5px;
    }

    .partners-logos img {
        height: 20px;
    }

    .partners-title {
        font-size: 0.60rem;
    }
}