/* ===================================
   CSS Variables & Design Tokens
   =================================== */
:root {
    /* Colors */
    --color-primary: #1e40af;
    --color-primary-dark: #1e3a8a;
    --color-primary-light: #3b82f6;
    --color-secondary: #f59e0b;
    --color-accent: #10b981;

    --color-dark: #1f2937;
    --color-dark-secondary: #302d3e;
    --color-dark-tertiary: #374151;

    --color-light: #f3f3f7;
    --color-light-secondary: #f3f4f6;
    --color-white: #ffffff;

    --color-text-primary: #4f4b6a;
    --color-text-secondary: #6b7280;
    --color-text-light: #9ca3af;
    --color-text-white: #ffffff;

    --color-border: rgba(214, 213, 222, 0.5);
    --color-border-light: rgba(214, 213, 222, 0.2);

    /* Typography */
    --font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 16px;
    --font-size-sm: 14px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;

    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Container */
    --container-max-width: 1320px;
    --container-padding: 100px;
}

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

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

html,
body {
    max-width: 100%;
    overflow-x: clip;
    /* Ensures nothing forces the page wider than screen */
}


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

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

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ===================================
   Utility Classes
   =================================== */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xl);
}

.section-title.centered {
    text-align: center;
}

.section-title.white {
    color: var(--color-text-white);
}

/* ===================================
   Header & Navigation
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: all var(--transition-base);
    padding-top: 1rem;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.header.header-hidden {
    transform: translateY(-100%);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: var(--spacing-lg);
}

.nav-logo .logo {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: all var(--transition-base);
}

.header.scrolled .nav-logo .logo {
    filter: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    /* gap: var(--spacing-lg); */
}

.nav-link {
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
    color: var(--color-white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
    opacity: 0.9;
}

.header.scrolled .nav-link {
    color: var(--color-text-secondary);
    opacity: 1;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-white);
    opacity: 1;
}

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link.active {
    color: #504B69;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background-color: white;
    transition: transform var(--transition-base);
}

.nav-link.active::after {
    background-color: transparent;
}

.header.scrolled .nav-link::after {
    background-color: #504B69;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--spacing-xs);
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--color-white);
    transition: all var(--transition-base);
}

.header.scrolled .nav-toggle span {
    background-color: var(--color-text-primary);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-video.loaded {
    opacity: 1;
}

/* Hero Placeholder Image */
.hero-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-placeholder.hidden {
    opacity: 0;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    /* Lighter overlay to see image/video better */
    z-index: -1;
}

.hero-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-2xl);
    width: 100%;
    padding: 80px 0;
}

.hero-text-content {
    flex: 1;
    max-width: 600px;
    color: var(--color-white);
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 35px;
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: var(--spacing-xl);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background-color: var(--color-white);
    color: #4B4B6C;
    padding: 4px 4px 4px 24px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.btn.btn-contact:hover {
    /* transform: translateY(-3px); */
    background-color: #4B4B6C;
    color: var(--color-white);
    box-shadow: 0 14px 28px rgba(75, 75, 108, 0.2), 0 10px 10px rgba(75, 75, 108, 0.15);
}

.btn.btn-contact:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(75, 75, 108, 0.2);
}

.btn-icon {
    width: 40px;
    height: 40px;
    background-color: #4B4B6C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn.btn-contact:hover .btn-icon {
    background-color: var(--color-white);
    color: #4B4B6C;
    transform: rotate(45deg);
}

.btn.btn-contact svg {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn.btn-contact:hover svg {
    /* transform: translate(2px, -2px); */
}

/* Glass Card Styles */
.hero-card {
    flex: 1;
    max-width: 500px;
    display: flex;
    justify-content: flex-end;
    animation: fadeInRight 1s ease-out 0.2s backwards;
}

.card-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 32px;
    width: 100%;
    color: var(--color-white);
}

@media (max-width: 768px) {
    /* ... other existing mobile styles ... */

    .card-glass {
        /* Reduced from 420px -> 280px */
        /* This should fit about 4-5 lines of text comfortably */
        min-height: 280px;
        padding: 24px;
    }

    .card-body p {
        font-size: 15px;
        /* Slightly smaller font on mobile helps reduce height */
    }
}

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

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 300;
}

.dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-white);
    border-radius: 50%;
}

.card-nav {
    display: flex;
    gap: 16px;
}

.nav-item {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-dot {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: none;
    z-index: 2;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.nav-item.active .nav-dot {
    opacity: 1;
    font-weight: 600;
}

.loader-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
    z-index: 1;
}

.loader-progress {
    stroke-dasharray: 113;
    stroke-dashoffset: 113;
    transition: stroke-dashoffset 0.1s linear;
}

.nav-item.active .loader-progress {
    animation: progress 5s linear forwards;
}

@keyframes progress {
    from {
        stroke-dashoffset: 113;
    }

    to {
        stroke-dashoffset: 0;
    }
}

.card-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 24px;
}

.card-body p {
    font-size: 16px;
    line-height: 1.6;
    font-weight: 300;
    opacity: 0.9;
}

@media (max-width: 968px) {
    .hero-wrapper {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding-top: 60px;
        gap: 64px;
    }

    .hero-text-content {
        max-width: 100%;
        /* margin-bottom: 40px; */
    }

    .hero-card {
        max-width: 100%;
    }
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    box-shadow: 0 4px 14px 0 rgba(30, 64, 175, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(30, 64, 175, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-color: var(--color-white);
    backdrop-filter: blur(10px);
}

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

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn.full-width {
    width: 100%;
}

/* ===================================
   About Section
   =================================== */
.about {
    padding: 80px 0;
    background-color: var(--color-light);
    margin: 0;
}

.about .section-title {
    font-size: 32px;
    font-weight: 700;
    color: #4B4B6C;
    /* Ensuring color matches image vibe if needed, but keeping it consistent with theme */
    margin-bottom: var(--spacing-md);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.about-text p {
    font-size: 15px;
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
}

.about-text p strong {
    color: #4B4B6C;
    /* Darker color for bold text often looks better */
    font-weight: 700;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-image {
    position: relative;
    display: flex;
    /* Helps in centering or aligning if needed */
    justify-content: center;
}

.rounded-image {
    width: 513px;
    height: 370px;
    object-fit: cover;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    transition: transform var(--transition-slow);
}

.rounded-image:hover {
    transform: scale(1.02);
}

/* ===================================
   Why Choose Us Section
   =================================== */
/* ===================================
   Why Choose Us Section
   =================================== */
.why-choose {
    padding: 80px 0;
    background-color: var(--color-white);
    margin: 0;
}

.why-choose .section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 48px;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    width: 100%;
    height: 156px;
    background-color: #F8F7FB;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(75, 75, 108, 0.2);
    /* border-color: #4B4B6C; */
}

.feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 50%;
    margin-bottom: 16px;
    transition: background-color 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.feature-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: filter 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Hover Effect: Icon gets dark circle background and turns white */
.feature-card:hover .feature-icon {
    background-color: #4B4B6C;
}

.feature-card:hover .feature-icon img {
    filter: brightness(0) invert(1);
}

.feature-title {
    font-size: 15px;
    font-weight: 400;
    /* Regular weight */
    color: var(--color-text-primary);
    margin: 0;
    line-height: normal;
}

/* Hiding description to match importance of the single-label look in the images */
.feature-description {
    display: none;
}

/* ===================================
   Business Sectors Section
   =================================== */
.business-sectors {
    padding: 80px 0;
    background-color: var(--color-dark-secondary);
    margin: 0;
    overflow: visible;
    /* Required for sticky positioning to work */
}

.business-sectors .container {
    overflow: visible;
    /* Required for sticky positioning to work */
}

.business-sectors .section-title {
    color: var(--color-white);
}

.sector-card {
    display: grid;
    grid-template-columns: 552px 1fr;
    gap: 40px;
    align-items: center;
    background-color: var(--color-white);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-xl);
    transition: box-shadow 0.4s ease;
    height: 556px;
    padding: 16px;
    position: -webkit-sticky;
    /* Safari support */
    position: sticky;
    top: 100px;
    /* Default top value */
    z-index: 1;
    width: 1200px;
    /* Pull back the container padding to center the cards */
    margin-left: calc(50% - 600px);
    margin-right: calc(50% - 600px);
}

/* Stacked cards effect - each card sticks at a different position */
/* Cards stick at offset positions so each card's header remains visible */
/* z-index increases so newer cards stack on top */
.sector-card:nth-of-type(1) {
    top: 100px;
    z-index: 1;
}

.sector-card:nth-of-type(2) {
    top: 140px;
    z-index: 2;
}

.sector-card:nth-of-type(3) {
    top: 180px;
    z-index: 3;
    margin-bottom: 0;
}

.sector-card.is-stuck {
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.4);
}

.sector-card:last-child {
    margin-bottom: 0;
}

.sector-card.reverse {
    grid-template-columns: 1fr 552px;
}

.sector-card.reverse .sector-image {
    order: 2;
}

.sector-card.reverse .sector-content {
    order: 1;
}

.sector-image {
    width: 552px;
    height: 524px;
    border-radius: 20px;
    overflow: hidden;
}

.sector-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sector-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    height: 100%;
    justify-content: center;
}

.sector-title {
    font-size: 20px;
    font-weight: 500;
    color: #4B4B6C;
    margin: 0;
}

.sector-description {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    max-width: 95%;
    color: #4f4b6a;
}

.sector-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin: 0;
    width: 100%;
}

.sector-list {
    list-style: none;
}

.sector-list li {
    font-size: 16px;
    font-weight: 400;
    color: #4f4b6a;
    padding: 3px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.sector-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: #4f4b6a;
    border-radius: 50%;
}

.btn-sector-contact {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background-color: #EBEBEB;
    color: #4B4B6C;
    padding: 6px 6px 6px 24px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 16px;
    /* margin-bottom: 40px; */
    /* Adds to the 16px flex gap for a total of 24px */
}

.btn-sector-contact .btn-icon {
    width: 36px;
    height: 36px;
    background-color: #4B4B6C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    transition: transform 0.3s ease;
}

.btn-sector-contact:hover {
    background-color: #4B4B6C;
    /* Dark background on hover */
    color: var(--color-white);
    /* box-shadow: 0 14px 28px rgba(75, 75, 108, 0.2), 0 10px 10px rgba(75, 75, 108, 0.15); */
}

.btn-sector-contact:hover .btn-icon {
    background-color: var(--color-white);
    /* White icon bg on hover */
    color: #4B4B6C;
    transform: rotate(45deg);
}

/* ===================================
   Brands Section
   =================================== */
.brands {
    padding: 80px 0;
    background-color: var(--color-white);
    /* Updated to white per design */
    margin: 0;
}

/* Allow more width for the specific 7-column layout */
/* Allow more width for the specific 7-column layout */
.brands .container {
    max-width: var(--container-max-width);
    padding: 0 var(--container-padding);
}

.brands .section-title {
    font-size: 32px;
}

.brands-tabs {
    display: flex;
    justify-content: center;
    gap: var(--spacing-2xl);
    margin: 0 auto var(--spacing-2xl) auto;
    width: fit-content;
    border-bottom: 1px solid var(--color-border);
    padding: 0 10px;
}

.brand-tab {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    padding-bottom: var(--spacing-sm);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-base);
    width: 380px;
    /* Fixed width to match the longer tab */
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-tab.active {
    color: #4B4B6C;
    /* Theme dark blue */
    font-weight: var(--font-weight-bold);
}

@keyframes progress-line {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

.brand-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    /* Align with border-bottom */
    left: 0;
    width: 0;
    height: 3px;
    background-color: #4B4B6C;
    animation: progress-line 5s linear forwards;
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

.brands-content {
    /* Create a grid stack context */
    display: grid;
    /* This ensures all children sit in the exact same cell */
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.brands-grid {
    /* 1. Stack them all on top of each other */
    grid-area: 1 / 1 / 2 / 2;

    /* 2. Keep layout properties */
    display: flex;
    /* We use flex inside the grid cell for the logos */
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    width: 100%;

    /* 3. Hide the inactive ones nicely */
    opacity: 0;
    visibility: hidden;
    /* Important: prevents clicking links in hidden tabs */
    z-index: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Reset transform for the inactive state */
    transform: translateX(20px);
}

.brands-grid.active {
    /* 4. Show the active one */
    opacity: 1;
    visibility: visible;
    z-index: 2;
    transform: translateX(0);
}

.brands-grid.active.slide-right {
    animation: slideInRight 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.brands-grid.active.slide-left {
    animation: slideInLeft 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Specific Layout for Oil & Gas */
#oil-gas,
#industrial-construction {
    max-width: 1250px;
    margin: 0 auto;
    /* Center the flex content within the grid area */
}

#oil-gas .brand-item {
    width: 157.71px;
    height: 68px !important;
    /* Force height overrides */
    min-height: 0;
    /* Reset min-height */
    /* padding: 10px; */
    flex: 0 0 157.71px;
}

/* Specific Layout for Industrial */
#industrial-construction {
    max-width: 1250px;
    /* ~228px * 5 + gaps */
}

#industrial-construction .brand-item {
    width: 227.2px;
    height: 68px !important;
    min-height: 0;
    padding: 10px;
    flex: 0 0 227.2px;
}

.brand-item {
    background-color: #F8F7FB;
    /* Light background for items */
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.brand-item:hover {
    transform: translateY(-4px);
    /* box-shadow: var(--shadow-md); */
    /* background-color: var(--color-white); */
    /* White on hover */
}

.brand-item img {
    /* max-width: 95%;
    max-height: 95%; */
    width: auto;
    height: auto;
    filter: none;
    /* Removed grayscale */
    object-fit: contain;
}

/* ===================================
   Quality & Commitment Section
   =================================== */
.quality-commitment {
    position: relative;
    min-height: 465px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin: 0;
    padding: 80px 0;
}

.quality-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.quality-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quality-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.quality-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--color-white);
}

.quality-content .section-title {
    font-size: 44px;
}

.quality-text {
    font-size: 16px;
    font-weight: 600;
    line-height: var(--line-height-relaxed);
    opacity: 0.95;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    padding: 80px 0;
    background-color: var(--color-white);
    margin: 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
}

.contact-description {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xl);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-radius: var(--radius-lg);
    color: var(--color-primary);
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
}

.contact-item p {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
}

.contact-form-wrapper {
    background-color: var(--color-light);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
}

.form-group input,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    background-color: var(--color-white);
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===================================
   Footer
   =================================== */
/* ===================================
   Footer
   =================================== */
.footer {
    background-color: #302d3e;
    color: var(--color-white);
    font-family: var(--font-family);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    padding: 80px 0 60px 0;
}

.footer-links-group {
    display: flex;
    gap: 80px;
}

.footer-logo {
    height: 48px;
    width: auto;
    /* Let width adjust automatically */
    margin-bottom: 24px;
    /* Ensure the logo is white if it's an SVG that needs inverting */
    filter: brightness(0) invert(1);
}

.footer-description {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 320px;
    font-weight: 400;
}

.footer-title {
    font-size: 20px;
    font-weight: 500;
    /* margin-bottom: 32px; */
    color: var(--color-white);
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-links a,
.footer-contact li {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    transition: color var(--transition-base);
    text-decoration: none;
    line-height: 1.5;
}

.footer-links a:hover {
    color: var(--color-white);
    padding-left: 0;
    /* Removing the shift effect for a cleaner look if desired, or keep it. Design looks static. */
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(16px);
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    :root {
        --container-padding: 1.5rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    /* 1. About Us: Image first */
    .about-image {
        order: -1;
    }

    /* Sector cards remain desktop style at 1024px */

    .footer-content {
        flex-direction: column;
        gap: var(--spacing-xl);
    }

    .footer-links-group {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --spacing-3xl: 4rem;
    }

    .nav-menu {
        position: fixed;
        top: 105px;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .nav-link {
        color: var(--color-text-primary);
        display: block;
        padding: 10px 0;
    }

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

    .nav-link::after {
        background-color: var(--color-primary);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .sector-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Mobile responsive sector cards */
    .sector-card,
    .sector-card.reverse {
        grid-template-columns: 1fr;
        height: auto;
        padding: 0;
        /* Disable sticky parallax on mobile */
        position: static;
        transform: none !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        margin-bottom: 2rem;
        /* Reset the fixed width and margins */
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        gap: 0;
    }

    .sector-image {
        width: 100%;
        height: 280px;
        /* Rounded corners only on top */
        border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    }

    .sector-content {
        padding: var(--spacing-lg);
    }

    .sector-card.reverse .sector-image,
    .sector-card.reverse .sector-content {
        order: unset;
    }

    /* 3. Global Brands: 2 Columns */
    .brands-grid.active {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
    }

    #oil-gas .brand-item,
    #industrial-construction .brand-item {
        width: 100% !important;
        flex: none;
        max-width: none;
        height: auto !important;
        min-height: 80px;
        /* Ensure enough height for logos */
        padding: 15px;
    }

    .brand-item img {
        max-width: 90%;
        max-height: 90%;
    }

    .footer-links-group {
        flex-direction: column;
        gap: var(--spacing-xl);
    }
}

@media (max-width: 480px) {


    .hero-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: var(--font-size-sm);
    }

    /* Sector cards mobile styles */
    .sector-image {
        height: 220px;
    }

    .sector-content {
        padding: var(--spacing-md);
    }

    .sector-title {
        font-size: 18px;
    }

    .sector-description {
        font-size: 14px;
    }

    .sector-list li {
        font-size: 14px;
        padding: 4px 0;
        padding-left: 16px;
    }

    .sector-list li::before {
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 4px;
    }

    .btn-sector-contact {
        font-size: 14px;
        padding: 4px 4px 4px 16px;
    }

    .btn-sector-contact .btn-icon {
        width: 32px;
        height: 32px;
    }
}

.footer-container {
    padding: 50px 40px 80px;
    align-items: center;
    display: flex;
    flex-direction: column;
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    height: min-content;
    padding: 0;
    display: flex;
    position: relative;
    overflow: visible;
    align-items: flex-start;
}

.brands-container {
    padding: 0px !important;
}

@media (max-width: 1250px) {

    .sector-card,
    .sector-card.reverse {
        width: 100%;
        /* Stop forcing 1200px */
        max-width: 90vw;
        /* Give it some breathing room */
        margin-left: auto;
        /* Reset the calculated margins */
        margin-right: auto;
        /* Keep the sticky effect or disable it depending on preference, 
           but width must be fluid here */
    }
}


/* ===================================
   Responsive Brands Tabs
   =================================== */

/* Tablet & Mobile (Below 1024px) */
@media (max-width: 1024px) {
    .brands-tabs {
        width: 100%;
        /* Force container to fill screen width */
        gap: 0;
        /* Remove the large gap between tabs */
        justify-content: space-between;
    }

    .brand-tab {
        width: 50%;
        /* Make each tab take up exactly half the screen */
        padding-left: 10px;
        /* Add safe spacing for text */
        padding-right: 10px;
    }
}

/* Mobile Specific (Below 600px) */
@media (max-width: 600px) {
    .brand-tab {
        font-size: 15px;
        /* Reduce font size to fit long text */
        padding-bottom: 12px;
        /* Adjust padding near the bottom border */
        display: flex;
        align-items: flex-end;
        /* Align text to bottom if heights differ */
        line-height: 1.2;
        /* Tighter line height for wrapping text */
    }

    /* Optional: Ensure the active line animation aligns perfectly */
    .brand-tab.active::after {
        bottom: -1px;
    }
}

/* --- Fix Sector Cards for Mobile --- */

/* ===================================
   Tablet / iPad Responsive Styles
   (Between 769px and 1200px)
   =================================== */
@media (max-width: 1200px) {

    /* 1. Reset the Layout from Side-by-Side to Stacked */
    .sector-card,
    .sector-card.reverse {
        grid-template-columns: 1fr;
        /* Single column layout */
        width: 90%;
        /* 90% of screen width */
        max-width: 700px;
        /* Cap width so it doesn't get huge */
        height: auto;
        /* content determines height */
        margin: 0 auto 48px auto;
        /* Center align and add bottom gap */

        /* 2. Disable the Sticky/Stacking Effect */
        /* Sticky prevents scrolling on tablets if content is tall */
        position: relative;
        top: 0 !important;
        transform: none !important;
        box-shadow: var(--shadow-xl);
        /* Keep nice shadow */
        z-index: 1;
    }

    /* 3. Adjust the Image */
    .sector-image {
        width: 100%;
        height: 350px;
        /* Fixed height for consistency */
        border-radius: 20px 20px 0 0;
        /* Round top corners only */
        order: -1;
        /* Force image to top, even on reversed cards */
    }

    /* 4. Adjust Content Area */
    .sector-content {
        padding: 40px;
        /* Generous padding looks premium on tablet */
        order: 2;
        /* Force content to bottom */
        padding-top: 0;
    }

    /* 5. Handle "Reverse" Cards */
    /* We cancel the reverse ordering so all cards look uniform (Image Top) */
    .sector-card.reverse .sector-image {
        order: -1;
    }

    .sector-card.reverse .sector-content {
        order: 2;
    }

    /* 6. Typography Adjustments for Tablet */
    .sector-title {
        font-size: 24px;
        /* Larger title for tablet readability */
    }

    .sector-description {
        font-size: 16px;
        max-width: 100%;
    }

    /* Keep the list in 2 columns (looks good on tablet) */
    .sector-columns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        /* margin-bottom: 24px; */
    }

    .btn-sector-contact {
        margin-bottom: 0;
        /* Reset margin */
        width: fit-content;
    }
}

/* ===================================
   Tablet Hero Card (iPad Portrait/Landscape)
   =================================== */
@media (max-width: 1024px) {

    /* 1. Stack the layout (Title on Top, Card on Bottom) */
    .hero-wrapper {
        flex-direction: column;
        align-items: center;
        /* Center elements horizontally */
        justify-content: center;
        gap: 40px;
        /* Reduce gap between title and card */
        padding-top: 60px;
    }

    /* 2. Center the Hero Text */
    .hero-text-content {
        max-width: 80%;
        /* readable width */
        text-align: center;
        /* Center align the main headline */
        margin-bottom: 0;
    }

    /* Center the buttons area */
    .hero-buttons {
        justify-content: center;
    }

    /* 3. Fix the Card Container */
    .hero-card {
        width: 100%;
        max-width: 550px;
        /* STOP it from stretching full screen width */
        display: flex;
        justify-content: center;
        margin: 0 auto;
        /* Center the card container */
    }

    /* 4. Fix the Glass Card Dimensions */
    .card-glass {
        /* A slightly larger height than desktop is often needed on tablets 
           because the font renders slightly differently or text wraps more */
        min-height: 280px;
        padding: 30px;
    }

    /* 5. Ensure text inside aligns correctly */
    .card-body {
        /* Keep text left-aligned inside the card - looks better than centered for paragraphs */
        text-align: left;
        align-items: flex-start;
    }
}

/* ===================================
   Mobile Fix for Brands Height & Layout
   (Place inside @media (max-width: 768px))
   =================================== */
@media (max-width: 768px) {

    /* 1. Ensure the container still acts as a stack */
    .brands-content {
        display: grid;
        grid-template-columns: 1fr;
    }

    /* 2. Configure the Inner Grid for Mobile (2 Columns) */
    .brands-grid {
        /* Keep it stacked in the same cell */
        grid-area: 1 / 1 / 2 / 2;

        /* Force Grid Layout (Overrides Desktop Flex) */
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        /* 2 Columns */
        gap: 12px;

        /* Animation & Visibility Logic */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, transform 0.3s ease;
        transform: translateX(10px);
        width: 100%;
        margin: 0;
    }

    /* 3. Show the active tab */
    .brands-grid.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        /* Note: We don't need to re-declare display: grid here, it inherits from above */
    }

    /* 4. Reset item sizes so they fill the grid cells */
    #oil-gas .brand-item,
    #industrial-construction .brand-item {
        width: 100% !important;
        height: auto !important;
        min-height: 80px;
        /* Ensure buttons are clickable/visible */
        flex: unset;
        /* Disable flex sizing */
    }

    /* Optional: Make logos smaller to fit nicely in 2 cols */
    .brand-item img {
        max-width: 80%;
        max-height: 80%;
    }

    .sector-content {
        padding-top: 40px;
    }

    .hero-text-content {
        max-width: 100%;
        text-align: left;
        margin-bottom: 0;
    }

    .hero-wrapper {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 64px;
        padding-top: 60px;
    }

    .sector-columns {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0px;
        /* margin-bottom: 24px; */
    }
}

/* ===================================
   DESKTOP: Sticky Animation (Screens wider than 1200px)
   =================================== */
@media (min-width: 1201px) {
    .sector-card {
        /* Enable Sticky Stacking */
        position: sticky;
        position: -webkit-sticky;
        /* Safari support */
        display: grid;
        grid-template-columns: 552px 1fr;
        width: 1200px;
        margin-left: calc(50% - 600px);
        /* Centers the 1200px card */
        margin-bottom: var(--spacing-xl);
        transition: box-shadow 0.4s ease;
        z-index: 1;
    }

    /* Stacking positions - This creates the animation effect */
    .sector-card:nth-of-type(1) {
        top: 100px;
        z-index: 1;
    }

    .sector-card:nth-of-type(2) {
        top: 140px;
        /* 40px lower so title shows */
        z-index: 2;
    }

    .sector-card:nth-of-type(3) {
        top: 180px;
        /* 80px lower */
        z-index: 3;
        margin-bottom: 80px;
        /* Space at bottom of section */
    }

    /* Shadow effect when stuck */
    .sector-card.is-stuck {
        box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.4);
    }
}

/* ===================================
   TABLET & MOBILE: No Animation (Screens smaller than 1200px)
   =================================== */
@media (max-width: 1200px) {

    .sector-card,
    .sector-card.reverse {
        /* Disable sticky on small screens */
        position: relative !important;
        top: 0 !important;
        transform: none !important;
        z-index: 1;

        /* Layout fixes */
        width: 90%;
        max-width: 700px;
        margin: 0 auto 40px auto;
        display: flex;
        flex-direction: column;
        height: auto;
    }

    /* Reset Margins for stacked cards */
    .sector-card:nth-of-type(1),
    .sector-card:nth-of-type(2),
    .sector-card:nth-of-type(3) {
        top: 0;
        margin-bottom: 40px;
    }
}