/* ---
Root Variables (Color Palette & Fonts)
--- */
:root {
    --primary-color: #0A2A4E; /* Deep Blue */
    --secondary-color: #FFFFFF;
    --accent-color: #00C896; /* Bright Mint Green */
    --bg-color: #F7F9FA; /* Lighter, cleaner gray */
    --text-color: #333333;
    --text-light: #555555;
    --border-color: #E0E0E0;
    
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Lato', sans-serif;
    
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-dark: 0 6px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s ease;
}

/* ---
General & Reset Styles
--- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    /* Subtle background pattern for texture */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23E0E0E0' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    /* Page load animation */
    animation: fadeInPage 0.5s ease-out forwards;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

@keyframes fadeInPage {
    from { opacity: 0; }
    to { opacity: 1; }
}

a:hover {
    color: var(--primary-color);
}

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

ul {
    list-style: none;
}

/* ---
Helper Classes
--- */
.container {
    width: 90%;
    max-width: 1140px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ---
Back to Top Button
--- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-dark);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ---
Buttons
--- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-speed);
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: #16a085;
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

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

/* Button loading state */
.btn.is-loading {
    position: relative;
    color: transparent !important; /* Hide button text */
    pointer-events: none; /* Prevent multiple clicks */
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ---
Header & Navigation
--- */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.main-header {
    background-color: var(--secondary-color);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

/* Scrolled state for sticky header */
.main-header.scrolled {
    box-shadow: var(--shadow-dark);
}
.main-header.scrolled nav {
    height: 80px; /* Reduced height */
}
.main-header.scrolled .logo img {
    height: 60px; /* Reduced logo size */
}
.main-header.scrolled .logo-text {
    font-size: 1.2rem; /* Reduce text size on scroll */
}

.main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 130px; /* Increased header height for a larger logo */
    transition: height 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.75rem; /* Further increased space for a wider feel */
}
.logo:hover .logo-text {
    color: var(--accent-color);
}
.logo:hover img {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 200, 150, 0.4); /* Mint green shadow */
}
.logo img {
    height: 100px; /* Made logo image significantly larger */
    width: auto;
    /* Removed border, padding, and background to let the logo breathe */
    border-radius: 0;
    transition: height 0.3s ease, transform 0.3s ease;
}

.logo-text {
    font-family: var(--font-primary);
    font-size: 1.6rem; /* Made brand name text larger */
    font-weight: 700;
    color: var(--primary-color);
    transition: font-size 0.3s ease, color 0.3s ease;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-light);
    font-size: 1rem;
}

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


.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-light);
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
}

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

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

.nav-links a.active {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* ---
Footer
--- */
.main-footer {
    background-color: var(--primary-color);
    color: #A9B4C2; /* Lighter text for footer */
    padding-top: 3rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start; /* Align columns to the top */
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-about { flex-basis: 300px; }
.footer-about p { margin-top: 1rem; }

.footer-logo img {
    max-height: 70px; /* Increased size for better visibility */
    /* Removed container styles to let the logo appear more naturally */
}

.make-in-india-logo {
    margin-top: 1rem;
    max-height: 40px;
    width: auto;
}

.footer-links h4 { color: var(--secondary-color); }
.footer-links ul { padding-top: 0.5rem; }
.footer-links a {
    color: #A9B4C2;
    padding: 0.25rem 0;
    display: inline-block; /* Needed for transition */
}
.footer-links a:hover {
    color: var(--secondary-color);
    transform: translateX(4px);
}

.footer-social h4 { color: var(--secondary-color); }
.social-icons {
    display: flex;
    gap: 1rem;
}
.social-icons a {
    font-size: 1.25rem;
    color: #A9B4C2;
}
.social-icons a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid #2A4A6E; /* Darker blue border */
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

/* ---
Home Page: Hero
--- */
.hero {
    background-color: var(--primary-color);
    background-size: cover;
    background-position: center;
    color: var(--secondary-color);
    padding: 6rem 0;
    animation: hero-slideshow 20s linear infinite;
    text-align: center;
    position: relative; /* Required for pseudo-element overlay */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 42, 78, 0.92); /* Dark blue overlay (Darkened) */
    /* Removed second slideshow animation */
    z-index: 1;
}

.hero-content {
    animation: none; /* Remove slideshow from content */
    background-image: none; /* Remove slideshow from content */
    position: relative;
    z-index: 2;
    max-width: 800px; /* Constrain width for better readability on large screens */
    margin-left: auto;
    margin-right: auto;
}

.hero-pretitle {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--accent-color);
    font-size: 3rem; /* Matched to h1 size */
    text-transform: none; /* Revert from uppercase */
    letter-spacing: 0; /* Reset letter spacing */
    margin-bottom: 1rem;
    display: block;
    /* New Animation */
    position: relative;
    opacity: 0;
    animation: fadeIn 0.1s ease-out 0.8s forwards;
}

.hero-pretitle::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    animation: text-reveal-mask 1s cubic-bezier(0.19, 1, 0.22, 1) 0.2s forwards;
}

@keyframes text-reveal-mask {
    from { width: 100%; }
    to { width: 0%; }
}

.hero-content h1 {
    color: var(--secondary-color);
    font-size: 3rem;
    margin-bottom: 1rem;
    /* Animation */
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.9s forwards;
}

.hero-subtitle {
    /* Animation */
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 1.1s forwards;
}

.hero-cta {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 1.3s forwards;
}

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

@keyframes hero-slideshow {
    0%   { background-image: url('images/hero-1.jpg'); }
    24%  { background-image: url('images/hero-1.jpg'); }
    25%  { background-image: url('images/hero-2.jpg'); }
    49%  { background-image: url('images/hero-2.jpg'); }
    50%  { background-image: url('images/hero-3.jpg'); }
    74%  { background-image: url('images/hero-3.jpg'); }
    75%  { background-image: url('images/hero-4.jpg'); }
    100% { background-image: url('images/hero-4.jpg'); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---
Home Page: Trust Bar
--- */
.trust-bar {
    background-color: var(--secondary-color);
    padding: 2.5rem 0;
    box-shadow: var(--shadow-dark);
    position: relative;
    z-index: 10;
    margin-top: -4rem; /* Overlap hero slightly */
    border-radius: 8px;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
}
.trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    text-align: center;
}
.trust-item i { color: var(--accent-color); font-size: 2rem; margin-bottom: 0.5rem; }
.trust-number { display: block; font-family: var(--font-primary); font-weight: 700; font-size: 1.8rem; color: var(--primary-color); line-height: 1.2; }
.trust-label { font-size: 0.85rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

/* ---
Home Page: Highlights
--- */
.highlights {
    padding: 4rem 0;
    padding: 6rem 0 4rem 0;
}

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

.highlight-card {
    background-color: var(--secondary-color);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border-top: 4px solid var(--accent-color);
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: var(--transition-speed);
}

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

.highlight-card i {
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 200, 150, 0.1); /* Light, transparent accent color */
    font-size: 2.25rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    transition: var(--transition-speed);
}

.highlight-card h3 {
    margin-bottom: 0.5rem;
}

.card-link {
    font-family: var(--font-primary);
    font-weight: 600;
}

/* --- Animation Helpers --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---
Home Page: Why Choose Us
--- */
.why-choose-us {
    padding: 4rem 0;
    background-color: var(--secondary-color);
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.why-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: var(--bg-color);
    transition: var(--transition-speed);
}

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

.why-card i {
    font-size: 2.75rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.why-card h3 {
    font-size: 1.4rem;
}

.why-card p {
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

/* ---
CTA Section
--- */
.cta-section {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 4rem 0 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--secondary-color);
}

.cta-section p {
    color: #DDEEFF;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto; /* Removed bottom margin to align with footer */
    margin-bottom: 1.5rem;
}


/* ---
Products Page
--- */
.product-catalog {
    padding: 4rem 0;
}

/* --- Product Catalog Table Styles --- */
.search-container { position: relative; max-width: 600px; margin: 0 auto 2rem auto; }
.search-input { width: 100%; padding: 12px 20px 12px 45px; font-size: 1rem; border: 1px solid var(--border-color); border-radius: 30px; outline: none; transition: all 0.3s ease; font-family: var(--font-secondary); box-sizing: border-box; }
.search-input:focus { border-color: var(--primary-color); box-shadow: 0 0 8px rgba(10, 42, 78, 0.2); }
.search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #888; font-size: 1.1rem; }

.product-table-container { overflow-x: auto; margin-top: 2rem; border-radius: 8px; box-shadow: var(--shadow-light); }
.product-table { width: 100%; border-collapse: collapse; background: #fff; text-align: left; }
.product-table th, .product-table td { padding: 15px; border-bottom: 1px solid #eaeaea; }
.product-table th { background-color: var(--primary-color); color: white; font-family: var(--font-primary); font-weight: 600; white-space: nowrap; }
.product-table tr:last-child td { border-bottom: none; }
.product-table tr:hover { background-color: #f8f9fa; }

.product-table th.sortable { cursor: pointer; user-select: none; transition: background-color 0.3s; }
.product-table th.sortable:hover { background-color: #0c3666; }
.product-table th.sortable i { margin-left: 8px; color: rgba(255, 255, 255, 0.6); }

.product-table td .btn { padding: 8px 16px; font-size: 0.9rem; white-space: nowrap; }

.category-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.badge-industrial { background-color: #e3f2fd; color: #0d6efd; }
.badge-specialty { background-color: #fdf1e3; color: #fd7e14; }
.badge-pharma { background-color: #e8f5e9; color: #198754; }

.product-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background-color: var(--secondary-color);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-speed);
}

.filter-btn:hover {
    background-color: var(--bg-color);
    border-color: var(--accent-color);
}

.filter-btn.active {
    background-color: var(--accent-color);
    color: var(--secondary-color);
    border-color: var(--accent-color);
}

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

.product-card {
    background-color: var(--secondary-color);
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease, max-height 0.4s ease-in-out;
    max-height: 500px; /* Set a large max-height for transition */
}

.product-card.is-hidden {
    opacity: 0;
    max-height: 0;
}
.product-card:hover {
    box-shadow: var(--shadow-dark);
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.product-card img.is-loaded {
    opacity: 1;
}

.product-card-content {
    padding: 1.5rem;
}

.product-card-content h3 {
    margin-bottom: 0.5rem;
}

.product-card-content p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ---
Contact Page
--- */
.contact-page {
    padding: 4rem 0;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.contact-form-container,
.contact-info {
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

/* Form */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group label {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-light);
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    pointer-events: none;
    transition: all 0.2s ease;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-bottom: 0.5rem;
    font-family: var(--font-secondary);
    font-size: 1rem;
    border: none;
    border-bottom: 2px solid var(--border-color);
    border-radius: 0;
    background-color: transparent;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group input:not(:placeholder-shown),
.form-group textarea:not(:placeholder-shown) {
    outline: none;
    border-bottom-color: var(--accent-color);
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -1.2rem;
    left: 0;
    font-size: 0.85rem;
    color: var(--accent-color);
}

#form-status {
    margin-top: 1rem;
    font-weight: 600;
}
#form-status.success { color: #16a085; }
#form-status.error { color: #c0392b; }


/* Contact Info */
.contact-info h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.contact-info ul {
    margin-top: 2rem;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.contact-info i {
    font-size: 1.25rem;
    color: var(--accent-color);
    width: 30px;
    margin-top: 4px;
}

.contact-social {
    margin-top: 2rem;
    display: flex;
    gap: 1.25rem;
}

.contact-social a {
    font-size: 1.5rem;
    color: var(--primary-color);
}
.contact-social a:hover {
    color: var(--accent-color);
}


/* Map */
.map-container {
    margin-top: 4rem;
}

.map-container h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 8px;
}


/* ---
Responsive Design (Mobile-First)
--- */

/* Tablet */
@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    .hero-content h1 { font-size: 3.5rem; }
    .hero-pretitle { font-size: 3.5rem; }

    .trust-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .highlights-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .why-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-layout {
        grid-template-columns: 2fr 1fr;
        gap: 3rem;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Mobile Nav Specifics */
@media (max-width: 767px) {
    body.nav-open {
        overflow: hidden;
    }
    body.nav-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background-color: var(--secondary-color);
        box-shadow: var(--shadow-dark);
        z-index: 1001;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        padding-top: 4rem;
    }
    
    .nav-links.nav-active {
        transform: translateX(0);
    }

    .nav-links a {
        display: block;
        padding: 1.25rem;
        width: 100%;
        border-bottom: 1px solid var(--bg-color);
    }
    
    .nav-links a::after {
        display: none; /* No underline on mobile nav */
    }

    .header-right {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-toggle {
        display: block;
    }
    
    .hero { padding: 4rem 0; }
    .hero-content h1 { font-size: 2.25rem; }
    .hero-content p { font-size: 1.1rem; }
    .hero-cta { flex-direction: column; }
    .trust-bar { margin-top: 0; border-radius: 0; width: 100%; box-shadow: none; border-bottom: 1px solid var(--border-color); }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}