@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Fresh Clinical Theme */
    --primary-color: #00869A;
    /* Logo Teal */
    --secondary-color: #00505c;
    /* Dark Teal - Logo Shade */
    --accent-color: #FE9134;
    /* Logo Orange - Accent */

    --text-color: #1e293b;
    /* Slate 800 */
    --text-light: #475569;
    /* Slate 600 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    --light-bg: #f8fafc;
    /* Slate 50 */
    --white: #ffffff;
    --border-color: #e2e8f0;
    /* Slate 200 */

    --header-height: 90px;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Visuals */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Soft Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-bg);
    /* Subtle dot pattern like maintenance page */
    background-image:
        radial-gradient(rgb(226, 232, 240) 1px, transparent 1px);
    background-size: 40px 40px;
    overflow-x: hidden;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.6rem, 3.8vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

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

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

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.home-section-heading {
    margin-bottom: 80px;
}

.home-core-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 40px;
}

.home-news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

.home-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 30px;
}

.home-footprint-layout {
    display: flex;
    gap: 60px;
    align-items: center;
    flex-wrap: wrap;
}

.home-footprint-title {
    margin-bottom: 24px;
    font-size: 2.5rem;
}

.home-cta-title {
    font-size: 3rem;
}

.home-cta-lead {
    font-size: 1.25rem;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

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

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

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

/* Topbar */
.topbar {
    background: #016d7d;
    color: var(--white);
    font-size: 0.85rem;
    padding: 8px 0;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.topbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-links a {
    color: #e2f4f7;
    font-weight: 600;
    font-size: 0.85rem;
}

.topbar-links a:hover,
.topbar-links a.active {
    color: var(--white);
}

.topbar-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.35);
}

.topbar-social {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-social a {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.topbar-social a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    /* Square/technical radius */
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-size: 0.95rem;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 134, 154, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(254, 145, 52, 0.4);
    /* Orange shadow */
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: #f0f9ff;
}

/* Modern Card Styles */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(8, 145, 178, 0.3);
    /* Teal border on hover */
}

/* Badge specific for "Fresh" look */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--accent-color);
    color: var(--white);
    border: 1px solid var(--accent-color);
}

/* Team Page Styles */
/* Fixed-width tracks keep the tiles a consistent size and centre a short row
   instead of stretching one card across the container */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 300px));
    justify-content: center;
    gap: 28px;
}

.team-grid.condensed {
    grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 270px));
    gap: 24px;
}

/* The whole card is the trigger, so it is a real button element.
   The photo is absolutely positioned so it can grow over the caption on hover;
   .team-img-spacer reserves its resting height in the flow. */
.team-card {
    --team-caption-height: 104px;
    font-family: inherit;
    width: 100%;
    justify-self: center;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-bottom: 3px solid #dbeafe;
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease,
        background-color 0.35s ease, border-color 0.35s ease;
}

.team-card:hover,
.team-card:focus-visible {
    transform: translateY(-6px);
    border-color: rgba(0, 134, 154, 0.45);
    border-bottom-color: var(--primary-color);
    box-shadow: 0 20px 32px -20px rgba(15, 23, 42, 0.4);
    z-index: 5;
}

.team-card:focus-visible {
    outline: 3px solid rgba(0, 134, 154, 0.35);
    outline-offset: 3px;
}

/* Reserves the resting photo area; the real photo sits on top of it */
.team-img-spacer {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    flex: none;
}

.team-img-wrapper {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: calc(var(--team-caption-height) + 10px);
    background: linear-gradient(160deg, #e8f4f6, #f1f5f9);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.team-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* A gentle zoom is the only thing that touches the photo itself */
.team-card:hover .team-img-wrapper img,
.team-card:focus-visible .team-img-wrapper img {
    transform: scale(1.05);
}

.team-info {
    height: var(--team-caption-height);
    flex: none;
    padding: 0 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.team-card h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    transition: color 0.35s ease;
}

.team-card .designation {
    display: block;
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: normal;
    transition: color 0.35s ease;
}

.team-card:hover h4,
.team-card:focus-visible h4 {
    color: var(--primary-color);
}

.social-links {
    margin-top: auto;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8fafc;
    color: var(--text-muted);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Management cards use the same tile, only a touch tighter */
.team-card.simple {
    --team-caption-height: 96px;
}

.team-card.simple h4 {
    font-size: 1.08rem;
}

.team-card.simple .designation {
    font-size: 0.84rem;
}

/* --- Team profile modal --------------------------------------------------- */

.team-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.team-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.team-modal-dialog {
    position: relative;
    width: min(880px, 100%);
    max-height: min(88vh, 720px);
    overflow: hidden;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: 0 40px 80px -30px rgba(15, 23, 42, 0.6);
    display: grid;
    grid-template-columns: 300px 1fr;
    transform: translateY(24px) scale(0.98);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-modal.is-open .team-modal-dialog {
    transform: translateY(0) scale(1);
}

/* Photo side is per member (team.image_position); grid order does the flip
   so the markup order stays photo-then-body for screen readers */
.team-modal-dialog.photo-right {
    grid-template-columns: 1fr 300px;
}

.team-modal-dialog.photo-right .team-modal-media {
    grid-column: 2;
    grid-row: 1;
}

.team-modal-dialog.photo-right .team-modal-body {
    grid-column: 1;
    grid-row: 1;
}

.team-modal-media {
    background: var(--white);
    position: relative;
    overflow: hidden;
    align-self: start;
}

/* The panel takes the photo's own ratio: it fills the column edge to edge
   with nothing cropped and no letterbox bars */
.team-modal-media img {
    display: block;
    width: 100%;
    height: auto;
}

.team-modal-body {
    padding: 44px 40px;
    overflow-y: auto;
}

.team-modal-body h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.team-modal-designation {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--primary-color);
    background: rgba(0, 134, 154, 0.08);
    padding: 6px 14px;
    border-radius: 9999px;
    margin-bottom: 20px;
}

.team-modal-desc {
    color: var(--text-light);
    line-height: 1.8;
    white-space: pre-line;
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

.team-modal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.team-modal-link:hover {
    text-decoration: underline;
}

.team-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-light);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.team-modal-close:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

body.team-modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .team-modal {
        padding: 16px;
    }

    /* One column on phones, so the photo always stacks above the text
       regardless of the per-member side setting */
    .team-modal-dialog,
    .team-modal-dialog.photo-right {
        grid-template-columns: 1fr;
        max-height: 90vh;
        overflow-y: auto;
    }

    .team-modal-dialog.photo-right .team-modal-media,
    .team-modal-dialog.photo-right .team-modal-body {
        grid-column: 1;
        grid-row: auto;
    }

    .team-modal-media {
        height: auto;
    }

    .team-modal-body {
        padding: 28px 22px 34px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .team-modal,
    .team-modal-dialog,
    .team-card,
    .team-img-wrapper img {
        transition: none;
    }
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    animation: spin-right 1.2s linear infinite;
}

.loader-ring-inner {
    position: absolute;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent-color);
    animation: spin-left 1s linear infinite;
}

.loader-logo {
    width: 70%;
    height: 70%;
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

.loader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes spin-right {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-left {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* -------------------------------------------------------------------------- */
/*                        Kinetic Minimalist Design Updates                   */
/* -------------------------------------------------------------------------- */

/* --- Typography Updates --- */
h1 {
    font-size: clamp(2.25rem, 5.5vw, 4rem);
    /* Larger, more impactful */
    letter-spacing: -0.04em;
    line-height: 1.1;
    font-weight: 800;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    letter-spacing: -0.03em;
    font-weight: 700;
}

/* --- Kinetic Animation Classes --- */
/* Base state for animated elements: hidden/offset */

.kinetic-anim {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

/* State when element enters viewport */
.kinetic-anim.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Delay modifiers for staggered effects */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

/* Kinetic Hover Effects for Cards */
.kinetic-card {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Start with very subtle or no shadow/border for minimalism */
    border: 1px solid transparent;
    box-shadow: none;
    background: var(--white);
}

.kinetic-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(0, 80, 92, 0.15);
    /* Soft, deep teal shadow */
    border-color: rgba(0, 134, 154, 0.1);
    z-index: 10;
}

/* Kinetic Buttons */
.btn-kinetic {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.3s ease;
}

.btn-kinetic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-kinetic:hover::before {
    width: 100%;
}

/* Section Specifics */
header + .hero-kinetic {
    margin-top: calc(-1 * var(--header-height));
    padding-top: var(--header-height);
}

.hero-kinetic {
    height: 400px;
    max-height: 400px;
    /* Fixed height as per request */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.hero-kinetic.hero-home {
    /* Locked to the 1920 x 850 banner artwork ratio.
       At 1920px viewport this is exactly 1920 x 850; narrower screens keep the
       same ratio so the artwork is never cropped or zoomed. */
    width: 100%;
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 1920 / 850;
    height: auto;
    min-height: 0;
    max-height: 850px;
    background-size: cover;
    background-position: center;
}

/* Banner artwork fills the box edge to edge without distortion */
.hero-kinetic.hero-home .hero-carousel-bg,
.hero-kinetic.hero-home .hero-carousel-slide {
    width: 100%;
    height: 100%;
}

.hero-kinetic.hero-home .hero-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-kinetic.hero-about,
.hero-kinetic.hero-awards,
.hero-kinetic.hero-gallery,
.hero-kinetic.hero-team,
.hero-kinetic.hero-products,
.hero-kinetic.hero-manufacturing,
.hero-kinetic.hero-exports,
.hero-kinetic.hero-csr,
.hero-kinetic.hero-news,
.hero-kinetic.hero-contact,
.hero-kinetic.hero-career,
.hero-kinetic.hero-biogas,
.hero-kinetic.hero-hse,
.hero-kinetic.hero-quality,
.hero-kinetic.hero-certificates,
.hero-kinetic.hero-resources {
    height: 500px;
    max-height: 500px;
    background-size: cover;
    background-position: center;
}

.hero-kinetic.hero-about::before,
.hero-kinetic.hero-awards::before,
.hero-kinetic.hero-gallery::before,
.hero-kinetic.hero-team::before,
.hero-kinetic.hero-products::before,
.hero-kinetic.hero-manufacturing::before,
.hero-kinetic.hero-exports::before,
.hero-kinetic.hero-csr::before,
.hero-kinetic.hero-news::before,
.hero-kinetic.hero-contact::before,
.hero-kinetic.hero-career::before,
.hero-kinetic.hero-biogas::before,
.hero-kinetic.hero-hse::before,
.hero-kinetic.hero-quality::before,
.hero-kinetic.hero-certificates::before,
.hero-kinetic.hero-resources::before {
    display: none;
}

.hero-kinetic.hero-about h1,
.hero-kinetic.hero-about p,
.hero-kinetic.hero-awards h1,
.hero-kinetic.hero-awards p,
.hero-kinetic.hero-gallery h1,
.hero-kinetic.hero-gallery p,
.hero-kinetic.hero-team h1,
.hero-kinetic.hero-team p,
.hero-kinetic.hero-products h1,
.hero-kinetic.hero-products p,
.hero-kinetic.hero-manufacturing h1,
.hero-kinetic.hero-manufacturing p,
.hero-kinetic.hero-exports h1,
.hero-kinetic.hero-exports p,
.hero-kinetic.hero-csr h1,
.hero-kinetic.hero-csr p,
.hero-kinetic.hero-news h1,
.hero-kinetic.hero-news p,
.hero-kinetic.hero-contact h1,
.hero-kinetic.hero-contact p,
.hero-kinetic.hero-career h1,
.hero-kinetic.hero-career p,
.hero-kinetic.hero-biogas h1,
.hero-kinetic.hero-biogas p,
.hero-kinetic.hero-hse h1,
.hero-kinetic.hero-hse p,
.hero-kinetic.hero-quality h1,
.hero-kinetic.hero-quality p,
.hero-kinetic.hero-certificates h1,
.hero-kinetic.hero-certificates p,
.hero-kinetic.hero-resources h1,
.hero-kinetic.hero-resources p {
    color: var(--white) !important;
}

@media (max-width: 768px) {
    .hero-kinetic.hero-about,
    .hero-kinetic.hero-awards,
    .hero-kinetic.hero-gallery,
    .hero-kinetic.hero-team,
    .hero-kinetic.hero-products,
    .hero-kinetic.hero-manufacturing,
    .hero-kinetic.hero-exports,
    .hero-kinetic.hero-csr,
    .hero-kinetic.hero-news,
    .hero-kinetic.hero-contact,
    .hero-kinetic.hero-career,
    .hero-kinetic.hero-biogas,
    .hero-kinetic.hero-hse,
    .hero-kinetic.hero-quality,
    .hero-kinetic.hero-certificates,
    .hero-kinetic.hero-resources {
        height: auto;
        min-height: 380px;
        padding-top: 100px;
        padding-bottom: 50px;
    }
}

.hero-kinetic.has-video {
    background-image: none !important;
    background-color: #f8fafc;
}

.hero-kinetic.has-video::before {
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(255, 255, 255, 0.35) 45%,
        rgba(255, 255, 255, 0.2) 75%
    );
}

.hero-video-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.hero-video-bg iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    border: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-kinetic.video-active .hero-video-bg iframe {
    opacity: 1;
}

@supports (aspect-ratio: 16/9) {
    .hero-video-bg iframe {
        width: auto;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 768px) {

    .hero-kinetic.hero-home {
        padding-top: calc(var(--header-height) + 48px);
    }

    .hero-kinetic.hero-home .badge {
        margin-top: 12px;
    }

    .hero-kinetic.hero-home h1 {
        font-size: 2.25rem;
        line-height: 1.2;
    }

    .hero-kinetic.hero-home p {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 220px;
        justify-content: center;
    }

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

    .container {
        padding: 0 18px;
    }

    .home-section-heading {
        margin-bottom: 48px;
    }

    .home-core-grid {
        gap: 24px;
    }

    .home-news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .home-news-grid {
        gap: 20px;
    }

    .home-footprint-layout {
        gap: 32px;
    }

    .home-footprint-title {
        font-size: 2rem;
    }

    .home-cta-title {
        font-size: 2.2rem;
    }

    .home-cta-lead {
        font-size: 1.05rem;
        margin-bottom: 36px;
    }

    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .topbar-links {
        flex-wrap: wrap;
        gap: 12px;
    }

    .topbar-divider {
        display: none;
    }
}

.hero-kinetic.has-video h1,
.hero-kinetic.has-video p {
    color: #0f172a !important;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.hero-kinetic.has-video .badge {
    background: var(--accent-color);
    color: var(--white);
    border: 1px solid var(--accent-color);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.hero-kinetic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    /* White wash at 70% opacity */
    z-index: 1;
}

.hero-content-wrapper {
    display: flex;
    align-items: center;
    gap: 60px;
    text-align: left;
}

.hero-text-col {
    flex: 1.2;
}

.hero-image-col {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-col img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

.hero-image-col img:hover {
    transform: scale(1.02);
}

@media (max-width: 991px) {
    .hero-content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-text-col {
        width: 100%;
    }

    .hero-kinetic .btn-group {
        justify-content: center;
    }
}

.hero-kinetic .container {
    position: relative;
    z-index: 2;
}

.hero-kinetic h1 {
    color: var(--text-color) !important;
}

.hero-kinetic p {
    color: var(--text-light) !important;
}

.hero-kinetic .badge {
    background: var(--accent-color);
    border: none;
    color: var(--white);
}

.hero-bg-anim {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 134, 154, 0.03) 0%, transparent 70%);
    animation: rotate-bg 60s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes rotate-bg {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Minimalist separator */
.separator-line {
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 20px 0;
    display: inline-block;
}

/* -------------------------------------------------------------------------- */
/*             Responsive Grids, Components, and Mobile Adjustments            */
/* -------------------------------------------------------------------------- */

/* Certifications Strip */
.certs-flex {
    display: flex;
    gap: 48px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.certs-flex > div {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* About Home section */
.about-stats-flex {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.about-facility-badge {
    position: absolute;
    bottom: 40px;
    right: 0px;
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
}

/* Stats Section */
.stats-section {
    position: relative;
    background-image: url('../images/test/test-stats.png');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--white);
    text-align: center;
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
}

/* Process Section */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

/* Innovation Section */
.innovation-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.innovation-col {
    flex: 1;
    min-width: min(300px, 100%);
}

.innovation-card-container {
    flex: 1;
    min-width: min(300px, 100%);
    display: flex;
    justify-content: center;
}

.innovation-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

/* Vision Section */
.vision-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: left;
}

/* Global Footprint layout columns */
.footprint-col {
    flex: 1;
    min-width: min(300px, 100%);
}

/* Base adjustments for Tablet / iPad (max-width: 1024px) */
@media (max-width: 1024px) {
    .hero-kinetic.hero-home {
        /* Ratio stays 1920:850; only inner spacing adapts */
        padding-top: var(--header-height);
        padding-bottom: 0;
    }

    .stats-section {
        background-attachment: scroll; /* iOS and general performance fix */
    }

    .home-core-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

    .home-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px;
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

    .vision-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .footprint-col {
        flex: 0 0 100%;
        width: 100%;
    }
}

/* Base adjustments for Medium Screens / iPad Portrait (max-width: 900px) */
@media (max-width: 900px) {
    .certs-flex {
        gap: 32px;
    }
    
    .certs-flex > div {
        font-size: 1.25rem;
    }
}

/* Base adjustments for Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .hero-kinetic.hero-home {
        /* Too narrow for the 1920:850 ratio to hold the text, so grow instead */
        aspect-ratio: auto;
        height: auto;
        min-height: 480px;
        max-height: none;
        padding-top: calc(var(--header-height) + 40px);
        padding-bottom: 60px;
    }

    .hero-kinetic.hero-home h1 {
        font-size: clamp(1.85rem, 6vw, 2.5rem) !important;
        line-height: 1.2;
    }

    .hero-kinetic.hero-home p {
        font-size: 1.05rem !important;
        line-height: 1.6;
    }

    .home-core-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .home-news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .process-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .vision-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .certs-flex {
        gap: 24px;
    }

    .certs-flex > div {
        font-size: 1.15rem;
    }

    .client-logo-card {
        width: 180px;
        height: 110px;
        padding: 16px;
    }

    .innovation-row {
        gap: 30px;
    }

    .innovation-col,
    .innovation-card-container {
        min-width: 100%;
    }
}

/* Base adjustments for Small Mobile (max-width: 576px) */
@media (max-width: 576px) {
    .certs-flex {
        gap: 16px;
        justify-content: space-around;
    }

    .certs-flex > div {
        font-size: 1rem;
        gap: 6px;
    }

    .about-stats-flex {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .about-stats-flex > div:last-child {
        grid-column: span 2;
    }

    .about-facility-badge {
        bottom: 15px;
        right: 15px;
        padding: 10px 16px;
        gap: 10px;
        border-radius: 8px;
    }

    .about-facility-badge div div:first-child {
        font-size: 0.7rem !important;
    }

    .about-facility-badge div div:last-child {
        font-size: 0.85rem !important;
    }

    .innovation-card {
        padding: 24px 16px;
    }
}

/* About Page Responsive Layouts */
.about-row {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
    align-items: stretch;
}

.about-row.gap-50 {
    gap: 50px;
}

.about-row.align-center {
    align-items: center;
}

.about-vision-left {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.about-vision-right {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: center;
}

.about-col-half {
    flex: 1;
}

.about-card-flex {
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 20px;
    align-items: start;
}

.btn-group-responsive,
.about-btn-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.about-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.about-card-icon.vision {
    background: rgba(0, 134, 154, 0.1);
    color: var(--primary-color);
}

.about-card-icon.mission {
    background: rgba(254, 145, 52, 0.1);
    color: var(--accent-color);
}

.about-card-content {
    flex: 1;
}

.about-card-content h4 {
    color: var(--secondary-color);
    margin-bottom: 12px;
    font-size: 1.35rem;
}

.about-card-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 0;
}

.about-img-container {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-img-container img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.about-glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-milestones-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.about-milestones-card {
    padding: 24px;
    text-align: center;
    border-radius: 12px;
}

.about-sustain-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.about-sustain-card {
    text-align: center;
    padding: 30px;
    border-radius: 16px;
}

/* Tablet & Mobile Media Queries for About Page */
@media (max-width: 991px) {
    .about-row {
        gap: 40px;
    }
    
    .about-vision-left,
    .about-vision-right,
    .about-col-half {
        flex: 0 0 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .about-row {
        gap: 30px;
    }
    
    .hero-kinetic p {
        font-size: 1.05rem !important;
    }
}

@media (max-width: 576px) {
    .about-card-flex {
        padding: 20px;
        gap: 16px;
        flex-direction: column;
        align-items: start;
    }
    
    .btn-group-responsive,
    .about-btn-group {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .btn-group-responsive .btn,
    .about-btn-group .btn {
        width: 100%;
    }
    
    .about-card-content h4 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .about-card-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .about-glass-card {
        padding: 20px;
    }
    
    .about-milestones-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .about-milestones-card {
        padding: 16px;
    }
    
    .about-milestones-card div:first-child {
        font-size: 1.75rem !important;
    }
    
    .about-milestones-card div:last-child {
        font-size: 0.85rem !important;
    }
    
    .about-sustain-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .about-sustain-card {
        padding: 20px;
    }
}

/* Exports Page Responsiveness */
.exports-row {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

.exports-col {
    flex: 1;
    min-width: min(320px, 100%);
}

.exports-col.form-card {
    background: #f0f7ff;
    padding: 40px;
    border-radius: 8px;
}

@media (max-width: 991px) {
    .exports-row {
        gap: 30px;
    }
    .exports-col {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .exports-col.form-card {
        padding: 24px 16px;
    }
}
/* ==========================================================================
   Mobile Compatibility Layer
   Loaded last so it wins over the base rules above at equal specificity.
   ========================================================================== */

/* --- 1. Viewport hygiene -------------------------------------------------- */

html {
    /* Stop iOS/Android from silently inflating text in landscape */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    /* Belt and braces against a stray wide child creating a sideways scroll */
    overflow-x: hidden;
    -webkit-tap-highlight-color: rgba(0, 134, 154, 0.15);
}

img,
svg,
video,
iframe,
canvas,
embed,
object {
    max-width: 100%;
}

/* Long product codes, e-mail addresses and URLs must wrap, not widen */
p,
li,
dd,
dt,
td,
th,
h1,
h2,
h3,
h4,
h5,
h6,
.badge,
blockquote {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Wide tables scroll inside their own box instead of stretching the page */
.table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    max-width: 100%;
}

/* --- 2. Readable prose on phones ----------------------------------------- */
/* Body copy is justified on mobile; hyphenation keeps the word gaps tight. */

@media (max-width: 768px) {

    p,
    .card p,
    .about-card-content p,
    .detail-main li,
    article li {
        text-align: justify;
        text-justify: inter-word;
        -webkit-hyphens: auto;
        hyphens: auto;
        /* Only break words of 6+ letters, and never leave a stub of 1-2 */
        -webkit-hyphenate-limit-before: 3;
        -webkit-hyphenate-limit-after: 3;
        hyphenate-limit-chars: 7 3 3;
    }

    /* Deliberately centred blocks stay centred */
    .text-center p,
    .text-center li,
    .hero-kinetic p,
    .home-section-heading p,
    .section-header p,
    .stat-item p,
    .team-info p,
    .team-card p,
    .team-info-simple p,
    .about-milestones-card p,
    .about-sustain-card p,
    .client-logo-card p,
    [style*="text-align: center"] p,
    [style*="text-align:center"] p,
    [style*="text-align: center"] li,
    [style*="text-align:center"] li {
        text-align: center;
        -webkit-hyphens: manual;
        hyphens: manual;
    }

    /* Addresses, form hints and captions read better ragged-right */
    footer p,
    .breadcrumb p,
    .product-breadcrumb p,
    figcaption,
    label p,
    .form-hint,
    small {
        text-align: left;
        -webkit-hyphens: manual;
        hyphens: manual;
    }
}

/* --- 3. Touch targets and tap comfort ------------------------------------ */

@media (max-width: 768px) {

    .btn {
        min-height: 44px;
        padding: 12px 22px;
    }

    .social-links a,
    .topbar-social a,
    footer a[aria-label] {
        min-width: 44px;
        min-height: 44px;
    }

    footer ul a {
        padding: 6px 0;
    }

    /* iOS zooms the whole page when a focused field is under 16px */
    input,
    select,
    textarea {
        font-size: 16px;
    }

    input,
    select,
    textarea,
    button {
        max-width: 100%;
    }
}

/* --- 4. Layout density on phones ----------------------------------------- */

@media (max-width: 768px) {

    .card {
        padding: 24px 20px;
    }

    .team-grid,
    .team-grid.condensed {
        grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
        gap: 20px;
    }

    /* Fixed backgrounds are expensive and buggy on mobile Safari */
    [style*="background-attachment: fixed"],
    [style*="background-attachment:fixed"] {
        background-attachment: scroll !important;
    }
}

@media (max-width: 576px) {

    .container {
        padding: 0 16px;
    }

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

    .card {
        padding: 20px 16px;
    }

    .team-card,
    .team-card.simple {
        --team-caption-height: 86px;
    }

    .team-card h4,
    .team-card.simple h4 {
        font-size: 0.98rem;
    }

    .team-card .designation,
    .team-card.simple .designation {
        font-size: 0.78rem;
    }

    .badge {
        font-size: 0.72rem;
        padding: 5px 12px;
    }

    /* Anything laid out as a side-by-side flex row stacks cleanly */
    .about-row,
    .exports-row,
    .home-footprint-layout,
    .innovation-row {
        gap: 24px;
    }
}

/* --- 5. Motion and rendering preferences --------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .kinetic-anim {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-bg-anim,
    .loader-ring,
    .loader-ring-inner,
    .loader-logo {
        animation: none;
    }

    * {
        scroll-behavior: auto !important;
    }
}

/* Hover lifts are meaningless on touch and leave cards stuck mid-animation */
@media (hover: none) {

    .card:hover,
    .kinetic-card:hover,
    .team-card:hover,
    .btn-primary:hover,
    .social-links a:hover,
    .topbar-social a:hover {
        transform: none;
    }

    .team-card:hover {
        transform: none;
        border-color: var(--border-color);
    }

    .team-card:hover .team-img-wrapper img {
        transform: none;
    }

    .team-card:hover h4 {
        color: var(--text-color);
    }
}
