/* 
 * KICDA Association Design System v2.0
 * Theme: Professional, Authoritative, Trustworthy
 * Base: Light Mode / Deep Navy & Gold
 */

:root {
    /* Brand Colors */
    --kicda-navy: #0f172a;
    /* Deep Navy: Authority, Trust */
    --kicda-navy-light: #1e293b;
    --kicda-gold: #b4975a;
    /* Muted Gold: Premium, Evaluation */
    --kicda-gold-light: #d4b87c;
    --kicda-blue: #2563eb;
    /* Action Blue: Primary Buttons */

    /* Neutral Colors */
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    /* Slight cool gray for section bg */
    --bg-gray: #f1f5f9;

    /* Text Colors */
    --text-primary: #0f172a;
    /* Nearly Black for headings */
    --text-body: #334155;
    /* Dark Gray for readability */
    --text-muted: #64748b;
    /* Light Gray for metadata */
    --text-white: #ffffff;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-white);
    color: var(--text-body);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-family: 'Noto Serif KR', serif;
    /* Serif for Authority */
    font-weight: 700;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   Header & Navigation
   ========================================= */
header {
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid #e2e8f0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--kicda-navy);
    font-family: 'Noto Sans KR', sans-serif;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--kicda-navy);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.header-cta {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 24px;
    border-radius: 4px;
    /* Slightly squared for professional look */
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--kicda-navy);
    color: white;
}

.btn-primary:hover {
    background-color: var(--kicda-navy-light);
    transform: translateY(-1px);
}

.btn-outline {
    border: 1px solid #cbd5e1;
    color: var(--text-body);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--kicda-navy);
    color: var(--kicda-navy);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    margin-top: var(--header-height);
    padding: 100px 0 120px;
    background: linear-gradient(to right, #f8fafc 50%, #fff 50%);
    /* Split bg design */
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
    color: var(--kicda-navy);
    letter-spacing: -0.02em;
}

.hero-text .highlight {
    color: var(--kicda-blue);
    /* Or Gold depending on preference */
    position: relative;
}

/* Underline effect for highlight */
.hero-text .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(180, 151, 90, 0.2);
    /* Gold alpha */
    z-index: -1;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-body);
    margin-bottom: 40px;
    max-width: 540px;
}

.hero-image {
    position: relative;
}

.hero-img-box {
    width: 100%;
    height: 500px;
    background-color: #e2e8f0;
    border-radius: 20px 0 20px 0;
    /* Distinctive shape */
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background-image: url('https://images.unsplash.com/photo-1524178232363-1fb2b075b655?auto=format&fit=crop&w=1000&q=80');
    background-size: cover;
    background-position: center;
}

/* Floating Stats in Hero */
.hero-stat-card {
    position: absolute;
    bottom: -30px;
    left: -30px;
    background: white;
    padding: 25px 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border-left: 5px solid var(--kicda-gold);
}

.hero-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--kicda-navy);
}

.hero-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   Trust & Authority Section
   ========================================= */
.trust-bar {
    background-color: var(--kicda-navy);
    padding: 60px 0;
    color: white;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
}

.trust-item h3 {
    color: white;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.trust-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.trust-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--kicda-gold);
}

/* =========================================
   Section Common
   ========================================= */
.section {
    padding: 100px 0;
}

.bg-gray {
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    color: var(--kicda-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--kicda-navy);
    margin-bottom: 20px;
}

/* =========================================
   Grid Cards (Courses / News)
   ========================================= */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--kicda-gold-light);
}

.card-img-top {
    height: 200px;
    background-color: #cbd5e1;
    background-size: cover;
    background-position: center;
}

.card-body {
    padding: 30px;
}

.card-tag {
    background-color: var(--bg-gray);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: inline-block;
}

.card-title {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.card-footer {
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.link-arrow {
    color: var(--kicda-navy);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.link-arrow:hover {
    color: var(--kicda-blue);
}

/* =========================================
   Footer
   ========================================= */
footer {
    background-color: #0f172a;
    /* Darkest Navy */
    color: #94a3b8;
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand h2 {
    color: white;
    margin-bottom: 20px;
}

.footer-nav h4 {
    color: white;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-nav ul li {
    margin-bottom: 12px;
}

.footer-nav a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}

/* =========================================
   Advisory Group (Standardized "Assistant" Layout)
   ========================================= */

/* Main Container Shift - Clean Flexbox Approach */
.org-tree {
    display: table;
    /* Standard tree centering */
    margin: 0 auto;
    padding-left: 0;
    /* Reset hacks */
    box-sizing: border-box;
}

/* Ensure the main page container is flexible */
main {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* 
   Logic: The '.has-assistant' LI is the vertical axis. 
   We position the Advisor Group to the LEFT of this axis.
*/
/* =========================================
   Advisory Group - Cleaned Positioning
   ========================================= */

/* Ensure the wrapper has space to hold the absolute element */
.has-assistant {
    position: relative;
    /* Does not need explicit width, just context */
}

/* 
   Positioning: 
   - Right: 50% (Align right edge to vertical center)
   - Margin-Right: 80px (Tight Gap for Compact Layout)
   - Top: -40px (Vertical alignment)
*/
.advisory-group {
    position: absolute;
    top: -119px;
    left: 50%;
    margin-left: 170px;
    width: 480px;
    text-align: center;
    padding: 0;
    z-index: 10;
}

/* KILL ALL CONNECTORS from this group to the trunk */
.advisory-group::after,
.advisory-group::before,
.has-assistant::after {
    display: none !important;
    content: none !important;
    border: none !important;
    width: 0 !important;
}

/* 
   CRITICAL FIX: Identify and Kill the "Ghost Horizontal Line" 
   The 'has-assistant' LI tries to draw a standard tree connector (top-left).
   We must remove the border but KEEP the element if it's used for vertical spacing?
   Actually, standard tree uses these for horizontal bars. We don't want a bar here.
*/
.org-tree li.has-assistant::before {
    border-top: none !important;
}

/* Ensure global container has room */
.org-tree {
    display: table;
    margin: 0 auto;
    margin-left: -130px;
    padding-left: 0;
    min-width: auto;
}

main {
    display: block !important;
    /* Vital: Ensure header is above content */
    overflow-x: auto;
    padding-bottom: 50px;
}

/* Ensure the Advisors don't get cut off on small screens */
@media (max-width: 1200px) {
    .org-tree {
        margin-left: 0;
        /* Force scroll */
    }
}

/* =========================================
   Advisor Tree (Internal Structure)
   ========================================= */

.advisor-tree {
    display: flex;
    justify-content: center;
}

.advisor-tree ul {
    display: flex;
    justify-content: center;
    /* Centered children */
    padding-top: 20px;
    position: relative;
    width: 100%;
}

.advisor-tree li {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 20px 5px 0 5px;
}

@media (max-width: 1400px) {
    .org-node.sub-advisor {
        min-width: 100px;
        /* Allow shrinking on tight screens */
        padding: 20px 10px;
        font-size: 0.9rem;
    }
}

/* Vertical line from Chief DOWN to sub-tree */
.advisor-tree li>ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 20px;
    background: #cbd5e1;
    margin-left: -1px;
    display: block !important;
}

/* Horizontal connectors for children */
.advisor-tree ul li::before {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid #cbd5e1;
    width: 50%;
    height: 20px;
}

.advisor-tree ul li::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-top: 2px solid #cbd5e1;
    border-left: 2px solid #cbd5e1;
    width: 50%;
    height: 20px;
    margin-left: -1px;
}

.advisor-tree ul li:first-child::before {
    display: none;
}

.advisor-tree ul li:last-child::after {
    border-top: 0;
}

/* CRITICAL FIX: Kill ALL lines on Root Advisor Node */
.advisor-tree::before,
.advisor-tree::after,
.advisor-tree>li::before,
.advisor-tree>li::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Box Styling */
.advisor-chief {
    margin-bottom: 0;
    position: relative;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    min-width: 150px;
    z-index: 2;
}

.advisor-chief::before,
.advisor-chief::after {
    display: none !important;
}

/* =========================================
   End of Advisor Tree Styles
   ========================================= */

/* Continue with standard items */
.advisor-chief .role {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}



/* 
   Horizontal connectors for children
   Standard tree logic
*/
.advisor-tree ul li::before {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid #cbd5e1;
    width: 50%;
    height: 20px;
}

.advisor-tree ul li::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-top: 2px solid #cbd5e1;
    border-left: 2px solid #cbd5e1;
    width: 50%;
    height: 20px;
}

.advisor-tree ul li:first-child::before {
    display: none;
}

.advisor-tree ul li:last-child::after {
    border-top: 0;
}

/* 
   CRITICAL FIX: Remove Stray Lines on Root Advisor 
   Targeting both the UL and the LI just in case.
*/
.advisor-tree::before,
.advisor-tree::after,
.advisor-tree>li::before,
.advisor-tree>li::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
}

/* Remove old leftover rules if any */
.advisor-tree ul::before {
    /* If this selector was targeting the root UL, kill it unless specific */
    display: none;
}

/* Re-enable ONLY for the nested UL (children) */
.advisor-tree li ul::before {
    display: block !important;
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 20px;
    background: #cbd5e1;
    margin-left: -1px;
}

/* Box Styling */
.advisor-chief {
    margin-bottom: 0;
    position: relative;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    min-width: 150px;
    z-index: 2;
}

.advisor-chief::before,
.advisor-chief::after {
    display: none !important;
}

/* First/Last child cleanup */
.advisor-tree ul li:first-child::before {
    display: none;
}

.advisor-tree ul li:last-child::after {
    border-top: 0;
}

/* Root Node (Chief) Cleanup - NUCLEAR OPTION for stray lines */
/* The root LI of the advisor tree should display NO lines using tree logic */
.advisor-tree>li::before,
.advisor-tree>li::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Advisor Chief Box Styling */
.advisor-chief {
    margin-bottom: 0;
    position: relative;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    min-width: 150px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.advisor-chief::before,
.advisor-chief::after {
    display: none !important;
    content: none !important;
}

.advisor-chief .role {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.advisor-chief::after {
    display: none;
}

/* Remove old manual line */

/* Sub-advisor Node Style */
.org-node.sub-advisor {
    padding: 8px 10px;
    font-size: 0.85rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #475569;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

.org-node.sub-advisor:hover {
    border-color: var(--kicda-gold);
    color: var(--kicda-navy);
    transform: translateY(-2px);
}

/* 1. Chairman -> CEO Vertical Connector */
.org-tree li.has-assistant::before {
    display: block !important;
    content: '';
    position: absolute;
    top: -25px;
    left: 50%;
    width: 2px !important;
    margin-left: -1px;
    height: 42px !important;
    background: #cbd5e1;
    border: none !important;
    transform: none !important;
    z-index: 1;
}

/* 2. Vertical Stack (Single Children) Connector Reset */
.org-tree li:only-child::before {
    display: block !important;
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    height: 27px;
    background: #cbd5e1;
    border: none !important;
    transform: none !important;
}

.org-tree li:only-child::after {
    display: none !important;
}

/* 3. UL Vertical Spine */
.org-tree ul ul::before {
    content: '';
    display: block !important;
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px !important;
    margin-left: -1px;
    height: 27px !important;
    background: #cbd5e1;
    border: none !important;
    transform: none !important;
}


/* =========================================
   Features Section (Why KICDA)
   Added from Old Version
   ========================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--kicda-gold-light);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--kicda-navy);
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--kicda-navy);
    font-family: 'Noto Sans KR', sans-serif;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* =========================================
   Reviews Section
   Added from Old Version
   ========================================= */
.reviews-section {
    background-color: var(--bg-light);
    /* Slightly gray bg */
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.review-quote {
    color: var(--kicda-gold-light);
    font-size: 3rem;
    line-height: 1;
    font-family: serif;
    margin-bottom: -20px;
}

.review-stars {
    color: #fbbf24;
    /* Amber 400 */
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.review-text {
    flex-grow: 1;
    margin-bottom: 20px;
    font-style: italic;
    color: var(--text-body);
}

.review-author {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.review-avatar {
    width: 40px;
    height: 40px;
    background: var(--kicda-navy);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.review-info .review-name {
    font-weight: 700;
    color: var(--text-primary);
}

.review-info .review-course {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* =========================================
   CTA Section
   Added from Old Version
   ========================================= */
.cta-section {
    background: linear-gradient(135deg, var(--kicda-navy) 0%, #1e293b 100%);
    padding: 80px 0;
    text-align: center;
    color: white;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    font-family: 'Noto Serif KR', serif;
}

.cta-desc {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-cta-primary {
    background: var(--kicda-gold);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.btn-cta-primary:hover {
    transform: translateY(-2px);
    background: #c5a86b;
    /* Lighter gold */
}

.btn-cta-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.btn-cta-secondary:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* =========================================
   Modals
   ========================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    display: none;
    /* JS will toggle flex */
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    padding: 30px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--kicda-navy);
}

.close {
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
}

.benefits-list {
    margin: 20px 0;
}

.benefits-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.btn-benefits-primary {
    width: 100%;
    background: var(--kicda-blue);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
}

/* =========================================
   Mobile Responsive Styles (Pulse Update)
   ========================================= */

/* Mobile Menu Overlay Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 2000;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    height: 60px;
}

.mobile-menu-header .logo-text {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--kicda-navy);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
}

.mobile-nav-list {
    list-style: none;
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.mobile-nav-list li {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #f8fafc;
    padding-bottom: 10px;
}

.mobile-nav-list a {
    display: block;
    width: 100%;
    color: var(--text-primary);
    text-decoration: none;
}

/* Mobile Submenu Styles */
.mobile-nav-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f8fafc;
    margin-bottom: 0;
    padding-bottom: 0;
}

.mobile-nav-link-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 0;
}

.mobile-nav-link-wrapper a {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--kicda-navy);
}

.submenu-toggle {
    background: none;
    border: none;
    padding: 10px;
    font-size: 1rem;
    color: #64748b;
    cursor: pointer;
    transition: transform 0.3s;
}

.submenu-toggle.active {
    transform: rotate(180deg);
    color: var(--kicda-blue);
}

.mobile-submenu {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    background: #f8fafc;
    border-radius: 8px;
}

.mobile-submenu.open {
    max-height: 1000px;
    /* Arbitrary large number */
    margin-bottom: 15px;
}

.mobile-submenu li {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0;
    padding: 0;
}

.mobile-submenu li:last-child {
    border-bottom: none;
}

.mobile-submenu a {
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #475569;
}

.mobile-submenu a:hover {
    color: var(--kicda-blue);
    background: #eff6ff;
}

/* 3rd Level Submenu */
.mobile-submenu-category {
    padding: 0;
}

.mobile-submenu-category>.category-title {
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: #f1f5f9;
}

.mobile-submenu-level-3 {
    max-height: 0;
    overflow: hidden;
    background: #e2e8f0;
    transition: max-height 0.3s ease-in-out;
}

.mobile-submenu-level-3.open {
    max-height: 500px;
}

.mobile-submenu-level-3 a {
    padding-left: 35px;
    font-size: 0.9rem;
}

.mobile-menu-footer {
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Mobile Specific & Logo Logic */
@media (max-width: 768px) {
    body.modal-open {
        overflow: hidden;
    }

    /* Hide Desktop Elements */
    .desktop-nav,
    .desktop-cta,
    .logo-desktop {
        display: none !important;
    }

    /* Show Mobile Elements */
    .mobile-menu-btn {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--kicda-navy);
        cursor: pointer;
        padding: 5px;
    }

    .logo-mobile {
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    .logo-mobile img {
        height: 32px !important;
    }

    .logo-mobile span {
        font-size: 1.2rem;
        font-weight: 900;
    }

    /* Layout Fixes */
    header {
        height: 60px;
    }

    .header-inner {
        justify-content: space-between;
        padding: 0 15px;
    }

    .hero {
        margin-top: 60px;
        padding: 40px 0;
    }

    .hero .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-img-box {
        height: 280px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Bento Grid Adjustment */
    .hero-media-grid .media-grid-secondary {
        grid-template-columns: 1fr !important;
    }

    /* Ensure cards stack */
    .features-grid-9 {
        grid-template-columns: 1fr !important;
    }
}

/* Desktop Specific Logic */
@media (min-width: 769px) {

    .mobile-menu-btn,
    .mobile-menu-overlay,
    .logo-mobile {
        display: none !important;
    }

    .logo-desktop {
        display: block;
        height: 50px;
        /* Reduced from 60px */
        width: auto;
    }
}

/* =========================================
   Global Mobile Optimizations (Added Patch)
   ========================================= */
@media (max-width: 768px) {

    /* Container Padding Adjustment */
    .container {
        padding: 0 20px;
        width: 100%;
        overflow-x: hidden;
        /* Prevent horizontal scroll */
    }

    /* Trust Grid - stack on mobile */
    .trust-grid {
        grid-template-columns: 1fr 1fr;
        /* 2x2 grid */
        gap: 20px;
    }

    /* Hero Text */
    .hero-text h1 {
        font-size: 2.2rem;
        /* Reduce extreme size */
    }

    /* Stats & Values Grids (Common pattern) */
    .stats-grid,
    .values-grid,
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .stats-grid {
        margin: 30px 0;
    }

    /* Sub-layout (Sidebar pages) */
    .sub-layout {
        grid-template-columns: 1fr !important;
        display: flex;
        flex-direction: column;
        padding-top: 40px;
    }

    /* Sidebar - move to top or bottom? usually top nav style or bottom */
    /* For now, let's keep it simple stack */
    .sidebar {
        order: 2;
        /* Content first? or Sidebar first? Standard is Content first on mobile for SEO, but nav is needed. */
        /* Let's keep distinct separation */
        border-top: 4px solid #f1f5f9;
        margin-top: 40px;
        padding-top: 40px;
    }

    .lnb-menu {
        border: 1px solid #e2e8f0;
    }

    /* Section Headers */
    .section-title {
        font-size: 1.8rem;
    }

    /* Card Images */
    .card-img-top {
        height: 180px;
    }

    /* Advisor Tree Mobile Scroll */
    .org-tree {
        transform: scale(0.7);
        transform-origin: top left;
        width: 150%;
        /* Compensation for scale */
        margin-left: 0;
    }

    .advisor-chief {
        min-width: 120px;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .trust-grid {
        grid-template-columns: 1fr;
        /* Stack on very small screens */
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }
}