/* ===============================
   Basic Reset and Global Styles
================================ */
.navbar-nav {
    margin-left: auto !important;
    margin-right: 0 !important;
}


.navbar .container {
    overflow: visible !important;
}

a {
    text-decoration: none;
    color: #004080;
}

a:hover {
    color: #007bff;
}

ul {
    list-style: none;
}

h2 {
    color: #004080;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
}

h3 {
    color: #555;
    font-size: 1.8em;
    margin-top: 25px;
    margin-bottom: 15px;
}

/* ===============================
   Header & Navigation
================================ */
header {
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-custom {
    padding: 0.5rem 0;
    font-size: 1.1em;
    margin-bottom: 2rem;
    background-color: #FFFFFF !important;
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
    color: black;
}

.navbar-custom .nav-link.active,
.navbar-custom .nav-link:hover {
    color: black !important;
}

.navbar-custom.shrink {
    padding: 0.3rem 0;
    font-size: 1em;
    transition: all 0.3s ease;
}

.navbar-custom.shrink .nav-link {
    font-size: 0.85em;
    padding: 0.2rem 0.6rem;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background-color: #ffffff;
        padding: 15px;
        border-radius: 5px;
    }
    .navbar-custom .nav-link {
        color: #000000 !important;
        border-bottom: 1px solid #f0f0f0;
    }
        #langDropdown {
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
        padding: 10px 15px;
    }
    
    .dropdown-menu {
        width: 100%;
        text-align: left !important;
    }
    
    .dropdown-menu .dropdown-item {
        justify-content: flex-start !important;
    }
    
    .navbar-collapse {
        background-color: #ffffff;
        padding: 15px;
        border-radius: 5px;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    #langDropdown {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .dropdown-item img.flag-icon-nav {
        width: 18px;
    }
}

/* Language Transition Animation */
.lang-transition {
    animation: langFade 0.3s ease-in-out;
}

@keyframes langFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

#langDropdown {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: white;
    color: #333;
    font-weight: 600;
    transition: all 0.3s ease;
}

#langDropdown:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

#langDropdown i {
    font-size: 1.1rem;
}

#current-lang {
    min-width: 35px;
    text-align: left;
}

.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e0e0e0;
    padding: 8px 0;
    text-align: left !important; /* Force left alignment */
}

.dropdown-item img {
    width: 20px;
    height: auto;
}

.dropdown-menu .dropdown-item {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important; /* Force left alignment */
    gap: 10px;
    padding: 8px 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    font-weight: 500;
    text-align: left !important;
}

.dropdown-item img.flag-icon-nav {
    width: 20px;
    height: auto;
    border-radius: 2px;
    border: 1px solid #ddd;
    flex-shrink: 0; /* Prevent flag from shrinking */
}

.dropdown-menu [data-lang-switch].active {
    background-color: #007bff;
    color: white;
}

.dropdown-menu [data-lang-switch].active::after {
    content: " ✓";
    margin-left: auto; /* Push checkmark to the right */
    font-weight: bold;
}

.dropdown-item {
    display: flex;
    align-items: center;
}

.dropdown-item img {
    border-radius: 2px;
    border: 1px solid black;
}

.dropdown-item img.flag-icon-nav {
    width: 20px;
    height: auto;
    border-radius: 2px;
    border: 1px solid #ddd;
    flex-shrink: 0; /* Prevent flag from shrinking */
}

/* ===============================================
   LANGUAGE DROPDOWN - COMPLETE LEFT ALIGNMENT FIX
================================================ */

.dropdown-menu {
    text-align: left !important;
    min-width: 180px;
}

.dropdown-menu .dropdown-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 10px 16px !important;
    text-align: left !important;
}

.dropdown-item img {
    width: 20px !important;
    height: auto !important;
    min-width: 20px !important;
    flex-shrink: 0 !important;
    margin-right: 10px !important;
    margin-left: 0 !important;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #007bff !important;
    padding-left: 20px !important;
}

.dropdown-menu .dropdown-item.active {
    background-color: #007bff !important;
    color: white !important;
}

.lang-switcher {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 999;
    display: flex;
    gap: 8px;
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.lang-btn {
    padding: 6px 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: #f5f5f5;
    border-color: #007bff;
}

.lang-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    padding: 0;
    font-size: 0;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #0056b3;
    transform: translateY(-5px);
}

.back-to-top i {
    font-size: 1.25rem;
    line-height: 1;
    pointer-events: none;
}

.back-to-top:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0,123,255,0.18);
}

@media (max-width: 480px) {
    .back-to-top { bottom: 16px; right: 16px; width: 44px; height: 44px; }
    .back-to-top i { font-size: 1.05rem; }
}

/* ===============================
   Index Section
================================ */
.hero {
    /* Fill the viewport height so header background == screen height */
    min-height: 100vh;
    background: url('image/bg_01.jpg') no-repeat center center / cover;
    background-color: #e9e9e9;
    background-attachment: fixed;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* remove large paddings so hero matches viewport exactly */
    padding: 0;
    position: relative;
    z-index: 1;
}

/* Mobile/tablet fallback: slightly shorter hero and disable fixed background for performance */
@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        padding: 40px 0;
        background-attachment: scroll;
    }
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.hero h1,
.hero h2 {
    font-size: 3.5em;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.hero p {
    font-size: 1.3em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.hero .btn {
    background: #ffc107;
    color: #004080;
}

.hero .btn:hover {
    background: #e0a800;
}

.profile-pic {
    max-width: 300px;
    height: auto;
}

.btn {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
}

.btn:hover {
    background: #0056b3;
}

/* ===============================
   Content Sections
================================ */
.content-section {
    padding: 60px 0;
}

.grey-bg {
    background-color: #ededed;
}

.timeline-wrapper {
    border-left: 3px solid #004080;
    padding-left: 30px;
    margin-left: 20px;
}

/* Section background variants for products & services split */
.section-a { background-color: #e1dddd; }
.section-b { background-color: #abb1be; }
.section-c { background-color: #e1dddd; }

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -38px;
    top: 5px;
    width: 14px;
    height: 14px;
    background-color: #ffc107;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Center the card columns inside the grey section (when fewer columns exist) */
.content-section.grey-bg .container.text-center .row.g-4 {
    justify-content: center;
}

.value-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ===============================
   Products & Services
================================ */
.business-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.business-list > div {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.service-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 260px;
    transition: all 0.3s ease-in-out;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.row.row-cols-1.row-cols-md-2.g-3 > .col {
    display: flex;
    align-items: stretch;
}
.row.row-cols-1.row-cols-md-2.g-3 > .col > .service-card {
    flex: 1 1 auto;
    height: 100%;
}

.service-card h5 {
    margin-top: 10px;
    margin-bottom: 6px;
}
.service-card p.small {
    margin-top: auto;
}

/* Maintain the square carousel look */
#featuredCarousel {
    width: 416px;
    height: 416px;
    margin: 0 auto;
    overflow: visible;
    position: relative;
}

.carousel-inner {
    width: 416px;
    height: 416px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
}

.carousel-control-prev {
    left: -50px;
    width: 40px;
}

.carousel-control-next {
    right: -50px;
    width: 40px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1) grayscale(100) brightness(0);
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    transform: scale(1.2);
    transition: transform 0.2s ease;
}

.carousel-indicators [data-bs-target] {
    background-color: #f6f6f6 !important;
    border: 1px solid #ccc;
}
.carousel-indicators .active {
    background-color: #004080 !important;
}

.carousel-indicators {
    bottom: -40px;
}

.carousel-img {
    height: 416px;
    object-fit: contain;
    background-color: white;
}

/* Responsive adjustments */
@media (max-width: 500px) {
    #featuredCarousel {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
    .carousel-img {
        height: auto;
    }
}

.product-grid li {
    list-style: none;
    background: white;
    padding: 12px 14px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.product-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    height: 100%;
    min-height: 120px;
    transition: all 0.3s ease-in-out;
}

.product-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-5px);
}

.product-item i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.product-item span {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    margin-top: 8px;
}

.country-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0;
}
.country-list li {
    list-style: none;
    background: white;
    padding: 10px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    text-align: center;
    font-weight: 600;
}

.country-grid {
    display: grid;
    /* Force exactly 4 columns for the main layout (4xN). */
    grid-template-columns: repeat(4, 1fr);
    /* Make rows match the card height but allow growth if needed */
    grid-auto-rows: minmax(70px, auto);
    gap: 20px;
    width: 100%;
}

/* Responsive fallbacks: 2 columns on medium/small screens, 1 column on very small */
@media (max-width: 900px) {
    .country-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .country-grid { grid-template-columns: repeat(1, 1fr); }
}

.country-grid > div {
    display: flex; 
    width: 100%;
    height: 100%;
}

.country-card {
    display: grid !important;
    grid-template-columns: 40px 1fr; 
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    height: 70px; 
    width: 100%;
    transition: all 0.3s ease-in-out;
}

.country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.flag-icon {
    width: 40px;
    height: 25px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid black;
}

.country-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    text-align: left;
    white-space: normal;
}

@media (max-width: 576px) {
    .flag-icon { width: 40px; height: 26px; }
}

@media (min-width: 768px) {
    .service-card { height: 320px; }
}

@media (min-width: 1200px) {
    .service-card { height: 360px; }
}

.hero-content,
.content-section,
main,
header,
footer {
    text-align: center;
}

.service-card,
.country-card {
    justify-content: center;
    text-align: center;
}

.service-card h5,
.service-card p,
.country-name {
    text-align: center;
}

.product-grid li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.country-grid {
    justify-items: center;
    align-items: center;
}

/* ===============================
   CONTACT PAGE (FIXED)
================================ */
/* ===============================
   CONTACT PAGE - COMPLETE FIX
================================ */

/* Contact section - remove any sticky/fixed positioning */
#contact {
    background-blend-mode: normal;
    position: relative;
    text-align: left !important;
    min-height: 100vh;
}

#contact .contact-header,
#contact .contact-info-card,
#contact .contact-form-wrapper,
#contact .container {
    text-align: left;
    position: relative;
}

/* Contact header - should scroll normally */
.contact-header {
    padding-top: 60px; /* Space for fixed navbar */
    padding-bottom: 20px;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

#contact .contact-header h2,
#contact .contact-header p {
    color: black;
}

#contact .contact-header h2 {
    font-size: 3.5rem;
    font-weight: 700;
}

.divider-custom {
    height: 5px;
    width: 100px;
    background-color: #ffc107;
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

/* Contact cards */
.contact-info-card,
.contact-form-wrapper {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    height: auto;
    min-height: 1150px;
    position: relative;
}

.contact-info-card {
    padding: 2rem;
}

.contact-form-wrapper {
    padding: 2rem;
}

.contact-info-card h5 {
    color: #004080;
}

/* Form styling */
.contact-form input,
.contact-form textarea,
.contact-form select {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: #004080;
    box-shadow: 0 0 0 3px rgba(0,64,128,0.1);
}

.contact-form button {
    margin-top: 20px;
    font-size: 1.1em;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .contact-header {
        padding-top: 60px;
    }
    
    .contact-header h2 {
        font-size: 2.5rem;
    }
    
    .contact-form-wrapper,
    .contact-info-card {
        height: auto !important;
        min-height: auto;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .contact-header h2 {
        font-size: 2rem;
    }
}
/* ===============================
   Footer
================================ */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 6px 0;
    font-size: 1em;
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2em;
    }
    .business-list {
        flex-direction: column;
    }
}

/* ===============================
   SKELETON LOADING SYSTEM
================================ */
/* The Shimmer Animation */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* The Placeholder Box */
.skeleton-box {
    width: 100%;
    height: 100%;
    background: #eeeeee;
    background-image: linear-gradient(90deg, #eeeeee 25%, #f5f5f5 50%, #eeeeee 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: opacity 0.4s ease-out;
}

/* Hide real content until AOS triggers it */
[data-aos] {
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos].aos-animate {
    opacity: 1;
}

.skeleton-wrapper:has(.aos-animate) .skeleton-box {
    opacity: 0;
    pointer-events: none;
}

/* Specific heights for different grid types */
.featured-product-skeleton { min-height: 120px; }
.country-card-skeleton { min-height: 70px; }

/* Layout Container */
.featured-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 50px;
}

.main-product-list {
    flex: 1; /* Takes up the center space */
}

/* ===============================================
   EMERGENCY FIX - Headers Following on Scroll
================================================ */

/* Remove sticky positioning from ALL headers except navbar */
header:not(.navbar):not(#hero),
.content-section header,
.content-section h2,
.content-section h3,
section header,
.text-center h2 {
    position: relative !important;
    top: auto !important;
    transform: none !important;
}

.contact-header,
#products-services header,
#about header {
    position: relative !important;
    position: static !important;
}

/* Button press-scale effect: press/click */
.btn-press-scale {
    transition: transform 120ms cubic-bezier(.2,.8,.2,1), box-shadow 120ms;
    will-change: transform;
}
.btn-press-scale:active,
.btn-press-scale.btn-pressing {
    transform: scale(0.96);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}
.btn-press-scale:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0,123,255,0.12);
}
.btn-press-scale:disabled {
    transform: none;
    opacity: 0.65;
}

@media (hover: none) {
    .btn-press-scale { transition-duration: 80ms; }
}