/*************************************************************/
/*  嘉義大學課程地圖 - 現代化版面                                */
/*  Built on Bootstrap 5 utility classes; this file only      */
/*  supplies NCYU branding, the navbar/hero/footer chrome,    */
/*  and light-touch overrides for legacy inline-styled tables */
/*  generated deeper in HTMLFunc.cs.                          */
/*  Used by: Map_School/General/College/DeptList/Dept.aspx,   */
/*  and EPF_Outline.aspx. No other page in the site links to  */
/*  this stylesheet.                                          */
/*************************************************************/

:root {
    --ncyu-green: #1b4332;
    --ncyu-green-dark: #0f2e22;
    --ncyu-green-light: #2d6a4f;
    --ncyu-gold: #c9a227;
    --ncyu-gold-light: #e8c468;
    --ncyu-bg: #f5f7f6;
    --ncyu-text: #222222;

    --college-agri: #588157;
    --college-eng: #1d6fa5;
    --college-teachers: #bc6c25;
    --college-manage: #6f4e7c;
    --college-life: #2a9d8f;
    --college-ha: #c1666b;
    --college-oth: #5e548e;
}

html, body {
    background-color: var(--ncyu-bg);
    color: var(--ncyu-text);
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
}

a { color: var(--ncyu-green-light); }
a:hover { color: var(--ncyu-gold); }

/* ---------------------------------- */
/* Top navbar                         */
/* ---------------------------------- */
.ncyu-navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ncyu-navbar .navbar-brand img {
    height: 44px;
}

.ncyu-navbar .navbar-brand-text {
    font-weight: 700;
    color: var(--ncyu-green);
    font-size: 1.1rem;
    line-height: 1.2;
}

.ncyu-navbar .navbar-brand-text small {
    display: block;
    font-weight: 400;
    font-size: 0.7rem;
    color: #777;
}

.ncyu-navbar .nav-link {
    color: var(--ncyu-text) !important;
    font-weight: 500;
    padding: 0.75rem 1rem !important;
}

.ncyu-navbar .nav-link.active,
.ncyu-navbar .nav-link:hover {
    color: var(--ncyu-green) !important;
}

.ncyu-navbar .nav-link.active {
    border-bottom: 3px solid var(--ncyu-gold);
}

.ncyu-navbar .dropdown-menu {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.ncyu-navbar .dropdown-item:hover,
.ncyu-navbar .dropdown-item:focus {
    background-color: var(--ncyu-bg);
    color: var(--ncyu-green);
}

/* ---------------------------------- */
/* Hero banner                        */
/* ---------------------------------- */
.ncyu-hero {
    position: relative;
    background-image: linear-gradient(135deg, rgba(15,46,34,0.82), rgba(27,67,50,0.55)), url('../img/header_new.jpg');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 2.5rem 1rem;
}

.ncyu-hero h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.ncyu-hero p {
    margin: 0.4rem 0 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* ---------------------------------- */
/* Sidebar (replaces old .nav3)       */
/* ---------------------------------- */
.map-sidenav {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    overflow: hidden;
}

.map-sidenav .list-group-item {
    border: none;
    border-bottom: 1px solid #eee;
    padding: 0.85rem 1.1rem;
    font-weight: 500;
    color: var(--ncyu-text);
}

.map-sidenav .list-group-item.title {
    background-color: var(--ncyu-green);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.map-sidenav .list-group-item.link {
    cursor: pointer;
}

.map-sidenav a.list-group-item-action:hover,
.map-sidenav a.list-group-item-action.active {
    background-color: var(--ncyu-bg);
    color: var(--ncyu-green);
    border-left: 4px solid var(--ncyu-gold);
    padding-left: calc(1.1rem - 4px);
}

/* ---------------------------------- */
/* Content card (replaces .content2)  */
/* ---------------------------------- */
.map-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 1.5rem;
}

.map-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ncyu-green);
    padding-bottom: 0.6rem;
    margin-bottom: 1.2rem;
    border-bottom: 3px solid var(--ncyu-gold);
}

.map-card .content-body p {
    line-height: 1.8;
    font-size: 1rem;
}

/* ---------------------------------- */
/* College / department card grid    */
/* (replaces the floated #wrapper .col layout) */
/* ---------------------------------- */
.college-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    overflow: hidden;
    height: 100%;
}

.college-card .college-card-header {
    padding: 0.9rem 1.1rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 5px solid rgba(0,0,0,0.15);
}

.college-card .list-group-item {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 0.7rem 1.1rem;
}

.college-card .list-group-item a {
    color: var(--ncyu-text);
    text-decoration: none;
    display: block;
}

.college-card .list-group-item:hover {
    background-color: var(--ncyu-bg);
}

.college-card .list-group-item:hover a {
    color: var(--ncyu-green);
}

#agri .college-card-header { background-color: var(--college-agri); }
#eng .college-card-header { background-color: var(--college-eng); }
#teachers .college-card-header { background-color: var(--college-teachers); }
#manage .college-card-header { background-color: var(--college-manage); }
#life .college-card-header { background-color: var(--college-life); }
#ha .college-card-header { background-color: var(--college-ha); }
#oth .college-card-header { background-color: var(--college-oth); }

/* ---------------------------------- */
/* Footer                             */
/* ---------------------------------- */
.ncyu-footer {
    background-color: var(--ncyu-green-dark);
    color: #e8e8e8;
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 2.5rem;
}

.ncyu-footer a { color: var(--ncyu-gold-light); }

/* ---------------------------------- */
/* Light-touch modernisation of the   */
/* legacy inline-styled data tables   */
/* generated in KPT()/KCrs()/         */
/* DomainPathway_Crs()/Certification()*/
/* Their bgcolor color-coding is left */
/* intact (it carries meaning) - we   */
/* only fix spacing/typography/radius */
/* ---------------------------------- */
.map-card table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0;
    margin: 0.5rem 0 1rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.map-card table td,
.map-card table th {
    padding: 0.6rem 0.8rem !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    vertical-align: middle;
}

.map-card table font[size="2"] {
    font-size: 0.95rem !important;
}

.map-card table font[size="3"] {
    font-size: 1.05rem !important;
    font-weight: 600;
}

.map-card table tr:hover td {
    filter: brightness(0.97);
}

.map-card table img {
    border-radius: 0.4rem;
}

.map-card input[type="submit"] {
    background-color: var(--ncyu-green);
    color: #fff;
    border: none;
    border-radius: 0.4rem;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
}

.map-card input[type="submit"]:hover {
    background-color: var(--ncyu-green-light);
}

/* ---------------------------------- */
/* GridView (EPF_Outline.aspx)        */
/* The control's colors/width are set */
/* server-side in PubFunc.GV_Load_     */
/* With_Button() - shared with         */
/* EPF_Viewer.aspx, so we override     */
/* visually here instead of touching   */
/* that shared helper.                 */
/* ---------------------------------- */
.map-card table[id*="GVOutLine"] {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.map-card table[id*="GVOutLine"] th,
.map-card table[id*="GVOutLine"] tr:first-child td {
    background-color: var(--ncyu-green) !important;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.7rem !important;
}

.map-card table[id*="GVOutLine"] td {
    background-color: #ffffff !important;
    padding: 0.6rem 0.8rem !important;
    border-bottom: 1px solid #eee !important;
}

.map-card table[id*="GVOutLine"] tr:nth-child(even) td {
    background-color: var(--ncyu-bg) !important;
}

.map-card table[id*="GVOutLine"] input[type="submit"] {
    background-color: var(--ncyu-gold);
    color: #1b4332;
    font-weight: 600;
}

.map-card table[id*="GVOutLine"] input[type="submit"]:hover {
    background-color: var(--ncyu-gold-light);
}

/* ---------------------------------- */
/* Mobile adjustments                 */
/* ---------------------------------- */
@media (max-width: 768px) {
    .ncyu-hero { padding: 1.6rem 1rem; }
    .ncyu-hero h1 { font-size: 1.4rem; }
    .map-card { padding: 1rem; }
    .map-card-title { font-size: 1.2rem; }
}

/* ---------------------------------- */
/* Print: hide chrome, keep content   */
/* ---------------------------------- */
@media print {
    .ncyu-navbar, .ncyu-hero, .ncyu-footer, .map-sidenav { display: none !important; }
    .map-card { box-shadow: none; }
}
