/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Portal Typography & Base Styling (KRDS / NIER Style) */
body {
    font-family: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    letter-spacing: -0.02em;
    color: #1e293b;
    background-color: #f8fafc;
}

/* Institutional Portal Component Styles */
.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
}

.portal-badge-teal {
    background-color: #ffffff;
    color: #007580;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.portal-badge-navy {
    background-color: #f8fafc;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.portal-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.portal-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

/* White background, light gray border, accent green text (Bright Portal Style) */
.portal-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #ffffff;
    color: #007580;
    border: 1px solid #cbd5e1;
    font-weight: 800;
    border-radius: 0.625rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.portal-btn-primary:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
    color: #005f5f;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.portal-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #007580;
    font-weight: 800;
    border-radius: 9999px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.portal-pill-btn:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
    color: #005f5f;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.portal-btn-navy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #0f172a;
    color: #ffffff;
    font-weight: 700;
    border-radius: 0.625rem;
    transition: all 0.2s ease;
}

.portal-btn-navy:hover {
    background-color: #1e293b;
    transform: translateY(-1px);
}

.portal-table th {
    background-color: #f8fafc;
    color: #334155;
    font-weight: 700;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

.portal-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: #475569;
}

/* Slide Transition in Hero Carousel */
#hero-slider .slide {
    will-change: opacity;
}

/* Custom Text Fade effect */
.slide-text {
    will-change: opacity, transform;
}

/* Play button pulse overlay animation */
@keyframes pulsePlay {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 139, 139, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0, 139, 139, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 139, 139, 0);
    }
}
.facility-card:hover .w-14 {
    animation: pulsePlay 1.5s infinite;
}

/* CSS Modal animations */
@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.animate-fade-in {
    animation: modalAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Styling Scrollbars for Premium Look */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Custom styles for Notice details */
.markdown-body p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}
.markdown-body p:last-child {
    margin-bottom: 0;
}
.markdown-body strong {
    color: #0f172a;
    font-weight: 700;
}

/* Mobile View Optimizations for Spacing & Padding */
@media (max-width: 767px) {
    /* Mobile header Phone CTA button: compact, perfectly aligned */
    header a[data-cta="cta_call"][data-cta-position="header_mobile"] {
        margin: 1px !important;
        padding: 4px 9px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    /* Bottom floating CTA bar on mobile */
    #scroll-floating-cta-bar .grid {
        gap: 6px !important;
    }
    #scroll-floating-cta-bar a {
        min-height: 44px !important;
    }

    /* Mobile Container & Spacing Clean Normalization */
    body {
        padding: 0 !important;
    }

    .max-w-7xl, .max-w-\[92rem\], .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }


    /* Header adjustments */
    header .h-16 {
        height: 48px !important;
    }
    
    .header-ci-logo {
        height: 28px !important;
    }
    
    .sticky.top-16 {
        top: 48px !important;
    }

    /* Titles & Headings margins and font sizes */
    h2.text-3xl, h2.text-4xl, h2.text-2xl {
        font-size: 1.25rem !important; /* text-xl */
        line-height: 1.75rem !important;
        margin-bottom: 4px !important;
    }
    
    .w-12.h-1.bg-brand-teal.mx-auto.mt-4 {
        margin-top: 4px !important;
    }

    /* Facility Info cards (10% additional font enlargement for mobile web) */
    .facility-card {
        padding: 11px 8px !important;
    }
    
    .facility-card .w-14.h-14 {
        width: 48px !important;
        height: 48px !important;
        margin-bottom: 6px !important;
    }
    
    .facility-card i {
        font-size: 18.5px !important;
    }
    
    .facility-card span {
        font-size: 15.5px !important; /* 10% additional enlargement */
    }
    
    .facility-card span.text-slate-500 {
        font-size: 13.8px !important;
    }

    .facility-card span.text-brand-teal {
        font-size: 14.5px !important;
        margin-top: 4px !important;
    }

    /* Form styling density */
    input, select, textarea {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        font-size: 16.5px !important; /* 20% larger */
    }
    button[type="submit"].w-full {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        margin-top: 8px !important;
    }

    .flex > button[type="submit"] {
        margin-top: 0 !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }
}

/* ==========================================================================
   Modern Institutional CTA Button & Number Styling
   ========================================================================== */
.portal-phone-text {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* Subtle micro-interactions for modern CTAs */
.cta-btn-hover {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background-color 0.2s ease;
}
.cta-btn-hover:hover {
    transform: translateY(-1px);
}
.cta-btn-hover:active {
    transform: translateY(0) scale(0.98);
}
