/**
 * AEU Sample 3 design system
 * 운영 적용 버전 — preview-s3 시안에서 이식.
 * 레거시(bootstrap/style.css)와 병행 로드되므로 s3- 프리픽스를 유지한다.
 */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Open Sans', 'Noto Sans KR', sans-serif; color: #333; line-height: 1.6; }
h1, h2, h3, h4 { font-family: 'Merriweather', 'Noto Sans KR', serif; }
img { max-width: 100%; }
a { color: inherit; }

/* ===== Top Bar ===== */
.s3-topbar { background: #8b0000; color: #fff; padding: 10px 0; font-size: 0.9rem; }
.s3-topbar-content { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.s3-topbar a { color: #fff; text-decoration: none; margin-left: 18px; }
.s3-topbar a:hover { text-decoration: underline; }
.s3-lang { font-weight: 700; }
.s3-lang a { opacity: 0.7; margin-left: 8px; }
.s3-lang a.active { opacity: 1; text-decoration: underline; }

/* ===== Navigation ===== */
.s3-nav { background: #fff; padding: 12px 0; border-bottom: 3px solid #8b0000; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.s3-nav-content { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
/* 로고 원본이 흰색뿐이라 흰 배경 내비게이션에서는 필터로 어둡게 변환 */
/* width:auto — 레거시 custom.css의 전역 img{width:100%} 무력화 (고정 높이 로고류) */
.s3-nav-logo img { height: 52px; width: auto; filter: brightness(0); }
.s3-logo-strip { display: flex; gap: 36px; align-items: center; flex-wrap: wrap; }
.s3-logo-strip img { height: 56px; width: auto; }
.s3-nav-menu { display: flex; gap: 30px; list-style: none; align-items: center; }
.s3-nav-menu > li { position: relative; }
.s3-nav-menu > li > a { color: #333; text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color 0.3s; display: inline-block; padding: 10px 0; }
.s3-nav-menu > li > a:hover, .s3-nav-menu > li.active > a { color: #8b0000; }
.s3-nav-menu > li.active > a { border-bottom: 2px solid #8b0000; }
/* Dropdown */
.s3-dropdown { position: absolute; top: 100%; left: 0; background: #fff; min-width: 220px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); border-top: 3px solid #8b0000; list-style: none; padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(8px); transition: all 0.25s ease; }
.s3-nav-menu > li:hover .s3-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.s3-dropdown li a { display: block; padding: 10px 20px; font-size: 0.9rem; font-weight: 500; color: #444; text-decoration: none; }
.s3-dropdown li a:hover { background: #f5f5f5; color: #8b0000; }
.s3-nav-cta { padding: 11px 24px; background: #8b0000; color: #fff; text-decoration: none; font-weight: 600; transition: background 0.3s; white-space: nowrap; }
.s3-nav-cta:hover { background: #6b0000; }
.s3-nav-toggle { display: none; font-size: 1.6rem; color: #8b0000; background: none; border: none; cursor: pointer; }

/* ===== Buttons ===== */
.s3-btn { display: inline-block; padding: 14px 30px; font-size: 1rem; font-weight: 600; text-decoration: none; transition: all 0.3s ease; margin-right: 12px; cursor: pointer; }
.s3-btn-primary { background: #8b0000; color: #fff; border: 2px solid #8b0000; }
.s3-btn-primary:hover { background: #6b0000; border-color: #6b0000; }
.s3-btn-secondary { background: transparent; color: #fff; border: 2px solid #fff; }
.s3-btn-secondary:hover { background: #fff; color: #1a1a1a; }
.s3-btn-outline { background: transparent; color: #8b0000; border: 2px solid #8b0000; }
.s3-btn-outline:hover { background: #8b0000; color: #fff; }

/* ===== Page Banner (inner pages) ===== */
.s3-banner { position: relative; height: 320px; background: #1a1a1a; overflow: hidden; }
/* 절대배치: 레거시 CSS(전역 transition/img 규칙)와의 %높이 계산 충돌 방지.
   세로 사진도 상단 위주로 보이도록 크롭 기준을 위쪽에 둔다 */
.s3-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.s3-banner-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.25) 100%); display: flex; align-items: center; }
.s3-banner-content { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; color: #fff; }
.s3-banner-content h1 { font-size: 2.8rem; font-weight: 700; margin-bottom: 10px; }
.s3-breadcrumb { font-size: 0.9rem; opacity: 0.85; }
.s3-breadcrumb a { color: #fff; text-decoration: none; }
.s3-breadcrumb a:hover { text-decoration: underline; }
.s3-breadcrumb span { margin: 0 8px; opacity: 0.6; }

/* ===== Home Hero ===== */
/* Hero tracks the video's 16:9 ratio (56.25vw), capped at 80vh so it never fills the whole screen */
.s3-hero { position: relative; height: min(56.25vw, 80vh); min-height: 420px; background: #1a1a1a; overflow: hidden; }
.s3-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s3-hero-video { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
/* 16:9 iframe that always covers the hero; each width term is its height term * 16/9 so the ratio holds */
.s3-hero-video iframe { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: max(100vw, 142.23vh, 747px); height: max(56.25vw, 80vh, 420px); border: 0; }
.s3-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%); display: flex; align-items: center; }
.s3-hero-content { max-width: 1200px; margin: 0 auto; padding: 0 40px; color: #fff; }
.s3-hero-content h1 { font-size: 3.2rem; font-weight: 700; line-height: 1.2; margin-bottom: 20px; max-width: 620px; }
.s3-hero-content p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 30px; max-width: 520px; }

/* ===== Quick Links ===== */
.s3-quicklinks { background: #f5f5f5; border-bottom: 3px solid #8b0000; }
.s3-quicklinks-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: center; flex-wrap: wrap; }
.s3-quicklink { padding: 24px 38px; text-decoration: none; color: #333; font-weight: 600; display: flex; align-items: center; gap: 12px; transition: all 0.3s ease; border-left: 1px solid #ddd; }
.s3-quicklink:first-child { border-left: none; }
.s3-quicklink:hover { background: #8b0000; color: #fff; }
.s3-quicklink i { font-size: 1.4rem; color: #8b0000; }
.s3-quicklink:hover i { color: #fff; }

/* ===== Generic layout helpers ===== */
.s3-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.s3-section { padding: 70px 0; }
.s3-section.alt { background: #f9f9f9; }
.s3-section-header { text-align: center; max-width: 720px; margin: 0 auto 45px; }
.s3-section-header h2 { font-size: 2.3rem; font-weight: 700; color: #1a1a1a; margin-bottom: 14px; }
.s3-section-header h2 span { color: #8b0000; }
.s3-section-header p { font-size: 1.08rem; color: #666; }

/* Two-column intro */
.s3-split { display: grid; grid-template-columns: 1fr 1fr; gap: 55px; align-items: center; }
.s3-split h2 { font-size: 2.2rem; font-weight: 700; color: #1a1a1a; margin-bottom: 18px; line-height: 1.3; }
.s3-split h2 span { color: #8b0000; }
.s3-split p { font-size: 1.06rem; color: #555; margin-bottom: 18px; }
.s3-img-shadow { border-radius: 5px; box-shadow: 0 20px 50px rgba(0,0,0,0.15); }

/* Stat badge */
.s3-img-wrap { position: relative; }
.s3-badge { position: absolute; bottom: -20px; right: -20px; background: #8b0000; color: #fff; padding: 26px; text-align: center; border-radius: 5px; }
.s3-badge .number { font-size: 2.6rem; font-weight: 700; display: block; line-height: 1; }
.s3-badge .label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }

/* Cards grid */
.s3-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.s3-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.s3-card { background: #fff; border-radius: 5px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.08); transition: all 0.3s ease; }
.s3-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.15); }
.s3-card img { width: 100%; height: 200px; object-fit: cover; }
.s3-card-body { padding: 24px; }
.s3-card-body h3 { font-size: 1.3rem; font-weight: 700; color: #1a1a1a; margin-bottom: 10px; }
.s3-card-body p { color: #666; margin-bottom: 14px; }
.s3-link { color: #8b0000; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.s3-link:hover { text-decoration: underline; }

/* Feature list */
.s3-features { list-style: none; }
.s3-features li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #eee; align-items: flex-start; }
.s3-features li:last-child { border-bottom: none; }
.s3-features i { color: #8b0000; font-size: 1.2rem; margin-top: 3px; }
.s3-features b { display: block; color: #1a1a1a; }

/* Info / table */
.s3-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: 0 5px 20px rgba(0,0,0,0.06); }
.s3-table th { background: #8b0000; color: #fff; text-align: left; padding: 14px 18px; font-size: 0.95rem; }
.s3-table td { padding: 13px 18px; border-bottom: 1px solid #eee; color: #444; }
.s3-table tr:last-child td { border-bottom: none; }

/* Contact */
.s3-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.s3-form label { display: block; font-weight: 600; margin: 16px 0 6px; color: #333; }
.s3-form input, .s3-form textarea { width: 100%; padding: 12px 14px; border: 1px solid #ddd; border-radius: 4px; font-family: inherit; font-size: 1rem; }
.s3-form textarea { min-height: 130px; resize: vertical; }
.s3-contact-info li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid #eee; }
.s3-contact-info i { color: #8b0000; font-size: 1.3rem; width: 28px; }

/* News list (blog) */
.s3-post { display: flex; gap: 22px; padding: 22px 0; border-bottom: 1px solid #eee; }
.s3-post img { width: 200px; height: 130px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.s3-post h3 { font-size: 1.25rem; margin-bottom: 8px; }
.s3-post .meta { color: #999; font-size: 0.85rem; margin-bottom: 8px; }
.s3-tag { display: inline-block; background: #8b0000; color: #fff; padding: 4px 11px; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 10px; }

/* ===== Footer ===== */
.s3-footer { background: #1a1a1a; color: #fff; padding: 60px 0 30px; }
.s3-footer-grid { max-width: 1200px; margin: 0 auto 40px; padding: 0 20px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.s3-footer-brand img { height: 48px; width: auto; margin-bottom: 18px; }
.s3-footer-brand p { color: rgba(255,255,255,0.7); margin-bottom: 18px; }
.s3-footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: rgba(255,255,255,0.1); border-radius: 50%; color: #fff; margin-right: 8px; transition: all 0.3s; text-decoration: none; }
.s3-footer-social a:hover { background: #8b0000; }
.s3-footer h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 18px; }
.s3-footer ul { list-style: none; }
.s3-footer ul li { margin-bottom: 11px; }
.s3-footer ul li a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.3s; }
.s3-footer ul li a:hover { color: #fff; }
.s3-footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 30px 20px 0; max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; color: rgba(255,255,255,0.5); font-size: 0.9rem; }
.s3-footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: none; margin-left: 18px; }
.s3-footer-bottom a:hover { color: #fff; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .s3-split { grid-template-columns: 1fr; }
    .s3-grid, .s3-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
    .s3-footer-grid { grid-template-columns: repeat(2, 1fr); }
    .s3-contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .s3-topbar-content { flex-direction: column; gap: 8px; }
    .s3-nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; gap: 0; padding: 10px 0; box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
    .s3-nav-menu.open { display: flex; }
    .s3-nav-menu > li { width: 100%; padding: 0 20px; }
    .s3-dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-top: none; padding-left: 12px; }
    .s3-nav-toggle { display: block; }
    .s3-hero-content h1 { font-size: 2.1rem; }
    .s3-banner-content h1 { font-size: 2rem; }
    .s3-grid, .s3-grid.cols-2 { grid-template-columns: 1fr; }
    .s3-footer-grid { grid-template-columns: 1fr; }
    .s3-footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .s3-post { flex-direction: column; }
    .s3-post img { width: 100%; height: 200px; }
    .s3-quicklink { padding: 16px 22px; }
}
