/* ==============================================
   ESMS on the Brazos - Main Stylesheet
   Government-style information portal
   Colors: Navy Blue (#1B2A4A), Slate Grey (#4A5568), White (#FFFFFF)
   ============================================== */

   :root {
    --navy: #1B2A4A;
    --navy-light: #243654;
    --slate: #4A5568;
    --slate-light: #718096;
    --white: #FFFFFF;
    --off-white: #F7F9FC;
    --grey-light: #EDF2F7;
    --grey-border: #E2E8F0;
    --accent-gold: #C4A25A;
    --success-green: #2F855A;
    --warning-red: #C53030;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--white);
    color: var(--slate);
    line-height: 1.6;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--navy);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ========== HEADER ========== */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--grey-border);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    height: 55px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--slate);
    letter-spacing: 1px;
}

.header-info {
    display: flex;
    gap: 24px;
}

.emergency-badge {
    background: var(--warning-red);
    color: white;
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.office-hours {
    color: var(--slate);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Navigation */
.main-nav {
    border-top: 1px solid var(--grey-border);
    padding: 12px 0;
}

.nav-list {
    display: flex;
    justify-content: flex-start;
    gap: 32px;
    list-style: none;
}

.nav-list li a {
    text-decoration: none;
    color: var(--slate);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--transition);
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.nav-list li a:hover,
.nav-list li a.active {
    color: var(--navy);
    border-bottom-color: var(--navy);
}

.search-item {
    margin-left: auto;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--slate);
    transition: var(--transition);
}

.search-toggle:hover {
    color: var(--navy);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--navy);
    transition: var(--transition);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 42, 74, 0.98);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    width: 90%;
    max-width: 600px;
    position: relative;
}

.search-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.search-form {
    display: flex;
    gap: 12px;
}

.search-form input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.search-form button {
    padding: 16px 32px;
    background: var(--accent-gold);
    border: none;
    border-radius: 8px;
    color: var(--navy);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    background: #b8923a;
}

/* ========== HERO SECTION ========== */
.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    width: 100%;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(27, 42, 74, 0.85), rgba(27, 42, 74, 0.4));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 650px;
    padding: 0 32px;
}

.hero-badge {
    background: var(--accent-gold);
    color: var(--navy);
    display: inline-block;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
    width: fit-content;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--accent-gold);
    color: var(--navy);
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #b8923a;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ========== WIDGETS SECTION ========== */
.widgets-section {
    padding: 60px 0;
    background: var(--off-white);
}

.widgets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.widget-card {
    background: var(--white);
    padding: 30px 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
    display: block;
}

.widget-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.widget-icon {
    width: 60px;
    height: 60px;
    background: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.widget-icon i {
    font-size: 1.5rem;
    color: white;
}

.widget-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 8px;
}

.widget-card p {
    font-size: 0.85rem;
    color: var(--slate);
}

/* ========== FEATURED SECTION ========== */
.featured-section {
    padding: 70px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header span {
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-gold);
    font-weight: 600;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--navy);
    margin-top: 8px;
}

.section-header p {
    color: var(--slate);
    max-width: 600px;
    margin: 15px auto 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.featured-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.featured-image {
    height: 200px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.featured-content {
    padding: 24px;
}

.featured-date {
    font-size: 0.7rem;
    color: var(--accent-gold);
    font-weight: 500;
}

.featured-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--navy);
    margin: 10px 0;
}

.featured-card p {
    font-size: 0.85rem;
    color: var(--slate);
    margin-bottom: 15px;
}

.read-more {
    color: var(--navy);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.read-more:hover {
    gap: 10px;
}

/* ========== ALERTS SECTION ========== */
.alerts-section {
    background: var(--grey-light);
    padding: 50px 0;
}

.alert-banner {
    background: white;
    border-left: 4px solid var(--warning-red);
    padding: 20px 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-content i {
    font-size: 1.8rem;
    color: var(--warning-red);
}

.alert-content h3 {
    font-size: 1rem;
    color: var(--navy);
}

.alert-content p {
    font-size: 0.85rem;
    color: var(--slate);
}

.alert-link {
    background: var(--navy);
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ========== ABOUT PAGE ========== */
.about-hero {
    background: var(--navy);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.about-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 60px 0;
}

.mission-card, .vision-card {
    background: var(--off-white);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.mission-card i, .vision-card i {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.mission-card h2, .vision-card h2 {
    font-family: 'Playfair Display', serif;
    color: var(--navy);
    margin-bottom: 15px;
}

/* ========== CONTACT PAGE ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin: 60px 0;
}

.contact-info-card {
    background: var(--off-white);
    padding: 30px;
    border-radius: 16px;
}

.contact-info-card h2 {
    font-family: 'Playfair Display', serif;
    color: var(--navy);
    margin-bottom: 25px;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-detail i {
    width: 45px;
    height: 45px;
    background: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-form {
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--navy);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--grey-border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

/* ========== FOOTER ========== */
.site-footer {
    background: var(--navy);
    color: var(--grey-light);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-logo img  {
    width: 85px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin: 15px 0 10px;
}

.footer-logo p {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #a0aec0;
}

.footer-contact p {
    font-size: 0.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: white;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-gold);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
}

.footer-newsletter {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.footer-newsletter input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.footer-newsletter input::placeholder {
    color: #a0aec0;
}

.footer-newsletter button {
    background: var(--accent-gold);
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--navy);
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-gold);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.7rem;
}

.footer-bottom-right {
    display: flex;
    gap: 20px;
}

.footer-bottom-right a {
    color: #a0aec0;
    text-decoration: none;
}

.footer-bottom-right a:hover {
    color: var(--accent-gold);
}

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    border: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-gold);
    transform: translateY(-3px);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .widgets-grid, .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .mission-vision, .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-list {
        position: fixed;
        top: 120px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 120px);
        background: white;
        flex-direction: column;
        padding: 30px;
        transition: var(--transition);
        gap: 20px;
        z-index: 99;
    }

    .nav-list.active {
        left: 0;
    }

    .search-item {
        margin-left: 0;
    }

    .hero {
        height: 60vh;
    }

    .hero-content {
        padding: 0 20px;
    }

    .widgets-grid, .featured-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-right {
        justify-content: center;
    }

    .alert-banner {
        flex-direction: column;
        text-align: center;
    }

    .alert-content {
        flex-direction: column;
    }
}