:root {
    /* Color Palette */
    --primary-color: #3D6BCD;
    /* Existing Blue */
    --secondary-color: #E63946;
    /* Accent Red */
    --accent-glow: rgba(230, 57, 70, 0.4);

    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --bg-surface: rgba(255, 255, 255, 0.7);

    --text-main: #111827;
    --text-muted: #6B7280;
    --text-light: #F9FAFB;

    --border-color: rgba(229, 231, 235, 0.5);
    
    --text: var(--text-main);
    --text3: var(--text-muted);

    /* Typography */
    --font-sans: 'Noto Sans KR', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px var(--accent-glow);

    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1 0 auto;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-base);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 6rem 0;
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
}

/* Typography Utility */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: #2e53a5;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(61, 107, 205, 0.3);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-base);
    background: transparent;
}

.navbar.scrolled {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 44px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: brightness(1);
    transition: filter var(--transition-base);
}

/* .navbar.scrolled .logo-img { 
    filter: ...;
} */

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.2;
    letter-spacing: -0.3px;
    transition: color var(--transition-base);
}

.logo-en {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    transition: color var(--transition-base);
}

/* White text for sub-page hero banners */
.navbar.is-subpage:not(.scrolled) .logo-name {
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.navbar.is-subpage:not(.scrolled) .logo-en {
    color: rgba(255, 255, 255, 0.8);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    color: var(--text-main);
    transition: all var(--transition-base);
}

.navbar.is-subpage:not(.scrolled) .nav-link {
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-button {
    background-color: rgba(61, 107, 205, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    transition: all var(--transition-fast);
}

.nav-button:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 0.5rem;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.dropdown-menu a:hover {
    background: rgba(61, 107, 205, 0.05);
    color: var(--primary-color);
    transform: translateX(4px);
}

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-main);
    transition: all 0.3s ease-in-out;
}

.navbar.is-subpage:not(.scrolled) .bar {
    background-color: white;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
    background-color: var(--bg-light);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 2rem;
    animation: fadeUp 1s ease-out forwards;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(230, 57, 70, 0.1);
    color: var(--secondary-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    border: 1px solid rgba(230, 57, 70, 0.2);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Hero Background Animations */
.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.shape-1 {
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: rgba(61, 107, 205, 0.3);
    animation: float 10s infinite alternate ease-in-out;
}

.shape-2 {
    bottom: -15%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: rgba(230, 57, 70, 0.2);
    animation: float 14s infinite alternate-reverse ease-in-out;
}

.shape-3 {
    top: 40%;
    left: 50%;
    width: 400px;
    height: 400px;
    background: rgba(255, 200, 50, 0.15);
    transform: translate(-50%, -50%);
    animation: float 12s infinite alternate ease-in-out;
}

/* Statistics Section */
.stats-section {
    position: relative;
    z-index: 20;
    margin-top: -50px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

.stat-box {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-desc {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Services Section */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.section-desc {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(61, 107, 205, 0.3);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(61, 107, 205, 0.1);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: all var(--transition-base);
}

.service-card:hover .card-icon {
    background: var(--primary-color);
    color: var(--bg-white);
    transform: scale(1.1) rotate(5deg);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.card-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.card-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.card-link .arrow {
    margin-left: 0.5rem;
    transition: transform var(--transition-base);
}

.service-card:hover .card-link .arrow {
    transform: translateX(5px);
}

/* CTA Section */
.cta-section {
    padding: 4rem 2rem;
}

.cta-container {
    background: linear-gradient(135deg, var(--primary-color), #2a4b9c);
    border-radius: var(--radius-lg);
    padding: 4rem;
    text-align: center;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.cta-desc {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.cta-btn {
    background: var(--bg-white);
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
}

.cta-btn:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 3rem 0;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-contact-info {
    text-align: left;
}

.footer-contact-info p {
    color: #94a3b8;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-contact-info span {
    color: #f8fafc;
    font-weight: 600;
    margin-right: 0.5rem;
}

.footer-bottom-info {
    width: 100%;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.footer-bottom-info p {
    color: #64748b;
}

.family-site {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #94a3b8;
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    outline: none;
    cursor: pointer;
    font-size: 0.85rem;
}

.family-site option {
    background: #0f172a;
    color: #f8fafc;
}

@media (max-width: 768px) {
    .footer-bottom-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(-30px) rotate(10deg);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .stats-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--bg-surface);
        backdrop-filter: blur(20px);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding-top: 100px;
        gap: 1.5rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .dropdown-menu {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Sub-page Hero Section */
.sub-hero {
    position: relative;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    margin-bottom: 2rem;
}

.sub-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.sub-hero-title {
    color: white;
    position: relative;
    z-index: 1;
    font-size: clamp(2rem, 4vw, 3rem);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    font-weight: 800;
    text-align: center;
}

@media (max-width: 768px) {
    .logo-name {
        font-size: 13px;
    }
    .logo-en {
        display: none;
    }
}

/* Tabs System */
#css_tabs {
    margin: 2rem 0;
}

.sub-content-wrap {
    width: 100%;
    margin-bottom: 30px;
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

#css_tabs input[type="radio"] {
    display: none;
}

#css_tabs label {
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

#css_tabs label:hover {
    color: var(--primary-color);
}

#tab1:checked ~ .tab-buttons label[for="tab1"],
#tab2:checked ~ .tab-buttons label[for="tab2"],
#tab3:checked ~ .tab-buttons label[for="tab3"],
#tab4:checked ~ .tab-buttons label[for="tab4"],
#tab5:checked ~ .tab-buttons label[for="tab5"],
#tab6:checked ~ .tab-buttons label[for="tab6"],
#tab7:checked ~ .tab-buttons label[for="tab7"] {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeUp 0.5s ease-out forwards;
}

#tab1:checked ~ .tab1_content,
#tab2:checked ~ .tab2_content,
#tab3:checked ~ .tab3_content,
#tab4:checked ~ .tab4_content,
#tab5:checked ~ .tab5_content,
#tab6:checked ~ .tab6_content,
#tab7:checked ~ .tab7_content {
    display: block !important;
}

/* Modern Tables inside tabs */
.tab-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tab-content th {
    background: #f1f5f9;
    padding: 1rem;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 2px solid var(--border-color);
    text-align: center;
}

.tab-content td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
}

.tab-content tr:last-child td {
    border-bottom: none;
}

.tab-content .tit {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.5rem;
}

.tab-content .tit::before {
    content: '';
    display: block;
    width: 4px;
    height: 1.25rem;
    background: var(--secondary-color);
    border-radius: 2px;
}

.tab-content .text {
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-left: 1.25rem;
}

/* Sub-page Refinement */
.sub-page-header {
    margin-bottom: 3.5rem;
    padding-left: 1.5rem;
    border-left: 6px solid var(--primary-color);
}

.sub-page-subtitle {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.sub-page-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.03em;
}

.sub-page-title span {
    color: var(--primary-color);
}

.content-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    padding: 3rem 4rem;
    box-shadow: var(--shadow-md);
}

.sub-top-message {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.sub-top-message p {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
}

.sub-top-message .highlight {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .sub-page-header {
        margin-bottom: 2.5rem;
        padding-left: 1rem;
        border-left-width: 4px;
    }
    .sub-page-title {
        font-size: 2rem;
    }
    .content-glass {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
}