/* Design system: colors and typography */
:root {
    --color-primary: #1a1f29; /* dark navy/charcoal */
    --color-secondary: #ffffff;
    --color-accent: #0056a6; /* accent blue */
    --color-light: #f5f5f5;
    --color-muted: #777;
    --font-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.25rem;
    --fs-xxl: 1.5rem;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --radius: 4px;
    --transition-fast: 0.2s ease-in-out;
    --transition-medium: 0.4s ease-in-out;
}
/* Basic reset and typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: var(--font-base);
    color: var(--color-primary);
    line-height: 1.6;
    padding-top: 70px; /* space for fixed header */
    background: var(--color-secondary);
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Utility spacing */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-sm { margin-bottom: var(--space-sm); }
.pb-md { padding-bottom: var(--space-md); }

/* scroll animation helper */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-medium), transform var(--transition-medium);
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: none;
}

/* Typography scale */
h1 { font-size: var(--fs-xxl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p, li, a { font-size: var(--fs-base); }


/* Header */
.site-header {
    background: var(--color-secondary);
    border-bottom: 1px solid var(--color-light);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
    /* extra vertical spacing so the logo sits comfortably */
    padding: var(--space-xs) 0;
}
.site-header.scrolled {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.site-header .logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    text-decoration: none;
    cursor: pointer;
}
.site-header .logo-img {
    /* constrain by height so any aspect ratio fits without distortion */
    height: 40px;
    width: auto;
    max-width: 150px; /* don't let a very wide file push the header wide */
    display: block;
    object-fit: contain; /* ensures the image scales cleanly */
}
.site-header .logo-text {
    font-size: var(--fs-lg);
    font-weight: bold;
    color: var(--color-primary);
}.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: var(--space-sm);
}
.main-nav a {
    text-decoration: none;
    color: var(--color-primary);
    padding: var(--space-xs) var(--space-sm);
    display: block;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.main-nav a:hover,
.main-nav a.active {
    background: var(--color-accent);
    color: var(--color-secondary);
    border-radius: var(--radius);
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-toggle .hamburger,
.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    transition: transform 0.3s ease;
    border-radius: 2px;
    position: relative;
}
.nav-toggle .hamburger::before {
    top: -8px;
    position: absolute;
}
.nav-toggle .hamburger::after {
    top: 8px;
    position: absolute;
}
.nav-open .nav-list {
    display: flex;
    flex-direction: column;
}

/* Footer extended */
.site-footer {
    background: #222;
    color: #eee;
    text-align: left;
    padding: 2rem 0 1rem;
}
.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}
.footer-about,
.footer-links,
.footer-contact,
.footer-social {
    flex: 1 1 200px;
}
.footer-links ul {
    list-style: none;
    padding: 0;
}
.footer-links a {
    color: #eee;
    text-decoration: none;
}
.footer-links a:hover {
    text-decoration: underline;
}
.footer-bottom {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #aaa;
}

/* Hero */
.hero-video {
    position: relative;
    height: 80vh;
    overflow: hidden;
}
.hero-video .hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.4);
    color: #fff;
    text-align: center;
    padding: 0 1rem;
}
.hero-overlay h1 {
    font-size: 2.5rem;
    max-width: 800px;
    margin-bottom: 1.5rem;
}
.hero-buttons .btn {
    margin: 0 0.5rem;
}

/* Stats */
.stats-section {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: 3rem 0;
    background: #f9f9f9;
}
.stats-section .stat h3 {
    font-size: 2rem;
    color: #222;
}
.stats-section .stat p {
    font-size: 1rem;
    color: #555;
}

/* Certifications */
.certifications h2 {
    margin-bottom: 1rem;
    text-align: center;
}
.cert-logos {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.cert-logos img {
    max-width: 120px;
    opacity: 0.8;
}

/* Product cards */
.cards {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    width: 300px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}
.card:hover {
    transform: translateY(-5px);
}
.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.card h3 {
    padding: 1rem;
}

/* Capabilities */
.capabilities {
    padding: 3rem 0;
}
.capabilities h2 {
    text-align: center;
    margin-bottom: 1rem;
}
.capabilities p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: #555;
}

/* Gallery preview */
.gallery-preview .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
    gap: 1rem;
}
.gallery-preview .gallery-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Clients slider */
.clients-slider .slider {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 1rem 0;
}
.clients-slider .slider img {
    max-height: 60px;
    object-fit: contain;
}

/* Gallery page filters */
.filter-buttons {
    text-align: center;
    margin: 2rem 0 1rem;
}
.filter-buttons button {
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #0056a6;
    background: transparent;
    color: #0056a6;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}
.filter-buttons button.active,
.filter-buttons button:hover {
    background: #0056a6;
    color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
    gap: 1rem;
}
.gallery-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
}

/* lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.lightbox-img {
    max-width: 90%;
    max-height: 90%;
}
.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}
.lightbox .nav {
    position: absolute;
    top: 50%;
    color: #fff;
    font-size: 3rem;
    padding: 0 10px;
    cursor: pointer;
    user-select: none;
    transform: translateY(-50%);
}
.lightbox .nav.prev { left: 20px; }
.lightbox .nav.next { right: 20px; }

/* caption animation */
.lightbox .caption {
    color: #fff;
    margin-top: var(--space-sm);
    text-align: center;
    opacity: 0;
    transition: opacity var(--transition-medium);
}
.lightbox.show-caption .caption { opacity: 1; }

/* gallery fade */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
    gap: 1rem;
    transition: opacity var(--transition-medium);
}
.gallery-grid.fade-out { opacity: 0; }
.gallery-grid.fade-in { opacity: 1; }

/* pagination */
.pagination {
    text-align: center;
    margin-top: var(--space-md);
}
.pagination button {
    margin: 0 var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--color-accent);
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background var(--transition-fast);
}
.pagination button.active,
.pagination button:hover {
    background: var(--color-accent);
    color: var(--color-secondary);
}

/* video gallery */
.video-gallery {
    margin-top: 3rem;
}
.video-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.video-thumb {
    position: relative;
    width: 200px;
    cursor: pointer;
}
.video-thumb img {
    width: 100%;
    border-radius: 4px;
}
.video-thumb .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255,255,255,0.8);
}

/* video modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.video-modal .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}
.video-modal .video-container {
    width: 80%;
    max-width: 800px;
}
.video-modal iframe {
    width: 100%;
    height: 450px;
}

/* CTA banner */
.cta-banner {
    background: #333;
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}
.cta-banner .btn.large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: bold;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.btn.primary {
    background: var(--color-accent);
    color: var(--color-secondary);
}
.btn.primary:hover {
    background: #004080; /* darker accent */
}
.btn.secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}
.btn.secondary:hover {
    background: var(--color-primary);
    color: var(--color-secondary);
}


/* Pages */
main.container {
    padding: 2rem 0;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.gallery-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Contact form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}
.contact-form button {
    padding: 0.75rem 1.5rem;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.contact-form button:hover {
    background: #555;
}
.success-message {
    color: green;
    font-weight: bold;
    margin-top: 1rem;
}

/* Addresses & maps */
.addresses {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.address {
    flex: 1 1 300px;
}
.address h3 {
    margin-bottom: 0.5rem;
}
.address a {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: #0056a6;
    text-decoration: none;
}
.address a.whatsapp {
    background: #25D366;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}
.address .map iframe {
    border:0;
    border-radius:4px;
}


/* About, head-office, factory layouts */
/* general padding for sections */
.about-page section,
.head-office-page section,
.factory-page section {
    padding: 3rem 0;
}

/* About page specific */
.about-page .mission-vision {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.about-page .mission,
.about-page .vision {
    flex: 1 1 300px;
    text-align: center;
}
.about-page .leadership .leader-content {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}
.about-page .leader-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}
.about-page .timeline ul {
    list-style: none;
    padding: 0;
}
.about-page .timeline li {
    margin: 0.5rem 0;
    font-weight: bold;
}

/* Head office specific */
.head-office-page .team-grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.head-office-page .member {
    text-align: center;
    max-width: 200px;
}
.head-office-page .member img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}
.head-office-page .communication ol {
    max-width: 600px;
    margin: 0 auto;
}
.head-office-page .communication ol li {
    margin: 0.5rem 0;
}
.head-office-page .meeting-cta {
    text-align: center;
}
.head-office-page .meeting-cta .btn {
    margin-top: 1rem;
}

/* Factory specific */
.factory-page .capacity-workforce {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}
.factory-page .capacity,
.factory-page .workforce {
    flex: 1 1 300px;
}
.factory-page .infra-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}
.factory-page .infra-grid img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}
.factory-page .video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.factory-page .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Machinery page */
.machinery-page .dept {
    margin-top: 3rem;
}
.machinery-page .dept h3 {
    margin-bottom: 1rem;
    border-bottom: 2px solid #0056a6;
    display: inline-block;
    padding-bottom: 0.25rem;
}
.machinery-page .machine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px,1fr));
    gap: 1.5rem;
}
.machinery-page .machine-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}
.machinery-page .machine-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}
.machinery-page .machine-card h4 {
    margin: 0.75rem 1rem 0.25rem;
}
.machinery-page .machine-card p {
    margin: 0.25rem 1rem;
    font-size: 0.9rem;
    color: #555;
}

/* Products page */
.products-page .product-category {
    margin-top: 3rem;
}
.products-page .product-category h3 {
    margin-bottom: 1rem;
    border-bottom: 2px solid #0056a6;
    display: inline-block;
    padding-bottom: 0.25rem;
}
.products-page .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
    gap: 1.5rem;
}
.products-page .product-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.products-page .product-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}
.products-page .product-card h4 {
    margin: 0.75rem 1rem 0.25rem;
}
.products-page .product-card p {
    margin: 0.25rem 1rem;
    font-size: 0.9rem;
    color: #555;
}

/* Compliance page */
.compliance-page .cert-grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.compliance-page .cert-item {
    text-align: center;
}
.compliance-page .cert-item img {
    max-width: 120px;
    display: block;
    margin: 0 auto 0.5rem;
}
.compliance-page section {
    margin-top: 2rem;
}

/* Quality page */
.quality-page section {
    margin-top: 2rem;
}
.quality-page .workflow ol {
    max-width: 600px;
    margin: 0 auto;
}
.quality-page .testing ul,
.quality-page .equipment ul {
    max-width: 600px;
    margin: 0 auto;
}
.quality-page ul {
    list-style: disc inside;
}

/* Footer */
.site-footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
}