/* 공통 폰트 / 기본 설정 */
body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    background-color: #fcfcfc;
}

/* Hero Section : 상단 600px, 어두운 그라데이션 + 이미지 */
.hero-bg {
    position: relative;
    height: 600px;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url('img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 콜분석 상단 이미지 */
.analytics-bg {
    position: relative;
    height: 600px;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url('img/analytics-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 콜분석 상단 이미지 */
.revenue-bg {
    position: relative;
    height: 600px;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url('img/revenue-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 치료계획지 상단 이미지 */
.careplan-bg {
    position: relative;
    height: 600px;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url('img/careplan-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 입·퇴원 관리 상단 이미지 */
.admission-bg {
    position: relative;
    height: 600px;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url('img/admission-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 병동·병실 현황 상단 이미지 */
.ward-bg {
    position: relative;
    height: 600px;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url('img/ward-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 환자 관리 상단 이미지 */
.patient-bg {
    position: relative;
    height: 600px;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url('img/patient-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/* Inquiry Modal Animation */
.modal-overlay {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-panel {
    transform: translateX(-50%) translateY(100%);
    transition: transform 0.4s ease-out;
}

.modal-overlay.open {
    visibility: visible;
    opacity: 1;
}

.modal-overlay.open .modal-panel {
    transform: translateX(-50%) translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f9f9f9;
}

::-webkit-scrollbar-thumb {
    background: #e0e7ff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c7d2fe;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    min-height: 180px;
    text-align: center;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: translateY(0);
}

/* Slider Dots */
.hero-dots-container {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-dots {
    display: inline-flex;
    gap: 0.5rem;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.hero-dot.active {
    transform: scale(1.3);
    background-color: #fff;
}

/* Fade-up scroll animation */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease-out;
}

.fade-up.show {
    opacity: 1;
    transform: translateY(0);
}

/* 전체폭 슬라이드 배너 */
.feature-banner {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
}

/* 슬라이드 기본 */
.feature-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.feature-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    background-size: cover;
    background-position: center;
}

.feature-slide.active {
    opacity: 1;
}

/* 어두운 그라데이션 오버레이 */
.feature-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            rgba(0, 0, 0, 0.55),
            rgba(0, 0, 0, 0.35));
}

/* 중앙 텍스트 */
.feature-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    width: 80%;
    max-width: 650px;
}

/* 텍스트 스타일 */
.feature-tag {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 8px;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 18px;
    opacity: 0.9;
}

/* 버튼 */
.feature-btn {
    display: inline-block;
    padding: 9px 22px;
    background: #e94f1f;
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    transition: 0.2s;
}

.feature-btn:hover {
    opacity: 0.9;
}

/* FEATURE 슬라이더 화살표 — 더 작고 세련되게 */
.feature-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    /* 기존 52px → 축소 */
    height: 38px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    /* 흰색 윤곽선 */
    background: transparent;
    color: #ffffff;
    font-size: 20px;
    /* 글자 크기 ↓ */
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 40;
    transition: all 0.2s ease;
}

/* hover 효과 */
.feature-arrow:hover {
    transform: translateY(-50%) scale(1.08);
    border-color: rgba(255, 255, 255, 0.85);
}

/* 위치 */
.feature-arrow-left {
    left: 22px;
}

.feature-arrow-right {
    right: 22px;
}

/* 모바일 숨김 */
@media (max-width: 768px) {
    .feature-arrow {
        display: none !important;
    }
}


/* Floating Buttons wrapper */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 9999;
}

/* 공통 버튼 스타일 */
.float-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    transition: 0.25s ease;
}

/* hover 효과 */
.float-btn:hover {
    transform: scale(1.08);
}

/* TOP 버튼 스타일 */
.top-btn {
    background: #E5E7EB;
    /* 밝은 회색 */
    color: #4B5563;
    /* 글자/아이콘 색 */
    font-weight: 600;
}

.top-btn .top-arrow {
    font-size: 18px;
    line-height: 16px;
}

.top-btn .top-text {
    margin-top: -2px;
    font-size: 11px;
    font-weight: 600;
}

/* 문의하기 버튼 */
.inquiry-btn {
    background: #e94f1f;
    display: flex;
    justify-content: center;
    align-items: center;
}

.inquiry-btn svg {
    width: 28px;
    height: 28px;
}

/* ===============================
   FAQ Section
================================ */
.faq-list {
    max-width: 70%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    padding: 0;
    overflow: hidden;
}

/* 숨겨진 체크박스 */
.faq-toggle {
    display: none;
}

/* 질문 */
.faq-question {
    display: flex;
    text-align: left;
    justify-content: flex-start;
    /* 플렉스 시작점으로 정렬 */
    gap: 12px;
    /* 아이콘과 텍스트 간격 */
    align-items: center;
    cursor: pointer;
    padding: 20px 24px;
    font-size: 1.05rem;
    font-weight: 600;
}

.q-label {
    color: #00a199;
    font-weight: 700;
    margin-right: 6px;
}

/* 화살표 */
.faq-arrow {
    width: 20px;
    height: 20px;
    transition: transform .3s ease;
}

/* 답변 전체 */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
    font-size: 0.98rem;
    line-height: 1.6;
    transition: max-height .35s ease, padding .35s ease;

    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* A. 라벨 (Q. 와 동일한 구조) */
.answer-label {
    color: #e94f1f;
    font-weight: 700;
    margin-right: 6px;
    flex-shrink: 0;
}

/* ================================
   모바일: 질문 높이 2줄 고정 + 넘치면 ...
================================ */

@media (max-width: 768px) {

    /* 질문 2줄까지만 보이기 */
    .faq-text {
        flex: 1;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 질문 박스 높이 고정 (2줄 기준) */
    .faq-question {
        min-height: 88px;
        align-items: flex-start;
    }
}

/* 체크되면 열림 */
.faq-toggle:checked+.faq-question+.faq-answer {
    max-height: 300px;
    padding-top: 10px;
    padding-bottom: 20px;
}

/* 화살표 회전 */
.faq-toggle:checked+.faq-question .faq-arrow {
    transform: rotate(180deg);
}

/* 화살표는 오른쪽 정렬 */
.faq-question svg {
    margin-left: auto;
}

.modal-panel button[type="submit"] {
    background-color: #e94f1f !important;
}

.modal-panel button[type="submit"]:hover {
    background-color: #e94f1f !important;
}

.feature-btn {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.feature-slide {
    pointer-events: auto;
}

/* FAQ 박스 사이즈 보완 */
@media (min-width: 769px) {
    .faq-list {
        max-width: 900px;
        /* 이전 70%보다 조금 더 넓게 */
    }
}

@media (max-width: 768px) {
    .faq-list {
        max-width: 100%;
        padding: 0 1.25rem;
        /* 양옆 여백만 살짝 */
    }

    .faq-question {
        padding: 16px 18px;
    }

    .faq-answer {
        padding: 0 18px;
        font-size: 0.95rem;
    }

    /* 모바일에서는 답변 최대 높이를 더 여유있게 */
    .faq-toggle:checked+.faq-question+.faq-answer {
        max-height: 600px;
    }
}

/* 모바일에서 소제목 h2 폰트 크기 통일 */
@media (max-width: 768px) {

    /* text-3xl, text-xl 붙어 있는 h2 전부 */
    h2.text-3xl,
    h2.text-xl {
        font-size: 1.375rem !important;
        /* 1.25랑 1.5 사이 중간 정도 */
        line-height: 1.4;
    }
}

/* 모바일에서 섹션 위아래 여백 축소 */
@media (max-width: 768px) {

    /* 공통 padding 축소 */
    section,
    .section,
    .py-20,
    .py-24,
    .py-16,
    .py-14 {
        padding-top: 2.5rem !important;
        /* 기본 5rem → 절반 정도 */
        padding-bottom: 2.5rem !important;
    }

    /* 더 큰 섹션은 조금 더 과감하게 줄임 */
    .py-32,
    .py-28 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

@media (max-width: 768px) {
    h1.leading-relaxed {
        line-height: 1.25 !important;
        /* mobile 정상 줄간격 */
    }
}


/* ============================
   모바일 작은 드롭다운 메뉴
============================ */
#mobile-menu {
    position: absolute;
    top: 60px;
    /* 네비 아래에서 내려오게 */
    right: 16px;
    /* 화면 오른쪽 정렬 */
    width: 220px;
    /* 메뉴 박스 크기 */
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    /* 닫혀있을 때 클릭 안되게 */
    transform: translateY(-10px);
    transition: all .25s ease;
    z-index: 999;
}

/* 메뉴 열렸을 때 */
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* =========================================
   모바일에서 모든 배경 섹션 높이 통일
========================================= */
/* =========================================
   모바일에서 모든 배경 섹션 높이 통일
========================================= */
@media (max-width: 768px) {

    /* 배경이미지 있는 섹션 전부 통합 */
    .hero-bg,
    .analytics-bg,
    .careplan-bg,
    .admission-bg,
    .ward-bg,
    .patient-bg {
        height: 45vh;
        /* 원하는 높이 */
        min-height: 260px;
        /* 너무 작아지지 않도록 안전값 */
        background-size: cover !important;
        background-position: center !important;
    }
}


/* ============================
   모바일 작은 드롭다운 메뉴 공통
============================ */
@media (max-width: 768px) {
    #mobile-menu {
        position: absolute;
        top: 60px;
        /* Nav 아래 */
        right: 16px;
        /* 우측 정렬 */
        width: 220px;
        /* 메뉴 박스 폭 */
        background: rgba(255, 255, 255, 0.95);
        border-radius: 12px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: all .25s ease;
        z-index: 999;
    }

    #mobile-menu.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
}

/* =========================================
   모든 페이지 Hero Title(h1) PC + 모바일 완전 통일
========================================= */

/* 상단 배경영역 안의 h1 공통 스타일 */
.hero-bg h1,
.analytics-bg h1,
.careplan-bg h1,
.admission-bg h1,
.ward-bg h1,
.patient-bg h1 {
    line-height: 1.25 !important;
    /* 줄 간격 고정 */
    margin-bottom: 1rem !important;
    /* h1 아래 간격 통일 */
    font-weight: 800 !important;
}

/* h1 내부 span 두 번째 줄(analytics만 넓었던 문제 해결) */
.hero-bg h1 span,
.analytics-bg h1 span,
.careplan-bg h1 span,
.admission-bg h1 span,
.ward-bg h1 span,
.patient-bg h1 span {
    display: block !important;
    margin-top: 0.35rem !important;
    /* 모든 페이지 2줄 간격 통일 */
}

/* <br>를 사용하는 페이지도 동일 줄 간격 유지 */
.hero-bg h1 br,
.analytics-bg h1 br,
.careplan-bg h1 br,
.admission-bg h1 br,
.ward-bg h1 br,
.patient-bg h1 br {
    line-height: 1.25 !important;
}

/* =========================================
   모든 페이지 Hero Title 간격 완전 통일
   (analytics와 동일한 느낌으로 강제 통일)
========================================= */

.hero-bg h1,
.analytics-bg h1,
.careplan-bg h1,
.admission-bg h1,
.ward-bg h1,
.patient-bg h1 {
    line-height: 1.25 !important;
    /* 기본 줄 간격 통일 */
    margin-bottom: 1.0rem !important;
    /* 아래 여백 통일 */
}

/* h1 안의 span(=2번째 줄) 간격을 모든 페이지에서 동일하게 만들기 */
.hero-bg h1 span,
.analytics-bg h1 span,
.careplan-bg h1 span,
.admission-bg h1 span,
.ward-bg h1 span,
.patient-bg h1 span {
    display: block !important;
    margin-top: 0.35rem !important;
    /* analytics의 mt-2보다 좁은, 모든 페이지 공통값 */
}

/* <br> 사용하는 페이지도 동일한 줄간격 적용 */
.hero-bg h1 br,
.analytics-bg h1 br,
.careplan-bg h1 br,
.admission-bg h1 br,
.ward-bg h1 br,
.patient-bg h1 br {
    line-height: 1.25 !important;
}

/* ===============================
   NAV Hover + Active 스타일
================================ */

/* 로고 hover 확대 */
.nav-logo {
    transition: transform 0.25s ease;
}

.nav-logo:hover {
    transform: scale(1.07);
}

/* 메뉴 기본 */
.nav-item {
    transition: transform 0.25s ease, color 0.2s ease;
    color: #4b5563;
    /* text-gray-600 */
    font-weight: 500;
}

/* 메뉴 hover 확대 */
.nav-item:hover {
    transform: scale(1.07);
    color: #000000;
}

/* 현재 페이지 메뉴 (active) */
.nav-item-active {
    color: #111827 !important;
    /* text-gray-900 */
    font-weight: 700 !important;
    transform: scale(1.05);
}