/**
 * 서울비디치과 Mobile Layout Optimization CSS
 * =============================================
 * 모바일 환경 최적화 스타일
 * SEO/AEO/GEO 지원 및 Core Web Vitals 개선
 */

/* ========================================
   📱 Touch & Tap Optimization
======================================== */
/* 터치 타겟 최소 크기 (44x44px) */
a, button, input, select, textarea,
.btn, .nav-item > a, .treatment-card,
.quick-action-item, .floating-btn {
  min-height: 44px;
  min-width: 44px;
}

/* 터치 피드백 개선 */
@media (hover: none) and (pointer: coarse) {
  a:active, button:active, .btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  .treatment-card:active {
    transform: scale(0.98) !important;
  }
}

/* ========================================
   📐 Safe Area & Notch Support (iOS)
======================================== */
@supports (padding: env(safe-area-inset-bottom)) {
  .quick-action-bar {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  
  .footer {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
  
  .mobile-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ========================================
   🎨 Mobile Typography & Readability
======================================== */
@media (max-width: 768px) {
  /* 기본 타이포그래피 */
  html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  
  body {
    line-height: 1.7;
    word-break: keep-all;
    overflow-wrap: break-word;
  }
  
  /* 제목 크기 조정 */
  h1, .text-display {
    font-size: clamp(1.75rem, 7vw, 2.5rem) !important;
    line-height: 1.3 !important;
  }
  
  h2, .text-h2 {
    font-size: clamp(1.5rem, 5vw, 2rem) !important;
    line-height: 1.35 !important;
  }
  
  h3 {
    font-size: clamp(1.125rem, 4vw, 1.5rem) !important;
  }
  
  /* 본문 텍스트 */
  p, .text-body-lg {
    font-size: 0.95rem !important;
    line-height: 1.75 !important;
  }
}

/* ========================================
   🦸 Hero Section Mobile Optimization
======================================== */
@media (max-width: 768px) {
  .hero {
    min-height: calc(100vh - 72px);
    min-height: calc(100svh - 72px); /* Small Viewport Height */
    padding: 40px 16px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 32px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: auto !important;
    padding: 20px 0 !important;
  }
  
  .hero-text {
    order: 1;
    text-align: center !important;
    width: 100% !important;
  }
  
  /* 새 히어로 후킹 스타일 */
  .hero-hook-main {
    font-size: clamp(1.6rem, 6vw, 2.5rem) !important;
    line-height: 1.3 !important;
    margin-bottom: 16px !important;
    padding: 0 10px;
    word-break: keep-all;
  }
  
  .hero-hook-sub {
    font-size: clamp(0.95rem, 3.5vw, 1.2rem) !important;
    margin-bottom: 28px !important;
  }
  
  .hero-brand-bar {
    flex-direction: column !important;
    gap: 8px !important;
    margin-bottom: 28px !important;
  }
  
  .hero-brand-bar > span[style*="rgba(255,255,255,0.3)"] {
    display: none !important;
  }
  
  .hero-brand-name {
    font-size: 1.1rem !important;
    margin-bottom: 8px;
  }
  
  .hero-social-proof {
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: center !important;
    padding: 12px 16px !important;
    font-size: 0.85rem;
  }
  }
  
  .hero-visual {
    order: 2;
    width: 100%;
  }
  
  .hero-badges {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
  }
  
  .hero-badge {
    font-size: 0.75rem !important;
    padding: 6px 12px !important;
  }
  
  .hero-brand-meaning {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }
  
  .bd-logo {
    font-size: 1.25rem;
  }
  
  .hero-desc {
    font-size: 0.95rem !important;
    margin-bottom: 24px;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    padding: 16px 24px !important;
    font-size: 1rem;
  }
  
  /* Hero Cards - 가로 스크롤 */
  .hero-cards {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .hero-card {
    min-width: 140px;
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 20px 16px !important;
  }
  
  .hero-card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
  }
  
  .hero-card-icon i {
    font-size: 1.25rem;
  }
  
  .hero-card-num {
    font-size: 1.75rem !important;
  }
  
  .hero-card-label {
    font-size: 0.75rem;
  }
  
  .hero-scroll {
    display: none;
  }
}

/* ========================================
   🎯 Features Banner Mobile
======================================== */
@media (max-width: 768px) {
  .features-banner {
    padding: 12px 0;
    overflow: hidden;
  }
  
  .features-ticker {
    animation-duration: 25s;
  }
  
  .feature-item {
    padding: 0 16px;
    gap: 6px;
  }
  
  .feature-item i {
    font-size: 0.875rem;
  }
  
  .feature-item span {
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

/* ========================================
   💡 Why Choose Section Mobile
======================================== */
@media (max-width: 768px) {
  .why-choose-section {
    padding: 60px 16px !important;
  }
  
  .why-choose-section .section-title {
    margin-bottom: 32px !important;
  }
  
  .why-choose-section .section-badge {
    padding: 8px 16px !important;
    font-size: 0.75rem !important;
  }
  
  .why-choose-grid {
    gap: 12px !important;
  }
  
  .why-card-large {
    padding: 24px 20px !important;
    gap: 20px !important;
  }
  
  .why-card-large .why-icon-wrap {
    width: 64px !important;
    height: 64px !important;
  }
  
  .why-card-large .why-icon-wrap i {
    font-size: 24px !important;
  }
  
  .why-card-large .why-content h3 {
    font-size: 1.25rem !important;
  }
  
  .why-card-large .why-content .why-subtitle {
    font-size: 0.875rem !important;
  }
  
  .why-card-large .why-content .why-desc {
    font-size: 0.85rem !important;
    margin-bottom: 12px !important;
  }
  
  .why-card-large .why-badge {
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
  }
  
  .why-card {
    padding: 24px 20px !important;
  }
  
  .why-card .why-icon {
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 16px !important;
  }
  
  .why-card .why-icon i {
    font-size: 20px !important;
  }
  
  .why-card h3 {
    font-size: 1rem !important;
    margin-bottom: 8px !important;
  }
  
  .why-card p {
    font-size: 0.8rem !important;
    margin-bottom: 16px !important;
  }
  
  .why-stat .stat-big {
    font-size: 1.75rem !important;
  }
  
  .why-stat .stat-unit {
    font-size: 0.75rem !important;
  }
  
  /* Patient Concerns Mobile */
  .patient-concerns {
    padding: 24px 16px !important;
    margin-top: 32px !important;
  }
  
  .patient-concerns h3 {
    font-size: 1rem !important;
    margin-bottom: 20px !important;
    text-align: center;
  }
  
  .concerns-grid {
    gap: 8px !important;
  }
  
  .concern-item {
    padding: 12px 16px !important;
    font-size: 0.8rem !important;
    flex-direction: column;
    text-align: center;
    gap: 4px !important;
  }
  
  .concern-item i {
    font-size: 14px !important;
  }
  
  .concern-item span {
    font-size: 0.8rem !important;
  }
  
  .concern-item .solution {
    font-size: 0.8rem !important;
  }
}

/* ========================================
   🏥 Treatment Cards Mobile
======================================== */
@media (max-width: 768px) {
  .treatment-summary-section {
    padding: 60px 16px !important;
  }
  
  .treatment-cards {
    gap: 12px !important;
  }
  
  .treatment-card {
    padding: 24px 16px !important;
    border-radius: 16px !important;
  }
  
  .treatment-card .treatment-icon {
    width: 56px !important;
    height: 56px !important;
    margin-bottom: 16px !important;
  }
  
  .treatment-card .treatment-icon i {
    font-size: 24px !important;
  }
  
  .treatment-card h3 {
    font-size: 1rem !important;
    margin-bottom: 8px !important;
  }
  
  .treatment-card p {
    font-size: 0.8rem !important;
    margin-bottom: 0 !important;
  }
  
  .treatment-badge {
    top: 12px !important;
    right: 12px !important;
    padding: 4px 10px !important;
    font-size: 0.65rem !important;
  }
  
  .card-arrow {
    display: none !important;
  }
  
  .treatment-cta {
    margin-top: 24px;
  }
  
  .treatment-cta .btn {
    width: 100%;
    padding: 14px 24px !important;
  }
}

/* ========================================
   🏢 Floor Guide Mobile
======================================== */
@media (max-width: 768px) {
  .floor-section {
    padding: 48px 16px !important;
  }
  
  .floor-visual > div {
    gap: 8px !important;
  }
  
  .floor-visual > div > div {
    padding: 16px 12px !important;
    border-radius: 12px !important;
    gap: 12px !important;
    flex-wrap: wrap;
  }
  
  .floor-visual > div > div > div:first-child {
    font-size: 1.25rem !important;
    min-width: 40px !important;
  }
  
  .floor-visual > div > div h3 {
    font-size: 0.9rem !important;
    margin-bottom: 2px !important;
  }
  
  .floor-visual > div > div p {
    font-size: 0.75rem !important;
  }
  
  .floor-visual > div > div > div:last-child {
    font-size: 1rem !important;
    display: none; /* 아이콘 숨김 (모바일에서 공간 절약) */
  }
  
  .floor-cta {
    margin-top: 24px !important;
  }
  
  .floor-cta a {
    width: 100%;
    justify-content: center;
    padding: 14px 24px !important;
  }
}

/* ========================================
   📜 Philosophy Section Mobile
======================================== */
@media (max-width: 768px) {
  section:has(.fa-quote-left) {
    padding: 48px 16px !important;
  }
  
  section:has(.fa-quote-left) h2 {
    font-size: 1.25rem !important;
    line-height: 1.5 !important;
  }
  
  section:has(.fa-quote-left) > div > div:last-child {
    gap: 16px !important;
  }
  
  section:has(.fa-quote-left) > div > div:last-child > div {
    padding: 20px 16px !important;
    gap: 16px !important;
    flex-direction: column;
    text-align: center;
  }
  
  section:has(.fa-quote-left) > div > div:last-child > div > div:first-child {
    width: 40px !important;
    height: 40px !important;
  }
  
  section:has(.fa-quote-left) > div > div:last-child > div > div:first-child i {
    font-size: 1rem !important;
  }
  
  section:has(.fa-quote-left) > div > div:last-child > div > div:last-child p:first-child {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }
  
  section:has(.fa-quote-left) > div > div:last-child > div > div:last-child p:last-child {
    font-size: 0.8rem !important;
  }
}

/* ========================================
   📊 Trust & Stats Section Mobile
======================================== */
@media (max-width: 768px) {
  .trust-section {
    padding: 48px 16px !important;
  }
  
  .trust-headline h2 {
    font-size: 1.35rem !important;
    line-height: 1.4 !important;
  }
  
  .trust-headline span {
    padding: 6px 14px !important;
    font-size: 0.75rem !important;
  }
  
  .trust-banner > div:last-child {
    gap: 12px !important;
  }
  
  .trust-banner > div:last-child > div {
    padding: 20px 16px !important;
    min-width: 100px !important;
    border-radius: 16px !important;
  }
  
  .trust-banner > div:last-child > div span:first-child {
    font-size: 1.25rem !important;
    margin-bottom: 6px !important;
  }
  
  .trust-banner > div:last-child > div span:nth-child(2) {
    font-size: 1.75rem !important;
  }
  
  .trust-banner > div:last-child > div span:last-child {
    font-size: 0.75rem !important;
  }
}

/* ========================================
   ⭐ Reviews Section Mobile
======================================== */
@media (max-width: 768px) {
  .reviews-section {
    padding: 48px 16px !important;
  }
  
  .reviews-header h2 {
    font-size: 1.5rem !important;
  }
  
  .reviews-header p {
    font-size: 0.9rem !important;
  }
  
  .reviews-stats {
    gap: 12px !important;
    margin-bottom: 32px !important;
  }
  
  .reviews-stats > div {
    padding: 16px 12px !important;
    min-width: 70px !important;
    border-radius: 12px !important;
    flex: 1;
  }
  
  .reviews-stats > div > div:first-child i,
  .reviews-stats > div > div:first-child {
    font-size: 1rem !important;
    margin-bottom: 6px !important;
  }
  
  .reviews-stats > div > div:nth-child(2) {
    font-size: 1.5rem !important;
  }
  
  .reviews-stats > div > div:last-child {
    font-size: 0.65rem !important;
  }
  
  /* Review Cards - 가로 스크롤 */
  .reviews-section > div > div:nth-child(3) {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px !important;
    padding-bottom: 16px;
    margin: 0 -16px !important;
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .reviews-section > div > div:nth-child(3) > div {
    min-width: 280px;
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 20px 16px !important;
    border-radius: 16px !important;
  }
  
  .reviews-section > div > div:nth-child(3) > div p {
    font-size: 0.85rem !important;
    line-height: 1.7 !important;
  }
  
  /* 리뷰 카드 내부 */
  .reviews-section > div > div:nth-child(3) > div > div:first-child {
    gap: 12px !important;
    margin-bottom: 12px !important;
  }
  
  .reviews-section > div > div:nth-child(3) > div > div:first-child > div:first-child {
    width: 40px !important;
    height: 40px !important;
    font-size: 0.9rem !important;
  }
  
  /* 리뷰 작성 유도 */
  .reviews-section > div > div:last-child {
    padding: 24px 16px !important;
    border-radius: 16px !important;
  }
  
  .reviews-section > div > div:last-child h3 {
    font-size: 1.125rem !important;
  }
  
  .reviews-section > div > div:last-child p {
    font-size: 0.85rem !important;
    margin-bottom: 16px !important;
  }
  
  .reviews-section > div > div:last-child > div:last-child {
    flex-direction: column;
    gap: 10px !important;
  }
  
  .reviews-section > div > div:last-child > div:last-child a {
    width: 100%;
    justify-content: center;
    padding: 12px 20px !important;
    font-size: 0.9rem !important;
  }
}

/* ========================================
   🎁 Promise Section Mobile (이런 분들께 추천)
======================================== */
@media (max-width: 768px) {
  .promise-section {
    padding: 48px 16px !important;
  }
  
  .promise-section .section-title {
    margin-bottom: 32px !important;
  }
  
  .promise-section .section-title span {
    font-size: 0.75rem !important;
    padding: 6px 14px !important;
  }
  
  .promise-section .section-title h2 {
    font-size: 1.35rem !important;
  }
  
  .promise-section .section-title p {
    font-size: 0.9rem !important;
  }
  
  .promise-section > div > div:last-child {
    gap: 12px !important;
  }
  
  .promise-section > div > div:last-child > div {
    padding: 24px 16px !important;
    border-radius: 16px !important;
  }
  
  .promise-section > div > div:last-child > div > div:first-child {
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 16px !important;
  }
  
  .promise-section > div > div:last-child > div > div:first-child i {
    font-size: 1.125rem !important;
  }
  
  .promise-section > div > div:last-child > div h4 {
    font-size: 1rem !important;
    margin-bottom: 8px !important;
  }
  
  .promise-section > div > div:last-child > div p {
    font-size: 0.8rem !important;
  }
}

/* ========================================
   📞 CTA Section Mobile
======================================== */
@media (max-width: 768px) {
  .cta-section {
    padding: 48px 16px !important;
  }
  
  .cta-section > div > div {
    padding: 32px 20px !important;
    border-radius: 20px !important;
  }
  
  .cta-section > div > div > p:first-child {
    font-size: 0.75rem !important;
    padding: 6px 14px !important;
    margin-bottom: 16px !important;
  }
  
  .cta-section > div > div h2 {
    font-size: 1.35rem !important;
    margin-bottom: 12px !important;
  }
  
  .cta-section > div > div > p:nth-child(3) {
    font-size: 0.9rem !important;
    margin-bottom: 24px !important;
  }
  
  .cta-section > div > div > div {
    flex-direction: column;
    gap: 10px !important;
    margin-bottom: 20px !important;
  }
  
  .cta-section > div > div > div a {
    width: 100%;
    justify-content: center;
    padding: 14px 24px !important;
    font-size: 0.95rem !important;
  }
  
  .cta-section > div > div > p:last-child {
    font-size: 0.95rem !important;
  }
}

/* ========================================
   🦶 Footer Mobile
======================================== */
@media (max-width: 768px) {
  .footer {
    padding: 48px 16px 120px !important; /* Quick Action Bar 공간 확보 */
  }
  
  .footer-top {
    flex-direction: column;
    gap: 32px;
  }
  
  .footer-brand {
    text-align: center;
  }
  
  .footer-logo {
    justify-content: center;
  }
  
  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .footer-col h4 {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }
  
  .footer-col ul li a {
    font-size: 0.85rem;
    padding: 4px 0;
  }
  
  .footer-info {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .footer-contact p {
    font-size: 0.8rem;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .footer-legal {
    text-align: center;
  }
  
  .legal-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  
  .legal-notice {
    font-size: 0.7rem !important;
  }
}

/* ========================================
   🔘 Quick Action Bar Enhanced
======================================== */
@media (max-width: 768px) {
  .quick-action-bar {
    padding: 20px 12px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.95) 20%, rgba(10, 10, 10, 0.98) 100%) !important;
  }
  
  .quick-action-grid {
    gap: 6px !important;
    max-width: 100% !important;
  }
  
  .quick-action-item {
    padding: 10px 4px !important;
    border-radius: 10px !important;
  }
  
  .quick-action-item i {
    font-size: 1.125rem !important;
  }
  
  .quick-action-item span {
    font-size: 0.6rem !important;
  }
}

/* ========================================
   📱 Mobile Navigation Enhanced
======================================== */
@media (max-width: 768px) {
  .mobile-nav {
    width: 100%;
    max-width: 100%;
  }
  
  .mobile-nav-menu {
    padding: 16px;
  }
  
  .mobile-nav-menu li a {
    padding: 14px 16px;
    font-size: 0.95rem;
  }
  
  .mobile-nav-submenu li a {
    padding: 12px 16px 12px 40px;
    font-size: 0.85rem;
  }
  
  .mobile-nav-footer {
    padding: 16px;
  }
  
  .mobile-nav-quick-btns {
    flex-direction: column;
    gap: 10px;
  }
  
  .mobile-nav-quick-btns .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   🎨 Floating Elements Mobile
======================================== */
@media (max-width: 768px) {
  .floating-cta {
    bottom: 100px; /* Quick Action Bar 위로 */
    right: 12px;
  }
  
  .floating-btn {
    width: 44px;
    height: 44px;
  }
  
  .floating-btn .tooltip {
    display: none !important;
  }
  
  .kakao-widget {
    bottom: 160px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: calc(100% - 24px);
  }
}

/* ========================================
   ⚡ Performance Optimization
======================================== */
@media (max-width: 768px) {
  /* 불필요한 애니메이션 감소 (저사양 기기 대응) */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
  
  /* GPU 가속 최적화 */
  .hero-card,
  .treatment-card,
  .why-card,
  .quick-action-item {
    transform: translateZ(0);
    will-change: transform;
  }
  
  /* 이미지 로딩 최적화 */
  img {
    content-visibility: auto;
  }
}

/* ========================================
   🔧 Accessibility on Mobile
======================================== */
@media (max-width: 768px) {
  /* 포커스 상태 강화 */
  a:focus-visible,
  button:focus-visible {
    outline: 3px solid #C9A962;
    outline-offset: 3px;
  }
  
  /* 스킵 링크 */
  .skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 16px;
    background: #C9A962;
    color: #000;
    text-align: center;
    font-weight: bold;
  }
}

/* ========================================
   📏 Landscape Mode (가로 모드)
======================================== */
@media (max-width: 896px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 32px 16px 60px;
  }
  
  .hero-cards {
    justify-content: center;
  }
  
  .hero-card {
    min-width: 120px !important;
  }
  
  .quick-action-bar {
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }
  
  .quick-action-grid {
    max-width: 600px !important;
    gap: 12px !important;
  }
}

/* ========================================
   📱 Small Mobile (320px-375px)
======================================== */
@media (max-width: 375px) {
  html {
    font-size: 14px;
  }
  
  .hero-badge {
    font-size: 0.65rem !important;
    padding: 5px 10px !important;
  }
  
  .hero-card {
    min-width: 110px !important;
    padding: 16px 12px !important;
  }
  
  .hero-card-num {
    font-size: 1.5rem !important;
  }
  
  .hero-cta .btn {
    padding: 14px 20px !important;
    font-size: 0.9rem;
  }
  
  .why-card-large .why-content h3 {
    font-size: 1.125rem !important;
  }
  
  .quick-action-item span {
    font-size: 0.55rem !important;
  }
}

/* ========================================
   🎯 인라인 스타일 반응형 오버라이드 v9.23.0
======================================== */

/* 비디오 섹션 */
@media (max-width: 768px) {
  .video-intro-section {
    padding: 60px 4% !important;
  }
  
  .video-wrapper {
    border-radius: 16px !important;
  }
  
  .video-placeholder {
    border-radius: 16px;
  }
}

/* Why Choose 섹션 인라인 스타일 대응 */
@media (max-width: 991px) {
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  [style*="grid-column: span 3"] {
    grid-column: span 2 !important;
    flex-direction: column !important;
    text-align: center !important;
  }
}

@media (max-width: 768px) {
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: repeat(2"] {
    grid-template-columns: 1fr !important;
  }
  
  [style*="grid-column: span 3"],
  [style*="grid-column: span 2"] {
    grid-column: span 1 !important;
  }
  
  /* 인라인 padding 오버라이드 */
  [style*="padding: 100px"] {
    padding: 60px 4% !important;
  }
  
  [style*="padding: 80px"] {
    padding: 48px 4% !important;
  }
  
  /* 인라인 gap 오버라이드 */
  [style*="gap: 40px"] {
    gap: 24px !important;
  }
  
  [style*="gap: 24px"] {
    gap: 16px !important;
  }
  
  /* 인라인 margin-bottom 오버라이드 */
  [style*="margin-bottom: 60px"],
  [style*="margin-bottom: 48px"] {
    margin-bottom: 32px !important;
  }
  
  /* 인라인 max-width 오버라이드 */
  [style*="max-width: 1200px"],
  [style*="max-width: 1400px"],
  [style*="max-width: 1000px"] {
    max-width: 100% !important;
    padding-left: 4% !important;
    padding-right: 4% !important;
  }
}

/* 초소형 화면 (320px 이하) 추가 최적화 */
@media (max-width: 320px) {
  /* 섹션 패딩 */
  section,
  [style*="padding:"] {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* 폰트 사이즈 축소 */
  [style*="font-size: 28px"],
  [style*="font-size: 2rem"] {
    font-size: 22px !important;
  }
  
  [style*="font-size: 22px"],
  [style*="font-size: 20px"] {
    font-size: 18px !important;
  }
  
  [style*="font-size: 18px"] {
    font-size: 16px !important;
  }
  
  [style*="font-size: clamp(24px"] {
    font-size: clamp(18px, 5vw, 24px) !important;
  }
  
  [style*="font-size: clamp(28px"] {
    font-size: clamp(20px, 6vw, 28px) !important;
  }
  
  /* 아이콘 사이즈 축소 */
  [style*="font-size: 48px"] {
    font-size: 36px !important;
  }
  
  [style*="font-size: 36px"] {
    font-size: 28px !important;
  }
  
  /* 간격 축소 */
  [style*="gap: 20px"] {
    gap: 12px !important;
  }
  
  [style*="gap: 16px"] {
    gap: 10px !important;
  }
  
  /* 카드 패딩 */
  [style*="padding: 36px"],
  [style*="padding: 40px"],
  [style*="padding: 48px"] {
    padding: 20px 16px !important;
  }
  
  /* Why 카드 아이콘 */
  .why-icon {
    width: 44px !important;
    height: 44px !important;
  }
  
  .why-icon i {
    font-size: 18px !important;
  }
  
  /* 층별 안내 */
  .floor-visual > div > div {
    padding: 14px 10px !important;
  }
  
  .floor-visual > div > div > div:first-child {
    font-size: 1.1rem !important;
    min-width: 36px !important;
  }
}

/* ========================================
   📐 태블릿 최적화 (768px - 1024px)
======================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  /* 컨테이너 */
  .container,
  [style*="max-width: 1200px"],
  [style*="max-width: 1400px"] {
    max-width: 100% !important;
    padding-left: 5% !important;
    padding-right: 5% !important;
  }
  
  /* 그리드 조정 */
  .treatment-cards,
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .why-choose-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .why-card-large {
    grid-column: span 2 !important;
  }
  
  /* 시설 갤러리 */
  .facility-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Hero 카드 */
  .hero-cards {
    gap: 16px;
  }
  
  .hero-card {
    min-width: 140px;
    padding: 20px 16px;
  }
  
  /* 섹션 패딩 */
  section {
    padding: 60px 5% !important;
  }
  
  /* 폰트 크기 */
  h1, .text-display {
    font-size: clamp(2rem, 5vw, 3rem) !important;
  }
  
  h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem) !important;
  }
}

/* ========================================
   🖥️ 대형 화면 (1920px+)
======================================== */
@media (min-width: 1920px) {
  html {
    font-size: 18px;
  }
  
  .container,
  [style*="max-width: 1200px"] {
    max-width: 1400px !important;
  }
  
  [style*="max-width: 1400px"] {
    max-width: 1600px !important;
  }
}

/* ========================================
   🔒 가로 오버플로우 완전 방지
======================================== */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

* {
  max-width: 100%;
}

img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* 특정 요소 오버플로우 방지 */
.hero-content,
.why-choose-grid,
.treatment-cards,
.facility-grid,
.floor-visual,
.concerns-grid {
  max-width: 100%;
  overflow-x: hidden;
}

/* 텍스트 줄바꿈 */
h1, h2, h3, h4, h5, h6, p, span, a {
  word-break: keep-all;
  overflow-wrap: break-word;
}
