:root {
    --primary-blue: #005f99;
    --teal-accent: #00a8cc;
    --dark-blue: #003366;
    --safety-orange: #ff6600;
    --dark-gray: #2c3e50;
    --light-gray: #f5f7fa;
    --mid-gray: #6c757d;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-gray);
    scroll-behavior: smooth;
    padding-top: 70px;
    background-color: var(--light-gray);
}

.navbar {
    background-color: var(--primary-blue);
    height: 70px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
    background-color: rgba(0, 95, 153, 0.95) !important;
    box-shadow: 0 4px 12px var(--shadow);
}

.nav-link {
    color: var(--white);
    font-weight: 500;
    font-size: 1.05rem;
    padding: 0.75rem 1.2rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--teal-accent) !important;
}

.navbar-brand img {
    transition: transform 0.3s;
}

.navbar-brand:hover img {
    transform: scale(1.08);
}

@media (min-width: 1200px) {
    .navbar-expand-xl .navbar-nav {
        flex-wrap: nowrap; /* prevent wrapping */
    }
}

/* Glass effect for mobile offcanvas */
.glass-offcanvas {
    background: rgba(20, 20, 40, 0.65);      /* semi-transparent dark */
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: white;
}

.glass-offcanvas .nav-link {
    color: white;
    font-size: 1.15rem;
    padding: 1rem 1.5rem;
}

.glass-offcanvas .nav-link:hover {
    background: rgba(255,255,255,0.09);
}

.glass-offcanvas .collapse .nav-link {
    font-size: 1.05rem;
    padding-left: 2.5rem;
}

/* Hero section */
#hero {
    position: relative;
    min-height: 70vh;
    padding-top: 90px !important;
    overflow: hidden;
}

#hero .container > .row > div {
    background: rgba(0, 0, 0, 0.5); /* semi-transparent black */
    padding: 2rem;
    border-radius: 12px;
}
.hero-title {
	color: var(--white);
    border-bottom: 3px solid var(--teal-accent);
    padding-bottom: 15px;
}

.hero-text-no-bg {
    padding: 2.5rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.hero-text-no-bg h1 {
    color: #ffffff;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.9), 0 2px 6px rgba(0, 0, 0, 0.7);
    letter-spacing: -0.5px;
}

.hero-text-no-bg p {
    color: #f0f8ff;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.85), 0 1px 4px rgba(0, 0, 0, 0.6);
    opacity: 0.98;
    font-weight: 400;
}

.hero-text-no-bg .btn-primary {
    background: linear-gradient(135deg, #0069d9, #00aaff);
    border: none;
    box-shadow: 0 6px 20px rgba(0, 105, 217, 0.5);
}

.hero-text-no-bg .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.hero-text-no-bg .btn-outline-light:hover {
    background: white;
    color: var(--primary-blue) !important;
    border-color: white;
}

/* Timeline */
.timeline::before {
    background: var(--primary-blue);
}

.timeline-item .timeline-content {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 5px 15px var(--shadow);
    border-radius: 12px;
}

.timeline-item .timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--shadow);
}

.timeline-item .timeline-time {
    font-weight: 600;
    color: var(--dark-blue);
}

.timeline-item .timeline-icon a {
    background: var(--teal-accent);
    color: var(--white);
    border: 2px solid var(--primary-blue);
}

.timeline-item .timeline-icon a:hover {
    background: var(--safety-orange);
}

.timeline-item .timeline-content h5 {
    color: var(--dark-blue);
}

/* Services */
.section-title {
    color: var(--dark-blue);
    border-bottom: 3px solid var(--teal-accent);
    padding-bottom: 15px;
}


.hex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hex-item {
    position: relative;
    width: 150px;
    height: 173px;
    margin: 0 auto 1rem;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.hex-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: inherit;
    transition: transform 0.3s;
}

.hex-item:hover .hex-img {
    transform: scale(1.08);
}

.hex-title {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--white);
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* About circles */
.about-circle {
    background: var(--white);
    border-radius: 50%;
    width: 180px;
    height: 180px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s;
}

.about-circle:hover {
    transform: scale(1.05);
}

.about-circle img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

/* Cards */
.content-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow);
    padding: 2rem;
    transition: transform 0.3s;
}

.content-card:hover {
    transform: translateY(-4px);
}

/* Safety */
.safety-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

/* Projects */
.project-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-card img {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card .card-body {
    padding: 1.5rem;
}

.project-card .card-title {
    color: var(--dark-blue);
}

/* Clients placeholders */
.client-placeholder .placeholder-box {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
    color: #007BFF;
    transition: all 0.3s ease;
}

.client-placeholder:hover .placeholder-box {
    border-color: #00BFFF;
    box-shadow: 0 4px 12px rgba(0, 191, 255, 0.2);
    transform: translateY(-3px);
}

.client-placeholder strong {
    font-weight: 600;
    display: block;
}

.client-placeholder small {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Contact form */
.form-control:focus {
    border-color: var(--teal-accent);
    box-shadow: 0 0 0 0.25rem rgba(0, 168, 204, 0.25);
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--teal-accent);
    color: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: none;
}

/* ──────────────────────────────────────────────
   CAROUSEL – MODERN & SAFE IMAGE DISPLAY
   ────────────────────────────────────────────── */

.carousel.slide.carousel-fade .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}


.carousel-inner,
.carousel-item {
    height: 530px;          
    position: relative;
    overflow: hidden;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;       /* ← fills container, no letterbox */
    object-position: center; /* keeps important center parts visible – good for machinery/people */
    border-radius: 10px;
    display: block;
}

/* Optional: if you prefer minimal letterboxing and slight fill behavior */
.carousel-item img.fill-more {
    object-fit: cover;       /* use only if you accept minor cropping on edges */
    /* or object-fit: scale-down;  ← another safe compromise */
}

/* Caption styling */
.carousel-caption {
    background: rgba(0,0,0,0.5) !important;
    padding: 10px 15px !important;
    border-radius: 8px;
    bottom: 1rem;            /* better spacing from bottom */
}

/* Responsive height reductions */
@media (max-width: 992px) {
    .carousel-inner,
    .carousel-item {
        height: 380px;      
    }
}

@media (max-width: 768px) {
    .carousel-inner,
    .carousel-item {
        height: 320px;       /* balanced mobile size */
    }
}

/* Control button width on smaller screens */
@media (max-width: 992px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 8% !important;
    }
}

/* Prevent unwanted overflow (already good, kept for safety) */
.carousel,
.hex-grid-inside {
    max-width: 100% !important;
    overflow: hidden;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a2b4c 0%, #007bff 100%);
}

footer hr {
    border-color: rgba(255,255,255,0.2);
}

footer a {
    transition: 0.3s;
}

footer a:hover {
    color: var(--teal-accent) !important;
}

footer .social-icons a {
    transition: color 0.3s ease, transform 0.3s ease;
}

footer .social-icons a:hover {
    color: #00a8cc !important;
    transform: scale(1.2);
}

footer .social-icons .fs-4 {
    font-size: 1.8rem;
}

/* Sticky navbar shadow */
.navbar.scrolled {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Fix mobile navbar brand size */
@media (max-width: 991.98px) {
    .navbar-brand {
        font-size: 1.1rem !important;          /* smaller text on mobile */
    }
    
    .navbar-brand img {
        height: 38px !important;               /* slightly smaller logo */
    }
    
    .navbar-brand span {
        font-size: 1rem !important;            /* reduce text size */
        margin-left: 0.5rem !important;        /* less space after logo */
    }
    
    /* Prevent wrapping / downward push */
    .navbar-brand {
        max-width: 70% !important;             /* limit width so hamburger stays on same line */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .hero {
        padding: 100px 0 60px;
    }
    .display-1 {
        font-size: 3rem;
    }
    .timeline::before {
        left: 40px;
    }
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 80px;
        text-align: left;
    }
    .partner img {
        filter: grayscale(100%);
        opacity: .7;
        transition: all .3s ease;
    }
    .partner img:hover {
        filter: grayscale(0);
        opacity: 1;
        transform: scale(1.05);
    }
}

/* ──────────────────────────────────────────────
   DROPDOWN & OFFCANVAS – SEMI-TRANSPARENT DARK + WHITE TEXT
   ────────────────────────────────────────────── */

.dropdown-menu {
    background-color: rgba(33, 37, 41, 0.88) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
    margin-top: 0.5rem;
}

.dropdown-item {
    color: #f8f9fa !important;
    padding: 0.65rem 1.5rem !important;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item:active {
    background-color: rgba(52, 58, 64, 0.9) !important;
    color: #ffffff !important;
}

/* Mobile & Collapse Fix */
@media (max-width: 1199.98px) {
    .dropdown-menu,
    .collapse.show .dropdown-menu,
    .offcanvas .dropdown-menu {
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0.5rem 0 !important;
    }
    
    .dropdown-item,
    .collapse.show .dropdown-item,
    .offcanvas .dropdown-item {
        color: #ffffff !important;
        font-size: 1.05rem !important;
        padding: 0.85rem 1.5rem !important;
    }
    
    .dropdown-item:hover,
    .collapse.show .dropdown-item:hover,
    .offcanvas .dropdown-item:hover {
        background-color: rgba(52, 58, 64, 0.9) !important;
        color: #ffffff !important;
    }
}

/* Offcanvas Full Fix */
.offcanvas,
.offcanvas .offcanvas-body {
    background-color: rgba(33, 37, 41, 0.88) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.offcanvas .nav-link,
.offcanvas .dropdown-item {
    color: #ffffff !important;
}

.offcanvas .nav-link:hover,
.offcanvas .dropdown-item:hover {
    background-color: rgba(52, 58, 64, 0.9) !important;
}

/* Force override any lingering white backgrounds */
.dropdown-menu, .offcanvas, .collapse.show {
    background: rgba(33, 37, 41, 0.88) !important;
}

/* Primary button - match teal accent underline color */
.btn-primary {
    background-color: var(--teal-accent) !important;      /* #00a8cc */
    border-color: var(--teal-accent) !important;
    color: var(--white) !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #008cb3 !important;                 /* darker teal hover */
    border-color: #008cb3 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 168, 204, 0.35) !important;
}

/* Outline button - optional subtle teal border */
.btn-outline-primary {
    border-color: var(--teal-accent) !important;
    color: var(--teal-accent) !important;
}

.btn-outline-primary:hover {
    background-color: var(--teal-accent) !important;
    color: var(--white) !important;
}

/* Ensure hero buttons use same teal */
#hero .btn-primary {
    background: var(--teal-accent) !important;
    border-color: var(--teal-accent) !important;
}

#hero .btn-primary:hover {
    background: #008cb3 !important;
    border-color: #008cb3 !important;
}

.text-shadow {
    text-shadow: 0 4px 12px rgba(0,0,0,0.8), 0 2px 6px rgba(0,0,0,0.6);
}

/* General hero adjustments for small screens */
@media (max-width: 991.98px) {  /* md and below – Bootstrap lg breakpoint */
    .hero-section-mobile-fix {
        aspect-ratio: unset !important;          /* remove forced wide ratio */
        min-height: 45vh !important;             /* smaller minimum – adjust 40–55vh to taste */
        max-height: 70vh !important;             /* prevent extreme tallness */
        background-attachment: scroll !important; /* disable parallax on mobile */
        padding-top: 4rem !important;            /* add internal space instead of height */
        padding-bottom: 4rem !important;
    }

    /* Optional: taller feel only if content needs it, but avoid over-scroll */
    .hero-section-mobile-fix .container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* Extra safety for very small phones (portrait) */
@media (max-width: 576px) {
    .hero-section-mobile-fix {
        min-height: 40vh !important;
    }
}

.whatsapp-float {
        position: fixed;
        width: 60px;
        height: 60px;
        bottom: 110px;          /* Higher than back-to-top */
        right: 30px;
        background-color: #25D366;
        color: #FFF;
        border-radius: 50%;
        text-align: center;
        font-size: 30px;
        box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
        z-index: 1001;          /* Slightly higher z-index than back-to-top */
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        text-decoration: none;
    }

    .whatsapp-float:hover {
        background-color: #20b358;
        transform: scale(1.1);
        box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
    }

    .whatsapp-float i {
        margin-top: 2px;
    }
	
	@media (max-width: 768px) {
        .whatsapp-float {
            width: 55px;
            height: 55px;
            bottom: 100px;
            right: 20px;
        }
		
		/* Fix dropdown stability inside offcanvas on touch/mobile */
.offcanvas .dropdown-menu {
    position: relative !important;     /* Flow naturally instead of absolute/fixed fights */
    transform: none !important;
    inset: auto !important;
    margin-top: 0.35rem !important;    /* Small positive margin – helps Popper */
    min-width: 100%;                   /* Full width on mobile for better touch area */
}

.offcanvas .dropdown.show .dropdown-menu {
    display: block !important;         /* Force visibility during any race condition */
}

/* Optional: make submenu items easier to tap */
.offcanvas .dropdown-item {
    padding: 0.85rem 1.5rem !important;
    min-height: 48px;                  /* Better touch target size */
}

/* Company name responsive sizing + safety */
.company-name {
    transition: font-size 0.3s ease;
}

.card-img-top {
    transition: transform 0.4s ease;
}
.card:hover .card-img-top {
    transform: scale(1.05);
}

@media (max-width: 575px) {
    .company-name {
        font-size: 0.85rem;          /* ≈13–14px – small enough for narrow phones */
        line-height: 1.2;
        white-space: normal;         /* Allow text to wrap to next line if very tight */
        max-width: 160px;            /* Prevent pushing hamburger icon off-screen */
        overflow: hidden;
        text-overflow: ellipsis;     /* Show ... if still too long */
    }
}

@media (max-width: 400px) {
    .company-name {
        font-size: 0.8rem;           /* Even smaller on tiny screens (e.g., old iPhone SE) */
        max-width: 130px;
    }
}

/* Extra navbar safety on very small screens */
@media (max-width: 575px) {
    .navbar-brand {
        padding-right: 0.5rem;       /* Reduce padding if needed */
    }
    .navbar-toggler {
        margin-right: 0.5rem;        /* Keep hamburger visible */
    }
}