/*
Theme Name: Multisite Branch Theme
Theme URI: https://www.에듀플렉스.kr
Author: 현
Author URI: https://www.에듀플렉스.kr
Description: 에듀플렉스 멀티사이트 지점 전용 맞춤형 워드프레스 테마. 팝업, 슬라이드, 문의폼, 지점 소개, 이벤트 페이지 기능 포함.
Version: 1.2.7
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: multisite-branch
Tags: custom-theme, responsive, business
*/

/* 글로벌 컬러 팔레트 정의 */
:root {
    --primary-color: #0054a7; /* 주요 파란색 계열 */
    --accent-color: #e4007f;  /* 강조 핑크색 계열 */
    --dark-bg: #222222;       /* 어두운 배경/텍스트 */
    --light-bg: #f8f9fa;      /* 밝은 회색 배경 */
    --text-dark: #333333;     /* 기본 텍스트 색상 */
    --text-light: #ffffff;    /* 밝은 텍스트 색상 */
    --border-color: #dddddd;  /* 기본 테두리 색상 */
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #d7d7d4;
    color: var(--text-dark);
    transition: padding-top 0.3s ease;
}

#primary,
body:not(.home) > main.container {
    flex-grow: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 상단 팝업 */
.top-popup-wrapper {
    width: 100%;
    z-index: 10001; 
    position: fixed;
    top: 0;
    left: 0;
}
.admin-bar .top-popup-wrapper {
    top: 32px;
}
.top-popup-wrapper.popup-hidden {
    display: none;
}
.popup-close-btn {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
    opacity: 0.7;
}
.popup-close-btn:hover {
    opacity: 1;
}

.shadow-box {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* GNB 헤더 */
#site-header {
    background: #fff;
    z-index: 10000;
    width: 100%;
    transition: top 0.3s ease;
    position: relative;
}
#site-header.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--mb-header-height, 75px);
}
body.sticky-header-active {
    padding-top: var(--mb-header-height, 75px);
}

.site-logo img {
    max-height: 50px;
    width: auto;
}

/* GNB 메뉴 (데스크탑) */
#site-navigation .desktop-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
}
#site-navigation .desktop-menu > li {
    position: relative;
}
#site-navigation .desktop-menu > li > a {
    display: block;
    padding: 0 15px;
    line-height: var(--mb-header-height, 75px);
    text-decoration: none;
    color: var(--mb-gnb-font-color, #333);
    font-size: var(--mb-gnb-font-size, 16px);
    font-weight: var(--mb-gnb-font-weight, 400);
    transition: color 0.3s ease;
}
#site-navigation .desktop-menu > li > a:hover {
    background: none;
    color: #e4007f;
}

/* 드롭다운 메뉴 (데스크탑) */
#site-navigation .desktop-menu ul {
    display: none;
    position: absolute;
    background: #222;
    box-shadow: none;
    top: 100%;
    left: 0;
    min-width: 100%;
    width: auto;
    z-index: 100;
    border-top: 2px solid #e4007f;
    margin: 0;
    padding: 0;
    list-style: none;
}
#site-navigation .desktop-menu > li:hover > ul {
    display: block;
}
#site-navigation .desktop-menu ul li a {
    display: block;
    padding: 10px 15px;
    color: var(--mb-dropdown-font-color, #ffffff);
    font-size: var(--mb-dropdown-font-size, 15px);
    border-bottom: 1px solid #444;
    white-space: nowrap;
    text-decoration: none;
}
#site-navigation .desktop-menu ul li:last-child a {
    border-bottom: none;
}
#site-navigation .desktop-menu ul li a:hover {
    color: #e4007f;
    background: none;
}

/* 햄버거 메뉴 버튼 (모바일) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10001; 
}
.nav-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

#site-navigation .nav-toggle .bar {
    background-color: #333;
}

body.mobile-menu-active #site-navigation .nav-toggle .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
body.mobile-menu-active #site-navigation .nav-toggle .bar:nth-child(2) {
    opacity: 0;
}
body.mobile-menu-active #site-navigation .nav-toggle .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* 모바일 메뉴 컨테이너 */
.mobile-nav-container {
    display: none; 
    position: fixed;
    left: 0;
    width: 100%;
    background: #222;
    z-index: 9999;
    overflow-y: auto;
    
    /* 수정된 부분: transform 대신 visibility와 opacity로 제어 */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* 수정된 부분: 메뉴 활성 시 보이도록 처리 */
body.mobile-menu-active .mobile-nav-container {
    visibility: visible;
    opacity: 1;
}

/* 슬라이드 컨테이너 */
.main-slider {
    position: relative;
    overflow: hidden;
    height: 550px;
}
.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: var(--desktop-bg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #222;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}
.slide.active {
    opacity: 1;
    z-index: 2;
}

/* 슬라이드 안 텍스트 */
.slide-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    width: 90%;
    user-select: none;
}
.slide-content h2, .slide-content h3 {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
}
.slide-content p {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    margin-bottom: 25px;
}
.slide-buttons {
    margin-top: 25px;
}

/* 슬라이드 버튼 */
.slide-btn {
    display: inline-block;
    padding: 0 25px;
    border-radius: 50px;
    background-color: #0054a7;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}
.slide-btn:hover {
    background-color: #002c57;
    color: yellow;
}

/* 슬라이드 네비게이션 버튼 */
.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    border: 2px solid #ffffff;
    background: transparent;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: background-color 0.3s ease, transform 0.3s ease, left 0.3s ease, right 0.3s ease;
}
.slide-nav:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
.slide-prev { left: 20px; }
.slide-next { right: 20px; }

/* 인디케이터 */
.slide-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.slide-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
}
.slide-indicators button.active {
    background: #000;
}

/* 서브 타이틀 */
.sub-title-section {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    margin-bottom: 0;
}
.sub-title-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: var(--desktop-bg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #f0f0f0;
    background-attachment: fixed;
    z-index: -1;
}
.sub-title-text {
    position: relative;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
    box-sizing: border-box;
    padding: 0 20px;
    user-select: none;
}
.sub-title-text h2 {
    margin: 0;
    line-height: 1.2;
}
.sub-title-slider {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}
.sub-title-bg-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: var(--desktop-bg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #f0f0f0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.sub-title-bg-slide.active {
    opacity: 1;
}


/* 서브 페이지 콘텐츠 영역 수정 */
body:not(.home) main.container {
    width: 1200px;
    max-width: 100%;
    box-sizing: border-box;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    margin-top: -60px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    margin-bottom: 40px;
}

/* 푸터 */
footer {
    width: 100%;
    padding: 0;
    display: flex;
    align-items: center;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
}
.footer-left {
    text-align: left;
}
.footer-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 25px;
}
.footer-right a,
.footer-right button.footer-modal-trigger {
    color: inherit;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    display: inline;
}
.footer-right a:hover,
.footer-right button.footer-modal-trigger:hover {
    text-decoration: underline;
}
.footer-sns-icons {
    display: flex;
    gap: 15px;
    border-right: 1px solid #555;
    padding-right: 25px;
}
.footer-sns-icons a {
    color: inherit;
    font-size: 20px;
    transition: color 0.3s, transform 0.3s;
}
.footer-sns-icons a:hover {
    color: #fff;
    transform: translateY(-2px);
}

/* 푸터 모바일 메뉴 */
.footer-right-mobile {
    display: none;
    position: relative;
}
.footer-mobile-toggle {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: inherit;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-mobile-toggle .icon {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid currentColor;
    transition: transform 0.3s ease;
}
.footer-right-mobile.is-open .footer-mobile-toggle .icon {
    transform: rotate(180deg);
}
.footer-mobile-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background-color: #444;
    border-radius: 4px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    width: 150px;
    padding: 5px 0;
    z-index: 10;
}
.footer-mobile-menu a,
.footer-mobile-menu button {
    display: block;
    width: 100%;
    padding: 10px 15px;
    text-align: left;
    color: #fff;
    text-decoration: none;
    background: none;
    border: none;
    font-size: 14px;
    box-sizing: border-box;
    cursor: pointer;
}
.footer-mobile-menu a:hover,
.footer-mobile-menu button:hover {
    background-color: rgba(255,255,255,0.1);
}

/* 푸터 모달 스타일 */
.footer-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.footer-modal-backdrop.is-visible {
    visibility: visible;
    opacity: 1;
}
.footer-modal-window {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    position: relative;
    width: 90%;
    height: 90%;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.footer-modal-backdrop.is-visible .footer-modal-window {
    transform: scale(1);
}
.footer-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    line-height: 1;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.footer-modal-close:hover {
    color: #333;
}
.footer-modal-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.footer-modal-content {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
}


/* =================================================================
 * ===================== 프론트 페이지 빌더 스타일 =====================
 * ================================================================= */

.front-page-content-wrapper {
    width: 1200px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-top: -50px;
    margin-bottom: 50px;
    position: relative;
    z-index: 10;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.fp-block {
    padding: 80px 0;
    background-size: cover;
    background-position: center center;
}
.fp-block h2 {
    text-align: center;
    font-size: 32px;
    margin-top: 0;
    margin-bottom: 20px;
}
.fp-block .subtitle {
    text-align: center;
    font-size: 16px;
    margin-bottom: 60px;
    color: #555;
}
.fp-block .grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}
.fp-block .grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    align-items: center;
}

/* 3단 블록 이미지 사이즈 변경 */
.three-col-icon .col-item img,
.success-stories .col-item img {
    width: 200px;
    height: 200px;
    object-fit: cover; /* 이미지 비율 유지 */
    margin-bottom: 15px;
}
.three-col-icon .col-item h3,
.success-stories .col-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

/* 1차, 2차 3단 블록 여백 및 간격 조정 */
.fp-block.three-col-icon .container,
.fp-block.success-stories .container {
    padding-left: 50px;
    padding-right: 50px;
}
.fp-block.three-col-icon .grid-3,
.fp-block.success-stories .grid-3 {
    gap: 50px;
}

.fp-block.two-col-cta .container {
    padding-left: 50px;
    padding-right: 50px;
}
.fp-block.two-col-cta .col-right img {
    max-width: 100%;
    height: auto;
    display: block;
}

.fp-block.experts .container {
    padding-left: 50px;
    padding-right: 50px;
}
.experts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    text-align: center;
}
.expert-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}
.expert-card h3 { font-size: 18px; margin-bottom: 5px; }
.expert-card h4 { font-size: 14px; color: #777; margin-top: 0; margin-bottom: 10px; }

.fp-block.cta-banner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 50px;
    padding-right: 15px;
}
.fp-block.cta-banner .cta-text-wrapper {
    flex: 1;
    padding-right: 20px;
}
.fp-block.cta-banner .cta-button-wrapper {
    flex-basis: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.fp-block.cta-banner .cta-button {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s ease;
}
.fp-block.cta-banner .cta-button:hover {
    background-color: #005177;
}

.fp-block.info-form {
    padding: 60px 0;
}
.fp-block.info-form .container {
    padding-left: 50px;
    padding-right: 50px;
}
.info-form .col-left h3 { 
    margin-top: 0; 
}
.info-form .col-right {
    background: rgba(255,255,255,0.9);
    padding: 30px;
    border-radius: 5px;
}

/* 범용 문의폼 스타일 */
.contact-form .form-field { margin: 0 0 15px 0; padding: 0; }
.contact-form label { display: block; margin-bottom: 5px; font-size: 14px; color: #555; }
.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="number"] { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; background-color: #fff; cursor: text !important; }
.contact-form .form-field-checkbox { display: flex; align-items: center; gap: 8px; }
.contact-form .form-field-checkbox input[type="checkbox"] { width: auto; flex-shrink: 0; }
.contact-form .form-field-checkbox label { margin-bottom: 0; font-size: 13px; color: #666; }
.contact-form .form-field-captcha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.contact-form .form-field-captcha label { margin-bottom: 0; }
.contact-form .form-field-captcha input { width: 80px; }
.contact-form button { width: 100%; padding: 15px; background: #0073aa; color: #fff; border: none; cursor: pointer; font-size: 16px; border-radius: 4px; transition: background-color 0.3s; }
.contact-form button:hover { background-color: #005177; }
.contact-form button:disabled { background-color: #ccc; }
.form-response { padding: 10px; margin-bottom: 15px; border-radius: 4px; border: 1px solid transparent; }
.form-response[style*="color: green"] { background-color: #d4edda; border-color: #c3e6cb; }
.form-response[style*="color: red"] { background-color: #f8d7da; border-color: #f5c6cb; }


/* 숏코드로 삽입된 지점 정보 블록 스타일 */
.shortcode-branch-info-block {
    background: #f8f9fa; /* 밝은 회색 배경 */
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px 40px;
    margin: 30px 0;
}
.shortcode-branch-info-block h3 {
    margin-top: 0;
    font-size: 24px;
    color: var(--text-dark);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.shortcode-branch-info-block p {
    line-height: 1.8;
    color: #555;
    font-size: 16px;
    margin-bottom: 1.2em;
}
.shortcode-branch-info-block p:last-child {
    margin-bottom: 0;
}
.shortcode-branch-info-block strong {
    color: #333;
    font-weight: 700;
}

/* 지도 컨테이너 스타일 */
.map-container {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* PC에서는 4:3 비율로 변경 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}
.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* 오시는 길 페이지 2단 레이아웃 스타일 */
.directions-container {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}
.directions-column {
    flex: 1;
    min-width: 0;
}
.directions-container .shortcode-branch-info-block {
    margin: 0;
}


/* =================================================================
 * ===================== 반응형 스타일 =====================
 * ================================================================= */

/* 태블릿 & 모바일 (1200px 이하) */
@media (max-width: 1200px) {
    .nav-toggle { display: block; }
    #site-navigation .desktop-menu { display: none; }
    
    .mobile-nav-container { 
        display: block;
    }

    .mobile-menu-header { display: none; }
    .mobile-nav-container ul.mobile-menu { flex-direction: column; display: block !important; padding: 0; margin:0; list-style: none; }
    .mobile-nav-container ul.mobile-menu li { position: relative; }
    .mobile-nav-container ul.mobile-menu li a { display: block; padding: 15px 20px; color: #fff; font-size: 16px; border-bottom: 1px solid #444; text-decoration: none; }
    .mobile-nav-container ul.mobile-menu li a:hover { color: #e4007f; }
    .submenu-toggle { position: absolute; right: 0; top: 0; width: 60px; height: 51px; border: none; background: transparent; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
    .submenu-toggle::after { content: '╲╱'; font-size: 10px; transform: scaleY(0.6); transition: transform 0.3s ease; }
    .submenu-toggle.open::after { transform: scaleY(0.6) rotate(180deg); }
    .mobile-nav-container ul.mobile-menu ul.sub-menu { display: none; background: #333; list-style: none; margin: 0; padding: 0; }
    .mobile-nav-container ul.mobile-menu ul.sub-menu li a { padding-left: 40px; font-size: 15px; border-color: #555; }

    .front-page-content-wrapper {
        width: 100%;
        margin-top: -30px;
        border-radius: 0;
    }

    /* 3단 블록 레이아웃 (2열로 변경) */
    .fp-block .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    /* 3단 블록의 마지막 아이템을 하단 중앙에 배치 */
    .fp-block .grid-3 .col-item:last-child {
        grid-column: 1 / -1; /* 1번 라인에서 마지막 라인까지 확장 */
    }

    .fp-block .grid-2 { grid-template-columns: 1fr; }
    
    .experts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .fp-block.two-col-cta .col-right {
        text-align: center;
    }
    
    .fp-block.cta-banner .container {
        flex-direction: column;
        padding-left: 15px;
        text-align: center;
    }
    .fp-block.cta-banner .cta-text-wrapper {
        text-align: center;
        padding-right: 0;
        margin-bottom: 20px;
    }
    .fp-block.cta-banner .cta-text-wrapper h2 {
        text-align: center;
    }

    .fp-block.three-col-icon .container,
    .fp-block.experts .container,
    .fp-block.success-stories .container,
    .fp-block.info-form .container,
    .fp-block.two-col-cta .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 태블릿에서 서브 페이지 상단 크기 조절 (85%) */
    .sub-title-section {
        height: 298px !important;
    }
    .sub-title-text h2 {
        font-size: 20px !important;
    }
}

/* 모바일 전용 (768px 이하) */
@media (max-width: 768px) {
    .slide { background-image: var(--mobile-bg); }
    .sub-title-bg,
    .sub-title-bg-slide { background-image: var(--mobile-bg); }
    
    /* 모바일에서 서브 페이지 상단 크기 조절 */
    .sub-title-section {
        height: 180px !important;
    }
    .sub-title-text h2 {
        font-size: 24px !important;
    }

    .slide-content { transform: translate(-50%, -50%) scale(0.7); width: 128%; }

    /* CSS line-clamp를 이용한 텍스트 2줄 제한 */
    .three-col-icon .col-item .truncatable-text,
    .success-stories .col-item .truncatable-text {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* 텍스트를 2줄로 제한 */
        -webkit-box-orient: vertical;
        line-height: 1.5em; /* 줄 높이 지정 */
        max-height: 3em; /* line-height * 2 (2줄 높이) */
    }

    /* 전문가 설명 모바일에서 숨김 처리 */
    .expert-card p {
        display: none;
    }

    /* 모바일에서 3단 블록 및 전문가 이미지 크기 축소 */
    .three-col-icon .col-item img,
    .success-stories .col-item img {
        width: 115px;
        height: 115px;
    }
    .expert-card img {
        width: 105px;
        height: 105px;
    }

    /* 모바일에서 3단 블록 간격 축소 */
    .fp-block.three-col-icon .grid-3,
    .fp-block.success-stories .grid-3 {
        gap: 25px;
    }

    /* 모바일에서 서브 페이지 여백 축소 */
    body:not(.home) main.container {
        padding: 12px;
        margin-top: -30px;
    }

    /* 모바일에서 오시는 길 컬럼을 세로로 쌓음 */
    .directions-container {
        flex-direction: column;
    }

    /* 모바일에서는 지도의 세로 비율을 더 길게 조정 */
    .map-container {
        padding-bottom: 112%;
    }

    /* 푸터 모바일 레이아웃 */
    .footer-right {
        display: none;
    }
    .footer-right-mobile {
        display: block;
    }

    /* --- 모바일 슬라이더 최적화 --- */
    /* 슬라이드 내부 버튼 크기 확대 */
    .slide-btn {
        transform: scale(1.5);
        margin: 0 10px;
    }

    /* 슬라이더 좌/우 버튼 위치 및 크기 조정 */
    .slide-nav {
        width: 35px; /* 44px의 80% */
        height: 35px; /* 44px의 80% */
        top: auto;
        bottom: 70px;
    }
    .slide-prev {
        left: 50%;
        right: auto;
        transform: translateX(calc(-100% - 10px));
    }
    .slide-next {
        left: 50%;
        right: auto;
        transform: translateX(10px);
    }
}

/* 기타 유틸리티 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    z-index: 100001;
    transition: top 0.3s;
}
.skip-link:focus {
    top: 0;
}

#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}
#scroll-to-top:hover {
    background-color: #c4006e;
    transform: translateY(-2px);
}