/* 
   BABC 2026 Custom CSS Framework 
   A lightweight, Bootstrap-like framework mapping exactly to the previous premium design
*/

:root {
    /* Colors */
    --primary: #23425e; /* Logo Blue */
    --secondary: #c19a5b; /* Logo Gold */
    --tertiary: #639286; /* Logo Teal */
    --bg-light: #d4e1de;
    --bg-white: #ffffff;
    --text-dark: #16232b;
    --text-muted: rgba(22, 35, 43, 0.7);
    --border-color: rgba(35, 66, 94, 0.1);

    /* Typography */
    --font-display: "Red Hat Display", sans-serif;
    --font-body: "Red Hat Display", sans-serif;
    --font-mono: monospace;

    /* Container */
    --container-max-width: 1280px;
}

/* Reset & Basics */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: 80px; /* Offset for fixed header */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
}
@media (min-width: 768px) {
    h1 {
        font-size: 4rem;
    }
}
h2 {
    font-size: 2.25rem;
}
h3 {
    font-size: 1.5rem;
}
h4 {
    font-size: 1.25rem;
}
h5 {
    font-size: 1.125rem;
}
h6 {
    font-size: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

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

/* Layout System */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-right: auto;
    margin-left: auto;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -1rem;
    margin-left: -1rem;
}

.col-1,
.col-2,
.col-3,
.col-4,
.col-5,
.col-6,
.col-7,
.col-8,
.col-9,
.col-10,
.col-11,
.col-12,
.col-md-1,
.col-md-2,
.col-md-3,
.col-md-4,
.col-md-5,
.col-md-6,
.col-md-7,
.col-md-8,
.col-md-9,
.col-md-10,
.col-md-11,
.col-md-12,
.col-lg-1,
.col-lg-2,
.col-lg-3,
.col-lg-4,
.col-lg-5,
.col-lg-6,
.col-lg-7,
.col-lg-8,
.col-lg-9,
.col-lg-10,
.col-lg-11,
.col-lg-12 {
    position: relative;
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}
.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

@media (min-width: 768px) {
    .col-md-2 {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }
    .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 1024px) {
    .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Display & Flex */
.d-flex {
    display: flex !important;
}
.d-block {
    display: block !important;
}
.d-none {
    display: none !important;
}

.flex-column {
    flex-direction: column !important;
}
.justify-content-center {
    justify-content: center !important;
}
.justify-content-between {
    justify-content: space-between !important;
}
.align-items-center {
    align-items: center !important;
}

.gap-1 {
    gap: 0.25rem !important;
}
.gap-2 {
    gap: 0.5rem !important;
}
.gap-3 {
    gap: 1rem !important;
}
.gap-4 {
    gap: 1.5rem !important;
}

/* Lists */
.list-unstyled {
    padding-left: 0;
    list-style: none;
}

/* Text Utilities */
.text-center {
    text-align: center !important;
}
.text-primary {
    color: var(--primary) !important;
}
.text-secondary {
    color: var(--secondary) !important;
}
.text-tertiary {
    color: var(--tertiary) !important;
}
.text-white {
    color: var(--bg-white) !important;
}
.text-muted {
    color: var(--text-muted) !important;
}
.text-uppercase {
    text-transform: uppercase !important;
}
.font-display {
    font-family: var(--font-display) !important;
}
.font-mono {
    font-family: var(--font-mono) !important;
}
.fw-bold {
    font-weight: 700 !important;
}
.fw-medium {
    font-weight: 500 !important;
}
.fw-light {
    font-weight: 300 !important;
}
.fs-1 {
    font-size: 3rem !important;
}
.fs-2 {
    font-size: 2.25rem !important;
}
.fs-3 {
    font-size: 1.5rem !important;
}
.fs-4 {
    font-size: 1.25rem !important;
}
.fs-sm {
    font-size: 0.875rem !important;
}
.tracking-wide {
    letter-spacing: 0.05em !important;
}
.tracking-widest {
    letter-spacing: 0.1em !important;
}

/* Backgrounds & Colors */
.bg-primary {
    background-color: var(--primary) !important;
}
.bg-secondary {
    background-color: var(--secondary) !important;
}
.bg-light {
    background-color: var(--bg-light) !important;
}
.bg-white {
    background-color: var(--bg-white) !important;
}
.bg-transparent {
    background-color: transparent !important;
}

/* Spacing */
.m-0 {
    margin: 0 !important;
}
.mt-4 {
    margin-top: 1.5rem !important;
}
.mt-5 {
    margin-top: 3rem !important;
}
.mb-2 {
    margin-bottom: 0.5rem !important;
}
.mb-3 {
    margin-bottom: 1rem !important;
}
.mb-4 {
    margin-bottom: 1.5rem !important;
}
.mb-5 {
    margin-bottom: 3rem !important;
}
.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.p-4 {
    padding: 1.5rem !important;
}
.p-5 {
    padding: 3rem !important;
}
.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}
.py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}
.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}
.py-section {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}
.px-4 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* Borders & Shadows */
.border {
    border: 1px solid var(--border-color) !important;
}
.border-top {
    border-top: 1px solid var(--border-color) !important;
}
.border-bottom {
    border-bottom: 1px solid var(--border-color) !important;
}
.shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}
.shadow-lg {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1) !important;
}
.rounded-circle {
    border-radius: 50% !important;
}

/* Glass Card Component */
.glass-card {
    background: #ffffff;
    border: 1px solid rgba(35, 66, 94, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    border: 1px solid transparent;
    padding: 0.75rem 2rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

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

.btn-outline {
    color: var(--primary);
    background-color: transparent;
    border-color: var(--primary);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.4s ease;
}
.btn-outline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--primary);
    z-index: -1;
    transition: width 0.4s ease;
}
.btn-outline:hover::before {
    width: 100%;
}
.btn-outline:hover {
    color: #fff;
    background-color: transparent;
}

/* Header & Nav */
.site-header {
    background-color: rgba(255, 255, 255, 0.95); /* Clean white background */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(35, 66, 94, 0.1); /* Subtle blue border */
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
    box-shadow: 0 10px 30px rgba(35, 66, 94, 0.1);
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.header-logo img {
    height: 100px; /* Increased logo size */
    transition: transform 0.3s;
}
.header-logo:hover img {
    transform: scale(1.05);
}

.nav-link {
    display: block;
    padding: 0.5rem 0;
    color: var(--primary); /* Logo blue */
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--secondary);
    transition:
        width 0.3s ease,
        transform 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--secondary);
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdowns */
.dropdown {
    position: relative;
}
.dropdown-menu {
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: translateY(15px);
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 12rem;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(35, 66, 94, 0.1);
    box-shadow: 0 10px 25px rgba(35, 66, 94, 0.1);
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0;
}

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

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1.5rem;
    clear: both;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(35, 66, 94, 0.05);
    color: var(--secondary);
}

/* Hero Section (Matching previous design exactly) */
.hero-section {
    position: relative;
    background-color: var(--primary);
    color: #fff;
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    mix-blend-mode: screen;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23FFFFFF" fill-opacity="1"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

/* Route Animation */
.route-animation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.route-line-path {
    stroke: var(--secondary);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawRoute 3s ease forwards;
}
.route-port-dot {
    fill: var(--secondary);
    opacity: 0;
    animation: fadeInDot 0.5s ease forwards;
}
@keyframes drawRoute {
    to {
        stroke-dashoffset: 0;
    }
}
@keyframes fadeInDot {
    to {
        opacity: 1;
    }
}

.hero-content h1 {
    color: #fff;
}
.hero-content h2 {
    color: var(--secondary);
}

.internal-hero {
    position: relative;
    background: linear-gradient(rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.95)), url('../hero-bg.png') center/cover no-repeat;
    background-color: var(--primary);
    color: #fff;
    padding: 1.25rem 0 1rem;
    overflow: hidden;
}

.internal-hero h1 {
    color: #fff;
}
.internal-hero p {
    color: rgba(255, 255, 255, 0.8) !important;
}

.decorative-line {
    width: 6rem;
    height: 1px;
    background-color: var(--secondary);
    margin-bottom: 1.5rem;
}

/* RTL Support */
[dir="rtl"] .dropdown-menu {
    left: auto;
    right: 0;
}
[dir="rtl"] .me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

/* Country Card Styling */
.country-card-flag-wrapper {
    width: 100px;
    height: 100px;
}

.country-card-flag-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.country-card-logo-wrapper {
    width: 120px;
    height: 120px;
}

.country-card-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* --- Mobile Compact Overrides --- */
@media (max-width: 767.98px) {
    /* Reduce Section Paddings */
    section.py-5,
    section.py-4,
    footer.py-4,
    footer.py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    /* Reduce Padding Utilities */
    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    .py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    .px-5 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    .px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .p-5 {
        padding: 1.5rem !important;
    }
    .p-4 {
        padding: 1rem !important;
    }

    /* Reduce Margin Utilities */
    .mb-5,
    .my-5 {
        margin-bottom: 1.5rem !important;
    }
    .mt-5,
    .my-5 {
        margin-top: 1.5rem !important;
    }
    .mb-4,
    .my-4 {
        margin-bottom: 1rem !important;
    }
    .mt-4,
    .my-4 {
        margin-top: 1rem !important;
    }

    /* Reduce Flex Gaps */
    .gap-5 {
        gap: 1.5rem !important;
    }
    .gap-4 {
        gap: 1rem !important;
    }
    .gap-3 {
        gap: 0.5rem !important;
    }

    /* Scale Down Typography */
    h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    h3 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }
    h4 {
        font-size: 1.1rem !important;
    }
    p.lead {
        font-size: 1rem !important;
    }
}

/* Hide Desktop Nav on Mobile */
@media (max-width: 991.98px) {
    .desktop-nav {
        display: none !important;
    }
}

/* Hide Hamburger on Desktop */
.mobile-hamburger {
    display: none !important;
}
@media (max-width: 991.98px) {
    .mobile-hamburger {
        display: block !important;
    }
}

/* --- Mobile Menu Premium Styling & Animations --- */

/* Glassmorphism Background */
.offcanvas-glass {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Staggered Entrance Animation */
.mobile-nav-item {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.offcanvas.show .mobile-nav-item {
    opacity: 1;
    transform: translateX(0);
}

/* Delay for each item */
.mobile-nav-item:nth-child(1) {
    transition-delay: 0.1s;
}
.mobile-nav-item:nth-child(2) {
    transition-delay: 0.15s;
}
.mobile-nav-item:nth-child(3) {
    transition-delay: 0.2s;
}
.mobile-nav-item:nth-child(4) {
    transition-delay: 0.25s;
}
.mobile-nav-item:nth-child(5) {
    transition-delay: 0.3s;
}
.mobile-nav-item:nth-child(6) {
    transition-delay: 0.35s;
}

/* Link Hover & Active Effects */
.mobile-nav-link {
    border-radius: 12px;
    margin: 4px 16px;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus,
.mobile-nav-link[aria-expanded="true"] {
    background-color: rgba(
        43,
        73,
        104,
        0.08
    ) !important; /* light primary tint */
    transform: translateX(6px);
}

/* Submenu Link Effects */
.mobile-submenu-link {
    border-radius: 8px;
    margin: 2px 8px;
    transition: all 0.3s ease;
}

.mobile-submenu-link:hover {
    background-color: rgba(
        200,
        160,
        89,
        0.15
    ) !important; /* light secondary tint */
    transform: translateX(6px);
    color: var(--primary) !important;
}

/* Chevron Rotation */
.mobile-nav-link .chevron-icon {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mobile-nav-link[aria-expanded="true"] .chevron-icon {
    transform: rotate(180deg);
}
