:root {
    --primary-color: #000000;
    --primary-dark: #000000;
    --primary-soft: rgba(0, 0, 0, 0.05);
    --accent-color: #666666;
    --accent-hover: #333333;
    --bg-light: #ffffff;
    --text-dark: #1a1a1a;
    --text-muted: #888888;
    --white: #ffffff;
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: var(--bg-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

/* Color Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.text-primary-dark {
    color: var(--primary-dark) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-primary-dark {
    background-color: var(--primary-dark) !important;
}

.bg-primary-soft {
    background-color: var(--primary-soft) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

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

.text-muted-light {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 33, 59, 0.15) !important;
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

/* Utilities */
.section-padding {
    padding: 90px 0;
}

.transition-all {
    transition: all 0.3s ease;
}

.tracking-wide {
    letter-spacing: 2px;
}

.max-w-700 {
    max-width: 700px;
}

/* Typography */
.heading-divider {
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 1.2rem 0;
    transition: padding 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
    padding: 0.8rem 0;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.logo-img {
    height: 48px;
    width: auto;
    transition: height 0.4s ease;
}

.navbar.scrolled .logo-img {
    height: 38px;
}

.navbar-nav .nav-link {
    color: var(--primary-dark) !important;
    position: relative;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 500;
}
.navbar-toggler i {
    color: var(--primary-dark);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
}

/* Navbar line effect */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

/* Disable underline animation on dropdown toggles */
.navbar-nav .nav-item.dropdown .nav-link::after {
    display: none;
}

/* Navbar Dropdown Styles */
.navbar-dropdown {
    background-color: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.navbar-dropdown .dropdown-item {
    color: #0f213b;
    font-size: 0.9rem;
    padding: 0.5rem 1.25rem;
    transition: color 0.2s ease, background-color 0.2s ease, padding-left 0.2s ease;
}

.navbar-dropdown .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.07);
    color: var(--accent-color);
    padding-left: 1.6rem;
}

.navbar-dropdown .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Dropdown Submenu */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: -1px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

/* Dropdown override for mobile */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: #ffffff;
        padding: 1rem;
        border-radius: 8px;
        margin-top: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
}

/* Hero Section / Slideshow */
.hero {
    height: 100vh;
    width: 100%;
}

.carousel,
.carousel-inner,
.carousel-item {
    height: 100%;
    width: 100%;
}

.hero-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

/* Ken Burns Effect */
.carousel-item.active .hero-slide-bg {
    animation: kenburns 12s ease-in-out infinite alternate;
}

@keyframes kenburns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.15);
    }
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: -1;
}

@media (max-width: 991px) {
    .hero .overlay {
        background: rgba(0, 0, 0, 0.2);
    }
}

/* Carousel Indicators */
.carousel-indicators [button] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--white);
    opacity: 0.5;
    margin: 0 6px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: var(--accent-color) !important;
    opacity: 1;
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 80px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero:hover .carousel-control-prev,
.hero:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 45px;
    height: 45px;
    background-size: 20px;
}

/* Hover Effects */
.hover-up {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.hover-up:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06) !important;
}

/* Icons box */
.icon-box-large {
    width: 70px;
    height: 70px;
}

.icon-box-medium {
    width: 60px;
    height: 60px;
}

.icon-box-small {
    width: 45px;
    height: 45px;
}

/* Glass effect for Vision/Mission */
.card-glass {
    position: relative;
    overflow: hidden;
}

.card-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

/* Service Cards */
.service-card {
    border: 1px solid rgba(0, 0, 0, 0.04);
    z-index: 1;
    background-color: #2E3192 !important;
    color: #ffffff !important;
}

.service-card h4 {
    color: #ffffff !important;
}

.service-card .text-muted {
    color: rgba(255, 255, 255, 0.85) !important;
}

.service-card .icon-box-medium {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.service-card .icon-box-medium i {
    color: #ffffff !important;
}

.service-card .text-accent {
    color: #ffffff !important;
}

.service-bg-icon {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 140px;
    color: rgba(255, 255, 255, 0.05);
    opacity: 0.6;
    z-index: -1;
    transition: all 0.5s ease;
}

.service-card:hover .service-bg-icon {
    transform: scale(1.1) rotate(-15deg);
    color: rgba(255, 255, 255, 0.1);
}

.service-list li {
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
}

.service-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Arinma Logo */
.arinma-logo-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Partner Company Tags */
.partner-company-tag {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
}

.partner-divider {
    color: var(--accent-color);
    font-weight: 300;
    font-size: 1.2rem;
}

/* Partner Logo Card (Partners Page) */
.partner-logo-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 2rem 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.35s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.partner-logo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.09);
}

.partner-logo-card img {
    max-height: 80px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.partner-logo-card:hover img {
    filter: grayscale(0%);
}

.partner-logo-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0;
}

.collaborator-card {
    width: 200px;
    flex-shrink: 0;
}

/* Text-only partner logo (e.g. ADB) */
.partner-text-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 2px;
    margin-bottom: 1rem;
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.partner-logo-card--text:hover .partner-text-logo {
    opacity: 1;
}

.partner-slide--text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 2px;
    opacity: 0.6;
}

/* Project Cards */
.project-card {
    border: none;
    background: var(--white);
    transition: all 0.4s ease;
}

.project-card img {
    transition: transform 0.6s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card .badge {
    letter-spacing: 1px;
    font-weight: 600;
}

@media (max-width: 767px) {
    .project-card img {
        min-height: 300px !important;
    }
}

.carousel-project-img {
    height: 500px;
    width: 100%;
    object-fit: contain;
    background-color: var(--white);
}

/* Form Controls */
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(251, 191, 36, 0.25);
    border-color: var(--accent-color) !important;
    background-color: var(--white) !important;
}

/* Animations Triggered via JS - Progressive Enhancement Approach */
.section-hidden {
    /* Visible by default for accessibility and fallback */
    opacity: 1;
    transform: translateY(0);
}

/* Only hide if JS is active */
.js-active .section-hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Reveal when in viewport */
.js-active .section-hidden.section-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    animation: fadeInUp 1s ease 0.2s both;
}

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

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

/* Image reveal animation */
.animate-img {
    transition: transform 0.5s ease;
}

.animate-img:hover {
    transform: scale(1.02);
}

/* Footer Hover */
.hover-text-accent {
    transition: color 0.3s ease, opacity 0.3s ease;
}

.hover-text-accent:hover {
    color: var(--accent-color) !important;
    opacity: 1 !important;
    transform: translateX(5px);
}

/* Custom Progress bar animation */
.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(-45deg,
            rgba(255, 255, 255, 0.2) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.2) 75%,
            transparent 75%,
            transparent);
    z-index: 1;
    background-size: 50px 50px;
    animation: move 2s linear infinite;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    overflow: hidden;
}

@keyframes move {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 50px 50px;
    }
}

/* Spare Part Slider */
.spare-part-slider-card {
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.spare-part-img-wrapper {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.spare-part-img-wrapper img {
    max-height: 350px;
    object-fit: contain;
}

@media (max-width: 767px) {
    .spare-part-img-wrapper {
        height: 250px;
    }
}


/* Partner Slider */
.partner-slider {
    width: 100%;
    overflow: hidden;
    background: white;
    padding: 20px 0;
    position: relative;
}
.partner-slider::before, .partner-slider::after {
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    content: '';
    height: 100px;
    position: absolute;
    width: 200px;
    z-index: 2;
}
.partner-slider::after {
    right: 0;
    top: 0;
    transform: rotateZ(180deg);
}
.partner-slider::before {
    left: 0;
    top: 0;
}
.partner-slider-track {
    display: flex;
    width: calc(200px * 36); /* 18 original + 18 duplicates x 200px */
    animation: scroll 36s linear infinite;
    align-items: center;
}
.partner-slide {
    width: 200px;
    padding: 0 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.partner-slide img {
    max-height: 80px;
    max-width: 150px;
    width: auto;
    object-fit: contain;
}
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-200px * 18)); /* 18 items in original set x 200px */
    }
}

/* Responsive Carousel Images */
.carousel-img-responsive {
    height: 600px;
    object-fit: contain;
    background: #fff;
    width: 100%;
}

@media (max-width: 991px) {
    .carousel-img-responsive {
        height: 400px;
    }
}

@media (max-width: 767px) {
    .carousel-img-responsive {
        height: 250px;
    }
    
    .carousel-project-img {
        height: 300px;
    }
}

/* Spare Part Card Design */
.spare-part-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 2.5rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.spare-part-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.spare-part-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: 0.5px;
}

.spare-part-divider {
    width: 80%;
    height: 1px;
    background-color: #eee;
    margin: 1rem 0 2rem 0;
}

.spare-part-image-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 2rem;
    min-height: 180px;
}

.spare-part-image-container img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

.spare-part-brand {
    height: 35px;
    width: auto;
    object-fit: contain;
    opacity: 0.8;
}

/* Mangrove Project Redesign */
.mangrove-project-section {
    background-color: #f4f9f6; /* Soft sage green */
}

.impact-badge {
    background: #ffffff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
    height: 100%;
    border: 1px solid rgba(10, 74, 52, 0.05);
}

.impact-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.impact-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(46, 49, 146, 0.1); /* Primary Blue tint */
    color: #2E3192;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.stats-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: #2E3192;
    line-height: 1.2;
    display: block;
}

.stats-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-top: 5px;
    display: block;
}

.gallery-layered {
    position: relative;
    padding-bottom: 40px;
    padding-right: 40px;
}

.img-main-shadow {
    border: 8px solid #ffffff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.img-secondary-floating {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 65%;
    border: 8px solid #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

@media (max-width: 991px) {
    .gallery-layered {
        padding: 0;
        margin-bottom: 2rem;
    }
    .img-secondary-floating {
        position: relative;
        width: 100%;
        margin-top: 15px;
        border-width: 4px;
        bottom: auto;
        right: auto;
    }
    .img-main-shadow {
        border-width: 4px;
    }
}

/* Google Maps Integration */
.map-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    background: #ffffff;
    height: 500px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.map-location-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
    display: block;
}

@media (max-width: 991px) {
    .map-wrapper {
        height: 350px;
    }
}
