/* ==========================================================================
   RESPONSIVE STYLESHEET - quynhthu.com
   Handles breakpoints: 1600px, 1200px, 991px, 768px, 575px, 402px, 390px, 375px
   ========================================================================== */

/* --------------------------------------------------------------------------
   Large Desktop (< 1600px)
   -------------------------------------------------------------------------- */
@media (max-width: 1600px) {
  .box-layout {
    padding: 0 50px;
  }

  .navbar-container {
    padding: 16px 45px;
  }

  .hero-card-container {
    min-height: 560px;
  }

  .hero-main-content {
    padding: 50px 50px 35px 50px;
    gap: 30px;
    min-height: 490px;
  }

  .hero-headline {
    font-size: clamp(2.6rem, 3vw, 3.1rem);
  }

  .services-boxed-container {
    padding: 70px 50px;
  }

  .contact-boxed-wrap {
    padding: 65px 50px;
  }

  .process-banner-box {
    padding: 50px 50px;
  }

  .process-title-area h3 {
    font-size: 1.85rem;
  }
}

/* --------------------------------------------------------------------------
   Small Desktop & Laptop (< 1400px)
   -------------------------------------------------------------------------- */
@media (max-width: 1400px) {
  .box-layout {
    padding: 0 35px;
  }

  .hero-card-container {
    min-height: 500px;
  }

  .hero-main-content {
    grid-template-columns: 1.15fr 0.85fr;
    padding: 40px 40px 30px 40px;
    gap: 25px;
    min-height: 440px;
  }

  .hero-headline {
    font-size: clamp(2.3rem, 2.7vw, 2.7rem);
    line-height: 1.18;
    margin-bottom: 16px;
  }

  .hero-tagline {
    font-size: 1.15rem;
    margin-bottom: 12px;
  }

  .hero-description {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 25px;
    max-width: 500px;
  }

  .hero-actions {
    gap: 14px;
  }

  .hero-image-wrapper {
    min-height: 380px;
  }

  .hero-heart-badge {
    left: -30px;
    top: 190px;
    width: 64px;
    height: 64px;
  }

  .heart-badge-icon {
    width: 54px;
    height: 54px;
  }

  .heart-svg {
    width: 26px;
    height: 26px;
  }

  .heart-pulse-ring {
    width: 54px;
    height: 54px;
    top: 5px;
    left: 5px;
  }

  .hero-floating-badge-wrap {
    right: 15px;
    bottom: 25px;
  }

  .hero-floating-badge {
    padding: 12px 16px;
  }

  .hero-ticker-bar {
    margin-top: -30px;
    padding: 14px 35px;
    gap: 25px;
  }
}

/* --------------------------------------------------------------------------
   Medium Desktop & Small Laptops (< 1200px)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .box-layout {
    padding: 0 24px;
  }

  .navbar-container {
    padding: 14px 20px;
  }

  .nav-item .nav-link {
    padding: 8px 12px;
    font-size: 16px;
  }

  .hero-card-container {
    min-height: 450px;
  }

  .hero-media-backdrop {
    display: flex;
    justify-content: flex-end;
  }

  .hero-backdrop-picture {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
  }

  .hero-backdrop-img {
    height: 100%;
    width: auto;
    max-width: none;
    object-fit: contain;
    object-position: right center;
    margin-left: auto;
    margin-right: 0;
  }

  .hero-main-content {
    grid-template-columns: 1.2fr 0.8fr;
    padding: 35px 35px 25px 35px;
    gap: 20px;
    min-height: 390px;
  }

  .hero-text-col {
    max-width: 560px;
  }

  .hero-headline {
    font-size: clamp(1.95rem, 2.3vw, 2.35rem);
    line-height: 1.2;
    margin-bottom: 14px;
    letter-spacing: -0.025em;
  }

  .hero-tagline {
    font-size: 1.05rem;
    margin-bottom: 10px;
  }

  .hero-description {
    font-size: 0.98rem;
    line-height: 1.62;
    margin-bottom: 22px;
    max-width: 100%;
  }

  .hero-actions {
    gap: 12px;
  }

  .hero-actions .btn {
    padding: 11px 22px;
    font-size: 14px;
  }

  .hero-image-wrapper {
    min-height: 350px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
  }

  .hero-heart-badge {
    left: -15px;
    top: 155px;
    width: 56px;
    height: 56px;
  }

  .heart-badge-icon {
    width: 48px;
    height: 48px;
  }

  .heart-svg {
    width: 24px;
    height: 24px;
  }

  .heart-pulse-ring {
    width: 48px;
    height: 48px;
    top: 4px;
    left: 4px;
  }

  .hero-floating-badge-wrap {
    right: 12px;
    bottom: 18px;
  }

  .hero-floating-badge {
    padding: 10px 14px;
    gap: 9px;
    border-radius: 10px;
  }

  .floating-badge-icon {
    width: 32px;
    height: 32px;
  }

  .floating-badge-icon svg {
    width: 17px;
    height: 17px;
  }

  .floating-badge-title {
    font-size: 12px;
  }

  .floating-badge-sub {
    font-size: 10.5px;
  }

  .hero-ticker-bar {
    margin-top: -26px;
    padding: 12px 28px;
    gap: 20px;
  }

  .ticker-label {
    font-size: 0.95rem;
    gap: 8px;
  }

  .ticker-label svg {
    width: 18px;
    height: 18px;
  }

  .ticker-item {
    font-size: 0.92rem;
  }

  .ticker-track {
    gap: 30px;
  }

  .ticker-divider {
    height: 22px;
  }

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

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

  .process-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .footer-nav-row {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 25px;
  }

  .footer-brand,
  .footer-social-links {
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Tablets & Mobile Menus (< 991px)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  /* Provide balanced container gutters so content never touches screen edges */
  .box-layout {
    padding: 0 20px;
  }

  .hero-section {
    margin-top: 75px;
  }

  .hero-card-container,
  .services-boxed-container,
  .process-banner-box,
  .contact-boxed-wrap,
  .footer-top-box {
    border-radius: var(--radius-md);
  }

  /* Header navigation switch to mobile drawer */
  .desktop-nav,
  .navbar-nav,
  .navbar-cta-wrap {
    display: none !important;
  }

  .navbar-container {
    padding: 12px 24px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .navbar-brand {
    max-width: calc(100% - 50px);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .navbar-toggler {
    display: flex !important;
    flex-shrink: 0;
    margin-left: auto;
  }

  /* About section stacked */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-visual-wrap {
    padding-left: 0;
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
  }

  .about-main-card {
    width: 100%;
  }

  .about-rotating-seal {
    top: -20px;
    left: -10px;
    width: 110px;
    height: 110px;
  }

  /* Services section adjustments */
  .services-header-row {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .clinical-pillars {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Monitoring section stacked */
  .monitoring-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Contact section stacked */
  .contact-boxed-wrap {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 50px 30px;
  }

  .process-banner-box {
    padding: 40px 30px;
  }

  .process-steps-row {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

/* --------------------------------------------------------------------------
   Tablet Landscape (900px - 991px): maintain clean 2-column hero
   -------------------------------------------------------------------------- */
@media (min-width: 900px) and (max-width: 991px) {
  .hero-card-container {
    min-height: 410px;
  }

  .hero-media-backdrop {
    display: flex;
    justify-content: flex-end;
  }

  .hero-backdrop-picture {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
  }

  .hero-backdrop-img {
    height: 100%;
    width: auto;
    max-width: none;
    object-fit: contain;
    object-position: right center;
    margin-left: auto;
    margin-right: 0;
  }

  .hero-main-content {
    grid-template-columns: 1.25fr 0.75fr;
    padding: 28px 25px 20px 25px;
    text-align: left;
    gap: 16px;
    min-height: 350px;
  }

  .hero-headline {
    font-size: clamp(1.75rem, 2.2vw, 1.95rem);
    line-height: 1.22;
    margin-bottom: 12px;
  }

  .hero-tagline {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .hero-description {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 18px;
    max-width: 100%;
  }

  .hero-actions {
    gap: 10px;
    justify-content: flex-start;
  }

  .hero-actions .btn {
    padding: 9px 18px;
    font-size: 13.5px;
  }

  .hero-image-wrapper {
    min-height: 320px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
  }

  .hero-heart-badge {
    left: -10px;
    top: 135px;
    width: 48px;
    height: 48px;
  }

  .heart-badge-icon {
    width: 42px;
    height: 42px;
  }

  .heart-svg {
    width: 20px;
    height: 20px;
  }

  .heart-pulse-ring {
    width: 42px;
    height: 42px;
    top: 3px;
    left: 3px;
  }

  .hero-floating-badge-wrap {
    right: 10px;
    bottom: 12px;
  }

  .hero-floating-badge {
    padding: 8px 12px;
    gap: 8px;
    border-radius: 8px;
  }

  .floating-badge-icon {
    width: 28px;
    height: 28px;
  }

  .floating-badge-icon svg {
    width: 15px;
    height: 15px;
  }

  .floating-badge-title {
    font-size: 11px;
  }

  .floating-badge-sub {
    font-size: 9.5px;
  }

  .hero-ticker-bar {
    display: flex;
    margin-top: -22px;
    padding: 10px 20px;
    gap: 15px;
  }

  .ticker-label {
    font-size: 0.88rem;
    gap: 6px;
  }

  .ticker-label svg {
    width: 16px;
    height: 16px;
  }

  .ticker-item {
    font-size: 0.86rem;
  }

  .ticker-track {
    gap: 25px;
  }

  .ticker-divider {
    height: 18px;
  }
}

/* --------------------------------------------------------------------------
   Tablet Portrait & Narrow Tablets (576px - 899px): stacked hero layout
   -------------------------------------------------------------------------- */
@media (max-width: 899px) and (min-width: 576px) {
  .hero-media-backdrop {
    transform: none;
  }

  .hero-main-content {
    grid-template-columns: 1fr;
    padding: 45px 30px 35px;
    text-align: center;
    transform: none;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-card-container {
    background-color: var(--bg-turquoise);
    min-height: auto;
  }

  .hero-backdrop-img {
    object-position: 72% top;
  }

  .hero-image-wrapper {
    margin-top: 30px;
    width: 100%;
    min-height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
  }

  .hero-heart-badge {
    position: absolute;
    top: -20px;
    left: 10%;
  }

  .hero-floating-badge-wrap {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 10px auto 0;
  }

  .hero-ticker-bar {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   Small Tablets & Large Phones (< 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Consistent horizontal gutters for all sections */
  .box-layout {
    padding: 0 18px;
  }

  h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 2rem;
  }

  .about-content-col h2 {
    font-size: 2.1rem;
  }

  .services-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .guidance-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .about-highlights {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .motto-banner-row {
    flex-direction: column;
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
  }

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

/* --------------------------------------------------------------------------
   Standard Mobile Phones (around 390px - 402px, e.g. iPhone / Pixel)
   SPECIFIC DEDICATED MOBILE HERO ARCHITECTURE & SECTION GUTTERS
   -------------------------------------------------------------------------- */
@media (max-width: 575px) {
  .box-layout {
    padding: 0 16px;
  }

  .navbar-container {
    padding: 10px 16px !important;
  }

  .hero-section {
    margin-top: 70px;
    padding: 0;
  }

  /* Dedicated Mobile Hero Layout Structure:
     The container cleanly nests the banner visual on top and typography below */
  .hero-card-container {
    display: flex;
    flex-direction: column;
    min-height: auto;
    overflow: visible;
    border-radius: var(--radius-md);
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-subtle);
  }

  /* 1. Visual banner stage at the top of Hero */
  .hero-media-backdrop {
    position: relative;
    width: 100%;
    height: 280px;
    top: auto;
    left: auto;
    overflow: hidden;
    background-color: #e9f8f9;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    display: block;
    z-index: 1;
  }

  .hero-backdrop-picture {
    display: block;
    width: 100%;
    height: 100%;
  }

  .hero-backdrop-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
  }

  /* 2. Hero content area placed below the banner */
  .hero-main-content {
    display: flex;
    flex-direction: column;
    padding: 24px 18px 28px;
    text-align: left;
    min-height: auto;
    gap: 0;
    position: relative;
    z-index: 2;
  }

  .hero-text-col {
    width: 100%;
  }

  /* REQUIREMENT 1: Remove "Bác sĩ Lê Nguyễn Quỳnh Thư" in Hero on mobile */
  .hero-headline {
    display: none !important;
  }

  /* REQUIREMENT 2: "Đồng hành cùng sức khỏe của bạn" placed below banner */
  .hero-tagline {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--dark-gray);
    margin-bottom: 12px;
    line-height: 1.35;
    letter-spacing: -0.015em;
    display: block;
  }

  /* Description and Actions stacked naturally below tagline */
  .hero-description {
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 22px;
    margin-left: 0;
    margin-right: 0;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 13px 20px;
  }

  /* Right composition wrapper containing overlays */
  .hero-image-wrapper {
    margin-top: 0;
    position: static;
    min-height: auto;
  }

  /* B. Mobile Hero:
     1) Trái tim mobile: Đưa lên trên khoảng 80px (từ top: 25px thành top: -55px)
     2) Giữ trong hero, không che nội dung chính, giữ motion pulse */
  .hero-heart-badge {
    position: absolute;
    top: -75px;
    left: 36px;
    width: 52px;
    height: 52px;
    z-index: 4;
  }

  .heart-badge-icon {
    width: 48px;
    height: 48px;
    box-shadow: 0 6px 18px rgba(244, 89, 89, 0.4);
  }

  .heart-svg {
    width: 23px;
    height: 23px;
  }

  .heart-pulse-ring {
    width: 48px;
    height: 48px;
    top: 2px;
    left: 2px;
  }

  /* B. Mobile Hero:
     2) Bỏ badge trên mobile: Bỏ hẳn badge “Bác sĩ Chuyên khoa II” trên mobile */
  .hero-floating-badge-wrap {
    display: none !important;
  }

  /* Hide medical hexagonal pattern on small screens */
  .hero-pattern-bg {
    display: none !important;
  }

  /* REQUIREMENT 2: BỎ TOÀN BỘ TICKER / RUNNING STRIP */
  .hero-ticker-bar {
    display: none !important;
  }

  /* ========================================================================
     SECTION SPACING & GUTTER SYSTEM FOR ALL BELOW-HERO SECTIONS
     Prevent any content from sticking to screen edges
     ======================================================================== */
  .about-section,
  .services-section,
  .monitoring-section,
  .guidance-section,
  .contact-section {
    padding: 55px 0;
  }

  .process-section {
    padding: 15px 0 55px;
  }

  /* Mobile - Bỏ vòng tròn xoay "Phương châm y đức" */
  .about-rotating-seal {
    display: none !important;
  }

  .about-visual-wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /* "Phương châm y đức" Card */
  .about-card-inner {
    padding: 26px 20px;
  }

  .about-card-inner h3 {
    font-size: 1.25rem !important;
  }

  .about-quote-box {
    padding: 14px 16px;
    font-size: 0.95rem;
    margin-top: 18px;
  }

  /* C. Mobile - phần Giới thiệu bên dưới:
     1) Bỏ title: "Bác sĩ Lê Nguyễn Quỳnh Thư"
     2) Bỏ 2 button: "Chuyên khoa khám" và "Liên hệ trao đổi" */
  .about-content-col h2 {
    display: none !important;
  }

  .about-content-col .about-actions {
    display: none !important;
  }

  .about-intro-lead {
    font-size: 1.02rem;
    line-height: 1.7;
    margin-bottom: 15px;
    margin-top: 12px;
  }

  .about-highlights {
    margin: 24px 0 30px;
  }

  .highlight-box {
    padding: 18px 20px;
  }

  /* Services / Specialties Boxed Container & Cards */
  .services-boxed-container {
    padding: 40px 18px;
    border-radius: var(--radius-md);
  }

  .services-header-row {
    margin-bottom: 35px;
    text-align: left;
  }

  .services-header-row h2 {
    font-size: 1.85rem;
    line-height: 1.3;
  }

  .services-cards-grid {
    margin-bottom: 35px;
  }

  .service-card {
    padding: 30px 22px;
    border-radius: var(--radius-sm);
  }

  .service-title {
    font-size: 1.25rem;
  }

  .clinical-pillars {
    padding-top: 30px;
    gap: 20px;
  }

  .pillar-item {
    gap: 16px;
  }

  /* "Theo dõi chỉ số liên tục & chủ động" (Monitoring Section) */
  .monitoring-visual-card {
    padding: 32px 20px;
    border-radius: var(--radius-md);
  }

  .monitoring-visual-card h3 {
    font-size: 1.5rem !important;
    line-height: 1.35;
    margin-bottom: 15px !important;
  }

  .monitoring-content-col {
    text-align: left;
  }

  .monitoring-content-col h2 {
    font-size: 1.85rem;
    line-height: 1.3;
    margin-bottom: 16px;
  }

  .monitoring-checklist {
    margin-top: 20px;
    gap: 14px;
  }

  .checklist-item {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .motto-banner-row {
    padding: 18px;
    margin-top: 40px;
  }

  .motto-text {
    font-size: 1rem;
    line-height: 1.5;
  }

  /* 3-Step Process Banner */
  .process-banner-box {
    padding: 36px 20px;
    border-radius: var(--radius-md);
  }

  .process-title-area h3 {
    font-size: 1.6rem;
    line-height: 1.35;
    text-align: left;
  }

  .process-steps-row {
    gap: 22px;
  }

  .step-item {
    gap: 14px;
  }

  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.1rem;
  }

  .step-info-title {
    font-size: 1.05rem;
  }

  /* Guidance Section */
  .section-header-center {
    margin-bottom: 35px;
    text-align: left;
  }

  .section-header-center h2 {
    font-size: 1.85rem;
    line-height: 1.3;
  }

  .guidance-card {
    padding: 30px 20px;
    text-align: left;
    align-items: flex-start;
  }

  .guidance-trust-badge {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    margin-top: 35px;
  }

  .trust-statement {
    font-size: 0.98rem;
  }

  /* Contact Section */
  .contact-boxed-wrap {
    padding: 40px 20px;
    border-radius: var(--radius-md);
  }

  .contact-intro-side h2 {
    font-size: 1.85rem;
    line-height: 1.3;
  }

  .direct-call-badge {
    margin-top: 20px;
    gap: 14px;
  }

  .call-icon-circle {
    width: 50px;
    height: 50px;
  }

  .call-icon-circle svg {
    width: 22px;
    height: 22px;
  }

  .call-info-target {
    font-size: 1.1rem;
  }

  .contact-info-card {
    padding: 20px 18px;
  }

  /* Footer Section */
  .footer-top-box {
    padding: 35px 20px;
    border-radius: var(--radius-md);
  }

  .footer-nav-links {
    flex-direction: column;
    gap: 12px;
  }

  .footer-bottom-bar {
    padding: 25px 0;
  }

  .scroll-top-indicator {
    bottom: 20px;
    right: 18px;
    width: 42px;
    height: 42px;
  }
}

/* --------------------------------------------------------------------------
   Narrow Mobile Phones (375px & below)
   -------------------------------------------------------------------------- */
@media (max-width: 375px) {
  .hero-media-backdrop {
    height: 250px;
  }

  .hero-heart-badge {
    top: -80px;
    left: 30px;
  }

  .hero-floating-badge-wrap {
    display: none !important;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .brand-tagline {
    font-size: 0.68rem;
  }
}
