/*
Theme Name: HariPasar
Theme URI: http://example.com/haripasar
Author: Antigravity
Author URI: http://example.com
Description: A modern FMCG WordPress theme converted from HTML.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: haripasar
*/

:root {
    --primary: #1a2a6c;   /* Deep Navy for Trust */
    --accent: #fdbb2d;    /* Gold for Energy */
    --text: #333;
    --light: #f9f9f9;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
    background: var(--white);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 8%;
    background: transparent;
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 15px 8%;
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 26px;
    font-weight: 700;
    color: var(--white); /* White on transparent background */
    transition: 0.3s;
    letter-spacing: -0.5px;
}

.navbar.scrolled .logo {
    color: var(--primary); /* Deep Navy on scroll */
}

.logo span { color: var(--accent); }

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9); /* Subtle white on transparent */
    margin: 0 15px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.3s;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: 0.3s;
}

.nav-links li a:hover::after {
    width: 100%;
}

.navbar.scrolled .nav-links li a {
    color: var(--text); /* Dark on scroll */
}

.nav-links li a:hover { color: var(--accent); }

.cta-btn {
    background: var(--accent);
    color: var(--primary) !important;
    padding: 10px 25px;
    border-radius: 50px;
    margin-left: 20px;
    box-shadow: 0 4px 15px rgba(253, 187, 45, 0.3);
}

.navbar.scrolled .cta-btn {
    background: var(--primary);
    color: white !important;
}

.menu-toggle {
    display: none;
    font-size: 30px;
    color: var(--white);
    cursor: pointer;
    transition: 0.3s;
}

.navbar.scrolled .menu-toggle {
    color: var(--primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    background-color: var(--primary);
    background: linear-gradient(rgba(26, 42, 108, 0.7), rgba(26, 42, 108, 0.7)), 
                url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=1600&q=80') center/cover;
    display: flex;
    align-items: center;
    padding: 0 8%;
    color: var(--white);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content h1 span { color: var(--accent); }

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

.btn {
    padding: 12px 35px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    margin-right: 15px;
    transition: 0.3s;
}

.btn.primary { background: var(--accent); color: var(--primary); }
.btn.secondary { border: 2px solid var(--white); color: var(--white); }
.btn:hover { opacity: 0.9; transform: translateY(-3px); }

@media (max-width: 576px) {
    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    .btn {
        margin-right: 0;
        text-align: center;
        width: 100%;
    }
}

/* Brand Grid */
.section { padding: 80px 8%; }
.container { max-width: 1200px; margin: auto; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 50px; color: var(--primary); }

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

.card {
    padding: 40px;
    background: var(--light);
    border-radius: 15px;
    text-align: center;
    transition: 0.4s;
    border-bottom: 4px solid transparent;
}

.card ion-icon { font-size: 40px; color: var(--accent); margin-bottom: 20px; }
.card h3 { margin-bottom: 15px; }
.card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-color: var(--primary); }

/* Sustainability Split Section */
.split-section { display: flex; height: 500px; }
.split-img { 
    flex: 1; 
    background: url('https://images.unsplash.com/photo-1532996122724-e3c354a0b15b?auto=format&fit=crop&w=800&q=80') center/cover; 
}
.split-text { 
    flex: 1; 
    background: var(--primary); 
    color: white; 
    padding: 80px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}
.split-text span { color: var(--accent); text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }
.split-text h2 { font-size: 2.2rem; margin: 15px 0; }
.read-more { color: var(--accent); text-decoration: none; margin-top: 20px; font-weight: 600; }

/* News List */
.news-item {
    display: flex;
    justify-content: space-between;
    padding: 25px 0;
    border-bottom: 1px solid #ddd;
}
.news-item h4 { font-size: 1.1rem; cursor: pointer; transition: 0.2s; }
.news-item h4:hover { color: var(--primary); }

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

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 3px;
    transition: 0.3s;
}

.view-all:hover {
    color: var(--accent);
}

/* Footer */
footer { background: #111; color: #ccc; padding: 60px 8% 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; }
.white span { color: var(--accent); }
.footer-links ul { list-style: none; margin-top: 20px; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links a { color: #ccc; text-decoration: none; transition: 0.3s; }
.footer-links a:hover { color: var(--accent); }
.social-icons { margin-top: 20px; display: flex; gap: 20px; font-size: 24px; cursor: pointer; }
.copyright { text-align: center; margin-top: 50px; font-size: 14px; border-top: 1px solid #333; padding-top: 20px; }

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 1s all ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.product-card {
    transition: transform 0.4s, opacity 0.4s, display 0.4s allow-discrete;
}

/* Stats Section */
.stats {
    background: var(--primary);
    color: var(--white);
    padding: 60px 8%;
    text-align: center;
}

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

.stat-item h2 {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Values Section */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.value-card {
    padding: 40px;
    border: 1px solid #eee;
    border-radius: 20px;
    transition: 0.3s;
}

.value-card ion-icon {
    font-size: 35px;
    color: var(--primary);
    margin-bottom: 20px;
}

.value-card:hover {
    background: var(--white);
    box-shadow: var(--shadow);
    border-color: transparent;
}

/* Newsletter */
.newsletter {
    background: var(--light);
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: auto;
}

.subscribe-form {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

.subscribe-form input {
    flex: 1;
    padding: 15px 25px;
    border: 1px solid #ddd;
    border-radius: 50px;
    outline: none;
}

.subscribe-form .btn {
    margin-right: 0;
    border-radius: 50px;
    cursor: pointer;
    border: none;
}

/* Corporate Page Styles */
.page-header {
    height: 45vh;
    background-color: var(--primary);
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.page-header h1 { font-size: 3rem; margin-bottom: 10px; }
.page-header p { opacity: 0.8; max-width: 600px; margin: auto; }

/* Timeline (About) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--primary);
    top: 0; bottom: 0; left: 50%;
    margin-left: -1px; /* Perfectly center the 2px line */
    transform: scaleY(0);
    transform-origin: top;
    transition: 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline.active::after {
    transform: scaleY(1);
}

.timeline-item {
    padding: 20px 40px;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline.active .timeline-item {
    opacity: 1;
    transform: translateY(0);
}

/* Dots */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: 0;
    background: var(--white);
    border: 4px solid var(--accent);
    top: 25px;
    border-radius: 50%;
    z-index: 10;
    transform: translateX(50%) scale(0); /* Center on right edge */
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-item:nth-child(even) { left: 50%; }

.timeline-item:nth-child(even)::after {
    left: 0;
    right: auto;
    transform: translateX(-50%) scale(0); /* Center on left edge */
}

.timeline.active .timeline-item::after {
    transform: translateX(50%) scale(1);
}

.timeline.active .timeline-item:nth-child(even)::after {
    transform: translateX(-50%) scale(1);
}

/* Staggered Delays */
/* Staggered Delays for infinite items */
.timeline-item:nth-child(1) { transition-delay: 0.2s; }
.timeline-item:nth-child(1)::after { transition-delay: 0.4s; }
.timeline-item:nth-child(2) { transition-delay: 0.4s; }
.timeline-item:nth-child(2)::after { transition-delay: 0.6s; }
.timeline-item:nth-child(3) { transition-delay: 0.6s; }
.timeline-item:nth-child(3)::after { transition-delay: 0.8s; }
.timeline-item:nth-child(n+4) { transition-delay: 0.8s; }
.timeline-item:nth-child(n+4)::after { transition-delay: 1.0s; }

/* Team Grid (About) */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.team-card {
    text-align: center;
    padding: 30px;
}

.team-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #ddd;
    margin-bottom: 20px;
    object-fit: cover;
}

/* Job Board (Careers) */
.job-list { margin-top: 40px; }
.job-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: white;
    border: 1px solid #eee;
    border-radius: 15px;
    margin-bottom: 20px;
    transition: 0.3s;
}

.job-item:hover { box-shadow: var(--shadow); transform: scale(1.02); }

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    outline: none;
}

/* Product Cards (Global) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: 0.4s;
    border: 1px solid #eee;
}

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

.product-img {
    height: 220px;
    background: #f0f0f0;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.product-card:hover .product-img img {
    transform: scale(1.1);
}

.product-info {
    padding: 25px;
}

.product-category {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.product-info h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.product-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 992px) {
    .navbar { padding: 15px 5%; }
    
    .menu-toggle { 
        display: block; 
        z-index: 1001;
        unicode-bidi: isolate; /* Ensuring it stays on top and visible */
    }
    
    /* Force dark color for close icon when menu is open */
    .nav-links.active ~ .menu-toggle {
        color: var(--primary);
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100vw; /* Using viewport width for guaranteed full width */
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        transition: 0.5s;
        box-shadow: none;
        z-index: 999;
        padding: 50px;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .nav-links li a {
        color: var(--text) !important;
        font-size: 1.3rem; /* Larger for touch */
    }
    
    .cta-btn {
        margin-left: 0;
        margin-top: 10px;
        width: 80%;
        text-align: center;
    }
    
    .contact-container { grid-template-columns: 1fr; }
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; left: 0 !important; }
    .timeline-item::after { left: 31px !important; right: auto !important; transform: translateX(-50%) scale(0) !important; }
    .timeline.active .timeline-item::after { transform: translateX(-50%) scale(1) !important; }
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5rem; }
    .split-section { flex-direction: column; height: auto; }
    .footer-grid { grid-template-columns: 1fr; }
    .subscribe-form { flex-direction: column; }
    .brand-grid, .stats-grid, .values-grid, .team-grid {
        grid-template-columns: 1fr;
    }
    .section { padding: 60px 5%; }
}