/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat',Helvetica,Arial,Lucida,sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    margin: 0;
}

h1 {
  font-weight: 700;
  font-style: italic;
  font-size: 34px;
  color: #3a3a00 !important;
  line-height: 1.2em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: white;
    border-top: 22px solid #5C5C5C;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

.navbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* row-reverse: logo img (first in DOM) renders on the right, h1 (second) on the left */
.navbar-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #676602;
}

h1.logo {
    margin-top: 10px;;
    margin-bottom: 10px;
}

.navbar-logo {
    height: 60px;
    width: auto;
    display: block;
    margin-bottom: 15px;
    margin-right: 15px;
}

/* Hamburger button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #5C5C5C;
    border-radius: 2px;
    transition: all 0.25s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    padding-left: 0;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    position: relative;
    padding-bottom: 3px;
    transition: color 0.25s ease, transform 0.25s ease;
    display: inline-block;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #676602;
    transition: width 0.25s ease;
}

.nav-menu a:hover {
    color: #676602;
    transform: translateY(-2px);
}

.nav-menu a.active {
    color: #676602;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* Content Section */
.content {
    padding: 2rem 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.card p {
    color: #666;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* Tables */
thead th {
    background-color: #5C5C5C;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 24px;
    }

    .navbar-logo {
        height: 40px;
    }

    /* Mobile: logo image on left, site title below it */
    .navbar-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .logo {
        font-size: 24px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        margin-top: 0.75rem;
        border-top: 1px solid #eee;
        padding-top: 0.5rem;
    }

    .nav-menu.nav-open {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 0.6rem 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-menu a:hover {
        transform: none;
        color: #676602;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 1.5rem 0;
    }

    .card {
        padding: 1.25rem;
    }
}
