/* ====================================================
   萬能科技大學 企業管理研究所 碩士在職專班 (EMBA)
   Starbucks Creative Expression 靈感美學規範
   配色基調：
   - 品牌主色：常春藤名校深綠 (Starbucks Siren Forest Green #006241 / #1E3932)
   - 畫布基底：暖光純淨白 (Warm Linen Canvas #FAF9F6 / Crisp White #FFFFFF)
   - 焦點點綴：溫暖典雅金 (Warm Amber Gold #CBA258 / #D4AF37)
   - 文字層級：濃縮曜黑 (Espresso Slate #1E293B) / 雅炭灰 (Charcoal #475569)
==================================================== */

:root {
    --color-siren-primary: #006241;
    --color-siren-dark: #1E3932;
    --color-siren-deep: #11231D;
    --color-siren-light: #00754A;
    --color-siren-soft: #E8F5E9;
    --color-gold-warm: #CBA258;
    --color-gold-bright: #D4AF37;
    --color-gold-soft: #F9F5EB;
    --color-bg-canvas: #FAF9F6;
    --color-bg-white: #FFFFFF;
    --color-text-main: #1E293B;
    --color-text-muted: #64748B;
    --font-heading: 'Noto Serif TC', Georgia, serif;
    --font-body: 'Noto Sans TC', system-ui, -apple-system, sans-serif;
}

/* Global Canvas Background & Mobile Overflow Fix */
html {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    -webkit-text-size-adjust: 100% !important;
}

body {
    background-color: var(--color-bg-canvas);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-font-smoothing: antialiased;
}

/* Prevent any horizontal layout overflow on mobile / iPhone */
#homepage-sections-container,
#main-header,
#top-announcement-bar,
section,
footer {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Fix AOS animations translating horizontally outside viewport on mobile (iPhone fix) */
@media (max-width: 768px) {
    [data-aos="fade-left"],
    [data-aos="fade-right"],
    [data-aos="zoom-in-left"],
    [data-aos="zoom-in-right"] {
        transform: none !important;
    }

    /* Prevent iOS Safari 16px font-size auto-zoom on input focus */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Prevent any rogue elements from exceeding screen width */
    header, nav, section, footer, main, .max-w-7xl, .container {
        max-width: 100vw !important;
        overflow-x: hidden;
    }
}

/* Typography Enhancements */
.font-serif-title {
    font-family: var(--font-heading);
}

/* Brand Gold Gradient Text */
.text-gradient-gold {
    background: linear-gradient(135deg, #B8860B 0%, #D4AF37 50%, #CBA258 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Brand Siren Green Gradient Text */
.text-gradient-siren {
    background: linear-gradient(135deg, #1E3932 0%, #006241 60%, #00754A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* White Clean Cards with Soft Elevation */
.starbucks-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 1.25rem;
    box-shadow: 0 4px 20px -2px rgba(30, 41, 59, 0.05), 0 2px 6px -1px rgba(30, 41, 59, 0.03);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.starbucks-card:hover {
    border-color: #CBA258;
    box-shadow: 0 20px 35px -8px rgba(0, 98, 65, 0.12), 0 8px 16px -4px rgba(30, 41, 59, 0.06);
    transform: translateY(-3px);
}

/* Deep Siren Green Feature Cards */
.starbucks-card-dark {
    background: linear-gradient(145deg, #1E3932 0%, #11231D 100%);
    color: #FFFFFF;
    border: 1.5px solid rgba(203, 162, 88, 0.4);
    border-radius: 1.25rem;
    box-shadow: 0 15px 30px -5px rgba(17, 35, 29, 0.45);
    transition: all 0.35s ease;
}

.starbucks-card-dark:hover {
    border-color: #D4AF37;
    box-shadow: 0 20px 40px -5px rgba(17, 35, 29, 0.6), 0 0 20px rgba(203, 162, 88, 0.25);
}

/* Primary Action Button (Starbucks Siren Green) */
.btn-siren {
    background: #006241;
    color: #FFFFFF;
    font-weight: 700;
    border-radius: 9999px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 98, 65, 0.3);
}

.btn-siren:hover {
    background: #00754A;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 98, 65, 0.4);
    color: #FFFFFF;
}

/* Gold Accent Button */
.btn-gold {
    background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 50%, #D97706 100%);
    color: #1E293B;
    font-weight: 800;
    border-radius: 9999px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #FEF3C7 0%, #FBBF24 50%, #D97706 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.45);
}

/* Secondary Outline Button */
.btn-outline-siren {
    background: transparent;
    border: 1.5px solid #006241;
    color: #006241;
    font-weight: 700;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.btn-outline-siren:hover {
    background: #006241;
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Two-Tier Centered Header */
.two-tier-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid #E2E8F0;
    transition: all 0.3s ease;
}

/* Dynamic Scroll Shrink (Request 3) */
.header-row-1 {
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#nav-logo-custom-img {
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-scrolled .header-row-1 {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
}

.header-scrolled #nav-logo-custom-img {
    height: 2.25rem !important; /* 36px on mobile */
}

@media (min-width: 640px) {
    .header-scrolled #nav-logo-custom-img {
        height: 2.85rem !important; /* 46px on desktop */
    }
}

.nav-link-item {
    position: relative;
    padding: 0.4rem 0.95rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: #334155;
    transition: all 0.25s ease;
}

.nav-link-item:hover {
    color: #006241;
}

.nav-link-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2.5px;
    background: #006241;
    border-radius: 999px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-item:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Active Track Tab Button */
.track-tab-active {
    background: #1E3932 !important;
    color: #FFFFFF !important;
    border-color: #1E3932 !important;
    box-shadow: 0 4px 15px rgba(30, 57, 50, 0.35);
}

/* Section Backgrounds */
.bg-canvas-subtle {
    background-color: #F4F2EB;
}

.bg-canvas-white {
    background-color: #FFFFFF;
}

.bg-siren-hero {
    background: linear-gradient(160deg, #11231D 0%, #1E3932 60%, #004F32 100%);
}

/* Modal Overlay */
.modal-overlay {
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF9F6;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #006241;
}

/* ========================================================
   17. TYPOGRAPHY & READABILITY ENHANCEMENT (字體清晰度放大且不破壞RWD)
   ======================================================== */

@media (min-width: 640px) {
    html {
        font-size: 16.5px !important;
    }
}

/* Enhancing small and base text for Chinese readability */
.text-xs {
    font-size: 0.82rem !important; /* ~13.5px */
    line-height: 1.5 !important;
}

.text-sm {
    font-size: 0.93rem !important; /* ~15px */
    line-height: 1.6 !important;
}

.text-base {
    font-size: 1.05rem !important; /* ~17.2px */
    line-height: 1.65 !important;
}

p {
    letter-spacing: 0.015em;
}

.starbucks-card p {
    font-size: 0.95rem;
    line-height: 1.65;
}

span.text-xs, a.text-xs, button.text-xs {
    line-height: 1.35 !important;
}

/* Form inputs on mobile: prevent iOS Safari auto-zoom while maintaining crisp layout */
@media (max-width: 639px) {
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }
}
