:root {
    --primary: #0e52ac;
    --secondary: #1a1a2e;
    --text: #333;
    --light: #f8f8f8;
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body { font-family: 'Pretendard', 'Noto Sans KR', sans-serif; color: var(--text); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =============================================
   Header
   ============================================= */
#header {
    position: fixed; top: 0; left: 0; width: 100%; height: 80px;
    z-index: 2000; transition: all 0.3s;
    display: flex; align-items: center;
    background: transparent;
}

#header.scrolled { 
    background: var(--white); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    height: 70px; 
}
#header.scrolled .logo a, #header.scrolled .gnb ul li a { 
    color: var(--text); 
}
#header.scrolled .menu-btn span { 
    background: var(--text); 
}

.header-inner {
    width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 40px;
    display: flex; justify-content: space-between; align-items: center;
}
.logo a { 
    font-size: 28px; font-weight: 800; color: var(--white); 
    letter-spacing: 2px; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.gnb ul { display: flex; gap: 40px; }
.gnb ul li { position: relative; white-space: nowrap; }
.gnb ul li a { 
    font-size: 17px; font-weight: 500; color: var(--white); 
    transition: color 0.3s; display: block; padding: 10px 0; 
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.gnb ul li a:hover { color: var(--primary); }

.gnb .submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2100;
    min-width: 160px;
    padding: 0;
    list-style: none;
    border-top: 3px solid var(--primary);
    display: block;
}
.gnb ul li:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.gnb .submenu li {
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}
.gnb .submenu li:last-child { border-bottom: none; }
.gnb .submenu li a {
    display: block;
    padding: 8px 20px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
}
.gnb .submenu li a:hover {
    background: var(--light);
    color: var(--primary);
}

.menu-btn {
    width: 30px; height: 22px; position: fixed; right: 20px; top: 29px; cursor: pointer; z-index: 2200;
}
#header.scrolled .menu-btn { top: 19px; }
#header.scrolled .menu-btn span { background: var(--secondary); }
body.act-all-menu .menu-btn span { background: var(--secondary) !important; }
.menu-btn span {
    display: block; position: absolute; height: 2px; width: 100%;
    background: var(--white); border-radius: 2px; transition: .25s ease-in-out;
}
.menu-btn span:nth-child(1) { top: 0; }
.menu-btn span:nth-child(2) { top: 10px; }
.menu-btn span:nth-child(3) { top: 20px; }

.menu-btn.act span:nth-child(1) { transform: rotate(45deg); top: 10px; }
.menu-btn.act span:nth-child(2) { opacity: 0; }
.menu-btn.act span:nth-child(3) { transform: rotate(-45deg); top: 10px; }

/* =============================================
   All Menu Overlay
   ============================================= */
.all-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--light); z-index: 1900; display: flex;
    visibility: hidden; opacity: 0; transition: all 0.5s;
    pointer-events: none;
}
.all-menu.act { visibility: visible; opacity: 1; pointer-events: auto; }
body.act-all-menu #header .logo, 
body.act-all-menu #header .gnb { opacity: 0; visibility: hidden; transition: all 0.3s; }
.all-left { width: 40%; background: var(--secondary) url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1000&q=80') center/cover; position: relative; }
.all-left::after { content: ''; position: absolute; inset: 0; background: rgba(14, 82, 172, 0.7); }
.all-right { width: 60%; display: flex; align-items: center; padding: 0 10%; }

.full-gnb > li { margin-bottom: 40px; }
.full-gnb > li > a { font-size: 32px; font-weight: 700; color: var(--secondary); display: block; margin-bottom: 15px; }
.full-gnb .sub { display: flex; gap: 20px; flex-wrap: wrap; }
.full-gnb .sub li a { font-size: 16px; color: #666; transition: color 0.3s; }
.full-gnb .sub li a:hover { color: var(--primary); }

/* =============================================
   Sections
   ============================================= */
.section { position: relative; overflow: hidden; height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sec-title { text-align: center; margin-bottom: 30px; }
.sec-title span { color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 2px; display: block; margin-bottom: 10px; }
.sec-title h3 { font-size: 36px; font-weight: 700; color: var(--secondary); }

/* Hero Slider */
.hero-swiper { width: 100%; height: 100%; position: relative; z-index: 1; }
.hero-slide { background-size: cover; background-position: center; height: 100vh; display: flex; align-items: center; position: relative; width: 100% !important; }
.hero-slide::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.hero-content { position: relative; z-index: 10; color: var(--white); max-width: 1200px; margin: 0 auto; padding: 0 40px; width: 100%; }
.hero-content h2 { font-size: 24px; font-weight: 400; margin-bottom: 10px; }
.hero-content .brand-name { font-size: 80px; font-weight: 800; line-height: 1; margin-bottom: 40px; }
.btn-more { display: inline-block; padding: 15px 40px; border: 1px solid var(--white); color: var(--white); font-weight: 600; transition: all 0.3s; }
.btn-more:hover { background: var(--white); color: var(--primary); }

/* Services Grid */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-card { position: relative; height: 400px; overflow: hidden; cursor: pointer; border-radius: 10px; }
.service-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.service-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; color: var(--white); transition: background 0.3s; }
.service-card:hover img { transform: scale(1.1); }
.service-card:hover .service-overlay { background: rgba(14, 82, 172, 0.8); }
.service-overlay h4 { font-size: 22px; margin-bottom: 10px; }
.service-overlay p { font-size: 14px; opacity: 0.8; }

/* Branch Section */
.section-branches { background: #f4f7fa; padding: 60px 0; }
.branch-content { display: flex; gap: 60px; align-items: stretch; }
.branch-map { flex: 1; background: var(--white); padding: 30px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); display: flex; flex-direction: column; justify-content: center; }
.map-container { position: relative; width: 100%; aspect-ratio: 1; }
.area-btn {
    position: absolute; padding: 8px 14px; background: var(--white); border: 2px solid var(--primary);
    border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.3s;
    color: var(--primary); transform: translate(-50%, -50%);
}
.area-btn:hover, .area-btn.active { background: var(--primary); color: var(--white); box-shadow: 0 5px 15px rgba(14,82,172,0.4); }

.branch-info { flex: 1; }
.branch-detail {
    display: none; background: var(--white); padding: 40px; border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); animation: fadeInUp 0.5s forwards;
}
.branch-detail.active { display: block; }
.branch-detail h4 { font-size: 28px; color: var(--primary); margin-bottom: 20px; border-bottom: 2px solid var(--light); padding-bottom: 10px; }
.info-list li { margin-bottom: 15px; display: flex; }
.info-list li strong { width: 100px; color: #888; font-weight: 500; }
.info-list li span { flex: 1; color: var(--secondary); font-weight: 600; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Swiper Custom Styles */
.main-swiper { width: 100%; height: 100vh; position: relative; }
.main-pagination {
    position: fixed; right: 20px; top: 50%; transform: translateY(-50%);
    z-index: 100; display: flex; flex-direction: column; gap: 10px;
}
.main-pagination .swiper-pagination-bullet {
    width: 12px; height: 12px; background: rgba(255,255,255,0.5); opacity: 1; margin: 0 !important;
}
.main-pagination .swiper-pagination-bullet-active {
    background: var(--primary);
}
.main-swiper-dark-pagination .swiper-pagination-bullet {
    background: rgba(0,0,0,0.2) !important;
}
.main-swiper-dark-pagination .swiper-pagination-bullet-active {
    background: var(--primary) !important;
}
.section-footer { height: auto !important; min-height: auto !important; }

/* Footer */
#footer { background: var(--secondary); color: rgba(255,255,255,0.6); padding: 40px 0; display: flex; align-items: center; position: relative; z-index: 10; min-height: auto !important; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.f-info p { font-size: 14px; margin-bottom: 5px; }
.f-links a { margin-left: 20px; font-size: 14px; color: var(--white); }

/* Mobile Responsive */
@media (max-width: 1024px) {
    #header { height: 60px; }
    .gnb { display: none; }
    .hero-content .brand-name { font-size: 50px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .branch-content { flex-direction: column; align-items: center; }
    .branch-map { width: 100%; max-width: 600px; margin-bottom: 30px; }
    .branch-info { width: 100%; }
    .branch-detail { padding: 30px 20px; min-height: auto; }
    .section-branches { height: auto !important; min-height: 100vh; padding: 80px 0; }
    .main-swiper .swiper-slide.section-branches { height: auto !important; }
    .all-right { width: 100%; padding: 100px 40px; }
}

@media (max-width: 768px) {
    .sec-title h3 { font-size: 28px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .service-card { height: 250px; }
    .hero-content .brand-name { font-size: 40px; }
    .footer-inner { flex-direction: column; text-align: center; gap: 30px; }
    .branch-detail h4 { font-size: 22px; margin-top: 20px; }
    .branch-detail h4:first-child { margin-top: 0; }
    .info-list li { flex-direction: column; gap: 5px; margin-bottom: 12px; }
    .info-list li strong { width: 100%; font-size: 13px; }
    .info-list li span { font-size: 15px; }
}
