/* ========================================
   layout.css — 팜플 공통 레이아웃 스타일
   리셋, CSS 변수, 상단바, 헤더/GNB, 페이지히어로,
   섹션 공통, 푸터, 스크롤투탑, 모바일 하단바, 반응형
   ======================================== */

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2bbcc0;
    --primary-dark: #229a9d;
    --primary-light: #e8f8f8;
    --dark: #1d1d1f;
    --dark-lighter: #2a2a2c;
    --gray-900: #333;
    --gray-700: #555;
    --gray-500: #86868b;
    --gray-300: #d2d2d7;
    --gray-100: #f5f5f7;
    --white: #fff;
    --top-bar-height: 40px;
    --header-height: 80px;
    --total-header-height: 120px;
    --transition: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--total-header-height) + 20px);
}

body {
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--white);
}

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

ul, li {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* Anchor scroll offset for fixed header */
section[id], div[id], h1[id], h2[id], h3[id], h4[id] {
    scroll-margin-top: calc(var(--total-header-height) + 20px);
}

/* ========================================
   TOP BAR
   ======================================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--top-bar-height);
    background: var(--dark);
    z-index: 9100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    font-size: 13px;
}

.top-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-left .remote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    background: var(--primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: background var(--transition);
}

.top-left .remote-btn:hover {
    background: var(--primary-dark);
}

.top-right {
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.top-right .top-phone {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.02em;
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
    position: fixed;
    top: var(--top-bar-height);
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.98);
    z-index: 9000;
    transition: box-shadow var(--transition), background var(--transition);
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.header-logo a {
    display: flex;
    align-items: center;
}

.header-logo img {
    height: 40px;
    width: auto;
}

/* Desktop Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-item > a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--dark);
    letter-spacing: -0.02em;
    transition: color var(--transition);
    white-space: nowrap;
}

.nav-item > a:hover,
.nav-item:hover > a,
.nav-item > a.active {
    color: var(--primary);
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 200px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
    pointer-events: none;
}

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

.nav-dropdown a {
    display: block;
    padding: 10px 24px;
    font-size: 14px;
    color: var(--gray-700);
    font-weight: 400;
    transition: background var(--transition), color var(--transition);
}

.nav-dropdown a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Header Right (Login) */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    background: var(--primary);
    border-radius: 24px;
    transition: background var(--transition), transform var(--transition);
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-login .material-symbols-outlined {
    font-size: 18px;
}

.header-member-name {
    font-size: 13px;
    color: var(--gray-700);
    font-weight: 500;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #ff3b30;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 9100;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation Overlay */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    z-index: 9050;
    padding-top: var(--total-header-height);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-nav.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-inner {
    padding: 20px 24px 100px;
}

.mobile-nav-item {
    border-bottom: 1px solid var(--gray-100);
}

.mobile-nav-item > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
}

.mobile-nav-item > a .material-symbols-outlined {
    font-size: 20px;
    color: var(--gray-500);
    transition: transform 0.3s;
}

.mobile-nav-item.open > a .material-symbols-outlined {
    transform: rotate(180deg);
}

.mobile-sub-menu {
    display: none;
    padding-bottom: 12px;
}

.mobile-nav-item.open .mobile-sub-menu {
    display: block;
}

.mobile-sub-menu a {
    display: block;
    padding: 10px 16px;
    font-size: 15px;
    color: var(--gray-700);
}

.mobile-sub-menu a:hover {
    color: var(--primary);
}

.mobile-nav-login {
    margin-top: 24px;
    text-align: center;
}

.mobile-nav-login .btn-login {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 16px;
    border-radius: 12px;
}

/* ========================================
   PAGE HERO
   ======================================== */
.page-hero {
    padding-top: var(--total-header-height);
    background: linear-gradient(135deg, var(--dark) 0%, #1a3a3b 60%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(43, 188, 192, 0.08);
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(43, 188, 192, 0.05);
}

.page-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 40px 50px;
    position: relative;
    z-index: 1;
}

.page-hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
}

.page-hero-breadcrumb a {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s;
}

.page-hero-breadcrumb a:hover {
    color: var(--primary);
}

.page-hero-breadcrumb .material-symbols-outlined {
    font-size: 16px;
}

.page-hero-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.page-hero-subtitle {
    font-size: clamp(15px, 2vw, 18px);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 12px;
}

/* Content area padding for pages without page-hero */
.content-top-pad {
    padding-top: calc(var(--total-header-height) + 40px) !important;
}

/* Custom hero sections auto-offset for fixed header */
.cs-req-hero,
.partners-hero,
.it-hero,
.greeting-hero,
section[class*="-hero"]:not(.hero-section):not(.page-hero) {
    padding-top: calc(var(--total-header-height) + 60px) !important;
}

/* ========================================
   SECTION COMMONS
   ======================================== */
.section {
    padding: 100px 0;
}

.section-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.section-desc {
    font-size: 16px;
    color: var(--gray-500);
    margin-top: 12px;
    line-height: 1.6;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.6);
    padding: 60px 0 0;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-top {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand-logo {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 20px;
}

.footer-brand p {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.4);
}

.footer-sitemap {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.footer-sitemap-col h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.footer-sitemap-col a {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    padding: 4px 0;
    transition: color var(--transition);
}

.footer-sitemap-col a:hover {
    color: var(--primary);
}

.footer-info {
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-info p {
    font-size: 12.5px;
    line-height: 2;
    color: rgba(255, 255, 255, 0.35);
}

.footer-info strong {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
}

.footer-copyright {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links a.privacy-link {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   SCROLL TO TOP
   ======================================== */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 16px rgba(43, 188, 192, 0.3);
    z-index: 8000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(43, 188, 192, 0.4);
}

.scroll-top .material-symbols-outlined {
    font-size: 24px;
}

/* ========================================
   MOBILE FIXED BOTTOM BAR
   ======================================== */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--white);
    box-shadow: 0 -2px 16px rgba(0,0,0,0.12);
    border-top: 1px solid var(--gray-300);
}

.mobile-bottom-bar .bar-inner {
    display: flex;
}

.mobile-bottom-bar .bar-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 0;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background var(--transition);
}

.mobile-bottom-bar .bar-btn.phone-btn {
    background: var(--primary);
    color: #fff;
}

.mobile-bottom-bar .bar-btn.remote-btn {
    background: var(--dark);
    color: #fff;
}

.mobile-bottom-bar .bar-btn:active {
    opacity: 0.85;
}

/* ========================================
   RESPONSIVE — Layout
   ======================================== */
@media (max-width: 1024px) {
    .header-nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

    .header-right .btn-login {
        display: none;
    }

    .header-right .header-member-name {
        display: none;
    }

    .header-inner {
        padding: 0 20px;
    }

    .section-inner {
        padding: 0 20px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-sitemap {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-inner {
        padding: 0 20px;
    }

    .page-hero-inner {
        padding: 40px 20px 36px;
    }
}

@media (max-width: 768px) {
    :root {
        --top-bar-height: 36px;
        --header-height: 60px;
        --total-header-height: 96px;
    }

    .top-bar {
        padding: 0 16px;
        font-size: 11px;
    }

    .top-left .remote-btn {
        font-size: 11px;
        padding: 3px 10px;
    }

    .top-right {
        font-size: 11px;
        gap: 10px;
    }

    .top-right .top-hours {
        display: none;
    }

    .header-logo img {
        height: 32px;
    }

    .section {
        padding: 70px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .footer-sitemap {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer-inner {
        padding: 0 20px;
    }

    .mobile-bottom-bar {
        display: block;
    }

    body {
        padding-bottom: 56px;
    }

    .scroll-top {
        bottom: 72px;
    }

    .content-top-pad {
        padding-top: calc(var(--total-header-height) + 32px) !important;
    }

    .cs-req-hero,
    .partners-hero,
    .it-hero,
    .greeting-hero,
    section[class*="-hero"]:not(.hero-section):not(.page-hero) {
        padding-top: calc(var(--total-header-height) + 40px) !important;
    }
}

@media (max-width: 480px) {
    .section-inner {
        padding: 0 16px;
    }

    .footer-sitemap {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .footer-inner {
        padding: 0 16px;
    }
}
