/* Design System for FJCU USR Office Website
   Base Styles
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;700&display=swap');

:root {
    /* Primary Colors - Updated Palette */
    --primary-green: #97D8B2;
    --primary-green-hover: #7BC99E;
    --header-bg: #FFFFFF;
    --nav-bg: #11A79C;
    --dark-blue: #003366;
    --charcoal: #2C3E35;

    /* Neutral Colors */
    --cream-bg: #FAF9F6;
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --text-main: #2D2D2D;
    --text-muted: #666666;
    --primary-teal: #97D8B2;
    --primary-blue: #4A6741;
    --accent-gold: #D4A373;

    /* Backwards-compat aliases */
    --primary-orange: #97D8B2;
    --primary-orange-hover: #7BC99E;

    /* Font Sizes */
    --fz-base: 1rem;
    --fz-h1: 2.2rem;
    --fz-h2: 1.8rem;
    --fz-h3: 1.4rem;
    --fz-h4: 1.2rem;
    --fz-nav: 1.15rem;

    /* Spacing & Borders */
    --transition-base: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

.bg-primary-blue {
    background-color: var(--primary-blue);
}

.text-primary-blue {
    color: var(--primary-blue);
}

.bg-primary-teal {
    background-color: var(--primary-teal);
}

.text-primary-teal {
    color: var(--primary-teal);
}

.letter-spacing-2 {
    letter-spacing: 2px;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.7;
    overflow-x: clip;
    /* Changed from hidden to clip for sticky nav */
    font-size: var(--fz-base);
}

#nav-placeholder {
    display: contents;
}

h1 {
    font-family: 'Noto Serif TC', serif;
    font-weight: 700;
    color: #EE4832;
    font-size: var(--fz-h1);
}

h2 {
    font-family: 'Noto Serif TC', serif;
    font-weight: 700;
    color: #EE4832;
    font-size: var(--fz-h2);
}

h3,
h4,
h5,
h6,
.serif-font {
    font-family: 'Noto Serif TC', serif;
    font-weight: 700;
    color: var(--dark-blue);
}

h3 {
    font-size: var(--fz-h3);
}

h4 {
    font-size: var(--fz-h4);
}

/* Header & Navbar - MoE Style */
.top-illustration {
    width: 100%;
    height: 180px;
    background: var(--header-bg);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-illustration::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.15), transparent);
}

.logo-container {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: 10;
    transition: var(--transition-base);
}

.header-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.header-title-logo {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0px 4px 6px rgba(255, 255, 255, 0.6)) drop-shadow(0px 1px 3px rgba(255, 255, 255, 0.4));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.logo-container:hover .header-title-logo {
    filter: drop-shadow(0px 6px 12px rgba(255, 255, 255, 0.75)) drop-shadow(0px 2px 4px rgba(255, 255, 255, 0.55));
    transform: translateY(-2px);
}

.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    box-shadow: var(--shadow-md);
    transition: background 0.3s ease, backdrop-filter 0.3s ease, padding 0.3s ease;
    padding: 12px 0 !important;
    /* Force consistent padding to prevent shrinking */
}

.sticky-nav.scrolled {
    background: rgba(17, 167, 156, 0.95) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.navbar-nav .nav-link {
    font-family: 'Noto Serif TC', serif;
    font-weight: 600;
    color: var(--white) !important;
    text-align: center;
    padding: 10px 15px !important;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-size: var(--fz-nav);
    transition: var(--transition-base);
}

.dropdown-item {
    font-family: 'Noto Serif TC', serif;
}

.navbar-nav .nav-link i {
    font-size: 1.58rem;
    margin-bottom: 0px;
    margin-right: 8px;
    color: #D4E8DC;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Dropdown styling */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-md);
    border-top: 3px solid var(--primary-green);
    border-radius: 0 0 8px 8px;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-blue) !important;
}

/* Sections */
section,
.section-padding {
    padding: 100px 0;
}

.section-white {
    background-color: var(--white);
}

.section-cream {
    background: linear-gradient(180deg, var(--cream-bg) 0%, #f2f0e9 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-green);
}

/* Common Buttons */
.btn-orange {
    background-color: var(--primary-green);
    color: #2C3E35;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-base);
}

.btn-orange:hover {
    background-color: var(--primary-green-hover);
    color: #2C3E35;
    transform: scale(1.05);
}

/* Floating Sidebar */
.floating-sidebar {
    position: fixed;
    right: 20px;
    bottom: 5%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.float-btn {
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition-base);
}

.float-btn:hover {
    background: var(--primary-green);
    color: #2C3E35;
}

/* Footer */
footer {
    background: #fba035;
    color: #000000;
    padding: 30px 0 30px;

}

.footer-logo {
    font-size: 1.3rem;
    color: #000000;
    margin-bottom: 20px;
}

.footer-info p {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #000000;
}

footer h4,
footer .text-white {
    color: #000000 !important;
}

footer a.text-white-50,
footer .text-white-50 {
    color: #000000 !important;
    opacity: 1 !important;
}

footer a.text-white-50:hover {
    color: #000000 !important;
}

footer .border-secondary {
    border-color: rgba(0, 0, 0, 0.2) !important;
}

/* Responsive adjustments for base layout */
@media (max-width: 991px) {
    .top-illustration {
        display: none;
    }

    .header-title-logo {
        height: 60px !important;
    }

    .mobile-nav-logo {
        max-width: 280px;
        height: 60px !important;
        object-fit: contain;
    }

    .logo-container {
        padding: 5px 15px;
        gap: 10px !important;
    }

    .sticky-nav {
        background: var(--nav-bg);
        padding: 12px 0 !important;
    }

    .navbar-collapse {
        background: var(--nav-bg);
        margin: 0 -12px;
        padding: 15px;
        border-radius: 0 0 15px 15px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-nav .nav-link {
        padding: 12px 20px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-size: 1.15rem;
        flex-direction: row;
        text-align: left;
        justify-content: flex-start;
    }

    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }

    .navbar-nav .nav-link i {
        margin-bottom: 0;
        margin-right: 15px;
        width: 25px;
        font-size: 1.3rem;
        opacity: 0.9;
    }

    /* Mobile Dropdown Styling */
    .dropdown-menu {
        background: rgba(0, 0, 0, 0.1);
        border: none;
        box-shadow: none;
        margin: 0 10px 10px;
        border-radius: 10px;
        border-top: none;
    }

    .dropdown-item {
        color: rgba(255, 255, 255, 0.9) !important;
        padding: 12px 20px 12px 50px !important;
        font-size: 1.05rem;
    }

    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff !important;
    }

    .navbar-toggler {
        border: none;
        padding: 8px;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }
}

@media (max-width: 576px) {
    .top-illustration {
        height: 85px;
    }

    .header-title-logo {
        height: 50px !important;
    }

    .navbar-nav .nav-link {
        font-size: 1.1rem;
        padding: 10px 15px !important;
    }

    .sticky-nav {
        padding: 12px 0 !important;
    }

    .mobile-nav-logo {
        height: 55px !important;
    }
}