body {
    background-color: #ecf0f1;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

.sticky-top {
    background-color: #f8f9fa !important; /* Enforce solid background */
}

/* The padding-top for the content wrapper is now handled by script.js */

.hero-section {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/hero_background.jpg');
    height: 14.4rem;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero-section h1 {
    font-size: 4rem;
    color: white;
}

section {
    padding: 10px 0 60px;
    scroll-margin-top: 150px; /* Default for portrait mobile */
}

.card-title {
    font-weight: bold;
}

.navbar-brand {
    background-color: #3498db;
    padding: 0.5rem 0.8rem;
    border-radius: 0.25rem;
    color: white !important;
}

.navbar-nav {
    border: 1px solid #ccc;
    border-radius: 0.25rem;
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%; /* Prevent overflowing its container */
}

.nav-item {
    width: auto;
    text-align: center;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-left: 1px solid #ccc;
}

.nav-item:first-child .nav-link {
    border-left: none;
}

section h2.text-center.mb-4 {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    border-radius: 0.25rem;
}

.bg-dark {
    background-color: #2c3e50 !important;
}

/* === Mobile Styles === */
@media (max-width: 999.98px) { /* Breakpoint at 1000px */
    .navbar-nav {
        border: none;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 5px;
    }

    .nav-item {
        width: auto;
        margin: 2px;
        border: 1px solid #ccc;
        border-radius: .25rem;
    }

    .nav-link {
        border-left: none;
        padding: 0.5rem 1rem;
    }

    .nav-item:first-child .nav-link {
        border-left: none;
    }

    .hero-section {
        padding: 3rem 0;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }
}

/* === Desktop Fixed-Width Layout === */
@media (min-width: 1000px) { /* Breakpoint at 1000px */
    .container {
        max-width: 1000px !important; /* Fixed width for containers */
    }

    .navbar-nav {
        flex-wrap: nowrap; /* Prevent nav items from wrapping */
    }

    .nav-item {
        flex-shrink: 0; /* Prevent nav items from shrinking */
    }
}

/* === Scroll Margin Adjustments === */
@media (min-width: 768px) {
    section {
        scroll-margin-top: 120px; /* For landscape mobile / tablet */
    }
}

@media (min-width: 1000px) {
    section {
        scroll-margin-top: 90px; /* For desktop */
    }
}

/* Utility class for rounded corners */
.rounded-corners {
    border-radius: 0.5rem !important;
}

#contact p:first-child {
    font-size: 1.5rem;
    font-weight: bold;
}

#about .table th {
    width: 25%;
}

.navbar {
    padding-top: 0.5rem !important;
    padding-bottom: 0.25rem !important;
}

#contact {
    scroll-margin-top: 150px;
}