/********** Template CSS **********/
:root {
    --primary: #434EA1;
    --secondary: #434EA1;
    --accent: #EE2424;
    --accent-soft: rgba(238, 36, 36, 0.12);
    --light: #F4F7FE;
    --dark: #14183E;
    /* Override Bootstrap so .bg-primary, .text-primary etc use our palette */
    --bs-primary: #434EA1;
    --bs-secondary: #434EA1;
    --bs-danger: #EE2424;
    /* Blended gradients: blue + red for intuitive emphasis */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, #434EA1 50%, var(--accent) 100%);
    --gradient-hero: linear-gradient(135deg, var(--primary) 0%, #434EA1 70%, rgba(238, 36, 36, 0.85) 100%);
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}


/*** Heading ***/
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--accent);
}

h1,
h2,
h3,
.fw-bold {
    font-weight: 700 !important;
}

h4,
h5,
h6,
.fw-medium {
    font-weight: 500 !important;
}


/*** Service lists with icons ***/
.service-icon-list {
    list-style: none;
    padding-left: 0;
}

.service-icon-list li {
    display: flex;
    align-items: flex-start;
    padding: 0.35rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.service-icon-list li i {
    flex-shrink: 0;
    margin-top: 0.2rem;
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
}

.btn-primary:hover {
    background-color: #d42020;
    border-color: #d42020;
}

.btn-primary:focus,
.btn-primary:active {
    background-color: #be1e1e;
    border-color: #be1e1e;
}

/* Navbar brand logo (from img/GATE DYNAMICS LOGO folder) */
.navbar-brand .navbar-logo,
.navbar-brand img.navbar-logo {
    height: 42px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

/* Footer logo */
.footer-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 50px;
}


/*** Navbar ***/
.sticky-top {
    top: -150px;
    transition: .5s;
    background-color: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sticky-top.bg-primary {
    background-color: #FFFFFF !important;
}

.navbar {
    padding: 11px 0 !important;
    height: 75px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 35px;
    padding: 0;
    color: var(--primary);
    outline: none;
}

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

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

/* Toggler visible on white header */
.sticky-top .navbar-toggler {
    border-color: rgba(67, 78, 161, 0.4);
}

.sticky-top .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23434EA1' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        padding: 0 15px;
        background: #FFFFFF;
    }

    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
        color: var(--primary);
    }

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

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Hero Header ***/
.hero-header {
    margin-top: -75px;
    background: url(../img/bg-hero.png) center center no-repeat;
    background-size: cover;
}

.hero-header.bg-primary {
    background-image: linear-gradient(135deg, rgba(67, 78, 161, 0.92) 0%, rgba(67, 78, 161, 0.9) 60%, rgba(238, 36, 36, 0.88) 100%), url(../img/bg-hero.png);
    background-size: cover;
    background-position: center;
}

/*** Hero image slider ***/
.hero-carousel {
    max-width: 100%;
}

.hero-carousel .carousel-inner {
    border-radius: 8px;
    overflow: hidden;
}

/* Fixed-size placeholder so all slider images appear consistent */
.hero-slide-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 280px;
    max-height: 320px;
    background: transparent;
    padding: 1rem;
}

.hero-slide-placeholder img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 45px;
    height: 45px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    opacity: 1;
}

.hero-carousel .carousel-control-prev {
    left: 10px;
}

.hero-carousel .carousel-control-next {
    right: 10px;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.hero-carousel .carousel-indicators {
    margin-bottom: 10px;
}

.hero-carousel .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
}

.hero-carousel .carousel-indicators .active {
    background-color: var(--accent);
}

.hero-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}


/*** Section Title ***/
.section-title::before {
    position: absolute;
    content: "";
    width: 45px;
    height: 4px;
    bottom: 0;
    left: 0;
    background: var(--dark);
}

.section-title::after {
    position: absolute;
    content: "";
    width: 4px;
    height: 4px;
    bottom: 0;
    left: 50px;
    background: var(--accent);
}

.section-title.text-center::before {
    left: 50%;
    margin-left: -25px;
}

.section-title.text-center::after {
    left: calc(50% + 25px);
    margin-left: 0;
}

.section-title h6::before,
.section-title h6::after {
    position: absolute;
    content: "";
    width: 10px;
    height: 10px;
    top: 2px;
    left: 0;
    background: var(--primary);
}

.section-title h6::after {
    top: 5px;
    left: 3px;
    background: var(--accent);
}


/*** About ***/
.about-img {
    position: relative;
    overflow: hidden;
}

.about-img::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url(../img/bg-about-img.png) top left no-repeat;
    background-size: contain;
}


/*** Service ***/
.service-item {
    position: relative;
    padding: 45px 30px;
    background: #FFFFFF;
    transition: .5s;
}

.service-item:hover {
    background: var(--gradient-primary);
}

.service-item .service-icon {
    margin: 0 auto 20px auto;
    width: 90px;
    height: 90px;
    color: var(--primary);
    background: var(--light);
    transition: .5s;
}

.service-item .service-icon .gdirst-logo {
    max-width: 70px;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Flags row in Our Services section */
.service-flags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.service-flags .service-flag-img {
    height: 48px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.service-flags.service-flags-stack {
    flex-direction: column;
    align-items: flex-start;
}

/* First (hero) flag image in Our Services – full width, larger */
.service-hero-flag-wrap {
    width: 100%;
    max-width: 100%;
}

.service-hero-flag-img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    object-position: center;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.service-item:hover .service-icon {
    background: #FFFFFF;
}

.service-item h5,
.service-item p {
    transition: .5s;
}

.service-item:hover h5,
.service-item:hover p {
    color: #FFFFFF;
}

.service-item a.btn {
    position: relative;
    display: flex;
    color: var(--primary);
    transition: .5s;
    z-index: 1;
}

.service-item:hover a.btn {
    color: var(--accent);
}

.service-item a.btn::before {
    position: absolute;
    content: "";
    width: 35px;
    height: 35px;
    top: 0;
    left: 0;
    border-radius: 35px;
    background: var(--light);
    transition: .5s;
    z-index: -1;
}

.service-item:hover a.btn::before {
    width: 100%;
    background: #FFFFFF;
}


/*** Feature (Vision & Mission section – same blue/red overlay as hero) ***/
.feature {
    background: url(../img/bg-hero.png) center center no-repeat;
    background-size: cover;
}

.feature.bg-primary {
    background-image: linear-gradient(135deg, rgba(67, 78, 161, 0.92) 0%, rgba(67, 78, 161, 0.9) 60%, rgba(238, 36, 36, 0.88) 100%), url(../img/bg-hero.png);
    background-size: cover;
    background-position: center;
}

/* Togo flag image in Our Vision & Mission section */
.feature-flag-wrap {
    display: inline-block;
    max-width: 320px;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-flag-wrap:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.feature-flag-img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 0.5rem;
}


/*** Newsletter (Request a Quote section – same blue/red overlay as hero) ***/
.newsletter {
    background: url(../img/bg-hero.png) center center no-repeat;
    background-size: cover;
}

.newsletter.bg-primary {
    background-image: linear-gradient(135deg, rgba(67, 78, 161, 0.92) 0%, rgba(67, 78, 161, 0.9) 60%, rgba(238, 36, 36, 0.88) 100%), url(../img/bg-hero.png);
    background-size: cover;
    background-position: center;
}

.newsletter .col-md-5 {
    perspective: 1000px;
}

/* Card around Request a Quote promo image – compact, matches feature glass style */
.newsletter-img-wrap {
    display: inline-block;
    max-width: 420px;
    width: 100%;
    padding: 0.9rem;
    background: var(--primary);
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.22);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.newsletter-img-wrap:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.28);
    filter: brightness(1.06);
}

.newsletter img.img-fluid {
    background: transparent;
    animation: newsletter-3d-spin 12s linear infinite;
}

.newsletter .newsletter-img-wrap img.img-fluid {
    max-height: 280px;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    display: block;
    object-fit: contain;
    border-radius: 0.5rem;
}

@media (min-width: 768px) {
    .newsletter .col-md-5 .newsletter-img-wrap {
        margin-left: auto;
        margin-right: 0;
        display: block;
        width: fit-content;
        max-width: 420px;
    }
}

@keyframes newsletter-3d-spin {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

@media (min-width: 992px) {
    .newsletter .container {
        max-width: 100% !important;
    }

    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 1320px) / 2) + .75rem);
    }
}


/*** Case Study ***/
.case-item img {
    transition: .5s;
}
  
.case-item:hover img {
    transform: scale(1.2);
}
  
.case-overlay {
    position: absolute;
    padding: 30px;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    background: linear-gradient(rgba(20, 24, 62, 0), var(--dark));
    z-index: 1;
}

.case-overlay small {
    display: inline-block;
    padding: 3px 15px;
    color: #FFFFFF;
    background: rgba(20, 24, 62, .7);
    border-radius: 25px;
    margin-bottom: 15px;
}

.case-overlay span.btn:hover {
    color: var(--primary);
    background: #FFFFFF;
    border-color: #FFFFFF;
}


/*** FAQs ***/
.accordion .accordion-item {
    border: none;
    margin-bottom: 15px;
}

.accordion .accordion-button {
    background: var(--light);
    border-radius: 2px;
}

.accordion .accordion-button:not(.collapsed) {
    color: #FFFFFF;
    background: var(--gradient-primary);
    box-shadow: none;
}

.accordion .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion .accordion-body {
    padding: 15px 0 0 0;
}


/*** Testimonial ***/
.testimonial-carousel {
    position: relative;
}

.testimonial-carousel .owl-nav {
    position: absolute;
    width: 40px;
    height: 100%;
    top: calc(50% - 50px);
    left: -21px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    margin: 5px 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #FFFFFF;
    border: 1px solid var(--primary);
    border-radius: 40px;
    font-size: 18px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    background: var(--accent);
    color: #FFFFFF;
    border-color: var(--accent);
}

.testimonial-carousel .owl-dots {
    margin-top: 35px;
    margin-left: 3rem;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin-right: 10px;
    width: 15px;
    height: 15px;
    background: #FFFFFF;
    border: 1px solid var(--primary);
    border-radius: 15px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    width: 30px;
    background: var(--accent);
    border-color: var(--accent);
}


/*** Sister Companies (about page) ***/
.sister-company-card .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sister-company-card:hover .card {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12) !important;
}

.sister-company-logo {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* When you add logos, put an img inside .sister-company-logo and use: .sister-company-logo img { max-height: 80px; max-width: 160px; object-fit: contain; } */
.sister-company-logo img {
    max-height: 80px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
}


/*** Partners ticker (about page) – continuous scroll like TV news ***/
.partners-ticker-wrap {
    overflow: hidden;
    width: 100%;
    padding: 20px 0;
}

.partners-ticker-inner {
    display: flex;
    width: max-content;
    animation: partners-ticker 25s linear infinite;
}

.partners-ticker-inner:hover {
    animation-play-state: paused;
}

@keyframes partners-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.partners-ticker-wrap .partner-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    padding: 0 30px;
    min-height: 90px;
}

/* Partner logos: always show original colors */
.partners-ticker-wrap .partner-logo {
    max-height: 60px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
    transition: opacity .3s ease, transform .25s ease;
}

.partners-ticker-wrap .partner-item:hover .partner-logo {
    opacity: 1;
    transform: scale(1.05);
}


/*** Team ***/
.team-item {
    transition: .5s;
    border: 1px solid transparent;
    transition: .5s;
}

.team-item:hover {

    border-color: var(--primary);
}


/*** Footer (same design as header: white bar, same shadow, blue links, red hover) ***/
.footer,
.container-fluid.footer {
    position: relative;
    overflow: hidden;
    min-height: 380px;
    background-color: #FFFFFF;
    background-image: url(footer.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.08);
}

/* Map image – transparent PNG; filter makes light/white map lines visible on white */
.footer-map-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: contain;
    object-position: center;
    z-index: 0;
    pointer-events: none;
    /* Darken so map lines are clearly visible on white background */
    filter: brightness(0) opacity(0.7);
}

/* Light overlay so text stays readable over the map */
.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    z-index: 1;
    pointer-events: none;
}

.footer .container {
    position: relative;
    z-index: 2;
}

.footer .text-white,
.footer h5 {
    color: var(--primary) !important;
}

.footer p {
    color: #495057;
}

.footer .btn.btn-social {
    margin-right: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 40px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: #FFFFFF;
    background-color: var(--accent);
    border-color: var(--accent);
}

.footer .btn.btn-outline-light.btn-social {
    background: transparent;
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 10px;
    padding: 0;
    text-align: left;
    color: var(--primary);
    font-weight: normal;
    transition: .3s;
}

.footer .btn.btn-link:hover {
    color: var(--accent);
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: #6c757d;
}

.footer .copyright a {
    color: var(--primary);
}

.footer .copyright a:hover {
    color: var(--accent);
}

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--primary);
    transition: .3s;
}

.footer .footer-menu a:hover {
    color: var(--accent);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}