/* 
  Panchmeva Foods and Feeds - Premium Modern Design
*/

/* --- Brand Utility Overrides --- */
.text-primary { color: var(--brand-green) !important; }
.text-secondary { color: var(--brand-blue) !important; }
.bg-primary { background: var(--brand-blue) !important; }
.bg-secondary { background: var(--brand-green) !important; }
.bg-primary-dark { background: #001529 !important; }

.btn-primary { 
    background: var(--brand-green) !important; 
    border-color: var(--brand-green) !important; 
    font-weight: 600;
}
.btn-primary:hover { 
    background: var(--brand-blue) !important; 
    border-color: var(--brand-blue) !important; 
}

:root {
    --brand-blue: #003366;      /* Matched from logo */
    --brand-green: #1d7b3a;     /* Matched from logo */
    --accent-gold: #FFB800;
    --text-dark: #1A1A1A;
    --text-muted: #666666;
    --bg-light: #F8FAFC;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 2px 4px 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);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 30px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.7;
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

/* --- Premium Pre-loader --- */
.panchmava-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    transition: opacity 0.6s ease, visibility 0.6s;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.loader-circle {
    width: 140px;
    height: 140px;
    border: 2px solid rgba(46, 125, 50, 0.05);
    border-top: 3px solid var(--brand-green);
    border-radius: 50%;
    animation: spin 2s linear infinite;
    position: absolute;
    top: -20px;
}

.loader-central-hen {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    filter: drop-shadow(0 5px 15px rgba(46, 125, 50, 0.2));
    animation: breathingHen 2.5s ease-in-out infinite;
}

.loader-central-hen img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

@keyframes breathingHen {
    0%, 100% { transform: scale(0.9) rotate(-2deg); }
    50% { transform: scale(1.1) rotate(2deg); }
}

.loader-text {
    display: flex;
    gap: 5px;
    margin-top: 30px;
}

.letter {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--brand-blue);
    display: inline-block;
    animation: waveText 1.5s ease-in-out infinite;
}

/* Stagger letters animation */
.letter:nth-child(1) { animation-delay: 0.1s; }
.letter:nth-child(2) { animation-delay: 0.2s; }
.letter:nth-child(3) { animation-delay: 0.3s; }
.letter:nth-child(4) { animation-delay: 0.4s; }
.letter:nth-child(5) { animation-delay: 0.5s; }
.letter:nth-child(6) { animation-delay: 0.6s; }
.letter:nth-child(7) { animation-delay: 0.7s; }
.letter:nth-child(8) { animation-delay: 0.8s; }
.letter:nth-child(9) { animation-delay: 0.9s; }

.loader-line-container {
    width: 100px;
    height: 3px;
    background: #f0f0f0;
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
}

.loader-line {
    width: 0;
    height: 100%;
    background: var(--brand-green);
    animation: fillLine 2s infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

@keyframes waveText {
    0%, 100% { transform: translateY(0); color: var(--brand-blue); }
    50% { transform: translateY(-10px); color: var(--brand-green); }
}

@keyframes fillLine {
    0% { width: 0; transform: translateX(-100%); }
    50% { width: 100%; transform: translateX(0); }
    100% { width: 0; transform: translateX(100%); }
}

.preloader-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Side Scroll Progress Bar Styling */
.side-scroll-container {
    position: fixed;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 150px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    z-index: 99999;
    overflow: hidden;
}

.side-scroll-bar {
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, #ed7124, var(--brand-green));
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(29, 123, 58, 0.4);
    transition: height 0.1s ease-out;
}

@media (max-width: 991px) {
    .side-scroll-container {
        right: 8px;
        height: 100px; /* Smaller on mobile */
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* --- Navigation --- */
.header-wrapper {
    position: relative;
    z-index: 1000;
}

.header-top-new {
    background: linear-gradient(135deg, var(--brand-blue) 0%, #001f3d 100%);
    padding: 8px 0;
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
}

@media (max-width: 767px) {
    .header-top-new .container {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    .contact-info-new {
        flex-direction: column;
        gap: 2px;
    }
    .contact-info-new span {
        display: none; /* Hide the separator | on mobile */
    }
    .contact-info-new a {
        margin-right: 0;
    }
    .social-links-new {
        margin-top: 5px;
    }
}

.contact-info-new a {
    color: var(--white);
    text-decoration: none;
    margin-right: 20px;
    transition: var(--transition);
}

.contact-info-new a:hover { opacity: 0.8; }

.social-links-new a {
    color: var(--white);
    text-decoration: none;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    margin-left: 10px;
    transition: var(--transition);
}

.social-links-new a:hover {
    background: var(--brand-green);
    transform: translateY(-3px);
}

.header-main-unified {
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 15px 0;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-main-unified.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 0;
    box-shadow: var(--shadow-md);
}

.logo-new img {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

@media (max-width: 991px) {
    .logo-new img {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .logo-new img {
        height: 40px;
    }
}

.navbar-nav .nav-link {
    color: var(--brand-blue) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 20px !important;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: var(--brand-green);
    border-radius: 10px;
    transform: scaleX(0);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

/* Hover Dropdown */
@media (min-width: 992px) {
    .hover-dropdown:hover > .dropdown-menu {
        display: block;
        animation: fadeDown 0.2s ease forwards;
        margin-top: 0;
    }
    .hover-dropdown > .dropdown-menu {
        margin-top: 0;
    }
    .hover-dropdown::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 20px;
        bottom: -20px;
        left: 0;
    }
}

/* --- Hierarchical Dropdown Styles --- */
.hover-bg-light {
    transition: all 0.2s ease;
}
.hover-bg-light:hover {
    background-color: rgba(0, 51, 102, 0.04);
}
.hover-text-primary:hover {
    color: var(--brand-green) !important;
    padding-left: 5px;
}
.submenu-arrow {
    transition: transform 0.3s ease;
}
.dropdown-menu li:hover .submenu-arrow {
    transform: rotate(90deg);
    color: var(--brand-green) !important;
    opacity: 1 !important;
}
.tiny-icon {
    font-size: 0.6rem;
    opacity: 0.6;
}

/* Mobile Menu Navigation Styling */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--white);
        padding: 5px 0 15px 0;
        margin-top: 15px;
        border-radius: 12px;
        box-shadow: 0 15px 35px rgba(0, 31, 61, 0.08);
        border: 1px solid rgba(0,0,0,0.04);
    }
    
    .navbar-nav {
        align-items: flex-start !important;
        width: 100%;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .navbar-nav .nav-item {
        width: 100%;
        position: relative;
    }

    .navbar-nav .nav-item::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 20px;
        right: 20px;
        height: 1px;
        background-color: rgba(0,0,0,0.05);
    }

    .navbar-nav .nav-item:last-child::after {
        display: none;
    }
    
    .navbar-nav .nav-link {
        padding: 15px 25px !important;
        width: 100%;
        color: var(--text-dark) !important;
        transition: all 0.3s ease;
        text-align: left;
        font-weight: 500;
        font-size: 1.05rem;
        background-color: transparent;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        color: var(--brand-green) !important;
        background-color: #fcfcfc;
        padding-left: 32px !important;
    }
    
    .navbar-nav .nav-link::after {
        display: none !important;
    }
    
    .navbar-nav .dropdown-toggle::after {
        display: none !important;
    }
    
    .dropdown-icon {
        transition: transform 0.3s ease;
    }
    
    .navbar-nav .dropdown-toggle[aria-expanded="true"] .dropdown-icon {
        transform: rotate(-180deg);
    }
    
    .dropdown-menu {
        border: none;
        background: #fafafa;
        padding: 0;
        margin: 0;
        border-radius: 0;
        box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
    }
    
    .dropdown-item {
        padding: 14px 25px 14px 45px;
        color: var(--text-dark);
        font-weight: 400;
        transition: all 0.3s ease;
        position: relative;
    }

    .dropdown-item::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 45px;
        right: 25px;
        height: 1px;
        background-color: rgba(0,0,0,0.03);
    }

    .dropdown-item:last-child::after {
        display: none;
    }
    
    .dropdown-item:hover, .dropdown-item:active {
        background-color: transparent !important;
        color: var(--brand-green) !important;
        padding-left: 52px;
    }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.custom-menu-item {
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s ease;
    display: block;
}

.custom-menu-item:hover, .custom-menu-item:focus {
    background-color: transparent !important;
    color: var(--brand-green) !important;
    transform: translateX(8px);
}

.btn-become-dist-small {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-green) 100%);
    color: white !important;
    padding: 12px 25px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border: none;
    box-shadow: 0 4px 15px rgba(29, 123, 58, 0.2);
}

.btn-become-dist-small:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(29, 123, 58, 0.3);
}

/* --- Hero Section --- */
.carousel-item {
    height: 75vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    background: linear-gradient(to right, rgba(0, 51, 102, 0.8), rgba(29, 123, 58, 0.6));
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-content h1 {
    font-size: 3.8rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

@media (max-width: 991px) {
    .hero-content h1 { font-size: 2.22rem; line-height: 1.2; }
    .hero-content .lead { font-size: 1.1rem !important; margin-bottom: 1.5rem !important; padding: 0 15px; }
    .hero-content .btn { 
        padding: 12px 24px !important; 
        font-size: 0.9rem; 
        width: 100%; 
        max-width: 300px;
        margin-bottom: 12px; 
        margin-right: 0 !important; 
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
    
    .carousel-item {
        height: auto;
        min-height: 550px;
        padding: 100px 0;
    }
    
    .section-padding { padding: 60px 0; }
    .display-5 { font-size: 2.22rem; }
    .display-4 { font-size: 2.8rem; }
    
    /* Product Cards Mobile */
    .product-card .card-img-top { height: 280px; }
    .product-card .card-body { padding: 20px; }
    
    /* Stats Mobile */
    .stat-item h2 { font-size: 2.5rem; }
    .stat-item p { font-size: 0.9rem; }
}

@media (max-width: 575px) {
    .logo-new img { height: 42px; }
    .btn-become-dist-small { 
        padding: 8px 12px; 
        font-size: 12px !important;
    }
    .btn-become-dist-small i {
        margin-right: 0;
    }
    .hero-content h1 { font-size: 1.8rem; }
    .display-4 { font-size: 2rem; }
    .display-5 { font-size: 1.6rem; }
}

/* --- Section Styling --- */
.section-padding { padding: 100px 0; }

.section-title {
    margin-bottom: 60px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* --- Section Patterns --- */
.bg-pattern {
    position: relative;
}

.bg-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(var(--brand-blue) 0.8px, transparent 0.8px), radial-gradient(var(--brand-blue) 0.8px, var(--bg-light) 0.8px);
    background-size: 24px 24px;
    background-position: 0 0, 12px 12px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.bg-pattern > .container {
    position: relative;
    z-index: 1;
}

/* --- Cards --- */
.premium-card {
    background: var(--white);
    border: none;
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    position: relative;
    z-index: 1;
}

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

.product-card {
    border: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.product-card .card-img-top {
    height: 380px;
    object-fit: contain;
    background: #ffffff;
    padding: 10px;
    transition: var(--transition);
}

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

.product-card .card-body {
    padding: 30px;
    background: var(--white);
}

/* --- Stats Section --- */
.stats-section {
    background: var(--brand-blue);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('../images/pattern.png');
    opacity: 0.1;
}

.stat-item h2 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--brand-green);
}

/* --- Buttons --- */
.btn-primary-custom {
    background: var(--brand-green);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    background: var(--brand-blue);
    transform: translateY(-3px);
}

/* --- Footer --- */
footer {
    background: #001529;
    color: rgba(255,255,255,0.7);
    padding: 100px 0 20px;
}

footer h5 {
    color: var(--white);
    margin-bottom: 30px;
}

footer li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

footer li a:hover {
    color: var(--brand-green);
    padding-left: 8px;
}

/* --- Custom Animations --- */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

.bg-light-green {
    background-color: #f0f7f2;
}

/* --- Extra Responsiveness Fixes --- */
@media (max-width: 1199px) {
    .hero-content h1 { font-size: 3rem; }
}

@media (max-width: 991px) {
    .section-padding { padding: 60px 0; }
    .display-3 { font-size: 2.5rem; }
    
    /* Reverse columns on mobile for better flow if needed */
    .row-reverse-mobile { flex-direction: column-reverse; }
    
    .logo-new img { height: 50px; }
}

@media (max-width: 767px) {
    .premium-card { padding: 30px 20px; }
    .product-card .card-img-top { height: 300px; }
    .stats-section { padding: 50px 0; }
    .stat-item { margin-bottom: 20px; }
    
    /* Form responsiveness */
    .form-control-lg { font-size: 1rem; padding: 12px 15px; }
    
    /* Footer responsiveness */
    footer .row > div { margin-bottom: 40px; text-align: center; }
    footer .social-links { justify-content: center; }
}

@media (max-width: 480px) {
    .display-3 { font-size: 1.8rem; }
    .display-4 { font-size: 1.6rem; }
    .display-5 { font-size: 1.4rem; }
    .logo-new img { height: 35px; }
    .btn-lg, .btn-primary-custom { width: 100%; }
    .section-padding { padding: 40px 0; }
    
    /* Preloader text size */
    .letter { font-size: 1.2rem; }
}

/* Ensure no elements cause overflow */
* {
    max-width: 100vw;
    box-sizing: border-box;
}
