/* main.css — site-wide styles (project static + layout from base.html) */

/* ----- Fonts ----- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@200;300;400;500;600;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Montserrat&display=swap');

/* ----- Home / field blocks ----- */
.field-block {
    text-align: center;
    padding: 2rem 1.5rem 0.5rem 1.5rem;
    margin: 0 0.75rem 1.25rem 0.75rem;
    background: linear-gradient(0deg, rgba(245, 245, 245, 1) 0%, rgba(245, 245, 245, 1) 75%, rgba(192, 196, 200, 1) 100%);
    border-bottom: 0.75rem solid #2d7db8;
    box-shadow: 0 0 10px #818992;
    transition: background 0.3sease-in-out;
}

.field-block:hover,
.field-block:focus {
    background: linear-gradient(0deg, #2d7db8 0%, rgba(192, 196, 200, 1) 100%);
}

.dark .field-block:hover,
.dark .field-block:focus {
    background: linear-gradient(0deg, #237bbc 0%, #26292e 100%);
}

.field-block:hover .field-title,
.field-block:focus .field-title,
.field-block:hover .field-title-en,
.field-block:focus .field-title-en,
.field-block:hover .field-text,
.field-block:focus .field-text,
.field-block:hover .field-text-en,
.field-block:focus .field-text-en,
.field-block:hover .field-icon,
.field-block:focus .field-icon {
    color: #f5f5f5;
}

.field-title {
    font-size: 1.5em;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 0.4em;
    color: #013b71;
}

.field-title-en {
    font-size: 1.2em;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.5em;
    color: #013b71;
}

.field-text {
    font-size: 0.8em;
    text-align: start;
    line-height: 170%;
    color: #1d2939;
}

.field-icon {
    font-size: 3.5rem;
    color: #2d7db8;
}

.field-text-en {
    font-size: 0.8em;
    text-align: start;
    line-height: 160%;
}

.dark .field-block {
    background: linear-gradient(0deg, #1b1b1b 0%, #1b1b1b 60%, #26292e 100%);
}

.dark .field-text,
.dark .field-title,
.dark .field-text-en {
    color: #c6d2e2;
}

.dark .field-icon,
.dark .field-title-en {
    color: #237bbc;
}

.dark .field-block {
    border-bottom: 0.75rem solid #237bbc;
    box-shadow: 0 0 10px #0d0d0d;
}

.bg-slogan {
    background-color: #e4e4e4;
    background-image: url();
    background-repeat: no-repeat;
    background-position: 50% 0;
}

.slogan {
    width: 770px;
    margin-top: 10rem;
    margin-bottom: 10rem;
    color: #e4e4e4;
    font-size: 2rem;
    letter-spacing: 0.05rem;
    font-family: 'Libre Baskerville', 'Noto Serif TC', serif;
    font-weight: 600;
    text-shadow: 0 0.5rem 0.5rem #000;
    line-height: 100%;
}

/* ----- Cards & typography ----- */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(45, 125, 184, 0.08);
    transition: transform 0.3s ease;
    height: auto;
    margin-bottom: 1.5rem;
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: left;
    text-align: left;
    height: auto;
}

.card-icon {
    font-size: 2.5rem;
    color: #2d7db8;
    margin-bottom: 1rem;
}

.card-title {
    color: #013b71;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    width: 100%;
}

.card-text {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    width: 100%;
    text-align: left;
}

h1 {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #013b71;
    margin-bottom: 2rem;
}

.h5 {
    /*color: #013b71;*/
    color: #f8f9fa;
    font-weight: 500;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* ----- Navbar & site layout (from base.html) ----- */
.menu-line {
    height: auto;
    width: 1px;
    background-color: #2d7db8;
}

.menu-item {
    font-family: 'Noto Sans TC', 'Caudex', sans-serif;
    font-weight: normal;
    font-style: normal;
}

.navbar-nav .nav-link {
    color: #013b71;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #2d7db8;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 24px rgba(45, 125, 184, 0.08);
    border-radius: 8px;
}

.dropdown-item {
    color: #013b71;
    font-weight: 400;
    padding: 0.5rem 1.5rem;
}

.dropdown-item:hover {
    background-color: #f5f8fa;
    color: #2d7db8;
}

#nav-1 {
    font-size: 0.8em;
    font-weight: 500;
    padding-bottom: 0.7em;
}

#nav-2 {
    font-size: 1em;
    font-weight: 600;
    padding-bottom: 1em;
}

#nav-2 .dropdown {
    padding: 0;
    width: 6.1em;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.98);
        padding: 1rem;
        z-index: 1000;
        display: none;
    }

    .navbar-collapse.show {
        display: block;
    }

    .navbar-nav {
        margin-top: 3rem;
    }

    .menu-line {
        display: none;
    }

    .nav-item {
        margin: 1rem 0;
    }

    .dropdown-menu {
        border: none;
        background: transparent;
        padding-left: 1rem;
    }

    .navbar-toggler {
        z-index: 1001;
    }

    .close-menu {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #333;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1001;
    }

    .close-menu:hover {
        color: #666;
    }
}

body > nav.navbar.fixed-top + * {
    margin-top: 80px;
}

@media (max-width: 991.98px) {
    body > nav.navbar.fixed-top + * {
        margin-top: 100px;
    }
}

@media (max-width: 768px) {
    body > nav.navbar.fixed-top + * {
        margin-top: 90px;
    }
}

@media (max-width: 480px) {
    body > nav.navbar.fixed-top + * {
        margin-top: 80px;
    }
}

.main-content {
    padding-top: 170px;
}

@media (max-width: 991.98px) {
    .main-content {
        padding-top: 120px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding-top: 170px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding-top: 160px;
    }
}

@media (min-width: 992px) {
    .main-content:has(.info-page) {
        padding-top: 100px;
    }
}

@media (max-width: 991.98px) {
    .main-content:has(.info-page) {
        padding-top: 80px;
    }
}

.language-switcher {
    display: flex;
    align-items: center;
    padding: 0.25rem;
}

.language-switcher .btn {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    color: #013b71;
    background: transparent;
    border: 1px solid #013b71;
    margin: 0 0.15rem;
    transition: all 0.3s ease;
}

.language-switcher .btn:hover,
.language-switcher .btn.active {
    background-color: #013b71;
    color: white;
}

.language-switcher .divider {
    width: 1px;
    height: 0.8rem;
    background-color: #013b71;
    margin: 0 0.3rem;
}

@media (max-width: 991.98px) {
    .language-switcher {
        margin: 0.5rem 0;
        justify-content: flex-end;
    }
}

.navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.navbar-brand img {
    max-height: 120px;
    width: auto;
}

.navbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    min-height: 140px;
}

.navbar-tools {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1000;
}

@media (max-width: 991.98px) {
    .navbar-brand {
        position: static;
        transform: none;
        margin: 0 auto;
    }

    .navbar-brand img {
        max-height: 100px;
    }

    .navbar-header {
        flex-direction: column;
        gap: 1rem;
        min-height: auto;
    }

    .navbar-tools {
        position: static;
        width: 100%;
        justify-content: flex-end;
        padding: 0.5rem 0;
    }
}

.container {
    padding-top: 80px;
}

.h5-black {
    color: #013b71;
}
