/* CSS Variables */
:root {
    --primary-navy: #0C2B5C;
    --accent-orange: #f85a14;
    --light-gray: #F5F6FA;
    --text-dark: #333333;
    --white: #FFFFFF;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    line-height: 24px;
    color: var(--text-dark);
    overflow-x: hidden;
}

.navbar {
    background-color: var(--primary-navy);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    padding: 0;
}

.navbar-logo {
    width: 300px;
    height: 60px;
    object-fit: contain;
}

.navbar-brand, .nav-link {
    color: var(--white) !important;
}

.nav-link:hover {
    color: var(--accent-orange) !important;
    border-bottom: 1px solid var(--accent-orange);
}

.nav-link:focus, .btn:focus {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
    border-bottom: 1px solid var(--accent-orange);
}

.dropdown-menu a {
    color: var(--primary-navy);
}

.dropdown-menu a:hover {
    color: var(--accent-orange);
    background-color: var(--light-gray);
}

.hero-section {
    color: var(--white);
    padding: 0;
    text-align: center;
}

.carousel {
    width: 100%;
    max-width: 100vw;
}

.carousel-item {
    height: 60vh;
    max-height: 600px;
    min-height: 300px;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
}

.carousel-caption {
    background: rgba(12, 43, 92, 0.5);
    border-radius: 5px;
    padding: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.carousel-caption h1 {
    font-weight: 700;
    font-size: 3rem;
    color: var(--accent-orange);
}

.carousel-caption p {
    color: var(--light-gray);
}

.btn-primary, .carousel-caption .btn {
    background-color: var(--accent-orange);
    border: none;
    border-radius: 5px;
    padding: 10px 25px;
    font-weight: 500;
}

.btn-primary:hover, .carousel-caption .btn:hover {
    background-color: var(--primary-navy);
}

.section-title {
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 40px;
    display: block; /* Full width for centering */
    margin-left: auto;
    margin-right: auto;
    max-width: fit-content; /* Underline matches title width */
    position: relative;
    border-bottom: 2px solid var(--accent-orange); /* Orange underline */
    padding-bottom: 8px; /* Space for underline and circle */
}

.section-title::after {
    content: 'o'; /* Circle character */
    position: absolute;
    bottom: -8px; /* Position below the underline */
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-orange);
    font-size: 0.8rem; /* Size of the 'o' */
    line-height: 1; /* Tighten vertical alignment */
    background: var(--white); /* Background to overlap the underline */
    padding: 0 4px; /* Small padding to create space around 'o' */
}

.card {
    border: none;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

.card-img-top {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

/* Companies Section */
.company-card {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.company-logo {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
}

.company-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.company-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    min-height: 2.5rem;
}

.company-card p.description {
    font-size: 1rem;
    margin-bottom: 15px;
    min-height: 80px;
    flex-grow: 1;
}

.company-card .btn-primary {
    align-self: center;
    margin-top: auto;
}

/* Equal height for company cards on large screens */
@media (min-width: 992px) {
    .row:has(.company-card) {
        display: flex;
        flex-wrap: wrap;
    }
    .company-card {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
}

a {
    outline: none !important;
    color: var(--accent-orange);
    transition: all 0.3s ease-in-out;
    text-decoration: none !important;
}

a:focus {
    color: var(--primary-navy);
    border-bottom: 1px solid var(--accent-orange);
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

a:hover {
    color: var(--primary-navy);
    border-bottom: 1px solid var(--accent-orange);
    text-decoration: none !important;
}

.footer {
    background-color: var(--primary-navy);
    color: var(--white);
    padding: 40px 0;
}

.footer .col-md-4 {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding-right: 20px;
}

.footer .col-md-4:last-child {
    border-right: none;
}

.footer a {
    color: var(--accent-orange);
    text-decoration: none !important;
}

.footer a:hover {
    color: var(--white);
    border-bottom: 1px solid var(--accent-orange);
}

.form-control, .form-select {
    border-radius: 5px;
}

.form-control:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 5px rgba(248, 90, 20, 0.3);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 1000;
}

.back-to-top.show {
    display: block;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .card:hover,
    .company-logo:hover {
        transform: none;
        transition: none;
    }
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .carousel-item {
        height: 40vh;
        max-height: 1200px;
        min-height: 400px;
    }

    .carousel-caption {
        padding: 15px;
    }

    .carousel-caption h1 {
        font-size: 1.2rem;
    }

    .carousel-caption p {
        font-size: 0.8rem;
    }

    .footer .col-md-4 {
        text-align: center;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .footer .col-md-4:last-child {
        border-bottom: none;
    }

    .navbar-logo {
        width: 180px;
        height: 36px;
    }

    .section-title {
        border-bottom: 1.5px solid var(--accent-orange); /* Thinner underline on mobile */
        padding-bottom: 6px; /* Adjust spacing */
    }

    .section-title::after {
        font-size: 0.6rem; /* Smaller circle on mobile */
        bottom: -7px; /* Adjust for thinner underline */
    }
}

@media (max-width: 991px) {
    .navbar-logo {
        width: 200px;
        height: 40px;
    }
}