/* KSMS Renewal Premium Custom CSS */
/* Inspired by Paynnet & Simicos High-End Aesthetics */

/* Fonts */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* Variables */
:root {
    --primary-color: #00397f; /* KSMS Deep Blue */
    --primary-dark: #00285a;
    --accent-color: #00d2ff; /* Cyan accent for premium feel */
    --text-color: #1d1d1f;
    --text-muted: #86868b;
    --bg-color: #f5f7fa;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Base Styles */
body {
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 10% 20%, rgba(0, 57, 127, 0.03) 0%, transparent 20%),
                      radial-gradient(circle at 90% 80%, rgba(0, 210, 255, 0.03) 0%, transparent 20%);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Layout Container */
.ksms-container {
    display: flex;
    gap: 50px;
    padding-top: 0 !important; /* Aggressive reduction (Reduced from 10px) */
    padding-bottom: 120px;
    max-width: 1320px;
    margin: 0 auto;
    padding-left: 20px; /* Safe area */
    padding-right: 20px;
}

/* Sidebar (Left) - Forced Upward Alignment */
.ksms-sidebar {
    width: 280px;
    flex-shrink: 0;
    margin-top: -20px; /* Negative margin to pull it up into the header space/gap */
    z-index: 10; /* Ensure it stays above if needed */
}

.ksms-logo {
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    /* Removed separator ::after */
}

/* Sidebar Configurable Banners */
.ksms-sidebar-banners {
    margin-top: 15px; /* Added top margin to distance from login box */
    margin-bottom: 0px; /* Reduced bottom margin to pull closer to LNB */
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ksms-sidebar-banner {
    display: block;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 57, 127, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: #ffffff;
    position: relative;
}
.ksms-sidebar-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
    pointer-events: none;
    border-radius: 8px;
}
.ksms-sidebar-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 57, 127, 0.15);
}
.ksms-sidebar-banner img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Prevents stretching and maintains aspect ratio */
    display: block;
    padding: 10px; /* Slight padding so the logo doesn't touch the edges */
    box-sizing: border-box;
    transition: transform 0.5s ease;
}
.ksms-sidebar-banner:hover img {
    transform: scale(1.02);
}

/* Empty State / Main Page Sidebar Animation (Tech Abstract) */
.sidebar-tech-anim {
    position: relative;
    width: 100%;
    box-sizing: border-box; /* Fix overflow */
    margin-top: 15px; /* Consistent spacing */
    height: 140px; /* Increased height for visibility */
    overflow: hidden;
    background: #ffffff; /* Pure white for contrast */
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); /* Match LNB shadow */
}

.tech-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(15px); /* Reduced blur */
    opacity: 0.9; /* Increased opacity */
    z-index: 1;
}

.tech-shape.red {
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, #ffcdd2 0%, #ef9a9a 100%); /* Stronger Gradient */
    top: -20px;
    right: -20px;
    animation: techFloat1 12s infinite linear; /* Slower, linear for continuous feel */
}

.tech-shape.blue {
    width: 110px;
    height: 110px;
    background: radial-gradient(circle, #b3e5fc 0%, #81d4fa 100%); /* Stronger Gradient */
    bottom: -30px;
    left: -20px;
    animation: techFloat2 15s infinite linear;
}

.tech-label {
    position: relative;
    z-index: 0; /* Behind blobs */
    font-size: 32px;
    font-weight: 900;
    color: rgba(0,0,0,0.06); /* Faint Engraving */
    text-shadow: 1px 1px 0 #fff, -1px -1px 0 rgba(0,0,0,0.02); /* Subtle pressed effect */
    text-transform: uppercase;
    letter-spacing: 4px; /* Wide spacing */
    text-align: center;
    background: none; /* No background */
    backdrop-filter: none;
    font-family: 'Montserrat', sans-serif;
    pointer-events: none;
    user-select: none;
    /* Infused Color Animation */
    animation: engravedGlow 18s infinite ease-in-out;
}

.tech-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(#eee 1px, transparent 1px),
                      linear-gradient(90deg, #eee 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5; /* More visible grid for paper feel */
    z-index: 0;
}

@keyframes techFloat1 {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    25% { transform: translate(40px, 20px) rotate(90deg) scale(1.1); }
    50% { transform: translate(10px, 60px) rotate(180deg) scale(0.9); }
    75% { transform: translate(-30px, 20px) rotate(270deg) scale(1.05); }
    100% { transform: translate(0, 0) rotate(360deg) scale(1); }
}

@keyframes techFloat2 {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(-40px, -30px) rotate(-120deg) scale(0.85); }
    66% { transform: translate(30px, -50px) rotate(-240deg) scale(1.15); }
    100% { transform: translate(0, 0) rotate(-360deg) scale(1); }
}

@keyframes engravedGlow {
    0% { color: rgba(0,0,0,0.06); } /* Gray */
    15% { color: rgba(255, 138, 101, 0.4); } /* Soft Pastel Red */
    30% { color: rgba(0,0,0,0.06); } /* Gray */
    50% { color: rgba(79, 195, 247, 0.4); } /* Soft Pastel Blue */
    70% { color: rgba(0,0,0,0.08); } /* Slightly Darker Gray */
    85% { color: rgba(255, 205, 210, 0.5); } /* Another Red */
    100% { color: rgba(0,0,0,0.06); }
}

.ksms-logo::after {
    display: none;
}

.ksms-logo img {
    max-width: 220px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.ksms-logo img:hover {
    transform: scale(1.05);
}

/* Premium Login Widget (Glassmorphism Card) */
.login-widget-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 1);
    padding: 25px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 57, 127, 0.08); /* Subtle blue tint shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* Contain children */
}

.login-widget-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 57, 127, 0.15);
}

.login-widget-wrapper h3 {
    font-size: 15px;
    font-weight: 900;
    color: #1d1d1f;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Replaced Blue Dot with Artistic Underline logic below */
    position: relative;
    padding-bottom: 15px;
}

/* Artistic "V" Shape Separator */
.login-widget-wrapper h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 4px;
    background: linear-gradient(90deg, #00397f, #00d2ff);
    clip-path: polygon(0 0, 100% 0, 50% 100%); /* Triangle/V shape */
    border-radius: 0; /* Sharp for V */
}

.login-widget-wrapper h3::before {
    display: none; /* Kill Blue Dot */
}

.ksms-login-form .login-inputs input {
    width: 100%;
    box-sizing: border-box; /* FIX OVERFLOW */
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid #e1e1e1; 
    background-color: #f9f9fc;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.ksms-login-form .login-inputs input:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 57, 127, 0.1);
}

/* Premium Button (Paynnet Style Liquid) */
.btn-login {
    width: 100%;
    position: relative;
    padding: 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 57, 127, 0.4);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%) rotate(45deg) translateY(100%);
    transition: transform 0.6s ease;
}

.btn-login:hover::before {
    transform: translate(-50%, -50%) rotate(45deg) translateY(0);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 57, 127, 0.5);
}

.login-links {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
}

.login-links a {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.login-links a:hover {
    color: var(--primary-color);
}

.user-info {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.user-info strong {
    font-size: 18px;
    color: var(--primary-color);
}

/* Main Content (Right) */
.ksms-content-area {
    flex-grow: 1;
    min-width: 0;
}

/* --- Minimalist Luxury Slider Controls --- */

/* 1. Reset Default Swiper Ugly Styles - STRICT FIX */
div.swiper-button-next, 
div.swiper-button-prev {
    background: none !important;
    width: auto !important;
    height: auto !important;
    margin-top: 0 !important;
    color: transparent !important; /* Hide default blue text */
    font-size: 0 !important; /* Hide default icon size */
}

div.swiper-button-next::after, 
div.swiper-button-prev::after { 
    content: '' !important; 
    display: none !important; 
    font-size: 0 !important;
}

/* 2. Artistic Navigation: "Constellation Chevrons" */
/* Replaces old buttons with 'Star-Tipped Fading Brackets' */

/* Clear old unused class */
/* .ksms-nav { display: none !important; } REMOVED */

/* Target the ACTUAL class used in main.html */
.magnetic-arrow {
    width: 80px; 
    height: 80px;
    
    /* STRICT RESET of old styles */
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    
    display: flex !important;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    cursor: pointer;
    
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hide the old icon font */
.magnetic-arrow i { display: none !important; }

/* THE CHEVRON (Wings of Light) */
.magnetic-arrow::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    
    /* Thin, elegant lines */
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    
    /* Glow */
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.8));
    transition: all 0.3s ease;
}

/* THE STAR (Sirius Tip) */
.magnetic-arrow::after {
    content: '' !important; /* Force override Swiper */
    position: absolute;
    width: 14px;
    height: 14px;
    z-index: 51;
    
    /* "Diffraction Spike" Star Gradient */
    background: 
        radial-gradient(circle at center, #ffffff 0%, #ffffff 1px, transparent 1.5px),
        linear-gradient(to right, transparent 20%, rgba(255,255,255,0.9) 50%, transparent 80%) no-repeat center/100% 1px,
        linear-gradient(to bottom, transparent 20%, rgba(255,255,255,0.9) 50%, transparent 80%) no-repeat center/1px 100%,
        radial-gradient(circle at center, rgba(255,255,255,0.4) 0%, transparent 60%);
    
    filter: drop-shadow(0 0 2px rgba(255, 230, 200, 0.6));
    animation: navStarTwinkle 4s infinite linear;
}

/* --- Left Arrow (<) Configuration --- */
.swiper-button-prev.magnetic-arrow { left: -15px; } 

.swiper-button-prev.magnetic-arrow::before {
    /* Rotate to point Left */
    transform: rotate(-45deg);
    /* Fade out the tails */
    -webkit-mask-image: linear-gradient(135deg, black 40%, transparent 100%);
    mask-image: linear-gradient(135deg, black 40%, transparent 100%);
    left: 28px;
    
    /* Animation: Micro-Float Left */
    animation: chevronFloatLeft 3s infinite ease-in-out;
}

.swiper-button-prev.magnetic-arrow::after {
    left: 22px; 
    top: 50%;
    transform: translateY(-50%);
    /* Syncs with chevron */
    animation: navStarTwinkle 4s infinite linear, starFloatLeft 3s infinite ease-in-out;
}

/* --- Right Arrow (>) Configuration --- */
.swiper-button-next.magnetic-arrow { right: -15px; }

.swiper-button-next.magnetic-arrow::before {
    /* Rotate to point Right */
    transform: rotate(135deg);
    /* Fade out the tails */
    -webkit-mask-image: linear-gradient(135deg, black 40%, transparent 100%);
    mask-image: linear-gradient(135deg, black 40%, transparent 100%);
    right: 28px;
    
    /* Animation: Micro-Float Right */
    animation: chevronFloatRight 3s infinite ease-in-out;
}

.swiper-button-next.magnetic-arrow::after {
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    animation: navStarTwinkle 4s infinite linear, starFloatRight 3s infinite ease-in-out;
}

/* Animations for "Fine Movement" & Contrast */
@keyframes chevronFloatLeft {
    0%, 100% { transform: rotate(-45deg) translateX(0); filter: drop-shadow(0 0 2px rgba(255,255,255,0.8)) drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
    50%      { transform: rotate(-45deg) translateX(-3px); filter: drop-shadow(0 0 4px rgba(255,255,255,1)) drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
}

@keyframes chevronFloatRight {
    0%, 100% { transform: rotate(135deg) translateX(0); filter: drop-shadow(0 0 2px rgba(255,255,255,0.8)) drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
    50%      { transform: rotate(135deg) translateX(-3px); /* In 135deg space, -X is outward-ish? Need to test or use simple translate */ filter: drop-shadow(0 0 4px rgba(255,255,255,1)) drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
}
/* Note: translateX in rotated space is confusing. Let's use simple values. 
   Rotate 135deg: X axis points South-East. -X points North-West. 
   We want it to move RIGHT. 
   Correction: It's better to animate the CONTAINER for movement and Pseudo for style? 
   No, user wants "Fine movement". 
   Let's try Keyframe with explicit pixel offsets that visually work.
*/

@keyframes starFloatLeft {
    0%, 100% { margin-left: 0; }
    50%      { margin-left: -3px; }
}

@keyframes starFloatRight {
    0%, 100% { margin-right: 0; }
    50%      { margin-right: -3px; }
}

.swiper-button-next.magnetic-arrow::after {
    /* Star at the tip */
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
}

/* HOVER INTERACTIONS */
.magnetic-arrow:hover {
    opacity: 1;
}

/* Push Effect */
.swiper-button-prev.magnetic-arrow:hover { transform: translate(-5px, -50%); }
.swiper-button-next.magnetic-arrow:hover { transform: translate(5px, -50%); }

.magnetic-arrow:hover::before {
    border-color: #fff;
    filter: drop-shadow(0 0 4px #fff); /* Brighter lines */
    width: 35px; height: 35px; /* Expand tails */
}

.magnetic-arrow:hover::after {
    transform: translateY(-50%) scale(1.3); /* Flare star */
}

@keyframes navStarTwinkle {
    0%, 100% { opacity: 0.8; transform: translateY(-50%) scale(1); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.1); }
}


/* 3. Artistic Footer (Modern Art Gradient Timeline) */
.artistic-slider-footer {
    position: absolute;
    bottom: 0; /* Anchor to very bottom */
    left: 0;
    width: 100%;
    height: 120px; /* Tall fade zone */
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Align content to bottom */
    padding-bottom: 25px; /* Lift line slightly up from the edge */
    pointer-events: none;
    
    /* "Night Sky Zone" - Critical Level */
    /* A deep, cinematic fade representing the night sky to ensure visibility */
    background: linear-gradient(to top, 
        rgba(5, 12, 30, 0.85) 0%, 
        rgba(5, 12, 30, 0) 100%
    );
}

.slide-counter { display: none; }

/* "The Shooting Star" - Minimalist Straight Line */
.progress-track {
    width: 500px; /* Long and elegant */
    height: 1px; /* The thinnest possible line */
    background: rgba(255,255,255,0.15); /* Slightly visible guide */
    position: relative;
    overflow: visible; /* Allow star to twinkle outside */
}

/* "The Comet Tail" - Fading Gradient */
.progress-fill {
    height: 100%;
    width: 0;
    
    /* Elegant Fade: Transparent -> Semi-White -> Pure White Tip */
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.4) 40%, 
        #ffffff 100%
    );
    
    /* Soft Glow for the trail */
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.1s linear;
}

/* "The True Star" - Realistic Optical Physics */
.progress-fill::after {
    content: '';
    position: absolute;
    right: -7px; /* Center the 14px canvas */
    top: 50%;
    transform: translateY(-50%);
    width: 14px; /* Reduced from 20px for subtler elegance */
    height: 14px;
    
    /* 
       Constructing a "Diffraction Spike" Star using gradients 
       This avoids the "Cartoon Shape" look entirely.
    */
    background: 
        /* 1. The Core: A tiny, intense 2px dot */
        radial-gradient(circle at center, #ffffff 0%, #ffffff 1px, transparent 1.5px),
        
        /* 2. Horizontal Diffraction Spike (Thin & Long) */
        linear-gradient(to right, transparent 20%, rgba(255,255,255,0.9) 50%, transparent 80%) no-repeat center/100% 1px,
        
        /* 3. Vertical Diffraction Spike (Thin & Tall) */
        linear-gradient(to bottom, transparent 20%, rgba(255,255,255,0.9) 50%, transparent 80%) no-repeat center/1px 100%,
        
        /* 4. Atmospheric Glow (Soft Halo) */
        radial-gradient(circle at center, rgba(255,255,255,0.4) 0%, transparent 60%);
        
    /* Subtle Gold Tint via Filter (Real stars have color temp) */
    filter: drop-shadow(0 0 2px rgba(255, 230, 200, 0.6));
    
    z-index: 10;
    
    /* "Atmospheric Scintillation" (Twinkling)
       Real stars don't rotate. They fluctuate in brightness and size unpredictably. */
    animation: realTwinkle 4s infinite linear;
}

@keyframes realTwinkle {
    0%   { opacity: 1;   transform: translateY(-50%) scale(1); }
    5%   { opacity: 0.8; transform: translateY(-50%) scale(0.9); }
    10%  { opacity: 1;   transform: translateY(-50%) scale(1.05); } /* Micro Burst */
    15%  { opacity: 0.9; transform: translateY(-50%) scale(0.95); }
    20%  { opacity: 1;   transform: translateY(-50%) scale(1); }
    50%  { opacity: 0.9; transform: translateY(-50%) scale(1); }
    55%  { opacity: 0.7; transform: translateY(-50%) scale(0.8); }
    60%  { opacity: 1;   transform: translateY(-50%) scale(1.1); } /* Small Burst */
    65%  { opacity: 0.9; transform: translateY(-50%) scale(0.95); }
    100% { opacity: 1;   transform: translateY(-50%) scale(1); }
}

/* Remove Ghost Lines */
.progress-track::after { content: none; }
/* Glassmorphism Navigation */
.ksms-nav {
    background: rgba(0, 57, 127, 0.95); /* Navy Blue Background */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px; /* Modern pill/rect hybrid */
    padding: 15px 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between; /* Spread items */
    align-items: center;
    position: relative;
    z-index: 1000 !important;
}

.ksms-nav ul {
    display: flex;
    gap: 10px; /* Close gap for pill effects */
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    justify-content: space-around; /* Distribute evenly */
}

.ksms-nav ul li a {
    display: block;
    padding: 12px 24px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff; /* White Text */
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ksms-nav ul li a:hover,
.ksms-nav ul li.active a {
    background: rgba(255, 255, 255, 0.15); /* White Overlay */
    color: #ffffff; /* Keep White */
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Active Indicator Dot */
.ksms-nav ul li.active a {
    position: relative;
    background: rgba(255, 255, 255, 0.2); /* Stronger Overlay */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Hover Bridge: Fix for dropdown disappearing when moving mouse */
.ksms-nav ul li::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 30px; /* Covers the 12px gap plus buffer */
    background: transparent;
}

/* Depth 2 Dropdown Styling */
.ksms-nav ul li {
    position: relative;
}

.ksms-nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%); /* Center dropdown */
    flex-direction: column;
    min-width: 180px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 57, 127, 0.12);
    padding: 8px;
    margin-top: 12px;
    z-index: 1000;
    gap: 4px;
}

/* Triangle Tip */
.ksms-nav ul li ul::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    margin-left: -6px;
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
}

.ksms-nav ul li:hover > ul {
    display: flex;
    animation: fadeUpMenu 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ksms-nav ul li ul li {
    width: 100%;
}

.ksms-nav ul li ul li a {
    font-size: 14px;
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
    color: #333 !important; /* Force Dark Text */
    font-weight: 500;
}

.ksms-nav ul li ul li a:hover {
    background: #f0f7ff;
    color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

@keyframes fadeUpMenu {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Main Swiper Premium */
.main-slider-wrapper {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 50px;
    position: relative;
}

.main-swiper {
    width: 100%;
    height: 330px !important; /* Correctly updated to 330px */
}

.swiper-slide {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #000;
    overflow: hidden;
}

/* 1. Deep Ambient Background */
.slide-bg-blur {
    position: absolute;
    top: -20px; left: -20px; right: -20px; bottom: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(30px) saturate(1.8) brightness(0.6); /* High saturation for premium feel */
    transform: scale(1.1); /* Prevent blur edges */
    z-index: 0;
}

/* 2. Film Grain / Noise Overlay (The "Premium" Touch) */
.slide-overlay-noise {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
    opacity: 0.15;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* 3. Main Image (Sharp & Clean) */
.slide-img-contain {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5)); /* Pop out from background */
}

/* 4. Text Content */
.slide-content {
    margin-top: auto;
    margin-bottom: 50px;
    padding-left: 60px;
    text-align: left;
    position: relative;
    z-index: 3; /* Highest priority */
    width: 100%;
    pointer-events: none;
}

.slide-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
    color: #fff;
    transform: translateY(20px);
    opacity: 0;
    animation: contentFadeUp 1s ease-out 0.5s forwards;
}

@keyframes contentFadeUp {
    to { transform: translateY(0); opacity: 1; }
}

/* Content Sections: Gallery Only (About removed) */
.ksms-gallery {
    background: #fff;
    border-radius: 24px;
    padding: 30px 20px; /* Greatly reduced top/bottom padding */
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
    transition: transform 0.4s ease;
}

.ksms-gallery:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Header Typography Re-design */
.ksms-gallery .section-header {
    margin-bottom: 20px !important; /* Force tight spacing */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ksms-gallery h3 {
    font-size: 18px; /* Reduced specific size */
    font-weight: 800;
    color: #111; /* Sharp Black */
    letter-spacing: -0.5px;
    margin: 0;
    padding-bottom: 8px;
    position: relative;
    display: inline-block;
}

/* "The Underline Effect" - Minimalist Chic */
.ksms-gallery h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #000;
}

/* Layout Fix: Force Single Row Horizontal */
.ksms-gallery .row {
    display: flex !important;
    flex-wrap: nowrap !important; /* Never wrap */
    gap: 15px;
    margin: 0; /* Clear bootstrap negative margins */
}

.ksms-gallery .col-md-6 {
    flex: 0 0 50%; /* Force 50% width always */
    max-width: 50%;
    padding: 0; /* Clean sizing */
}

/* Update Cosmic Frame for "Living Star Border" */
.cosmic-frame {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    /* Thin, elegant border (Fixed to 1px for uniform rendering) */
    padding: 1px; 
    
    /* 
       "Night Sky Atmosphere" (Contrast Provider)
       - Dark shadow AROUND the frame so the white border is visible on white background
       - User requested: "Subtle night sky outside"
    */
    box-shadow: 0 0 20px 2px rgba(5, 12, 30, 0.4);
    
    border: none;
    /* "Soft Medium Grey" Track - Lighter than charcoal (#2b2d30) to reduce harshness */
    background: #555555; 
    z-index: 1; 
}

/* The "Living Light" (Rotating Gradient) */
.cosmic-frame::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    /* Pure White Light */
    background: conic-gradient(
        from 0deg, 
        transparent 0%, 
        transparent 80%, 
        rgba(255, 255, 255, 0.8) 95%, 
        #ffffff 100%
    );
    /* Base Slow Animation */
    animation: erraticSpin 25s infinite linear;
    z-index: -1; 
}

/* Randomize Speeds for "Organic" Feel */
.col-md-6:nth-of-type(1) .cosmic-frame::before {
    animation-duration: 23s;
    animation-delay: -2s;
}

.col-md-6:nth-of-type(2) .cosmic-frame::before {
    animation-duration: 31s; /* Significantly different to prevent syncing */
    animation-delay: -9s;
}

/* Internal Backplate */
.cosmic-frame::after {
    content: '';
    position: absolute;
    inset: 1px; /* Match padding */
    background: #000;
    border-radius: 11px; 
    z-index: -1;
}

/* Image styling */
.cosmic-frame img {
    display: block;
    width: 100%;
    border-radius: 11px; 
    position: relative;
    z-index: 2; 
    transition: all 0.5s ease;
}

/* Erratic "Living" Animation - Slow & Organic */
@keyframes erraticSpin {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(60deg); }   /* Slow drift start */
    45% { transform: rotate(200deg); }  /* Sudden surge (Cosmic event) */
    70% { transform: rotate(240deg); }  /* Stall/Hover */
    100% { transform: rotate(360deg); } /* Completion */
}

/* Hover Interaction: Intensify */
.cosmic-frame:hover::before {
    filter: drop-shadow(0 0 5px #fff); 
    animation-duration: 4s; /* Wakes up on interaction */
}

.cosmic-frame:hover img {
    transform: scale(1.02);
}

/* Remove old nebula/sheen styles to prevent conflict/clutter */
.poster-glow { display: none; }

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 10000; 
    background: rgba(5, 12, 30, 0.98); /* Deep Space Dark */
    backdrop-filter: blur(15px); 
    display: none; 
    /* Layout handled by scroll area */
    opacity: 0; 
    transition: opacity 0.4s ease;
}

.lightbox-overlay.active {
    opacity: 1;
}

/* Scroll wrapper allows panning when zoomed */
.lightbox-scroll-area {
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable native scroll */
    -webkit-overflow-scrolling: touch; 
    
    /* Default: Perfect Centering via Flexbox */
    display: flex;
    justify-content: center;
    align-items: center;
    
    padding: 30px; 
    box-sizing: border-box;
}

/* Panning Mode: Activates when zoomed to allow free scrolling */
.lightbox-scroll-area.panning-mode {
    display: block; /* Switch to block to support content larger than container */
    text-align: center; /* Horizontally center content */
    overflow: auto;
}

.lightbox-content {
    max-width: 90vw; 
    max-height: 90vh; 
    border-radius: 4px; 
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8); 
    
    transform: scale(0.95); 
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.3s ease;
    opacity: 0;
    
    /* Optimize Text Sharpness */
    image-rendering: -webkit-optimize-contrast; 
    
    /* Layout */
    display: inline-block; /* Works with text-align center */
    vertical-align: middle;
}

/* ... existing .lightbox-overlay.active .lightbox-content ... */
.lightbox-overlay.active .lightbox-content {
    /* "none" ensures pixel-perfect rendering */
    transform: none; 
    opacity: 1;
}

/* Ensure zoomed state overrides limitations */
.lightbox-content.zoomed {
    max-width: none;
    max-height: none;
    margin: 0 auto;
}

/* Cosmic Zoom Controls */
.lightbox-controls {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10002;
    /* Remove container background/border to be cleaner, let buttons float */
    background: transparent;
    border: none;
    pointer-events: none; /* Let clicks pass through the gap between buttons */
}

.cosmic-btn {
    pointer-events: auto; /* Re-enable clicks on buttons */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    
    /* Cosmic Styling */
    appearance: none; -webkit-appearance: none; /* Reset default button styles */
    background: rgba(20, 20, 30, 0.4); /* Slight dark tint for contrast */
    border: 1px solid rgba(255, 255, 255, 0.6); /* Thin white star-line */
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5); /* Shadow for depth */
    
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    
    /* "Floating" Animation */
    animation: cosmicFloat 4s infinite ease-in-out;
}

.cosmic-btn svg {
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.8)); /* Glowing Icon */
}

/* Close Button (Cosmic Style) */
.lightbox-close.cosmic-close-btn {
    /* Absolute positioning prevents Flexbox 'stretch' bug */
    position: absolute; 
    top: 30px; 
    right: 30px; 
    width: 50px;
    height: 50px;
    padding: 0;
    
    /* Circle & Glass */
    border-radius: 50%;
    appearance: none; -webkit-appearance: none;
    background: rgba(20, 20, 30, 0.4); 
    border: 1px solid rgba(255, 255, 255, 0.5); 
    color: #fff;
    
    /* Centering Icon */
    display: flex; 
    justify-content: center; 
    align-items: center; 
    
    cursor: pointer; 
    transition: all 0.3s ease;
    z-index: 10010; /* Must be on top */
    backdrop-filter: blur(5px);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.lightbox-close.cosmic-close-btn:hover {
    background: rgba(255, 255, 255, 0.2); 
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    transform: rotate(90deg) scale(1.1);
}

.lightbox-close.cosmic-close-btn svg {
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.8));
    width: 24px;
    height: 24px;
}

.cosmic-btn:nth-child(2) {
    animation-delay: -1.5s; /* Desync Float */
}

/* Hover Interaction: Glow & Click Effect */
.cosmic-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    border-color: #fff;
}

.cosmic-btn:active {
    transform: scale(0.95);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes cosmicFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .lightbox-scroll-area {
        padding: 15px; /* Side padding */
        padding-bottom: 120px; /* CRITICAL: Extra space at bottom so image clears the floating buttons */
    }
    .lightbox-content {
        max-width: 95vw;
        max-height: 75vh; 
    }
    .lightbox-controls {
        bottom: 30px;
        gap: 20px; 
    }
    .cosmic-btn {
        width: 50px; 
        height: 50px;
        background: rgba(20, 20, 30, 0.6); /* Slightly darker on mobile for visibility */
    }
    /* Mobile Close Button */
    .lightbox-close.cosmic-close-btn {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* Footer */
.paynnet-footer {
    background: #111;
    color: #888;
    padding: 60px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.f-item {
    font-size: 14px;
    line-height: 1.8;
}

.f-item strong {
    color: #fff;
    font-weight: 700;
    margin-right: 15px;
}

/* Responsive */

/* Custom Grid System for KSMS (Base Desktop) */
.ksms-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* Space between columns */
    margin-bottom: 20px; /* Reduced gap below section */
}

.ksms-col-main {
    flex: 0 0 calc(60% - 15px);
    max-width: calc(60% - 15px);
}

.ksms-col-side {
    flex: 0 0 calc(40% - 15px);
    max-width: calc(40% - 15px);
}

@media (max-width: 991px) {
    .ksms-container { flex-direction: column; gap: 30px; }
    .ksms-sidebar { width: 100%; }
    .ksms-col-main, .ksms-col-side { flex: 0 0 100%; max-width: 100%; } /* Stack columns */
    .ksms-nav { padding: 15px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .ksms-nav ul { width: auto; gap: 5px; }
    .ksms-nav ul li a { font-size: 14px; padding: 10px 15px; white-space: nowrap; }
    
    /* Mobile Sync: Aggressive Height Reduction */
    .main-swiper { height: 220px !important; } 
    .slide-content { padding-left: 20px; margin-bottom: 20px; }
    .slide-title { font-size: 20px; }
    
    /* Compact Schedule Widget */
    .schedule-widget-premium { height: auto !important; min-height: 0 !important; } 
    .widget-header { padding: 6px 15px; font-size: 12px; }
    .widget-body { 
        padding: 12px 15px 0px 15px; /* ZERO bottom padding for tightness */
        justify-content: center; 
        text-align: left; /* Align text left */
        display: flex;
        flex-direction: column;
        flex-grow: 0; /* Do not expand to fill height */
    } 
    
    /* Compact Typography (2-Line Layout) */
    .sub-text { 
        font-size: 11px; 
        margin: 0 !important; /* Zero Margin forced */
        padding: 0 !important;
        display: block; 
        color: #666;
    }
    
    /* Line 2 Container Effect via Inline-Block */
    .main-logo-text.artistic-ksms {
        display: inline-block !important;
        margin-right: 4px;
        margin-bottom: 0 !important;
    }
    
    .desc-text { 
        font-size: 13px; 
        margin: 0 !important; /* Zero Margin forced */
        padding: 0 !important;
        line-height: 1.2;
        display: inline-block; 
    }
    .desc-text br { display: none; } /* Flatten text */
    
    .main-logo-text.artistic-ksms .char-k,
    .main-logo-text.artistic-ksms .char-s1,
    .main-logo-text.artistic-ksms .char-m,
    .main-logo-text.artistic-ksms .char-s2 { font-size: 18px; } /* Smaller Logo */
    
    /* Compact Icons - Floating with Zero Vertical Footprint */
    .icon-graphic { 
        position: absolute; 
        top: 50%; 
        transform: translateY(-50%);
        right: 15px; 
        width: auto; /* Maintain width so they don't squash */
        height: 0 !important; /* Force zero height to prevent layout gap */
        line-height: 0 !important;
        margin: 0 !important; 
        padding: 0 !important;
        display: flex;
        align-items: center;
        gap: 5px;
        z-index: 5;
        opacity: 0.9;
        pointer-events: none; 
    }
    .clock-icon, .calendar-icon { font-size: 28px; } 
    
    .widget-footer { padding: 5px 15px 12px; } /* Pull closer to text */
    
    /* --- MOBILE ANIMATIONS --- */
    
    /* 1. KSMS Distinct "Living" Animations */
    .artistic-ksms .char-k  { animation: mobileRotate 3s infinite alternate ease-in-out; }
    .artistic-ksms .char-s1 { animation: mobileUp 2.5s infinite alternate ease-in-out; }
    .artistic-ksms .char-m  { animation: mobileScale 2s infinite alternate ease-in-out; }
    .artistic-ksms .char-s2 { animation: mobileRotateRev 3.5s infinite alternate ease-in-out; }

    /* 2. Unique Icon Movements */
    .clock-icon    { animation: mobilePendulum 4s infinite ease-in-out; display:inline-block; }
    .calendar-icon { animation: mobileFloatIcon 3s infinite ease-in-out; display:inline-block; }
}

/* Animations */
@keyframes slideRight { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* --- Keyframes for Mobile (Global Scope for safety) --- */
@keyframes mobileRotate { 0% { transform: rotate(-5deg); } 100% { transform: rotate(0deg); } }
@keyframes mobileUp { 0% { transform: translateY(0); } 100% { transform: translateY(-3px); } }
@keyframes mobileScale { 0% { transform: scale(1); } 100% { transform: scale(1.15); } }
@keyframes mobileRotateRev { 0% { transform: rotate(5deg); } 100% { transform: rotate(0deg); } }

@keyframes mobilePendulum { 
    0%, 100% { transform: rotate(-15deg); } 
    50% { transform: rotate(15deg); } 
}
@keyframes mobileFloatIcon { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-5px); } 
}

/* Premium Schedule Widget */
.schedule-widget-premium {
    display: flex;
    flex-direction: column;
    height: 330px; /* Adjusted to 330px */
    background: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
    border-radius: 20px; /* Slightly reduced radius */
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-sizing: border-box;
}

.schedule-widget-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 57, 127, 0.2);
}

.widget-header {
    background: linear-gradient(90deg, #e0e0e0 0%, #f5f5f5 100%);
    padding: 12px 20px; /* Very compact */
    border-bottom: 1px solid #dcdcdc;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00397f;
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
}

.widget-header i {
    font-size: 18px;
    color: #00397f;
}

.widget-body {
    flex-grow: 1;
    padding: 20px; /* Compact padding */
    position: relative;
    background: radial-gradient(circle at top right, rgba(0, 57, 127, 0.05), transparent 70%);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sub-text {
    font-size: 12px;
    font-weight: 700;
    color: #555;
    margin-bottom: 2px;
}

.main-logo-text {
    font-size: 30px; /* Reduced for 300px height */
    font-weight: 900;
    color: #000;
    margin: 0;
    line-height: 1;
    letter-spacing: -1px;
}

.main-logo-text .small {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-left: 5px;
    vertical-align: middle;
}

/* KSMS Logo Colors */
/* KSMS Logo Colors - Artistic Expression */
.main-logo-text.artistic-ksms {
    background: none !important;
    -webkit-background-clip: border-box !important;
    -webkit-text-fill-color: initial !important;
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-start; /* Aligned Left per request */
    gap: 0px; /* Tight Kern */
}

.artistic-ksms span {
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
}

/* K - The Foundation (Black) */
.char-k {
    color: #111;
    font-weight: 900;
    letter-spacing: -2px;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

/* S - System/Schedule (Blue) */
.char-s1 {
    color: #00397f; /* Widget Header Blue */
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 2px 2px 0px rgba(0, 57, 127, 0.1);
}

/* M - Media/Movement (Red) */
.char-m {
    color: #e3001b; /* Strong Premium Red */
    font-weight: 900;
    font-size: 1.05em; /* Subtle emphasis */
    letter-spacing: -1px;
    text-shadow: 2px 2px 0px rgba(227, 0, 27, 0.1);
}

/* S - Sport/Society (Black) */
.char-s2 {
    color: #111;
    font-weight: 800;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

/* Hover Interaction: Dance */
.schedule-widget-premium:hover .char-k { transform: rotate(-5deg); }
.schedule-widget-premium:hover .char-s1 { transform: translateY(-3px); }
.schedule-widget-premium:hover .char-m { transform: scale(1.1); }
.schedule-widget-premium:hover .char-s2 { transform: rotate(5deg); }

.desc-text {
    font-size: 18px; /* Reduced */
    font-weight: 800;
    color: #333;
    margin-top: 5px;
    line-height: 1.3;
}

.icon-graphic {
    position: absolute;
    bottom: 10px;
    right: 15px;
    display: flex;
    gap: 5px;
}

.clock-icon, .calendar-icon {
    font-size: 50px; /* Reduced */
    color: rgba(0, 57, 127, 0.1);
    transform: rotate(-10deg);
    transition: all 0.5s ease;
}

.calendar-icon {
    font-size: 60px;
    color: rgba(220, 20, 60, 0.1); /* Red hint */
    margin-left: -15px;
    z-index: 1;
}

.schedule-widget-premium:hover .clock-icon {
    transform: rotate(20deg) scale(1.1);
    color: rgba(0, 57, 127, 0.2);
}

.schedule-widget-premium:hover .calendar-icon {
    transform: rotate(-20deg) scale(1.1) translateX(10px);
    color: rgba(220, 20, 60, 0.2);
}

.widget-footer {
    padding: 12px 20px; /* Compact */
    background: #fff;
    border-top: 1px dashed #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.widget-footer span {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.go-btn {
    background: #ff0000;
    color: #fff;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.3);
    transition: all 0.3s;
}

.schedule-widget-premium:hover .go-btn {
    background: #cc0000;
    transform: scale(1.1);
    padding-right: 20px;
}

@media (max-width: 991px) {
    .schedule-widget-premium { height: auto; min-height: 200px; }
    .widget-body { padding: 20px; }
    .icon-graphic { position: relative; bottom: auto; right: auto; justify-content: flex-end; margin-top: -40px; }
    .clock-icon, .calendar-icon { font-size: 60px; }
}

/* Cosmic Separator (Artistic Divider) - "Event Horizon" Theme */
.section-header {
    border: none !important; 
    position: relative;
    /* Force Vertical Stack & Centering */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* NUCLEAR OPTION: Remove any existing lines from parent themes */
.section-header h3::after, 
.section-header::after,
.section-header h3::before {
    content: none !important;
    display: none !important;
    border: none !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
}

.cosmic-separator {
    position: relative;
    width: 100%;
    max-width: 300px; /* Control width of the line */
    height: 1px;
    margin: 15px auto 10px; /* Tighter bottom spacing */
    display: flex;
}

@keyframes mobilePendulum { 
    0%, 100% { transform: rotate(-15deg); } 
    50% { transform: rotate(15deg); } 
}
@keyframes mobileFloatIcon { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-5px); } 
}

/* Mobile Poster Gallery: Stack 1 per line (Force Grid Break) */
@media (max-width: 991px) {
    .ksms-gallery .row {
        display: flex !important;
        flex-direction: column !important; /* Force vertical stack */
        flex-wrap: wrap !important;
        align-items: center !important;
    }

    /* Target ALL direct column children within the gallery row
       (This covers col-md-6, col-five, etc automatically) */
    .ksms-gallery .row > div {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-bottom: 30px !important; /* Visual gap */
        padding: 0 10px; /* Safe padding from edges */
    }
    
    .poster-item {
        width: 100% !important;
        margin: 0 auto;
        /* Ensure no weird overflow */
        box-sizing: border-box;
    }
}

/* --- Login UX Enhancements --- */

/* Shake Animation (Error Feedback) */
@keyframes ksmsShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-widget {
    animation: ksmsShake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.shake-input {
    animation: ksmsShake 0.4s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #ff4d4d !important; /* Error Red */
    background-color: #fff0f0 !important;
}

/* Premium Toast Notification */
#ksms_toast {
    visibility: hidden;
    min-width: 250px;
    background-color: rgba(30, 30, 30, 0.9); /* Dark Premium */
    color: #fff;
    text-align: center;
    border-radius: 50px; /* Pill shape */
    padding: 12px 24px;
    position: fixed;
    z-index: 10000;
    left: 50%;
    top: 50%; /* Center Screen */
    transform: translate(-50%, -50%) scale(0.9);
    font-size: 15px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#ksms_toast.show {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

#ksms_toast i {
    margin-right: 8px;
    color: #ff4d4d;
}



/* --- Global Spacing Adjustment (Final) --- */
.ksms-container {
    padding-top: 10px !important; /* Set to 10px per user request */
}

.ksms-sidebar {
    margin-top: 0 !important; /* Reset negative margin to align with container padding */
}

/* 2026-02-20: Reduce GNB Bottom Margin & Add Top Margin */
/* 2026-02-20: Reduce GNB Bottom Margin & Add Top Margin */
.ksms-nav {
    display: flex !important; /* Enable Flex to center inner UL */
    align-items: center !important; /* Vertically center the UL */
    justify-content: flex-start; /* Align UL to left (or change to center if needed) */
    min-height: 80px !important; /* Define explicit height for the GNB area to be 'wider' vertically */
    margin-top: 20px !important; /* Restore 20px top margin per user request */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 20px !important;
    /* background-color removed to restore original color */
    border-radius: 10px; /* Optional: Rounded corners for better look */
    padding-left: 20px; /* Internal spacing */
}
.ksms-nav ul {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 1st Level Menu Vertical Centering & Compact Sizing */
.ksms-nav > ul > li {
    display: flex !important;
    align-items: center !important; /* Ensure 'a' is centered in 'li' */
    height: 100%;
}

.ksms-nav > ul > li > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 55px !important; /* Increased to 55px to expand GNB area & center text */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 20px !important; /* Slightly increased horizontal spacing */
    padding-right: 20px !important;
}

/* Section Spacing Override to match Grid Gap (30px) */
.section-padding.ksms-gallery {
    padding-top: 0 !important; 
    margin-top: 0 !important; /* Reset to natural flow */
}

/* Fix Slider Wrapper Gap */
.main-slider-wrapper {
    margin-bottom: 0 !important; /* Remove the 50px gap */
}

/* 5-Column Grid Support */
.col-five {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    flex: 0 0 20%;
    max-width: 20%;
}

@media (max-width: 991px) {
    .col-five {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
    }
}

@media (max-width: 768px) {
    .col-five {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 480px) {
    .col-five {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Mobile Breathe Animation */
@keyframes mobileBreathe {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.05) translateY(-2px); }
}

/* The Glowing Line (Gravity Well) */
.cosmic-separator::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    
    /* "Black Hole" Gradient: Fading from void to singularity */
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 0, 0, 0.1) 20%, 
        rgba(0, 0, 0, 0.8) 50%, 
        rgba(0, 0, 0, 0.1) 80%, 
        transparent 100%
    );
    
    /* Subtle gravity shadow */
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* Ensure Footer is Top Most */
footer.ksms-footer, .ksms-footer {
    position: relative !important;
    z-index: 99999 !important;
    background: #fff !important;
    transform: translateZ(0); /* Force Stacking Context */
}

/* KSMS Sidebar Sub-Navigation (LNB) - Minimalist Red Card (Right Aligned) */
.ksms-sidebar-nav {
    margin-top: 30px;
    padding: 20px; /* Reduced padding */
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); /* Premium soft shadow */
    text-align: right;
    border: 1px solid #f5f5f5;
}

/* Sidebar Title - Premium Animated Badge */
.lnb-tit {
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 15px; /* Reduced margin */
    letter-spacing: 0.5px;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    
    /* Badge Style */
    background: linear-gradient(135deg, #e57373 0%, #ff8a65 100%);
    padding: 5px 15px; /* Reduced badge size */
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(229, 115, 115, 0.3);
    
    /* Animation - Cloud Float */
    animation: floatBadge 3s ease-in-out infinite;
    transition: all 0.3s ease;
    cursor: default;
    opacity: 1; 
    transform: translateY(0);
}

.lnb-tit:hover {
    box-shadow: 0 6px 15px rgba(229, 115, 115, 0.4);
    filter: brightness(1.1);
    animation-play-state: paused;
}

@keyframes floatBadge {
    0% { transform: translateY(0); box-shadow: 0 4px 10px rgba(229, 115, 115, 0.3); }
    50% { transform: translateY(-6px); box-shadow: 0 15px 20px rgba(229, 115, 115, 0.2); }
    100% { transform: translateY(0); box-shadow: 0 4px 10px rgba(229, 115, 115, 0.3); }
}

.lnb-tit::after {
    display: none;
}

.lnb-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lnb-list li {
    margin-bottom: 0;
}

.lnb-list li a {
    display: flex;
    justify-content: flex-end; /* Align to Right */
    align-items: center;
    padding: 7px 0; /* Compact padding */
    font-size: 17px; /* INCREASED: Slightly smaller font for compact look */
    color: #555;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px dashed #f0f0f0; /* Subtle separator */
}

.lnb-list li:last-child a {
    border-bottom: none;
}

/* First child border removal */
.lnb-list li:first-child a {
    border-top: none;
}

/* Active State - Pastel Red */
.lnb-list li.active a {
    color: #e57373; /* Pastel Red */
    font-weight: 800;
    transform: translateX(-5px); /* Move Left */
}

.lnb-list li a:hover {
    color: #e57373;
    transform: translateX(-3px); /* Move Left */
}

/* Minimalist Indicator - RIGHT Side */
.lnb-list li.active a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #e57373;
    border-radius: 50%;
    margin-left: 10px; /* Space on left */
    margin-top: -1px;
}

/* Ensure no BEFORE indicator */
.lnb-list li.active a::before {
    display: none;
}

/* Remove big arrow icon */
.lnb-list li a i {
    display: none;
}

/* --- Mobile Premium Header & Menu (2026 Renewal) --- */
#ksms-mobile-header {
    display: none; /* Default hidden on PC */
}
#ksms-mobile-menu-overlay {
    display: none;
}
#ksms-mobile-login-modal {
    display: none; /* Hide on PC */
}

@media (max-width: 991px) {
    /* 1. Hide Existing Sidebar Elements & Desktop GNB */
    .ksms-sidebar, .ksms-nav {
        display: none !important;
    }
    
    /* 2. Show Mobile Header */
    #ksms-mobile-header {
        display: block;
        position: fixed;
        top: 0; left: 0; right: 0;
        height: 70px; /* Comfortable touch height */
        z-index: 9999;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(0,0,0,0.05);
        transition: all 0.3s ease;
    }
    
    /* Offset main container so fixed header doesn't overlap content */
    .ksms-wrapper {
        padding-top: 70px !important;
    }
    
    .mobile-header-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
        height: 100%;
        max-width: 100%;
    }
    
    /* Mobile Logo - Box Styling */
    .mobile-logo img {
        height: 52px; /* Increased to 52px per user request */
        width: auto;
        display: block;
        background-color: #ffffff; /* Add background to create "box" effect */
        border-radius: 8px; /* Rounded corners */
        padding: 3px; /* Added 3px inner padding as requested */
        box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Optional soft shadow for polish */
        box-sizing: border-box;
    }
    .mobile-logo span {
        font-family: 'Krona One', sans-serif;
        font-size: 20px;
        color: #333;
        font-weight: 700;
        text-transform: uppercase;
    }
    
    /* 3. Premium Trigger Button */
    .premium-menu-trigger {
        display: flex;
        align-items: center;
        gap: 10px;
        background: #00397f; /* Changed to KSMS Navy per user request */
        color: #fff;
        border: none;
        padding: 8px 18px;
        border-radius: 100px; /* Pill Shape */
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0,57,127,0.3); /* Navy shadow */
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    /* ... (rest of trigger styles) ... */

    /* Mobile Login / User Trigger */
    .mobile-login-trigger, .mobile-user-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: transparent;
        color: #00397f;
        border: 1px solid rgba(0,57,127,0.2);
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.2s ease;
        padding: 0;
    }
    .mobile-login-trigger i, .mobile-user-btn i {
        font-size: 18px;
    }
    .mobile-login-trigger:active, .mobile-user-btn:active {
        background: #00397f;
        color: #fff;
    }
    .m-profile-img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
    }
    
    /* Mobile Login Modal Overlay */
    .mobile-login-modal {
        display: flex !important; /* Force flex on mobile to override ID-based hide rule */
        position: fixed;
        inset: 0;
        z-index: 999999; /* Higher than everything */
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    .mobile-login-modal.active {
        pointer-events: auto;
        opacity: 1;
    }
    .m-login-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(8px);
    }
    .m-login-container {
        position: relative; /* Changed from absolute bottom to relative flow */
        width: 100%;
        max-width: 400px; /* PC like width on mobile */
        background: #fff;
        border-radius: 20px; /* Full rounded corners */
        padding: 30px 25px 40px;
        transform: translateY(20px) scale(0.95);
        transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
        box-shadow: 0 10px 40px rgba(0,0,0,0.3);
        z-index: 10;
        max-height: 80vh; /* Don't exceed screen */
        overflow-y: auto; /* Scroll if device is super small */
    }
    .mobile-login-modal.active .m-login-container {
        transform: translateY(0) scale(1);
    }
    .m-login-close {
        position: absolute;
        top: 20px; right: 20px;
        background: #f0f2f5;
        border: none;
        width: 36px; height: 36px;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-size: 20px; color: #333;
    }
    .m-login-header {
        margin-bottom: 25px;
    }
    .m-login-header h2 {
        font-family: 'Krona One', sans-serif;
        font-size: 22px;
        color: #00397f;
        margin-bottom: 5px;
    }
    .m-login-header p {
        font-size: 13px; color: #666;
    }
    
    .m-input-group {
        position: relative;
        margin-bottom: 15px;
    }
    .m-input-group i {
        position: absolute;
        left: 15px; top: 50%;
        transform: translateY(-50%);
        color: #999;
        font-size: 18px;
    }
    .m-input-group input {
        width: 100%;
        height: 50px;
        background: #f8f9fa;
        border: 1px solid #eee;
        border-radius: 12px;
        padding: 0 15px 0 45px;
        font-size: 15px;
        transition: all 0.2s;
        box-sizing: border-box;
    }
    .m-input-group input:focus {
        background: #fff;
        border-color: #00397f;
        box-shadow: 0 0 0 3px rgba(0,57,127,0.1);
        outline: none;
    }
    .m-btn-login {
        width: 100%;
        height: 50px;
        background: #00397f;
        color: #fff;
        border: none;
        border-radius: 12px;
        font-size: 16px; font-weight: 700;
        margin-top: 10px;
        box-shadow: 0 4px 15px rgba(0,57,127,0.2);
    }
    .m-btn-login:active {
        transform: scale(0.98);
    }
    .m-login-links {
        display: flex; justify-content: center; align-items: center; gap: 10px;
        margin-top: 20px; font-size: 13px; color: #666;
    }
    .m-login-links a { color: #666; text-decoration: none; }
    .m-login-links .divider { width: 1px; height: 10px; background: #ddd; }

    .m-item-1depth {
        margin-bottom: 25px;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.5s ease;
    }
    
    .m-item-1depth > a {
        font-family: 'Pretendard', sans-serif;
        font-size: 22px !important;
        font-weight: 700;
        color: #1a1a1a;
        text-decoration: none;
        letter-spacing: -0.5px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        word-break: keep-all;
        white-space: normal;
        line-height: 1.3;
    }

    /* Submenu Toggle Icon */
    .m-item-1depth > a::after {
        content: '\ea4e'; /* Phosphor Icon 'CaretDown' or similar */
        font-family: 'RemixIcon';
        font-size: 18px;
        color: #999;
        transition: transform 0.3s ease;
    }
    .m-item-1depth.has-sub.open > a::after {
        transform: rotate(180deg);
    }
    /* Hide icon if no sub */
    .m-item-1depth:not(.has-sub) > a::after {
        display: none;
    }

    /* 2nd Depth Menu - Redesigned */
    .m-sub-menu {
        display: none;
        list-style: none;
        padding: 0;
        margin: 15px 0 0 0;
        background: #f9f9f9; /* Subtle background area */
        border-radius: 12px;
        overflow: hidden; /* For border radius */
    }
    
    .m-sub-menu li {
        border-bottom: 1px solid rgba(0,0,0,0.03);
    }
    .m-sub-menu li:last-child {
        border-bottom: none;
    }
    
    .m-sub-menu li a {
        font-family: 'Pretendard', sans-serif;
        font-size: 15px !important;
        font-weight: 500;
        color: #555;
        padding: 12px 20px;
        display: block;
        transition: all 0.2s ease;
        position: relative;
        padding-left: 20px;
    }
    
    .m-sub-menu li a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: transparent;
        transition: background 0.2s ease;
    }

    .m-sub-menu li a:active {
        color: #00397f;
        background: #f0f4ff; /* Very light navy tint */
        font-weight: 700;
    }
    .m-sub-menu li a:active::before {
        background: #00397f;
    }
    .premium-menu-trigger:active {
        transform: scale(0.95);
    }
    
    .premium-menu-trigger .trigger-text {
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 1px;
    }
    
    .premium-menu-trigger .trigger-icon {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 16px;
    }
    
    .premium-menu-trigger .line {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #fff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    /* 4. Fullscreen Overlay */
    #ksms-mobile-menu-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 10000;
        pointer-events: none; /* Through when closed */
        opacity: 0;
        visibility: hidden; /* Hard hide to prevent touch interception */
        transition: opacity 0.4s ease, visibility 0.4s ease;
    }
    
    #ksms-mobile-menu-overlay.active {
        pointer-events: auto;
        opacity: 1;
        visibility: visible;
    }
    
    .menu-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(5px);
    }
    
    .menu-container {
        position: fixed; /* Changed to fixed to ensure viewport containment */
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        display: flex;
        flex-direction: column;
        padding: 25px; /* Slightly reduced padding */
        box-sizing: border-box !important; /* Critical fix for width overflow */
        transform: translateY(-100%);
        transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
        z-index: 10001; /* Ensure higher than overlay wrapper */
        overflow-y: auto; /* Allow scrolling if content is too tall */
    }
    
    #ksms-mobile-menu-overlay.active .menu-container {
        transform: translateY(0);
    }
    
    /* Inside Overlay */
    .menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 40px;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        flex-shrink: 0;
    }
    
    .menu-title {
        font-family: 'Krona One', sans-serif;
        font-size: 20px;
        color: #00397f;
        font-weight: 700;
        letter-spacing: -0.5px;
    }
    
    /* Premium Close Button (Pure CSS Animated X) */
    .close-btn {
        width: 44px;
        height: 44px;
        background: #f0f2f5;
        border: none;
        border-radius: 50%; /* Circular */
        position: relative;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        display: flex; /* Flex to center spans */
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        padding: 0; /* Reset padding */
        margin: 0;
    }
    
    /* The X lines */
    .close-btn span {
        position: absolute;
        width: 20px; /* Line length */
        height: 2px; /* Line thickness */
        background-color: #333;
        border-radius: 2px;
        transition: all 0.3s ease;
        display: block; /* Ensure visibility */
    }
    
    .close-btn span:nth-child(1) { transform: rotate(45deg); }
    .close-btn span:nth-child(2) { transform: rotate(-45deg); }
    
    .close-btn:hover {
        background: #fff;
        transform: rotate(90deg) scale(1.1);
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    }
    
    .close-btn:active {
        transform: rotate(90deg) scale(0.9);
    }
    .close-btn:active span {
        background-color: #000;
    }

    .mobile-gnb ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .m-item-1depth {
        margin-bottom: 25px;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.5s ease;
    }
    
    #ksms-mobile-menu-overlay.active .m-item-1depth {
        opacity: 1;
        transform: translateY(0);
    }
    /* ... delays ... */
    
    .m-item-1depth a {
        font-family: 'Pretendard', sans-serif;
        font-size: 22px !important; /* Reduced to 22px and enforced */
        font-weight: 700;
        color: #1a1a1a;
        text-decoration: none;
        letter-spacing: -0.5px;
        display: block;
        word-break: keep-all; /* Prevent awkward word breaks */
        white-space: normal; /* Allow wrapping if needed */
        line-height: 1.3;
    }
    
    .m-item-1depth a:active {
        color: var(--primary-color, #00397f);
        transform: scale(0.98);
    }

    /* Submenu Toggle Icon */
    .m-item-1depth > a::after {
        content: '\ea4e'; /* Phosphor Icon 'CaretDown' */
        font-family: 'RemixIcon';
        font-size: 18px;
        color: #999;
        transition: transform 0.3s ease;
    }
    .m-item-1depth.has-sub.open > a::after {
        transform: rotate(180deg);
    }
    .m-item-1depth:not(.has-sub) > a::after {
        display: none;
    }

    /* 2nd Depth Menu - Redesigned (Round Box) */
    .m-sub-menu {
        display: none;
        list-style: none;
        padding: 0;
        margin: 15px 0 0 0;
        background: #f9f9f9;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .m-sub-menu li {
        border-bottom: 1px solid rgba(0,0,0,0.03);
    }
    .m-sub-menu li:last-child {
        border-bottom: none;
    }
    
    .m-sub-menu li a {
        font-family: 'Pretendard', sans-serif;
        font-size: 15px !important;
        font-weight: 500;
        color: #555;
        padding: 13px 20px;
        display: block;
        transition: all 0.2s ease;
        position: relative;
        padding-left: 20px; /* Reset padding */
    }
    .m-sub-menu li a::before { content: none; }
    
    .m-sub-menu li a:active {
        color: #00397f;
        background: #eef4ff;
        font-weight: 700;
    }
    
    /* Animation Delays */
    #ksms-mobile-menu-overlay.active .m-item-1depth { opacity: 1; transform: translateY(0); }
    #ksms-mobile-menu-overlay.active .m-item-1depth:nth-child(1) { transition-delay: 0.1s; }
    #ksms-mobile-menu-overlay.active .m-item-1depth:nth-child(2) { transition-delay: 0.2s; }
    #ksms-mobile-menu-overlay.active .m-item-1depth:nth-child(3) { transition-delay: 0.3s; }
    #ksms-mobile-menu-overlay.active .m-item-1depth:nth-child(4) { transition-delay: 0.4s; }
    #ksms-mobile-menu-overlay.active .m-item-1depth:nth-child(5) { transition-delay: 0.5s; }
    
    .menu-footer {
        margin-top: auto;
        border-top: 1px solid rgba(0,0,0,0.05);
        padding-top: 25px;
        text-align: center;
    }
    
    .copyright-text {
        font-family: 'Space Mono', 'Courier New', monospace; /* Engineering feel */
        font-size: 11px;
        color: #888;
        letter-spacing: 1px;
        text-transform: uppercase;
        position: relative;
        display: inline-block;
        padding: 5px 10px;
        background: rgba(0, 57, 127, 0.05); /* Very subtle navy bg */
        border-radius: 4px;
        transition: color 0.3s;
    }
    
    .copyright-text:hover {
        color: #00397f;
        background: rgba(0, 57, 127, 0.1);
    }
}
