@charset "UTF-8";

/* ==========================================================================
   1. CSS Variables / Base Settings
   ========================================================================== */
:root {
    /* Colors - School Identity */
    --primary: #9E1A20;
    /* エンジ色 (School Color) */
    --primary-dark: #7a1419;
    --accent: #D4AF37;
    /* ゴールド (Accent) */
    --accent-hover: #b5952f;

    /* Colors - Layout */
    --text-main: #333333;
    --text-sub: #666666;
    --bg-body: #ffffff;
    --bg-gray: #f8f9fa;
    --border: #e0e0e0;

    /* Layout Dimensions */
    --header-height: 70px;
    --max-width: 1200px;
    --container-padding: 20px;

    /* Typography */
    --font-base: "Noto Sans JP", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    --font-heading: var(--font-base);

    /* Transitions */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-base);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease, opacity 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

ul {
    list-style: none;
}

/* ==========================================================================
   2. Components & Utilities
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.main-wrapper {
    margin-left: 260px;
    /* Sidebar width */
    width: calc(100% - 260px);
}

.section {
    padding: 80px 0;
}

.bg-gray {
    background-color: var(--bg-gray);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 50px;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.section-title span {
    display: block;
    font-size: 1rem;
    color: var(--text-sub);
    margin-top: 10px;
    font-weight: 400;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   3. Header (Sticky & Glassmorphism)
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: #fff;
    border-right: 1px solid var(--border);
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.header-inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 30px 20px;
    gap: 30px;
    overflow-y: auto;
}

.logo-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    text-decoration: none;
    margin-bottom: 20px;
}

.logo-img {
    height: 80px;
    width: auto;
}

.logo-txt {
    height: 40px;
    width: auto;
}

/* PC Navigation (Default) */
.nav-menu {
    display: block;
}

.nav-menu ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.nav-menu a {
    display: block;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 12px 15px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-menu a:hover {
    background-color: var(--bg-gray);
    color: var(--primary);
    padding-left: 20px;
}

.nav-menu a::after {
    display: none;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: auto;
    /* Push to bottom */
    width: 100%;
    justify-content: center;
}

.btn-icon {
    color: var(--primary);
    font-size: 1.5rem;
    padding: 8px;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.btn-access {
    background-color: var(--primary);
    color: #fff;
    font-size: 0.9rem;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-access:hover {
    background-color: var(--primary-dark);
}

.menu-toggle {
    display: none;
    /* Hidden on PC */
}

/* ==========================================================================


/* ==========================================================================
   4. Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    min-height: 500px;
    /* Removed padding-top since we are not using sticky header overlay on main content */
    background: url('../images/hero_new.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding: 0;
    overflow: hidden;
    width: 100%;
    /* margin-left adjustment is handled by main-wrapper */
}

/* Hero Slider (Global) */
.hero-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.slide-item {
    display: block;
    width: 100%;
    flex-shrink: 0;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    border: none;
}

/* Background Images */
.bg-school-main {
    background-image: url('../images/slider_school.jpg');
}

.bg-dept {
    background-image: url('../images/slider_dept.jpg');
}

.bg-event {
    background-image: url('../images/slider_event.jpg');
}

.bg-club {
    background-image: url('../images/slider_club.jpg');
}

.bg-arch {
    background-image: url('../images/slider_arch.jpg');
}

.bg-mech {
    background-image: url('../images/slider_mech_v2.png');
}

.bg-elec {
    background-image: url('../images/slider_elec.jpg');
}

.bg-other {
    background-image: url('../images/slider_other.jpg');
}

.bg-sky {
    background-image: url('../images/sky3.jpg');
}


/* Thumbnails for Slider */
.thumbnail-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: 90%;
    max-width: 800px;
    /* Reduced max-width */
    padding: 0;
    /* Removed padding */
    background: transparent;
    /* Removed background */
    border-radius: 10px;
    backdrop-filter: none;
    /* Removed blur */
    box-shadow: none;
    /* Removed shadow */
}

.thumbnail-wrapper {
    width: 100%;
    overflow: hidden;
    /* Masking */
    position: relative;
    border-radius: 8px;
    /* Add radius directly to wrapper if needed */
}

.thumbnail-track {
    display: flex;
    gap: 0;
    /* REMOVED GAP */
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    /* Smooth slide */
    width: 100%;
    /* Force full width */
    justify-content: center;
    /* Center items */
}

.thumb-item {
    width: 80px;
    /* Fixed width */
    height: 50px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    opacity: 0.6;
    border-radius: 4px;
    flex-shrink: 0;
    /* No shrinking */
}

.thumb-item {
    width: 60px;
    height: 40px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    opacity: 0.6;
    border-radius: 4px;
}

.thumb-item:hover,
.thumb-item.active {
    opacity: 1;
    border-color: var(--primary);
    /* Use primary color */
    transform: scale(1.1);
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through to slider */
}

.hero-content a,
.hero-content button {
    pointer-events: auto;
    /* Re-enable clicks for buttons/links inside hero-content */
}

.hero-sub {
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    margin-bottom: 20px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.5);
    color: #ffffff;
    /* Explicitly set white */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 40px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.6);
    color: #ffffff;
    /* Explicitly set white */
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-hero {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-hero:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-hero-outline {
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.btn-hero-outline:hover {
    background-color: #fff;
    color: var(--primary);
}

/* ==========================================================================
   5. Important News Bar
   ========================================================================== */
.important-bar {
    background-color: #FFF5F5;
    border-bottom: 1px solid #FFE0E0;
    padding: 15px 0;
}

.important-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.label-important {
    background-color: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: bold;
}

.important-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

/* ==========================================================================
   6. Departments Grid
   ========================================================================== */
.dept-grid {
    display: grid;
    /* PC: 4 columns */
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.dept-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dept-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.dept-icon {
    color: var(--primary);
    margin-bottom: 20px;
}

.dept-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.dept-card p {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 20px;
}

.dept-card .arrow {
    margin-top: auto;
    color: var(--accent);
    font-size: 1.5rem;
}

/* ==========================================================================
   7. News & Topics (Tabs)
   ========================================================================== */
.news-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    background-color: #eee;
    color: var(--text-sub);
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background-color: var(--primary);
    color: #fff;
}

.tab-content-panel {
    display: none;
    /* JS toggles this */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Default active panel style (for no-js fallback or initial state) */
#tab-news {
    display: grid;
    opacity: 1;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-img {
    height: 180px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.news-body {
    padding: 20px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.badge {
    background-color: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.news-card h3 {
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--text-main);
}

/* ==========================================================================
   8. Footer
   ========================================================================== */
.footer {
    background-color: #222;
    color: #aaa;
    padding: 60px 0 30px;
    text-align: center;
}

.footer-logo {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    display: inline-block;
}

.footer-info {
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.copyright {
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 0.8rem;
}

/* ==========================================================================
   9. Responsive Design
   ========================================================================== */
@media (max-width: 1023px) {

    /* Tablet & Mobile */
    :root {
        --header-height: 60px;
        --section-padding: 60px 0;
    }

    /* Hide Target Nav on Mobile */
    .target-nav {
        display: none !important;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    /* Reset Sidebar for Mobile */
    .header {
        position: sticky;
        top: 0;
        left: auto;
        width: 100%;
        height: var(--header-height);
        flex-direction: row;
        border-right: none;
        box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
        padding: 0;
    }

    .header-inner {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 20px;
        gap: 0;
        overflow-y: visible;
    }

    .main-wrapper {
        margin-left: 0;
        width: 100%;
    }

    .logo-link {
        flex-direction: row;
        margin-bottom: 0;
        gap: 10px;
    }

    .logo-img {
        height: 36px;
    }

    .logo-txt {
        height: 24px;
        max-width: 140px;
        /* Reduced from 180px */
        object-fit: contain;
    }

    .nav-menu {
        display: none;
        /* Mobile menu logic handled by JS class toggling */
    }

    .nav-menu.active {
        /* Mobile menu styles would go here */
        display: block;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: #fff;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 1100;
    }

    .nav-menu.active ul {
        flex-direction: column;
        gap: 15px;
    }

    .menu-toggle {
        display: block;
        font-size: 1.8rem;
        color: var(--primary);
        cursor: pointer;
        padding: 5px;
        z-index: 1200;
        /* Ensure on top */
        position: relative;
        background: rgba(255, 255, 255, 0.8);
        /* Slight bg to ensure visibility */
        border-radius: 4px;
        order: 999;
        /* Force to far right */
        margin-left: auto;
        /* Push to right edge */
    }

    .dept-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns for tablet */
    }
}

@media (max-width: 600px) {

    /* Mobile Small */
    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .dept-grid {
        grid-template-columns: 1fr;
        /* 1 column for mobile */
    }

    .important-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Footer Extended Styles */
.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    text-align: left;
    border-bottom: 1px solid #333;
    padding-bottom: 40px;
}

.footer-link-group h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 15px;
    border-left: 3px solid var(--accent);
    padding-left: 10px;
}

.footer-link-group ul li {
    margin-bottom: 10px;
}

.footer-link-group ul li a {
    color: #888;
    font-size: 0.85rem;
}

.footer-link-group ul li a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.footer-bottom-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 0.8rem;
}

.footer-bottom-links a {
    color: #aaa;
}

.footer-bottom-links a:hover {
    color: #fff;
}

/* Banner Grid */
.banner-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
}

.banner-item {
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 240px;
}

.banner-item:hover {
    transform: translateY(-5px);
    opacity: 0.8;
}

.banner-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-outline {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-sub);
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #fff5f5;
}

/* Responsive adjustments for banner */
@media (max-width: 600px) {
    .banner-grid {
        flex-direction: column;
    }

    .banner-item {
        max-width: 100%;
        width: 80%;
    }
}

/* ==========================================================================
   10. Subpage Styles
   ========================================================================== */
.page-header {
    background: linear-gradient(rgba(158, 26, 32, 0.8), rgba(158, 26, 32, 0.6)), url('../images/school.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 0;
    height: 140px;
    /* Force reduced height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 0;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.page-title-sub {
    font-size: 0.9rem;
    opacity: 0.9;
    letter-spacing: 0.1em;
}

.breadcrumb {
    padding: 10px 0;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 30px;
}

.breadcrumb ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.breadcrumb li::after {
    content: '>';
    margin-left: 10px;
    color: #ccc;
}

.breadcrumb li:last-child::after {
    content: none;
}

.breadcrumb a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Content Area - Basic Reset for Legacy Content */
.content-area h2 {
    font-size: 1.8rem;
    color: var(--primary);
    border-left: 5px solid var(--primary);
    padding-left: 15px;
    margin: 40px 0 20px;
    line-height: 1.4;
    background: #fefefe;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.content-area h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin: 30px 0 20px;
    display: inline-block;
}

.content-area h4 {
    font-size: 1.2rem;
    margin: 20px 0 15px;
    color: var(--primary);
    font-weight: bold;
    background: #f4f4f4;
    padding: 8px 12px;
    border-radius: 4px;
}

.content-area p {
    margin-bottom: 1.5em;
    line-height: 1.8;
    color: #444;
}

.content-area ul,
.content-area ol {
    margin-bottom: 1.5em;
    padding-left: 20px;
}

.content-area li {
    margin-bottom: 0.5em;
}

.content-area table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
}

.content-area th,
.content-area td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.content-area th {
    background-color: #f5f5f5;
    color: var(--primary);
    font-weight: bold;
    width: 25%;
}

.content-area img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   11. Responsive Design
   ========================================================================== */
@media (max-width: 1023px) {
    :root {
        --header-height: 60px;
        --section-padding: 60px 0;
    }

    /* Header Mobile */
    .header-inner {
        padding: 10px 15px;
    }

    .nav-menu {
        display: none;
        /* Hidden by default */
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: #fff;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #eee;
    }

    .nav-menu.active {
        display: block;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 0;
    }

    .nav-menu li {
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu a {
        padding: 15px 0;
        display: block;
    }

    .nav-menu a::after {
        display: none;
    }

    .menu-toggle {
        display: block;
        font-size: 24px;
        cursor: pointer;
        padding: 5px;
        color: var(--primary);
    }

    .logo-link {
        gap: 8px;
    }

    .logo-img {
        height: 35px;
    }

    .logo-txt {
        height: 25px;
    }

    .header-actions .btn-access {
        padding: 6px 15px;
        font-size: 0.8rem;
    }

    /* Other Mobile Adjustments */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .dept-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dept-grid {
        grid-template-columns: 1fr;
    }

    .important-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}


/* ==========================================================================
   Desktop Sidebar Layout (min-width: 1024px)
   ========================================================================== */
@media (min-width: 1024px) {

    /* Global Background for PC */
    body {
        background-color: #f2f2f2;
        /* Light Gray Background */
    }

    /* Box Layout Wrapper */
    .site-wrapper {
        display: flex;
        max-width: 1600px;
        /* Expanded width */
        margin: 0 auto;
        /* Center alignment */
        background-color: #fff;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
        /* Soft shadow */
        min-height: 100vh;
    }

    /* Left Sidebar (Sticky) */
    .header {
        position: sticky;
        /* Sticky inside flex container */
        top: 0;
        width: 260px;
        height: 100vh;
        overflow-y: auto;
        flex-shrink: 0;
        /* Prevent shrinking */
        border-right: 1px solid #eee;
        background: #fff;
        backdrop-filter: none;
        box-shadow: none;
        /* No shadow needed inside wrapper */
        align-items: flex-start;
        padding: 0;
        z-index: 100;
    }

    /* Right Main Content */
    .main-wrapper {
        flex-grow: 1;
        min-width: 0;
        /* Fix flex overflow issues */
    }

    main,
    footer {
        margin-left: 0;
        /* Reset margin */
        width: 100%;
    }

    .header-inner {
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        height: 100%;
        padding: 0;
        width: 100%;
    }

    /* Logo Area */
    .logo {
        width: 100%;
        padding: 30px 25px;
        border-bottom: 1px solid #f0f0f0;
        text-align: center;
    }

    .logo-link {
        flex-direction: column;
        gap: 15px;
    }

    .logo-img {
        height: 80px;
        /* Larger logo */
    }

    /* =========================================
       Hero Slider Styles
       ========================================= */
    /* Hero Slider Styles Moved to Global Scope */

    /* Ensure content is above slider */
    .hero-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        width: 100%;
        text-align: center;
    }

    .logo-txt.mobile-only {
        display: none;
    }



    /* Sidebar Navigation */
    .nav-menu {
        width: 100%;
        padding: 20px 0;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 12px 25px;
        border-left: 4px solid transparent;
        /* Selection indicator */
        font-size: 1rem;
        color: var(--text-main);
    }

    .nav-menu a::after {
        display: none;
        /* Disable underline effect */
    }

    .nav-menu a:hover {
        background-color: #f9f9f9;
        color: var(--primary);
        border-left-color: var(--primary);
        width: 100%;
    }

    /* Sidebar Footer (Bottom area) */
    .sidebar-footer.pc-only {
        display: block;
        padding: 20px 25px;
        background: #fafafa;
        border-top: 1px solid #f0f0f0;
        width: 100%;
        margin-top: auto;
    }

    .btn-access-sidebar {
        display: block;
        width: 100%;
        background: var(--text-main);
        color: #fff;
        text-align: center;
        padding: 10px;
        border-radius: 4px;
        text-decoration: none;
        margin-bottom: 15px;
        transition: background 0.3s;
    }

    .btn-access-sidebar:hover {
        background: var(--primary);
    }

    .sidebar-search {
        display: flex;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 4px;
        overflow: hidden;
    }

    .search-input {
        flex-grow: 1;
        border: none;
        padding: 8px;
        font-size: 0.85rem;
        outline: none;
    }

    .search-btn {
        background: none;
        border: none;
        color: #999;
        cursor: pointer;
        padding: 0 8px;
    }

    .search-btn:hover {
        color: var(--primary);
    }

    /* Hide standard actions */
    .header-actions {
        display: none;
    }

    .pc-only {
        display: block;
    }

    .mobile-only {
        display: none;
    }

    /* =========================================
       Target Nav (White Header)
       ========================================= */
    .main-wrapper {
        position: relative;
    }

    .target-nav {
        position: relative;
        /* Changed from absolute */
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 15px 40px;
        z-index: 500;
        background: #fff;
        /* White background */
        border-bottom: 1px solid #ddd;
        /* Separator */
        pointer-events: auto;
        /* Re-enable pointer events */
    }

    .target-nav * {
        pointer-events: auto;
    }

    .target-links {
        display: flex;
        list-style: none;
        gap: 30px;
        margin: 0;
        padding: 0;
    }

    .target-links a {
        color: #333;
        /* Dark text */
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 700;
        text-align: center;
        display: block;
        line-height: 1.4;
        text-shadow: none;
        /* Remove shadow */
        padding-bottom: 5px;
        border-bottom: 2px solid transparent;
        transition: border-color 0.3s;
    }

    .target-links a:hover {
        border-bottom-color: var(--accent);
    }

    .target-actions {
        display: flex;
        gap: 20px;
    }

    .action-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #333;
        /* Dark text */
        text-decoration: none;
        font-size: 0.75rem;
        gap: 5px;
        text-shadow: none;
        /* Remove shadow */
        font-weight: bold;
    }

    .action-item .material-icons {
        font-size: 24px;
        background: #f0f0f0;
        /* Light gray bg for icons */
        color: #333;
        border-radius: 50%;
        padding: 10px;
        transition: background 0.3s, transform 0.3s, color 0.3s;
        backdrop-filter: none;
    }

    .action-item:hover .material-icons {
        background: var(--primary);
        color: #fff;
        transform: scale(1.1);
    }

    /* Enhanced Sidebar Styling */
    .sidebar-logo {
        padding: 20px 15px;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }

    .sidebar-logo img {
        width: 100%;
        max-width: 240px;
        /* Adjust as needed */
        height: auto;
        display: block;
        margin: 0 auto;
    }

    .nav-menu ul {
        border-top: none;
        /* Removed border-top since logo has bottom border */
        margin-top: 10px;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu a {
        padding: 15px 25px;
        font-weight: 500;
        transition: padding-left 0.2s;
    }

    .nav-menu a:hover {
        padding-left: 30px;
        background: #fcfcfc;
    }

    /* Clean up sidebar footer */
    .sidebar-footer.pc-only {
        border-top: none;
        background: transparent;
    }

    .sidebar-search {
        background: #f5f5f5;
        border: none;
    }
}





/* ==========================================================================
   Back to Top Button
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #666;
    /* Gray as per image */
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 4px;
    /* Square with slight radius */
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top .material-icons {
    font-size: 32px;
}

/* =========================================
   PC Layout (Sidebar) - Grid System
   ========================================= */
@media (min-width: 1024px) {

    /* 1. Body & Generic Resets */
    body {
        background-color: #f5f5f5;
        /* Background for whitespace */
        padding-top: 0 !important;
        margin: 0;
    }

    /* 2. Site Wrapper: The Grid Container */
    .site-wrapper {
        display: grid;
        grid-template-columns: 280px minmax(0, 1fr);
        /* Left: Sidebar, Right: Main */
        grid-template-rows: auto 1fr auto;
        width: 100%;
        max-width: 1600px;
        /* Max width constraint */
        margin: 0 auto;
        /* Center alignment */
        background-color: #fff;
        /* Content background */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
        /* Border shadow */
        min-height: 100vh;
        position: relative;
    }

    /* 3. Header: Sticky Sidebar */
    .header {
        grid-column: 1;
        grid-row: 1 / 99;
        /* Span all rows */
        /* position: sticky;  <-- Disabled */
        /* top: 0; */
        /* height: 100vh; */
        width: 100% !important;
        /* Fill grid cell */
        left: auto;
        border-right: 1px solid #eee;
        z-index: 1000;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 0;
        /* overflow-y: auto; */
        overflow: visible !important;
        /* Force visible */
        height: auto !important;
        /* Force auto height */
        position: static !important;
        /* Force static positioning */
        background: rgba(255, 255, 255, 0.98);
        box-shadow: none;
        /* Shadow handled by wrapper if needed */
    }

    .header-inner {
        flex-direction: column;
        width: 100%;
        height: auto;
        padding: 0;
    }

    /* 4. Main Content & Footer */
    main,
    .footer,
    .main-wrapper,
    .page-header {
        grid-column: 2;
        /* 2nd column */
        width: 100% !important;
        margin-left: 0 !important;
        /* Remove margin shift */
        max-width: none;
    }

    /* Specific adjustments */
    .page-header {
        margin-top: 0 !important;
        width: 100% !important;
    }

    /* Hide Toggle, Show Menu */
    .menu-toggle {
        display: none;
    }

    .nav-menu {
        display: block;
        width: 100%;
    }

    /* Logo adjustment */
    .logo {
        padding: 30px 20px;
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
        text-align: center;
    }

    .logo-link {
        flex-direction: column;
        gap: 10px;
    }

    .logo-img {
        height: 60px;
    }

    /* Sidebar Links */
    .nav-menu ul {
        flex-direction: column;
        gap: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #f9f9f9;
    }

    .nav-menu a {
        display: block;
        padding: 15px 25px;
    }

    /* Fix for blank space issues */
    body {
        padding-top: 0 !important;
    }
}

/* ==========================================================================
   New Section: Official Note
   ========================================================================== */
.note-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 1023px) {
    .note-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .note-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Club Images Grid - Figure & Figcaption */
.club-images-grid figure {
    margin: 0;
    break-inside: avoid;
    display: flex;
    flex-direction: column;
}

.club-images-grid figure a {
    display: block;
}

.club-images-grid figcaption {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    text-align: center;
    line-height: 1.4;
}

.club-images-grid img:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   12. School PC scaling fix (LAN Disk Environment)
   ========================================================================== */
@media (min-width: 1024px) and (max-width: 1366px) {
    body {
        zoom: 0.75;
    }
}