:root {
    --primary: #1e67b2;
    --primary-dark: #154d8a;
    --accent: #15b026;
    --accent-hover: #11931f;
    --leaf: #8cc63f;
    --text-dark: #1a1a1a;
    --text-muted: #6c757d;
    --bg-light: #f5f8fc;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e3eaf2;
    box-shadow: 0 1px 8px rgba(21, 77, 138, 0.06);
}

.site-header .navbar {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    min-height: 148px;
}

.site-header .navbar-brand {
    display: inline-flex;
    align-items: center;
    padding: 0;
    margin-right: 1.5rem;
    text-decoration: none;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    line-height: 0;
}

.site-header .brand-logo {
    height: 132px;
    width: auto;
    max-width: none;
    display: block;
    object-fit: contain;
    background: transparent;
}

@media (max-width: 991.98px) {
    .site-header .navbar {
        min-height: 120px;
    }

    .site-header .brand-logo {
        height: 108px;
    }
}

@media (max-width: 576px) {
    .site-header .navbar {
        min-height: 104px;
    }

    .site-header .brand-logo {
        height: 92px;
    }
}

.site-header .nav-link {
    color: var(--primary-dark) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
}

.site-header .nav-link:hover {
    color: var(--primary) !important;
}

.site-header .navbar-toggler {
    border-color: #c5d5e6;
}

.site-header .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(30, 103, 178, 0.2);
}

.search-input {
    min-width: 200px;
    border-radius: 20px;
    border-color: #c5d5e6;
    background: #f7fafc;
}

.search-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 0.2rem rgba(30, 103, 178, 0.15);
}

.header-search {
    position: relative;
}

.search-autocomplete {
    position: relative;
    width: 100%;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    min-width: 280px;
    max-height: 360px;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    z-index: 1050;
    padding: 0.35rem 0;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.85rem;
    color: var(--text-dark);
    text-decoration: none;
}

.search-suggestion-item:hover,
.search-suggestion-item.is-active {
    background: rgba(30, 103, 178, 0.08);
    color: var(--primary);
}

.search-suggestion-thumb {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f3f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-suggestion-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-suggestion-thumb.is-empty::after {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: #d5dde8;
}

.search-suggestion-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.search-suggestion-name {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.25;
}

.search-suggestion-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.search-suggestion-empty,
.search-suggestion-more {
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.search-suggestion-more a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}

.btn-accent:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

/* Hero — banners are designed for 1920×600; container keeps that aspect ratio */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section .carousel-item {
    height: auto;
}

.hero-slide {
    position: relative;
    width: 100%;
    aspect-ratio: 1920 / 600;
    overflow: hidden;
    background-color: var(--primary-dark, #154d8a);
}

.hero-slide-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.hero-slide-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: var(--primary-dark, #154d8a);
}

.hero-slide-link {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-slide-default {
    height: auto;
    min-height: 0;
    aspect-ratio: 1920 / 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.hero-section .carousel-control-prev,
.hero-section .carousel-control-next {
    z-index: 5;
    width: 8%;
}

/* Features */
.features-bar {
    background: #fff;
    border-bottom: 1px solid #eee;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.feature-item h5 {
    color: var(--primary);
    font-weight: 600;
}

/* Grain side decor — wheat, rice, lentils, barley (home sections) */
.has-grain-decor {
    position: relative;
    overflow: hidden;
}

.features-bar.has-grain-decor {
    overflow: visible;
}

.has-grain-decor > .container,
.has-grain-decor > .carousel {
    position: relative;
    z-index: 2;
}

.hero-section.has-grain-decor .carousel-control-prev,
.hero-section.has-grain-decor .carousel-control-next {
    z-index: 6;
}

.grain-side-decor {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.grain-side-decor__panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: min(200px, 16vw);
    opacity: 0.78;
}

.grain-side-decor__panel--left {
    left: 0;
}

.grain-side-decor__panel--right {
    right: 0;
}

.grain-side-decor__panel svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Short sections (features bar): keep full-size decor, centered and allowed to overflow */
.grain-side-decor--compact {
    inset: auto;
    left: 0;
    right: 0;
    top: 50%;
    height: 520px;
    transform: translateY(-50%);
}

.grain-side-decor--compact .grain-side-decor__panel {
    top: 0;
    bottom: auto;
    height: 100%;
    width: min(200px, 16vw);
    opacity: 0.78;
}

.grain-side-decor--hero .grain-side-decor__panel {
    width: min(180px, 15vw);
    opacity: 0.5;
}

.hero-section.has-grain-decor .grain-side-decor__panel svg {
    filter: brightness(1.15) saturate(0.85);
}

@media (max-width: 991.98px) {
    .grain-side-decor__panel {
        width: min(120px, 12vw);
        opacity: 0.55;
    }

    .grain-side-decor--compact .grain-side-decor__panel {
        width: min(120px, 12vw);
        opacity: 0.55;
    }
}

@media (max-width: 767.98px) {
    .grain-side-decor {
        display: none;
    }
}

/* Sections */
.section-padding {
    padding: 1.5rem 0 2.5rem;
}

/* First content block after the features strip — less top gap */
.features-bar + .section-padding {
    padding-top: 0.5rem;
}

/* Back-to-back sections (e.g. Categories → Featured Products) */
.section-padding + .section-padding {
    padding-top: 0.5rem;
}

.section-heading {
    margin-top: 0;
}

.section-heading h2 {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 0.85rem;
    padding: 0.85rem 1.5rem 1.55rem;
    color: #fff;
    background: var(--primary);
    font-weight: 700;
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.25;
    border-radius: 0 0 50% 50% / 0 0 2.75rem 2.75rem;
    box-shadow: 0 4px 14px rgba(21, 77, 138, 0.18);
}

.section-heading p {
    color: var(--text-muted);
    margin-bottom: 0;
}

@media (max-width: 575.98px) {
    .section-heading h2 {
        padding: 0.7rem 1rem 1.25rem;
        border-radius: 0 0 50% 50% / 0 0 1.75rem 1.75rem;
        font-size: 1.15rem;
    }
}

/* Page header — matches home section-heading banner, straight corners */
.page-header {
    background: transparent;
    color: #fff;
    padding: 1.25rem 0 0;
    border-bottom: none;
}

.page-header h1 {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.85rem 1.5rem;
    color: #fff;
    background: var(--primary);
    font-weight: 700;
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.25;
    border-radius: 0;
    box-shadow: 0 4px 14px rgba(21, 77, 138, 0.18);
}

@media (max-width: 575.98px) {
    .page-header h1 {
        padding: 0.7rem 1rem;
        font-size: 1.15rem;
    }
}

/* Category cards */
.category-card {
    display: block;
    text-align: center;
    padding: 0 0 1rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    color: var(--text-dark);
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    color: var(--primary);
}

.private-label-card {
    height: 100%;
    cursor: default;
}

.private-labels-scroller-item {
    flex: 0 0 240px;
    max-width: 240px;
}

.private-labels-scroller-item .private-label-card {
    width: 100%;
}

@media (max-width: 768px) {
    .private-labels-scroller-item {
        flex-basis: 200px;
        max-width: 200px;
    }
}

.category-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: #f4f7fb;
    padding: 0.5rem;
    box-sizing: border-box;
}

.category-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.category-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2.5rem;
    color: var(--primary);
    opacity: 0.5;
}

.category-card h6 {
    font-weight: 600;
    margin: 0;
    padding: 0 0.75rem;
}

/* Product cards */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.product-scroller-wrap {
    position: relative;
}

.product-scroller {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 0.5rem 0.25rem 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-scroller::-webkit-scrollbar {
    display: none;
    height: 0;
}

.product-scroller.is-centered {
    justify-content: center;
}

.product-scroller-item {
    flex: 0 0 260px;
    max-width: 260px;
    scroll-snap-align: start;
}

.product-scroller-btn {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-scroller-btn:hover {
    background: var(--primary);
    color: #fff;
}

.product-scroller-btn.prev {
    left: -8px;
}

.product-scroller-btn.next {
    right: -8px;
}

@media (max-width: 768px) {
    .product-scroller-item {
        flex-basis: 220px;
        max-width: 220px;
    }

    .product-scroller-btn {
        display: none;
    }
}

.product-image {
    display: block;
    height: 200px;
    background: var(--bg-light);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ccc;
}

.product-placeholder.large {
    height: 350px;
    background: var(--bg-light);
    border-radius: 12px;
}

.product-body {
    padding: 1rem;
}

.product-category, .product-brand {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.product-brand {
    margin-left: 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid #ddd;
}

.product-body h6 {
    margin: 0.5rem 0;
    font-weight: 600;
}

.product-body h6 a {
    color: var(--text-dark);
    text-decoration: none;
}

.product-body h6 a:hover {
    color: var(--primary);
}

.product-weight {
    font-size: 0.875rem;
    color: var(--leaf);
    font-weight: 600;
}

/* Brand cards */
.brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    min-height: 100px;
    transition: transform 0.2s;
}

.brand-card:hover {
    transform: translateY(-4px);
}

.brand-card-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #fff;
    flex: 0 0 auto;
    padding: 0.2rem;
}

.brand-card-media img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.brand-card-name {
    display: block;
    width: 100%;
    padding: 0.4rem 0.35rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary, #0b3d91);
    text-align: center;
    line-height: 1.25;
    flex-shrink: 0;
}

.brand-card-name-only {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
}

.brand-placeholder {
    font-weight: 600;
    color: var(--primary);
    text-align: center;
    font-size: 0.85rem;
    padding: 0.5rem;
}

.brands-grid > [class*="col-"] {
    display: flex;
}

.brands-grid .brand-card {
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    gap: 0;
    overflow: hidden;
    min-height: 0;
}

.brands-scroller-item {
    flex: 0 0 160px;
    max-width: 160px;
}

.brands-scroller-item .brand-card {
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    gap: 0;
    overflow: hidden;
    min-height: 0;
}

@media (max-width: 768px) {
    .brands-scroller-item {
        flex-basis: 140px;
        max-width: 140px;
    }
}

/* Sidebar */
.sidebar-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

@media (min-width: 992px) {
    .products-sidebar,
    .section-padding .row > aside.col-lg-3:has(.category-list) {
        align-self: flex-start;
        position: sticky;
        top: 1rem;
        z-index: 2;
    }

    .products-sidebar .sidebar-card,
    .section-padding .row > aside.col-lg-3:has(.category-list) .sidebar-card {
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

.sidebar-card h5 {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list > li > a,
.category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    border-bottom: 1px solid #f0f0f0;
}

.category-list > li > a {
    padding: 0.55rem 0;
    color: var(--text-dark);
    text-decoration: none;
}

.category-row .category-link {
    flex: 1;
    padding: 0.55rem 0;
    color: var(--text-dark);
    text-decoration: none;
}

.category-count {
    margin-left: 0.35rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.88em;
    white-space: nowrap;
}

.category-list > li > a:hover .category-count,
.category-list > li > a.active .category-count,
.category-row .category-link:hover .category-count,
.category-row .category-link.active .category-count,
.category-row .category-link.active-parent .category-count,
.subcategory-list li a:hover .category-count,
.subcategory-list li a.active .category-count {
    color: inherit;
    font-weight: 500;
}

.category-list > li > a:hover,
.category-list > li > a.active,
.category-row .category-link:hover,
.category-row .category-link.active,
.category-row .category-link.active-parent {
    color: var(--primary);
    font-weight: 600;
}

.category-toggle {
    border: none;
    background: transparent;
    color: var(--primary);
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.category-toggle:hover {
    background: rgba(30, 103, 178, 0.1);
}

.category-toggle i {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.has-subcategories .subcategory-list {
    display: none;
}

.has-subcategories.is-open .subcategory-list {
    display: block;
}

.has-subcategories.is-open .category-toggle i {
    transform: rotate(180deg);
}

.subcategory-list {
    list-style: none;
    padding: 0.25rem 0 0.5rem 0.9rem;
    margin: 0 0 0.35rem;
    border-left: 2px solid rgba(30, 103, 178, 0.2);
}

.subcategory-list li a {
    display: block;
    padding: 0.35rem 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    border-bottom: none;
}

.subcategory-list li a:hover,
.subcategory-list li a.active {
    color: var(--primary);
    font-weight: 600;
}

.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.products-page-size-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.products-page-size-form .form-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.products-page-size-form .form-select {
    width: auto;
    min-width: 4.5rem;
}

.search-result-title {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(30, 103, 178, 0.15);
}

.search-page-form .form-control {
    border-color: rgba(30, 103, 178, 0.25);
}

/* Contact */
.contact-info-card, .contact-form-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    height: 100%;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary);
}

.contact-item p {
    margin: 0;
    color: var(--text-muted);
}

.contact-recaptcha {
    min-height: 78px;
}

.contact-map-wrap h4 {
    color: var(--primary);
    font-weight: 700;
}

.contact-map {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(30, 103, 178, 0.15);
    background: #fff;
    min-height: 380px;
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 380px;
    border: 0;
}

.map-facade {
    width: 100%;
    min-height: 380px;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    text-align: center;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(30, 103, 178, 0.92), rgba(21, 77, 138, 0.92)),
        repeating-linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.04) 0,
            rgba(255, 255, 255, 0.04) 12px,
            transparent 12px,
            transparent 24px
        );
}

.map-facade:hover {
    filter: brightness(1.05);
}

.map-facade-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #8cc63f;
}

.map-facade-title {
    max-width: 36rem;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
}

.map-facade-action {
    margin-top: 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: #15b026;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.contact-success-modal .success-check {
    font-size: 3rem;
    color: var(--accent);
    line-height: 1;
}

.contact-success-modal h4 {
    color: var(--primary);
    font-weight: 700;
}

/* CTA */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Footer */
.site-footer {
    background: #1a1a1a;
    color: #ccc;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-whatsapp-link,
.whatsapp-text-link {
    color: #25d366;
    text-decoration: none;
    font-weight: 600;
}

.footer-whatsapp-link:hover,
.whatsapp-text-link:hover {
    color: #1ebe57;
    text-decoration: underline;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.15rem;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.footer-social-link:hover {
    background: var(--primary, #1e67b2);
    color: #fff;
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus {
    background: #1ebe57;
    border-color: #1ebe57;
    color: #fff;
}

.whatsapp-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1040;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease;
}

.whatsapp-float:hover {
    background: #1ebe57;
    color: #fff;
    transform: translateY(-2px);
}

/* Content pages */
.content-page h2, .content-page h3 {
    color: var(--primary);
    margin-top: 1.5rem;
}

/* Worldwide footprint map */
.footprint-section {
    position: relative;
    isolation: isolate;
    background: linear-gradient(180deg, #02060e 0%, #071327 38%, #0a1830 70%, #06101f 100%);
    color: #fff;
    padding: 4.5rem 0 4rem;
    overflow: hidden;
}

.footprint-section > .container {
    position: relative;
    z-index: 2;
}

.footprint-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.footprint-stars {
    position: absolute;
    inset: 0;
    opacity: 0.7;
    background-image:
        radial-gradient(1.5px 1.5px at 8% 14%, rgba(220, 235, 255, 0.9), transparent),
        radial-gradient(1px 1px at 18% 32%, rgba(180, 210, 255, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 30% 10%, rgba(230, 240, 255, 0.8), transparent),
        radial-gradient(1px 1px at 42% 24%, rgba(160, 200, 255, 0.55), transparent),
        radial-gradient(1px 1px at 55% 8%, rgba(220, 235, 255, 0.85), transparent),
        radial-gradient(1.5px 1.5px at 68% 18%, rgba(190, 220, 255, 0.7), transparent),
        radial-gradient(1px 1px at 78% 12%, rgba(220, 235, 255, 0.75), transparent),
        radial-gradient(1px 1px at 88% 28%, rgba(170, 200, 255, 0.55), transparent),
        radial-gradient(1px 1px at 94% 8%, rgba(220, 235, 255, 0.7), transparent),
        radial-gradient(1px 1px at 12% 48%, rgba(180, 210, 255, 0.4), transparent),
        radial-gradient(1px 1px at 50% 36%, rgba(180, 210, 255, 0.35), transparent);
}

.footprint-network {
    position: absolute;
    top: 6%;
    width: clamp(180px, 26vw, 340px);
    height: auto;
    opacity: 1;
    filter:
        drop-shadow(0 0 4px rgba(100, 180, 255, 0.65))
        drop-shadow(0 0 14px rgba(70, 140, 255, 0.35));
    z-index: 2;
}

.footprint-network-left {
    left: 0.5rem;
}

.footprint-network-right {
    right: 0.5rem;
}

.footprint-globe {
    position: absolute;
    left: 50%;
    bottom: -8%;
    width: min(150vw, 1300px);
    height: 620px;
    max-height: 620px;
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
    opacity: 1;
}

.footprint-globe-body {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 100%;
    height: 200%;
    transform: translateX(-50%);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 18%, rgba(90, 150, 220, 0.35) 0%, transparent 22%),
        radial-gradient(circle at 35% 30%, rgba(50, 90, 140, 0.25) 0%, transparent 28%),
        radial-gradient(circle at 65% 35%, rgba(30, 60, 100, 0.2) 0%, transparent 26%),
        radial-gradient(circle at 50% 40%, #1a304c 0%, #0d1b30 35%, #071018 62%, #03070f 100%);
    box-shadow:
        inset 0 40px 90px rgba(120, 180, 255, 0.22),
        inset 0 -80px 120px rgba(0, 0, 0, 0.75),
        0 -20px 80px rgba(60, 130, 220, 0.2);
}

.footprint-globe-atmosphere {
    position: absolute;
    left: 5%;
    right: 5%;
    top: 0;
    height: 42%;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background:
        radial-gradient(ellipse 90% 70% at 50% 100%, rgba(100, 180, 255, 0.55) 0%, rgba(50, 120, 210, 0.2) 40%, transparent 72%);
    filter: blur(8px);
    opacity: 0.95;
}

.footprint-globe-atmosphere::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    top: 48%;
    height: 3px;
    border-radius: 50%;
    background: linear-gradient(90deg, transparent, rgba(170, 215, 255, 0.75), transparent);
    box-shadow: 0 0 24px 4px rgba(110, 180, 255, 0.55);
}

.footprint-globe-grid {
    position: absolute;
    left: 4%;
    right: 4%;
    top: 2%;
    height: 70%;
    opacity: 0.85;
    overflow: visible;
}

.footprint-heading h2 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 500;
    margin-bottom: 0.85rem;
}

.footprint-heading h2 strong {
    font-weight: 700;
}

.footprint-heading p {
    max-width: 720px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
}

.footprint-rule {
    width: 56px;
    height: 3px;
    background: #fff;
    margin: 1.25rem auto 0;
}

.footprint-legends {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem 1.75rem;
    margin: 1.75rem 0 1rem;
}

.footprint-legend {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.9);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.footprint-legend:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.06);
}

.footprint-legend.is-active {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.footprint-legends.has-filter .footprint-legend:not(.is-active) {
    opacity: 0.45;
}

.footprint-map path.footprint-dimmed {
    opacity: 0.55;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}

.legend-swatch.clientele,
.legend-swatch.distribution {
    background: #3d8ad4;
}

.legend-swatch.destination {
    background: #e8a317;
}

.legend-swatch.head-office,
.legend-swatch.office {
    background: #15b026;
}

.footprint-map-shell {
    position: relative;
    width: 100%;
    background: transparent;
    overflow: visible;
}

.footprint-map,
#worldwideFootprintMap,
#worldwideFootprintMap.jvm-container {
    width: 100%;
    height: 520px;
    background: transparent !important;
    background-color: transparent !important;
    position: relative;
    z-index: 1;
    overflow: hidden;
    touch-action: none;
    cursor: default;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
}

.footprint-map .jvm-zoom-btn {
    z-index: 8 !important;
    pointer-events: auto !important;
    position: absolute;
}

.footprint-map.is-pan-ready {
    cursor: grab;
}

.footprint-map.is-panning {
    cursor: grabbing;
}

.footprint-map svg,
#worldwideFootprintMap svg {
    background: transparent !important;
    display: block;
    pointer-events: auto;
    touch-action: none;
}

.footprint-map .jvm-region,
.footprint-map path {
    touch-action: none;
}

.footprint-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.footprint-country-label.is-hovered,
.footprint-country-pin.is-hovered,
.footprint-label-line.is-hovered {
    opacity: 0;
    transition: opacity 0.1s ease;
}

.footprint-country-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
}

.footprint-country-label {
    position: absolute;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    line-height: 1;
    z-index: 4;
}

.footprint-label-line {
    position: absolute;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.55);
    transform-origin: 0 50%;
    pointer-events: none;
    z-index: 2;
}

.footprint-country-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.footprint-country-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.footprint-country-dot.is-clientele {
    background: #3d8ad4;
}

.footprint-country-dot.is-destination {
    background: #e8a317;
}

.footprint-country-dot.is-head-office {
    background: #15b026;
}

.footprint-country-name {
    background: rgba(11, 21, 38, 0.55);
    padding: 0.12rem 0.35rem;
    border-radius: 3px;
}

.footprint-map path.footprint-active {
    transition: filter 0.15s ease, opacity 0.15s ease;
}

.footprint-map path.footprint-active:hover {
    filter: brightness(1.2);
    opacity: 1;
}

.footprint-map .jvm-tooltip,
.jvm-tooltip {
    background: rgba(11, 21, 38, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 8px !important;
    padding: 0.55rem 0.75rem !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
    z-index: 40 !important;
    pointer-events: none !important;
    transform: translateY(-8px);
}

.footprint-tooltip {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    color: #fff;
    font-size: 0.85rem;
}

.footprint-tooltip-type {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    font-size: 0.78rem;
}

.footprint-tooltip-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

@media (max-width: 768px) {
    .footprint-section {
        padding: 2.5rem 0 2rem;
    }

    .footprint-section > .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .footprint-heading h2 {
        font-size: 1.35rem;
        line-height: 1.3;
        margin-bottom: 0.65rem;
    }

    .footprint-heading p {
        font-size: 0.88rem;
        line-height: 1.5;
        max-width: 100%;
    }

    .footprint-rule {
        margin-top: 0.9rem;
    }

    .footprint-legends {
        gap: 0.45rem 0.5rem;
        margin: 1.1rem 0 0.85rem;
    }

    .footprint-legend {
        font-size: 0.76rem;
        padding: 0.28rem 0.55rem;
        gap: 0.3rem;
    }

    .legend-swatch {
        width: 11px;
        height: 11px;
    }

    .footprint-network {
        display: none;
    }

    .footprint-globe {
        bottom: -2%;
        width: 140vw;
        height: 280px;
        max-height: 280px;
        opacity: 0.9;
    }

    .footprint-globe-grid {
        opacity: 0.45;
    }

    .footprint-map-shell {
        margin: 0;
        overflow: hidden;
    }

    .footprint-map,
    #worldwideFootprintMap,
    #worldwideFootprintMap.jvm-container {
        height: 300px;
    }

    /* Overlay names clutter phones — pins + list below are clearer */
    .footprint-country-label,
    .footprint-label-line {
        display: none !important;
    }

    .footprint-country-pin {
        transform: translate(-50%, -50%) scale(0.92);
    }

    .footprint-country-dot {
        width: 6px;
        height: 6px;
        box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9);
    }

    .footprint-mobile-list {
        list-style: none;
        margin: 1rem 0 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
        max-height: 240px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .footprint-mobile-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.65rem;
        padding: 0.55rem 0.7rem;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footprint-mobile-item.is-filtered-out {
        display: none;
    }

    .footprint-mobile-name {
        font-size: 0.88rem;
        font-weight: 600;
        color: #fff;
    }

    .footprint-mobile-types {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.3rem;
    }

    .footprint-mobile-badge {
        display: inline-block;
        font-size: 0.65rem;
        font-weight: 600;
        color: #fff;
        padding: 0.15rem 0.4rem;
        border-radius: 999px;
        white-space: nowrap;
    }

    .footprint-map .jvm-zoom-btn {
        width: 28px !important;
        height: 28px !important;
        line-height: 28px !important;
        font-size: 14px !important;
    }
}

@media (min-width: 769px) {
    .footprint-mobile-list {
        display: none !important;
    }
}


/* ===== About Us page ===== */
.about-overview-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #334155;
}

.about-overview-content h2,
.about-overview-content h3 {
    color: var(--primary, #0b3d91);
}

/* --- About timeline: 3D carousel with wheat prints on white --- */
.about-timeline-section {
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
    background-color: #ffffff;
    background-image: url('/images/timeline-wheat-bg.svg');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

.about-timeline-section .section-heading h2 {
    color: #fff;
    background: var(--primary);
}

.about-timeline-section .section-heading p {
    color: #7a756e;
}

.about-timeline-section .container {
    position: relative;
    z-index: 2;
}

.timeline-3d {
    position: relative;
    perspective: 1400px;
    perspective-origin: 50% 42%;
    min-height: 480px;
    padding: 2rem 3.25rem 2.75rem;
    user-select: none;
    z-index: 1;
}

.timeline-nav {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    z-index: 20;
    width: 42px;
    height: 42px;
    border: 2px solid rgba(44, 62, 80, 0.15);
    border-radius: 0.25rem;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--primary, #0b3d91);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 8px 20px rgba(15, 40, 80, 0.2);
}

.timeline-3d-stage {
    position: relative;
    height: 500px;
    overflow: visible;
    transform-style: preserve-3d;
}

.timeline-3d-track {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}

.timeline-3d-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(340px, 78vw);
    padding: 0;
    border-radius: 0.35rem;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: transform 0.45s ease, opacity 0.45s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    overflow: visible;
    --timeline-img-base-w: clamp(118px, 14vw, 168px);
    --timeline-img-base-h: clamp(88px, 10vw, 126px);
    --timeline-img-w: var(--timeline-img-base-w);
    --timeline-img-h: var(--timeline-img-base-h);
}

.timeline-card-surround[data-image-count="2"] {
    --timeline-img-w: clamp(104px, 12vw, 148px);
    --timeline-img-h: clamp(78px, 9vw, 111px);
}

.timeline-card-surround[data-image-count="2"] .timeline-surround-top-left {
    transform: translateX(-68%) rotate(-5deg);
    animation-name: timelineSurroundInTopLeftWide;
}

.timeline-card-surround[data-image-count="2"] .timeline-surround-top-right {
    transform: translateX(68%) rotate(5deg);
    animation-name: timelineSurroundInTopRightWide;
}

.timeline-card-surround[data-image-count="3"] .timeline-surround-top-left {
    transform: translateX(-55%) rotate(-6deg);
}

.timeline-card-surround[data-image-count="3"] .timeline-surround-top-right {
    transform: translateX(55%) rotate(6deg);
}

.timeline-card-surround[data-image-count="4"] {
    --timeline-img-w: clamp(100px, 11.5vw, 140px);
    --timeline-img-h: clamp(75px, 8.5vw, 105px);
}

.timeline-card-surround[data-image-count="5"],
.timeline-card-surround[data-image-count="6"] {
    --timeline-img-w: clamp(96px, 11vw, 138px);
    --timeline-img-h: clamp(72px, 8vw, 104px);
}

.timeline-card-surround[data-image-count="6"] {
    --timeline-img-w: clamp(88px, 10vw, 128px);
    --timeline-img-h: clamp(66px, 7.5vw, 96px);
}

.timeline-card-body {
    position: relative;
    z-index: 2;
    padding: 1.5rem 1.35rem 1.65rem;
    border-radius: 0.35rem;
    background: linear-gradient(165deg, #ffffff 0%, #eef3f8 100%);
    border: 1px solid rgba(44, 62, 80, 0.18);
    border-top: 4px solid var(--primary, #0b3d91);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 20px 44px rgba(15, 40, 80, 0.2);
}

.timeline-3d-card.is-active .timeline-card-body {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 24px 52px rgba(11, 61, 145, 0.28);
}

.timeline-card-surround {
    position: absolute;
    top: -155px;
    right: -110px;
    bottom: -155px;
    left: -110px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.timeline-3d-card.is-active .timeline-card-surround {
    opacity: 1;
    visibility: visible;
}

.timeline-surround-frame {
    position: absolute;
    margin: 0;
    width: var(--timeline-img-w);
    height: var(--timeline-img-h);
    padding: 5px;
    border: none;
    background: linear-gradient(155deg, #1c2b38 0%, #34495e 55%, #243647 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 18px 36px rgba(10, 24, 42, 0.32);
    overflow: hidden;
    pointer-events: none;
    cursor: default;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-3d-card.is-active .timeline-surround-frame {
    pointer-events: auto;
    cursor: zoom-in;
}

.timeline-3d-card.is-active .timeline-surround-frame:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 22px 40px rgba(10, 24, 42, 0.42);
}

.timeline-3d-card.is-active .timeline-surround-frame:focus-visible {
    outline: 2px solid var(--primary, #0b3d91);
    outline-offset: 3px;
}

.timeline-surround-frame::before,
.timeline-surround-frame::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(180, 198, 214, 0.85);
    pointer-events: none;
    z-index: 3;
}

.timeline-surround-frame::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.timeline-surround-frame::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.timeline-surround-accent {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 7px;
    background: repeating-linear-gradient(
        -45deg,
        #e8a317 0,
        #e8a317 7px,
        #1c2b38 7px,
        #1c2b38 14px
    );
    z-index: 2;
    opacity: 0.92;
}

.timeline-surround-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
    filter: contrast(1.06) saturate(0.92);
}

.timeline-3d-card.is-active .timeline-surround-frame {
    animation-duration: 0.55s;
    animation-timing-function: ease;
    animation-fill-mode: both;
}

.timeline-surround-top-left,
.timeline-surround-top-center,
.timeline-surround-top-right,
.timeline-surround-bottom-left,
.timeline-surround-bottom-center,
.timeline-surround-bottom-right {
    z-index: 3;
}

.timeline-surround-outer {
    z-index: 2;
    width: calc(var(--timeline-img-w) * 0.88);
    height: calc(var(--timeline-img-h) * 0.88);
    opacity: 0.94;
}

.timeline-surround-top-left {
    left: 110px;
    bottom: calc(100% - 155px + 16px);
    transform: translateX(-48%) rotate(-7deg);
    animation-name: timelineSurroundInTopLeft;
}

.timeline-surround-top-center {
    left: 50%;
    right: auto;
    bottom: calc(100% - 155px + 22px);
    transform: translateX(-50%) rotate(0deg);
    animation-name: timelineSurroundInTopCenter;
}

.timeline-surround-top-right {
    right: 110px;
    left: auto;
    bottom: calc(100% - 155px + 16px);
    transform: translateX(48%) rotate(7deg);
    animation-name: timelineSurroundInTopRight;
}

.timeline-surround-bottom-left {
    left: 110px;
    top: calc(100% - 155px + 16px);
    bottom: auto;
    transform: translateX(-48%) rotate(6deg);
    animation-name: timelineSurroundInBottomLeft;
}

.timeline-surround-bottom-center {
    left: 50%;
    right: auto;
    top: calc(100% - 155px + 22px);
    bottom: auto;
    transform: translateX(-50%) rotate(0deg);
    animation-name: timelineSurroundInBottomCenter;
}

.timeline-surround-bottom-right {
    right: 110px;
    left: auto;
    top: calc(100% - 155px + 16px);
    bottom: auto;
    transform: translateX(48%) rotate(-6deg);
    animation-name: timelineSurroundInBottomRight;
}

.timeline-surround-top-left.timeline-surround-outer {
    bottom: calc(100% - 155px + 36px);
    transform: translateX(-58%) rotate(-9deg);
}

.timeline-surround-top-center.timeline-surround-outer {
    bottom: calc(100% - 155px + 42px);
}

.timeline-surround-top-right.timeline-surround-outer {
    bottom: calc(100% - 155px + 36px);
    transform: translateX(58%) rotate(9deg);
}

.timeline-surround-bottom-left.timeline-surround-outer {
    top: calc(100% - 155px + 36px);
    transform: translateX(-58%) rotate(8deg);
}

.timeline-surround-bottom-center.timeline-surround-outer {
    top: calc(100% - 155px + 42px);
}

.timeline-surround-bottom-right.timeline-surround-outer {
    top: calc(100% - 155px + 36px);
    transform: translateX(58%) rotate(-8deg);
}

@keyframes timelineSurroundInTopCenter {
    from { opacity: 0; filter: blur(2px); transform: translateX(-50%) scale(0.92); }
    to { opacity: 1; filter: blur(0); transform: translateX(-50%) scale(1); }
}

@keyframes timelineSurroundInBottomCenter {
    from { opacity: 0; filter: blur(2px); transform: translateX(-50%) scale(0.92); }
    to { opacity: 1; filter: blur(0); transform: translateX(-50%) scale(1); }
}

@keyframes timelineSurroundInTopLeft {
    from { opacity: 0; filter: blur(2px); transform: translateX(-42%) rotate(-7deg) scale(0.92); }
    to { opacity: 1; filter: blur(0); transform: translateX(-42%) rotate(-7deg) scale(1); }
}

@keyframes timelineSurroundInTopRight {
    from { opacity: 0; filter: blur(2px); transform: translateX(42%) rotate(7deg) scale(0.92); }
    to { opacity: 1; filter: blur(0); transform: translateX(42%) rotate(7deg) scale(1); }
}

@keyframes timelineSurroundInTopLeftWide {
    from { opacity: 0; filter: blur(2px); transform: translateX(-68%) rotate(-5deg) scale(0.92); }
    to { opacity: 1; filter: blur(0); transform: translateX(-68%) rotate(-5deg) scale(1); }
}

@keyframes timelineSurroundInTopRightWide {
    from { opacity: 0; filter: blur(2px); transform: translateX(68%) rotate(5deg) scale(0.92); }
    to { opacity: 1; filter: blur(0); transform: translateX(68%) rotate(5deg) scale(1); }
}

@keyframes timelineSurroundInBottomLeft {
    from { opacity: 0; filter: blur(2px); transform: translateX(-42%) rotate(6deg) scale(0.92); }
    to { opacity: 1; filter: blur(0); transform: translateX(-42%) rotate(6deg) scale(1); }
}

@keyframes timelineSurroundInBottomRight {
    from { opacity: 0; filter: blur(2px); transform: translateX(42%) rotate(-6deg) scale(0.92); }
    to { opacity: 1; filter: blur(0); transform: translateX(42%) rotate(-6deg) scale(1); }
}

.timeline-year {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(180deg, #0f4a9e 0%, #0b3d91 100%);
    padding: 0.28rem 0.75rem;
    border-radius: 0.15rem;
    margin-bottom: 0.75rem;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.timeline-3d-card h3 {
    font-size: 1.2rem;
    color: #0f2748;
    margin-bottom: 0.5rem;
}

.timeline-3d-card p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.55;
}

.timeline-prev { left: 0.25rem; }
.timeline-next { right: 0.25rem; }

.timeline-dots {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.timeline-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    background: rgba(11, 61, 145, 0.25);
    padding: 0;
}

.timeline-dot.is-active {
    background: var(--primary, #0b3d91);
    transform: scale(1.25);
}

.timeline-image-modal {
    z-index: 1085;
}

.timeline-image-modal.show ~ .modal-backdrop,
.modal.show ~ .modal-backdrop.show ~ .modal-backdrop.show {
    z-index: 1080;
}

.about-event-gallery-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    border-radius: 0.375rem;
    overflow: hidden;
    text-align: left;
}

.about-event-gallery-trigger:hover .about-event-gallery-img {
    opacity: 0.92;
}

.timeline-image-modal .modal-dialog {
    max-width: min(960px, 92vw);
}

.timeline-image-modal-content {
    position: relative;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #f1f5f9;
    pointer-events: auto;
}

.timeline-image-modal .modal-body {
    padding: 0.25rem 0 0.75rem;
}

.timeline-image-modal-frame {
    position: relative;
    padding: 3px;
    background: linear-gradient(155deg, #243647 0%, #3d5368 52%, #1c2b38 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 18px 42px rgba(0, 0, 0, 0.42);
}

.timeline-image-modal-close {
    position: absolute;
    top: -0.65rem;
    right: -0.65rem;
    z-index: 5;
    width: 2.15rem;
    height: 2.15rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 2px solid rgba(196, 210, 224, 0.8);
    border-radius: 0.15rem;
    background: linear-gradient(165deg, #4a6278 0%, #1c2b38 100%);
    color: #f8fafc;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 6px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.timeline-image-modal-close:hover {
    background: linear-gradient(165deg, #5a738a 0%, #243647 100%);
    color: #fff;
    transform: scale(1.06);
}

.timeline-image-modal-close:focus-visible {
    outline: 2px solid #e8a317;
    outline-offset: 2px;
}

.timeline-image-modal-frame::before,
.timeline-image-modal-frame::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(196, 210, 224, 0.8);
    pointer-events: none;
    z-index: 2;
}

.timeline-image-modal-frame::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.timeline-image-modal-frame::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.timeline-image-modal-accent {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 5px;
    background: repeating-linear-gradient(
        -45deg,
        #e8a317 0,
        #e8a317 6px,
        #1c2b38 6px,
        #1c2b38 12px
    );
    z-index: 2;
}

.timeline-image-modal-img {
    display: block;
    width: 100%;
    max-height: min(78vh, 820px);
    object-fit: contain;
    margin: 0;
    background: #eef2f6;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-image-modal-caption {
    margin-top: 0.65rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #e2e8f0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.about-events-scroller-wrap {
    margin-top: 0.25rem;
}

.about-events-scroller .about-events-scroller-item {
    flex: 0 0 min(100%, 380px);
    max-width: 380px;
}

.about-events-scroller .about-event-card {
    height: 100%;
}

.about-event-card {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(15, 40, 80, 0.08);
    border-radius: 0.85rem;
    overflow: hidden;
    background: #fff;
    padding: 0;
    box-shadow: 0 10px 28px rgba(15, 40, 80, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(15, 40, 80, 0.14);
}

.about-event-media {
    aspect-ratio: 16 / 10;
    background: #e8eef8;
    overflow: hidden;
}

.about-event-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-event-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 2rem;
    color: #7a93b8;
}

.about-event-body {
    padding: 1rem 1.1rem 1.2rem;
}

.about-event-body time {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent, #c45c26);
}

.about-event-body h3 {
    margin: 0.35rem 0 0;
    font-size: 1.05rem;
    color: #0f2748;
}

.about-event-gallery-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.about-certs-carousel {
    max-width: 520px;
    margin: 0 auto;
}

.about-cert-slide {
    width: 100%;
    border: none;
    background: #fff;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 12px 32px rgba(15, 40, 80, 0.1);
    text-align: center;
}

.about-cert-slide img,
.about-cert-modal-logo {
    max-height: 120px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 1rem;
}

.about-cert-placeholder {
    min-height: 100px;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--primary, #0b3d91);
    margin-bottom: 1rem;
}

.about-cert-slide h3 {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
    color: #0f2748;
}

.about-cert-hint {
    font-size: 0.85rem;
    color: #64748b;
}

.about-certs-carousel .carousel-control-prev,
.about-certs-carousel .carousel-control-next {
    width: 44px;
    height: 44px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(11, 61, 145, 0.85);
    border-radius: 50%;
    opacity: 1;
}

.about-certs-carousel .carousel-control-prev { left: -0.5rem; }
.about-certs-carousel .carousel-control-next { right: -0.5rem; }

.footer-links-certs {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.footer-quick-links {
    flex: 0 1 auto;
    min-width: 0;
}

.footer-certifications {
    flex: 0 1 auto;
    min-width: 0;
    text-align: left;
}

.footer-cert-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.footer-cert-logos img {
    height: 36px;
    width: auto;
    max-width: 72px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 0.35rem;
    padding: 0.2rem 0.35rem;
}

@media (max-width: 575.98px) {
    .footer-links-certs {
        flex-direction: column;
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .timeline-3d {
        padding: 0.5rem 2.25rem 2rem;
        min-height: 400px;
        perspective: 1100px;
    }

    .timeline-3d-stage {
        height: 420px;
    }

    .timeline-3d-card {
        --timeline-img-base-w: clamp(72px, 17vw, 100px);
        --timeline-img-base-h: clamp(54px, 13vw, 76px);
    }

    .timeline-card-surround {
        top: -110px;
        right: -50px;
        bottom: -110px;
        left: -50px;
    }

    .timeline-surround-top-left {
        left: 50px;
        bottom: calc(100% - 110px + 10px);
        transform: translateX(-44%) rotate(-5deg);
    }

    .timeline-surround-top-center {
        bottom: calc(100% - 110px + 14px);
    }

    .timeline-surround-top-right {
        right: 50px;
        transform: translateX(44%) rotate(5deg);
    }

    .timeline-card-surround[data-image-count="2"] .timeline-surround-top-left {
        transform: translateX(-58%) rotate(-4deg);
    }

    .timeline-card-surround[data-image-count="2"] .timeline-surround-top-right {
        transform: translateX(58%) rotate(4deg);
    }

    .timeline-surround-bottom-left,
    .timeline-surround-bottom-center,
    .timeline-surround-bottom-right {
        display: none;
    }
}

/* Infrastructure & Processes page */
.infrastructure-factory-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.infrastructure-factory-item {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 14px rgba(21, 77, 138, 0.08);
}

.infrastructure-factory-media {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--bg-light);
    position: relative;
}

.infrastructure-factory-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.infrastructure-factory-carousel,
.infrastructure-factory-carousel .carousel-inner,
.infrastructure-factory-carousel .carousel-item {
    height: 100%;
}

.infrastructure-factory-carousel .carousel-indicators {
    margin-bottom: 0.5rem;
}

.infrastructure-factory-carousel .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.55);
    border: none;
    opacity: 1;
}

.infrastructure-factory-carousel .carousel-indicators .active {
    background-color: #fff;
}

.infrastructure-factory-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 180px;
    color: var(--primary);
    font-size: 3rem;
    opacity: 0.45;
}

.infrastructure-factory-name {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.infrastructure-factory-desc {
    color: var(--text-muted);
    white-space: pre-line;
    line-height: 1.65;
}

.process-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(21, 77, 138, 0.08);
    display: flex;
    flex-direction: column;
}

.process-card-media {
    aspect-ratio: 16 / 10;
    background: var(--bg-light);
    overflow: hidden;
}

.process-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.process-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 160px;
    color: var(--primary);
    font-size: 2.5rem;
    opacity: 0.4;
}

.process-card-body {
    padding: 1.25rem 1.35rem 1.5rem;
}

.process-card-body h3 {
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.process-card-body p {
    color: var(--text-muted);
    margin-bottom: 0;
    white-space: pre-line;
    line-height: 1.6;
    font-size: 0.95rem;
}

.infrastructure-factory-item:nth-child(even) .row {
    flex-direction: row-reverse;
}

@media (max-width: 767.98px) {
    .infrastructure-factory-item:nth-child(even) .row {
        flex-direction: column;
    }
}
