/*--------------------------------------------------------------
# Aisha Abdelmaguid - Mobile & Tablet Responsive Stylesheet
# File: assets/css/mobile.css
--------------------------------------------------------------*/

/* ==========================================
   1. GLOBAL & CONTAINER OVERRIDES
   ========================================== */
@media (max-width: 991px) {

  html,
  body {
    overflow-x: clip !important;
    width: 100%;
  }

  .container {
    max-width: 95% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

@media (max-width: 576px) {
  .container {
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ==========================================
   2. NAVBAR & MOBILE MENU
   ========================================== */
@media (max-width: 991px) {
  #header {
    padding: 12px 0;
  }

  #header.scrolled {
    padding: 10px 0;
  }

  .logo-img {
    max-height: 38px;
  }

  .logo-script {
    font-size: 1.45rem;
  }

  .logo-sub {
    font-size: 0.5rem;
    letter-spacing: 1px;
  }

  .navbar-toggler {
    padding: 6px 10px;
    border: 1px solid rgba(196, 30, 58, 0.2);
    border-radius: 8px;
    background-color: rgba(196, 30, 58, 0.04);
    transition: all 0.3s ease;
  }

  .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.25);
  }

  .navbar-toggler-icon {
    width: 1.3em;
    height: 1.3em;
  }

  .navbar-collapse {
    background: #ffffff;
    padding: 20px;
    margin-top: 12px;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  .navbar-nav {
    gap: 6px;
    margin-bottom: 18px;
  }

  .nav-item {
    text-align: center;
  }

  .nav-link {
    padding: 10px 16px !important;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    display: inline-block;
    width: 100%;
  }

  .nav-link::after {
    display: none;
    /* Replace bottom border line with soft background fill on mobile */
  }

  .nav-link:hover,
  .nav-link.active {
    background-color: rgba(196, 30, 58, 0.08);
    color: var(--primary-red) !important;
    font-weight: 600;
  }

  .nav-icons {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding-top: 0 !important;
    border-top: none !important;
  }

  .icon-link {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.05rem !important;
    background-color: rgba(0, 0, 0, 0.04) !important;
    border-radius: 50% !important;
  }
}

@media (max-width: 576px) {
  .logo-script {
    font-size: 1.3rem;
  }

  .logo-sub {
    font-size: 0.45rem;
    letter-spacing: 0.8px;
  }
}

/* ==========================================
   2. MOBILE TOP STATUS BAR & HEADER
   ========================================== */
.mobile-top-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 20px 2px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #111111;
  background-color: var(--bg-light);
  letter-spacing: 0.2px;
}

.mobile-top-status-bar .status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}

/* ==========================================
   3. HERO CAROUSEL SECTION
   ========================================== */
@media (max-width: 991px) {
  .hero-section {
    padding-top: 135px;
    padding-bottom: 30px;
    min-height: auto;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative !important;
    background-color: #ffffff;
  }

  .hero-slides-wrapper {
    display: grid !important;
    grid-template-areas: "hero-slide-area" !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
  }

  .hero-slide {
    grid-area: hero-slide-area !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .hero-slide .container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  .hero-slide .row {
    position: relative;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .hero-slide .col-lg-6:first-child {
    position: relative;
    z-index: 2;
    width: 100% !important;
  }

  .hero-slide .col-lg-6:last-child {
    position: static;
    height: 0;
    margin: 0;
    padding: 0;
  }

  .hero-title {
    font-family: var(--font-serif);
    font-size: 2.1rem;
    font-weight: 400;
    color: #b81d36;
    line-height: 1.15;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
  }

  .title-number {
    font-size: 2.1rem;
    color: #b81d36;
    font-family: var(--font-serif);
  }

  .title-text {
    font-size: 2.1rem;
    color: #b81d36;
    font-family: var(--font-serif);
  }

  .title-accent-line {
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6 0%, #a855f7 20%, #f4c430 60%, #f97316 100%);
    border-radius: 2px;
    margin-bottom: 22px;
  }

  .qualifications-list {
    max-width: 48%;
    font-size: 0.86rem;
    margin-bottom: 24px;
    min-height: 240px;
  }

  .qualifications-list li {
    position: relative;
    margin-bottom: 10px;
    line-height: 1.45;
    padding-left: 18px;
    font-size: 0.85rem;
    color: #222222;
  }

  .qualifications-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 6px;
    height: 6px;
    background-color: #efbf04;
    border-radius: 50%;
  }

  .qualifications-list .dual-item {
    gap: 8px;
  }

  .qualifications-list .dual-item span {
    display: block;
    padding-left: 18px;
  }

  /* Right side visual (portrait arch + background SVG + books & cap fading) */
  .hero-visual {
    position: absolute;
    top: 35px;
    right: 0px;
    width: 53%;
    max-width: 280px;
    height: 340px;
    margin-top: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 1;
    pointer-events: none;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .hero-bg {
    position: absolute;
    right: -5%;
    top: -5%;
    width: 115%;
    height: 115%;
    opacity: 1;
    transform: none;
  }

  .hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right top;
  }

  .person-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }

  .person-img {
    max-height: 112%;
    width: auto;
    max-width: 112%;
    transform: translate(5px, 0) scale(1.12);
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.12));
  }

  .person-fade {
    display: none !important;
  }

  .gallery-slider {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
    gap: 12px;
    clear: both;
    position: relative;
    z-index: 3;
  }

  .gallery-track-wrapper {
    max-width: 280px;
  }

  .gallery-item {
    width: 82px;
    height: 92px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .slider-arrow {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding-top: 125px;
    padding-bottom: 25px;
  }

  .hero-title {
    font-size: 1.75rem;
    margin-bottom: 8px;
  }

  .title-number,
  .title-text {
    font-size: 1.75rem;
  }

  .title-accent-line {
    width: 100px;
    margin-bottom: 16px;
  }

  .qualifications-list {
    max-width: 48%;
    font-size: 0.8rem;
    margin-bottom: 16px;
    min-height: 220px;
  }

  .qualifications-list li {
    font-size: 0.78rem;
    margin-bottom: 8px;
    padding-left: 15px;
    line-height: 1.4;
  }

  .qualifications-list li::before {
    top: 5px;
    width: 5px;
    height: 5px;
  }

  .hero-visual {
    top: 35px;
    right: 0px;
    width: 54%;
    max-width: 235px;
    height: 290px;
  }

  .gallery-slider {
    margin-top: 10px;
    gap: 8px;
  }

  .gallery-track-wrapper {
    max-width: 250px;
  }

  .gallery-item {
    width: 74px;
    height: 84px;
    border-radius: 8px;
  }

  .slider-arrow {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
}

/* ==========================================
   4. AFFILIATIONS & MARQUEE SECTION
   ========================================== */
@media (max-width: 991px) {
  .affiliations-section {
    padding-top: 10px;
  }

  .section-subtitle {
    font-size: 1.25rem;
  }

  .header-icon-line {
    max-width: 420px;
  }

  .marquee-item {
    width: 240px;
    height: 105px;
    padding: 12px 18px;
    border-radius: 12px;
  }

  .ring-border {
    width: 150px;
    height: 150px;
    padding: 10px;
  }

  .ring-border::before {
    border-width: 3.5px;
  }

  .ring-border::after {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 576px) {
  .section-subtitle {
    font-size: 1rem;
    letter-spacing: 0.5px;
    padding: 0 10px;
  }

  .header-icon-line {
    max-width: 280px;
  }

  .marquee-container {
    padding: 12px 0;
  }

  .marquee-content {
    gap: 20px;
    padding-right: 20px;
  }

  .marquee-item {
    width: 175px;
    height: 80px;
    padding: 8px 12px;
    border-radius: 10px;
  }

  .ring-border {
    width: 115px;
    height: 115px;
    padding: 8px;
  }

  .ring-border::before {
    border-width: 3px;
  }

  .ring-border::after {
    width: 8px;
    height: 8px;
  }

  .sec-dot {
    width: 8px;
    height: 8px;
    margin: 0 4px;
  }

  .sec-dot.active {
    width: 18px;
  }
}

/* ==========================================
   5. INTERACTIVE MEDIA GALLERY SECTION
   ========================================== */
@media (max-width: 991px) {
  .interactive-gallery-section {
    padding: 45px 0 60px 0;
  }

  .gallery-toggle-wrapper {
    margin-bottom: 32px;
  }

  /* Force single-column layout on tablet/mobile: Main Frame on Top, 2x2 Grid Below */
  .gallery-container-grid,
  .reflex-gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    max-width: 680px;
    margin: 0 auto;
    padding-left: 14px;
  }

  .photo-featured-wrapper,
  .video-featured-wrapper,
  .reflex-monitor-wrapper {
    width: 100%;
  }

  .reflex-3d-lens {
    left: -20px;
    top: 36px;
    width: 58px;
    height: 58px;
  }

  .photo-featured-frame img,
  .video-featured-frame video {
    aspect-ratio: 16 / 10;
  }

  .paperclip-icon {
    top: -14px;
    right: 24px;
    width: 34px;
    height: 34px;
  }

  /* 2x2 Grid Centered Below Main Frame */
  .photo-thumbs-grid,
  .video-thumbs-grid,
  .video-thumbs-grid-labeled {
    grid-template-columns: 1fr 1fr !important;
    gap: 18px !important;
    width: 100%;
  }

  .filmstrip-frame {
    padding: 12px 30px;
  }

  .video-thumb-item {
    padding: 6px 16px;
  }

  .video-play-overlay {
    width: 64px;
    height: 64px;
  }

  .video-play-overlay svg {
    width: 26px;
    height: 26px;
  }
}

@media (max-width: 576px) {
  .interactive-gallery-section {
    padding: 35px 0 45px 0;
  }

  .gallery-toggle-pill {
    padding: 4px 6px;
    gap: 4px;
  }

  .gallery-toggle-btn {
    padding: 10px 18px;
    font-size: 0.78rem;
    gap: 6px;
  }

  .gallery-toggle-btn svg {
    width: 15px;
    height: 15px;
  }

  .gallery-container-grid,
  .reflex-gallery-grid {
    gap: 24px !important;
    max-width: 100%;
    padding-left: 0 !important;
  }

  .reflex-3d-lens {
    left: -12px;
    top: 30px;
    width: 44px;
    height: 44px;
  }

  .exhibit-card-frame {
    padding: 12px 14px 14px 14px;
  }

  .exhibit-title {
    font-size: 0.95rem;
  }

  .photo-featured-frame {
    padding: 6px;
    border-width: 3.5px;
  }

  .photo-featured-frame img,
  .video-featured-frame video {
    aspect-ratio: 4 / 3;
    border-radius: 2px;
  }

  .paperclip-icon {
    top: -12px;
    right: 18px;
    width: 28px;
    height: 28px;
  }

  .photo-thumbs-grid,
  .video-thumbs-grid,
  .video-thumbs-grid-labeled {
    gap: 12px !important;
  }

  .video-card-thumb-frame {
    padding: 4px 10px;
    background-size: 6px 100%;
    background-position: 3px 0, calc(100% - 3px) 0;
  }

  .video-card-title {
    font-size: 0.75rem;
  }

  .video-card-time {
    font-size: 0.68rem;
  }

  .card-play-overlay {
    width: 26px;
    height: 26px;
  }

  .card-play-overlay svg {
    width: 11px;
    height: 11px;
  }

  .photo-thumb-item {
    padding: 4px;
    border-width: 3px;
  }

  .push-pin-dot {
    top: -8px;
    width: 11px;
    height: 11px;
  }

  .push-pin-icon {
    top: -12px;
    width: 20px;
    height: 20px;
  }

  .filmstrip-frame {
    padding: 8px 18px;
    border-radius: 4px;
  }

  .video-thumb-item {
    padding: 4px 10px;
  }

  .video-play-overlay {
    width: 50px;
    height: 50px;
  }

  .video-play-overlay svg {
    width: 20px;
    height: 20px;
    margin-left: 3px;
  }

  .thumb-play-overlay {
    width: 32px;
    height: 32px;
  }

  .thumb-play-overlay svg {
    width: 14px;
    height: 14px;
  }
}

/* ==========================================
   6. STATS & PROFESSIONAL ENDORSEMENT SECTION
   ========================================== */
.stats-endorsement-section {
  overflow: hidden;
  /* Prevents background circles from causing horizontal scroll on mobile */
}

@media (max-width: 991px) {
  .stats-endorsement-section {
    padding: 60px 0 70px 0;
  }

  .bg-red-circle-wrapper {
    width: 320px;
    height: 320px;
    top: -60px;
    left: -80px;
    opacity: 0.6;
  }

  .bg-purple-glow {
    width: 300px;
    height: 300px;
  }

  .bg-quote-watermark {
    font-size: 160px;
  }

  .bg-quote-watermark.left {
    left: -10px;
    top: 30%;
  }

  .bg-quote-watermark.right {
    right: -10px;
    bottom: 10%;
  }

  .stat-card {
    padding: 26px 16px;
  }

  .stat-number-wrapper {
    font-size: 2.2rem;
  }

  .stat-label {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }
}

/* 2x2 Grid Stacking on Mobile/Tablets (max-width: 768px) */
@media (max-width: 768px) and (min-width: 577px) {
  .stats-endorsement-section .row>[class*="col-"] {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

/* 1 Column Stacking on Small Phones (max-width: 576px) */
@media (max-width: 576px) {
  .stats-endorsement-section {
    padding: 40px 0 50px 0;
  }

  .stats-endorsement-section .row>[class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .bg-red-circle-wrapper {
    width: 220px;
    height: 220px;
    top: -30px;
    left: -60px;
    opacity: 0.45;
  }

  .bg-purple-glow {
    width: 200px;
    height: 200px;
    top: 5%;
  }

  .bg-quote-watermark {
    display: none;
    /* Hide heavy watermark quotes on mobile to avoid background clutter */
  }

  .stat-card {
    padding: 20px 14px;
    border-radius: 10px;
  }

  .stat-corner-bracket {
    width: 15px;
    height: 15px;
  }

  .stat-number-wrapper {
    font-size: 1.9rem;
    margin-bottom: 4px;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .endorsement-card-wrapper {
    margin-top: 15px;
  }

  .endorsement-card {
    border-radius: 24px !important;
    padding: 24px 16px 20px 16px !important;
  }

  .endorsement-quote-icon {
    top: 14px;
    left: 16px;
    width: 22px;
    height: 22px;
  }

  .endorsement-header {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
  }

  .endorsement-quote {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 18px;
  }

  .endorsement-author {
    font-size: 0.88rem;
  }

  .endorsement-role {
    font-size: 0.75rem;
  }

  .endorsement-controls {
    margin-top: 18px;
    gap: 12px;
  }

  .endorsement-nav-btn {
    width: 34px;
    height: 34px;
  }

  .endorsement-nav-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* ==========================================
   7. FOOTER SECTION
   ========================================== */
@media (max-width: 768px) {
  .site-footer {
    padding: 24px 0 20px 0;
  }

  .footer-location-row {
    justify-content: center;
  }

  .copyright-text,
  .follow-text {
    font-size: 0.78rem;
  }
}

@media (max-width: 576px) {
  .social-btn {
    width: 30px;
    height: 30px;
  }

  .social-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* ==========================================
   8. BOOK PAGE - HERO SECTION RESPONSIVE
   ========================================== */
@media (max-width: 991px) {
  .book-hero-section {
    padding-top: 120px;
    padding-bottom: 50px;
    min-height: 440px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.88) 55%, rgba(255, 255, 255, 0.65) 100%), url('../img/hero sec- book.png');
    background-position: center right;
  }

  .book-hero-content {
    max-width: 100%;
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .book-hero-logo img {
    max-width: 250px;
  }

  .book-hero-description {
    font-size: 1.02rem;
    line-height: 1.65;
  }
}

@media (max-width: 576px) {
  .book-hero-section {
    padding-top: 100px;
    padding-bottom: 35px;
    min-height: 380px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.9) 70%, rgba(255, 255, 255, 0.75) 100%), url('../img/hero sec- book.png');
  }

  .book-hero-logo img {
    max-width: 200px;
  }

  .publications-pill-badge {
    font-size: 0.78rem;
    padding: 6px 14px;
  }

  .book-hero-description {
    font-size: 0.92rem;
    line-height: 1.6;
  }
}

/* ==========================================
   8B. JOURNALIST PAGE - HERO SECTION RESPONSIVE
   ========================================== */
@media (max-width: 991px) {
  .journalist-hero-section {
    padding-top: 105px;
    padding-bottom: 40px;
    min-height: 380px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.92) 55%, rgba(255, 255, 255, 0.65) 100%), url('../img/Journalist/Journalist-hero-section.jpeg');
    background-position: center right;
  }

  .journalist-hero-content {
    max-width: 100%;
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .journalist-hero-logo img {
    max-width: 230px;
  }

  .journalist-hero-description {
    font-size: 0.92rem;
    line-height: 1.6;
  }
}

@media (max-width: 576px) {
  .journalist-hero-section {
    padding-top: 95px;
    padding-bottom: 25px;
    min-height: 330px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.94) 70%, rgba(255, 255, 255, 0.8) 100%), url('../img/Journalist/Journalist-hero-section.jpeg');
  }

  .journalist-hero-logo img {
    max-width: 200px;
  }

  .editorial-pill-badge {
    font-size: 0.72rem;
    padding: 4px 12px;
  }

  .journalist-hero-description {
    font-size: 0.85rem;
    line-height: 1.55;
  }
}

/* ==========================================
   JOURNALS I PUBLISH WITH & ACTION CARDS
   ========================================== */
@media (max-width: 768px) {
  .journals-publish-section {
    padding: 50px 0 70px 0;
  }

  .decorative-red-corner {
    max-width: 60%;
  }

  .decorative-red-img {
    max-height: 320px;
    opacity: 0.75;
  }

  .journals-publish-section .marquee-item {
    width: 250px;
    height: 115px;
    padding: 10px 18px;
  }

  .journals-publish-section .marquee-item img {
    max-width: 190px;
    max-height: 85px;
  }

  .action-card {
    padding: 1.5rem !important;
  }
}

@media (max-width: 576px) {
  .journals-publish-section {
    padding: 40px 0 55px 0;
  }

  .decorative-red-corner {
    max-width: 70%;
  }

  .decorative-red-img {
    max-height: 240px;
    opacity: 0.65;
  }

  .journals-publish-section .marquee-item {
    width: 195px;
    height: 90px;
    padding: 8px 12px;
  }

  .journals-publish-section .marquee-item img {
    max-width: 145px;
    max-height: 65px;
  }

  .action-card {
    padding: 1.25rem !important;
  }
}

/* ==========================================
   FEATURED ARTICLES SECTION RESPONSIVE
   ========================================== */
@media (max-width: 991px) {
  .featured-articles-section {
    padding: 60px 0 80px 0;
  }

  .featured-section-title {
    font-size: 1.65rem;
    margin-bottom: 1.5rem;
  }

  .article-card-inner {
    border-radius: 16px !important;
    border-top: 6px solid #8b1115 !important;
    clip-path: none !important;
  }

  .card-maroon-accent {
    display: none !important;
  }

  .article-card-content {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
    min-height: auto;
  }

  .col-date {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    border-right: none;
    border-bottom: 1px solid #f2b4ba;
    padding: 0 0 14px 0;
    width: 100%;
    height: auto;
  }

  .article-date-block {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }

  .date-day {
    font-size: 2.2rem;
  }

  .quill-icon-wrapper {
    margin-top: 0;
    margin-left: auto;
  }

  .col-author {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 0;
    text-align: left;
  }

  .author-avatar-wrapper {
    margin-bottom: 0;
    width: 58px;
    height: 58px;
  }

  .author-name {
    text-align: left;
    font-size: 0.88rem;
  }

  .col-details {
    padding: 0;
  }

  .article-title {
    font-size: 1.15rem;
  }

  .col-action {
    padding: 10px 0 0 0;
    width: 100%;
  }

  .btn-read-article {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    box-sizing: border-box;
  }
}

@media (max-width: 576px) {
  .featured-articles-section {
    padding: 45px 0 60px 0;
  }

  .search-sort-bar {
    gap: 12px;
    margin-bottom: 1.5rem;
  }

  .sort-dropdown-wrapper {
    width: 100%;
  }

  .sort-dropdown-btn {
    width: 100%;
    justify-content: space-between;
  }

  .sort-dropdown-wrapper .dropdown-menu {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  .featured-section-title {
    font-size: 1.45rem;
  }

  .btn-view-more {
    width: 100%;
    padding: 12px 24px;
  }
}

/* ==========================================
   CONTRIBUTORS SECTION RESPONSIVE
   ========================================== */
@media (max-width: 1199px) {
  .contributors-grid {
    grid-template-columns: repeat(2, minmax(0, 280px));
    justify-content: center;
    gap: 95px 36px;
  }

  .contributors-section-title {
    margin-bottom: 85px;
  }
}

@media (max-width: 991px) {
  .contributors-section {
    padding: 40px 0 25px 0;
  }

  .contributors-section-title {
    font-size: 1.75rem;
    margin-bottom: 75px;
  }

  .contributors-vector-img {
    max-height: 380px;
    opacity: 0.6;
  }
}

@media (max-width: 640px) {
  .contributors-section {
    padding: 35px 0 20px 0;
  }

  .contributors-grid {
    grid-template-columns: minmax(0, 300px);
    justify-content: center;
    gap: 85px;
  }

  .contributors-section-title {
    font-size: 1.45rem;
    margin-bottom: 70px;
  }
}

/* ==========================================
   9. BOOKS CATALOG MOBILE & TABLET OPTIMIZATION
   ========================================== */
@media (max-width: 768px) {

  /* Hide the heavy wooden shelf image on small screens */
  .wooden-shelf-container {
    display: none !important;
  }

  /* Style each book item into a clean, modern card layout */
  .bookshelf-item-row {
    background: #ffffff;
    border: 1.5px solid #f0f0f0;
    border-radius: 16px;
    padding: 24px 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    min-height: auto !important;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .bookshelf-item-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  }

  /* Stack cover, title, badges, ratings, and button vertically */
  .bookshelf-item-row .row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px !important;
  }

  .bookshelf-item-row [class*="col-"] {
    width: 100% !important;
    text-align: center !important;
    margin-left: 0 !important;
  }

  /* Book Cover Alignment on Mobile */
  .book-cover-wrap {
    margin: 0 auto 12px auto !important;
    transform: none !important;
    display: flex !important;
    justify-content: center;
  }

  .book-cover-card {
    width: 140px !important;
    height: 215px !important;
    margin: 0 auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
  }

  /* Book Details Box on Mobile */
  .book-details-box {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    text-align: center !important;
  }

  .book-details-box .d-flex.justify-content-between {
    justify-content: center !important;
    gap: 12px !important;
  }

  .rating-wrapper {
    justify-content: center !important;
  }

  .btn-show-details {
    width: 100%;
    max-width: 260px;
    justify-content: center;
    margin-top: 10px;
  }

  .row-illustration-card {
    max-width: 220px !important;
    margin: 0 auto 10px auto;
  }

  .row-illustration-img {
    width: 200px !important;
  }

  .bg-deco-leaf {
    max-width: 260px !important;
    opacity: 0.25 !important;
  }
}

/*--------------------------------------------------------------
# Book Details & Story Responsive Adjustments
--------------------------------------------------------------*/
@media (max-width: 1199px) {
  .book-mockup-img {
    max-width: 360px;
  }
}

@media (max-width: 991px) {

  /* Hero Section */
  .book-details-hero-section {
    padding: 120px 0 80px 0;
    background-size: 300px 300px, 220px auto;
    background-position: top right -50px, top left -50px;
  }

  .bd-info-col {
    margin-left: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .bd-info-col .d-flex.align-items-center.justify-content-between {
    justify-content: center !important;
    gap: 12px !important;
  }

  .book-meta-grid {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .meta-item {
    align-items: center;
  }

  .book-mockup-img {
    max-width: 280px;
    margin: 0 auto;
  }

  .purchase-card-box {
    margin-top: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Story Section */
  .book-story-section {
    padding-top: 40px !important;
    padding-bottom: 60px !important;
    text-align: center;
  }

  .book-story-section::before {
    top: -50px;
    background-size: 400px auto;
    opacity: 0.4;
  }

  .book-story-section .row {
    flex-direction: column;
  }

  .book-story-section .col-lg-6 {
    padding-right: 15px !important;
    padding-left: 15px !important;
  }

  .story-book-image {
    transform: none;
    margin-top: 40px;
    max-width: 85% !important;
    margin-left: auto;
    margin-right: auto;
  }

  .book-story-section .d-flex.gap-4 {
    justify-content: center;
  }
}

@media (max-width: 768px) {

  /* Hero Section */
  .book-mockup-img {
    max-width: 240px;
  }

  .book-main-title {
    font-size: 2rem;
  }

  .book-arabic-title {
    font-size: 1.3rem;
  }

  .book-meta-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
  }

  /* Story Section */
  .book-story-section h2.display-5 {
    font-size: 2rem;
  }

  .book-story-section .lead {
    font-size: 1rem;
  }

  .book-story-section .d-flex.flex-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 15px !important;
  }

  .book-story-section .d-flex.flex-wrap>div {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 576px) {

  /* Hero Section */
  .book-details-hero-section {
    padding: 100px 0 60px 0;
    background-image:
      radial-gradient(circle at 86% 22%, rgba(254, 240, 138, 0.45) 0%, rgba(253, 224, 71, 0.18) 120px, transparent 240px),
      url('../img/book-details-background/bg-%20book%20details01.png');
    background-size: 200px 200px, 150px auto;
  }

  .book-main-title {
    font-size: 1.75rem;
  }

  .book-credits {
    font-size: 0.85rem;
  }

  .meta-label {
    font-size: 0.65rem;
  }

  .meta-value {
    font-size: 0.85rem;
  }

  .purchase-card-box {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .main-price-text {
    font-size: 2.5rem;
  }

  .tab-btn {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .btn-rent-buy-action,
  .btn-add-to-cart-action {
    padding: 14px 20px;
    font-size: 0.95rem;
  }

  /* Story Section */
  .book-story-section h2.display-5 {
    font-size: 1.75rem;
  }

  .story-book-image {
    max-width: 100% !important;
  }
}

/*--------------------------------------------------------------
# PDF Preview / Reader Responsive Adjustments (Section 3)
--------------------------------------------------------------*/
@media (max-width: 991px) {
  .book-preview-section {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }

  .preview-sidebar {
    height: auto !important;
    margin-bottom: 20px;
  }

  #pdf-thumbnails {
    max-height: 160px !important;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
    padding-bottom: 6px;
  }

  #pdf-thumbnails>* {
    flex: 0 0 auto;
    margin-bottom: 0 !important;
  }

  #book-preview .pdf-viewer-container {
    padding: 1.25rem 0.85rem !important;
  }

  #book-preview #pdf-spread-container {
    min-height: 420px !important;
  }

  #book-preview #pdf-render-left,
  #book-preview #pdf-render-right {
    max-height: 450px !important;
  }
}

@media (max-width: 768px) {
  #book-preview .pdf-viewer-container {
    padding: 0.85rem 0.5rem !important;
  }

  #book-preview #pdf-spread-container {
    min-height: 380px !important;
  }

  /* Single-page mode on mobile for 2.5x larger PDF display */
  #book-preview #pdf-render-right {
    display: none !important;
  }

  #book-preview #pdf-render-left {
    max-width: 100% !important;
    max-height: 460px !important;
    width: 100% !important;
    border-right: none !important;
    object-fit: contain !important;
  }

  /* Hide center fold line divider on mobile */
  #book-preview #pdf-spread-container>div.position-absolute.start-50 {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .preview-sidebar {
    padding: 14px !important;
  }

  .preview-tabs .btn {
    font-size: 0.82rem;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  #book-preview .pdf-viewer-container {
    padding: 0.5rem 0.25rem !important;
  }

  #book-preview #pdf-spread-container {
    min-height: 340px !important;
  }

  #book-preview #pdf-render-left {
    max-height: 420px !important;
    max-width: 100% !important;
  }
}

/*--------------------------------------------------------------
# Book Reviews & More Magic Responsive Adjustments
--------------------------------------------------------------*/
@media (max-width: 991px) {
  #book-reviews {
    padding-top: 50px !important;
    padding-bottom: 50px !important;
  }

  #book-reviews>img.position-absolute {
    max-width: 200px !important;
    left: -10px !important;
    top: -10px !important;
  }

  .review-summary-box {
    padding: 24px 16px !important;
  }

  .review-summary-box .border-end {
    border-right: none !important;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 20px;
    margin-bottom: 20px !important;
    width: 100%;
  }

  #more-magic .container {
    padding-bottom: 80px !important;
  }

  #more-magic>img.position-absolute {
    max-width: 180px !important;
    right: -10px !important;
  }
}

@media (max-width: 768px) {
  #book-reviews h2.display-5 {
    font-size: 2rem;
  }

  .review-summary-box h3.display-4 {
    font-size: 3rem;
  }

  /* Make More Magic books horizontally scrollable on mobile */
  #more-magic .row.g-4 {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  #more-magic .row.g-4>div {
    flex: 0 0 70%;
    max-width: 70%;
    scroll-snap-align: start;
  }

  /* Hide custom scrollbar for clean look */
  #more-magic .row.g-4::-webkit-scrollbar {
    display: none;
  }

  #more-magic .row.g-4 {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

@media (max-width: 576px) {
  #book-reviews {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  #book-reviews>img.position-absolute {
    max-width: 150px !important;
  }

  .review-card {
    padding: 20px !important;
    padding-bottom: 50px !important;
  }

  .review-card p {
    font-size: 0.9rem !important;
  }

  #more-magic .container {
    padding-bottom: 60px !important;
    margin-top: 30px !important;
  }

  #more-magic h2.display-6 {
    font-size: 1.75rem;
  }

  #more-magic>img.position-absolute {
    max-width: 140px !important;
    right: -20px !important;
    opacity: 0.6;
  }

  #more-magic .row.g-4>div {
    flex: 0 0 85%;
    max-width: 85%;
  }
}

/*--------------------------------------------------------------
# Cart & Checkout Pages Mobile Responsiveness & Layout
--------------------------------------------------------------*/
@media (max-width: 991px) {
  .cart-page-wrapper,
  .checkout-page-wrapper,
  .checkout-result-page-wrapper {
    padding-top: 110px !important;
  }

  .cart-bottom-right-svg img {
    max-width: 140px !important;
    opacity: 0.6;
  }
}

@media (max-width: 768px) {
  .cart-page-wrapper,
  .checkout-page-wrapper,
  .checkout-result-page-wrapper {
    padding-top: 100px !important;
  }

  .cart-item-card {
    padding: 0.85rem !important;
    border-radius: 14px !important;
  }

  .cart-item-card .cart-item-img {
    width: 75px !important;
    height: 95px !important;
  }

  .cart-item-card .cart-item-title {
    font-size: 1rem !important;
    padding-right: 28px;
    /* Space for delete button */
  }

  .cart-item-card .cart-item-author {
    font-size: 0.78rem !important;
    margin-bottom: 0.5rem !important;
  }

  .cart-item-card .cart-item-label {
    font-size: 0.68rem !important;
    padding: 0.2rem 0.55rem !important;
    margin-bottom: 0.4rem !important;
  }

  .cart-item-card .cart-item-price {
    font-size: 1.05rem !important;
  }

  .summary-card {
    padding: 1.25rem !important;
    border-radius: 16px !important;
  }
}

@media (max-width: 576px) {
  .cart-item-card {
    padding: 0.75rem !important;
    margin-bottom: 0.85rem !important;
  }

  .cart-item-card .cart-item-img {
    width: 65px !important;
    height: 85px !important;
  }

  .cart-item-card .cart-item-title {
    font-size: 0.92rem !important;
    line-height: 1.25;
    padding-right: 25px;
  }

  .cart-item-card .cart-item-author {
    font-size: 0.72rem !important;
    margin-bottom: 0.4rem !important;
  }

  .cart-item-card .cart-item-label {
    font-size: 0.62rem !important;
    padding: 0.18rem 0.45rem !important;
    margin-bottom: 0.35rem !important;
  }

  .cart-item-card .quantity-control {
    padding: 1px 2px !important;
  }

  .cart-item-card .qty-btn-minus,
  .cart-item-card .qty-btn-plus {
    font-size: 0.95rem !important;
    padding: 0 0.4rem !important;
  }

  .cart-item-card .qty-value {
    font-size: 0.85rem !important;
    padding: 0 0.25rem !important;
  }

  .cart-item-card .cart-item-price {
    font-size: 1rem !important;
  }

  .cart-bottom-right-svg {
    display: none !important;
  }
}

/* ==========================================
   10. PROFILE PAGE MOBILE & TABLET OPTIMIZATION
   ========================================== */

/* --- Tablet & Medium Screens (max-width: 991px) --- */
@media (max-width: 991px) {

  /* Profile Container Spacing */
  main.profile-main-wrapper,
  main:has(.profile-gradient-banner) {
    margin-top: 75px !important;
    padding-top: 1.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  /* Profile Banner Header */
  .profile-gradient-banner {
    padding: 1.75rem 1.5rem;
    gap: 1.25rem;
    border-radius: 20px;
  }

  .profile-avatar-wrapper {
    width: 80px;
    height: 80px;
  }

  .profile-avatar-img {
    width: 80px;
    height: 80px;
    border-width: 3px;
  }

  .profile-avatar-upload-icon {
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
    bottom: 1px;
    right: 1px;
  }

  .profile-user-name {
    font-size: 1.45rem;
  }

  .profile-member-since {
    font-size: 0.88rem;
  }

  /* Profile Tabs Navigation - Scrollable Pill Bar on Mobile/Tablet */
  .profile-nav-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    gap: 0.6rem !important;
    margin-top: 1.75rem !important;
    margin-bottom: 1.5rem !important;
    padding-bottom: 6px !important;
    scrollbar-width: none;
  }

  .profile-nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .profile-nav-tabs .nav-item {
    flex: 0 0 auto !important;
  }

  .profile-nav-tabs .nav-link {
    white-space: nowrap !important;
    padding: 0.6rem 1.15rem !important;
    font-size: 0.88rem !important;
    border-radius: 30px !important;
    background-color: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #4b5563 !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.25s ease !important;
  }

  .profile-nav-tabs .nav-link::after {
    display: none !important;
  }

  .profile-nav-tabs .nav-link:hover {
    color: #111827 !important;
    border-color: #cbd5e1 !important;
    background-color: #f8fafc !important;
  }

  .profile-nav-tabs .nav-link.active {
    background: #c41e3a !important;
    color: #ffffff !important;
    border-color: #c41e3a !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.25) !important;
  }

  .profile-nav-tabs .nav-link.active i {
    color: #fbc02d !important;
  }

  /* CRITICAL FIX: Override Desktop 195px Margin on Reviews Form Column */
  #reviews-panel .col-lg-7 {
    margin-top: 0 !important;
  }
}

/* --- Mobile Devices (max-width: 768px) --- */
@media (max-width: 768px) {

  /* Library Panel */
  .library-header-title {
    font-size: 1.15rem;
  }

  .library-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
  }

  .library-book-card {
    padding: 1rem;
    border-radius: 16px;
  }

  .library-book-cover {
    height: 150px;
  }

  /* Wishlist Panel 2-Column Grid on Tablet/Large Mobile */
  #wishlistBooksContainer .col {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .wishlist-cover-box {
    height: 180px !important;
    padding: 0.5rem !important;
  }

  .wishlist-cover-box img {
    max-height: 145px !important;
  }

  /* Orders Panel Cards */
  #orders-panel .bg-white.rounded-4 {
    padding: 1.25rem !important;
    border-radius: 16px !important;
    gap: 1rem !important;
  }

  /* Reviews Panel Cards */
  .review-book-card {
    padding: 1.25rem !important;
    border-radius: 16px !important;
    gap: 1rem !important;
  }

  .review-book-card .action-btn-wrapper button {
    width: 100% !important;
  }

  /* Settings Panel Form Cards */
  #settings-panel .bg-white.rounded-4 {
    padding: 1.5rem 1.25rem !important;
    border-radius: 18px !important;
  }

  #settings-panel form .text-end {
    text-align: center !important;
  }

  #settings-panel form button[type="submit"] {
    width: 100% !important;
  }
}

/* --- Small Mobile Phones (max-width: 576px) --- */
@media (max-width: 576px) {

  /* Main profile banner compact layout */
  .profile-gradient-banner {
    padding: 1.25rem 1rem;
    gap: 0.9rem;
    border-radius: 16px;
  }

  .profile-avatar-wrapper {
    width: 70px;
    height: 70px;
  }

  .profile-avatar-img {
    width: 70px;
    height: 70px;
  }

  .profile-avatar-upload-icon {
    width: 24px;
    height: 24px;
    font-size: 0.72rem;
    bottom: 0;
    right: 0;
  }

  .profile-user-name {
    font-size: 1.2rem;
    line-height: 1.25;
  }

  .profile-member-since {
    font-size: 0.78rem;
  }

  /* Tabs compact font size & spacing */
  .profile-nav-tabs {
    gap: 0.45rem !important;
    margin-top: 1.25rem !important;
    margin-bottom: 1.25rem !important;
  }

  .profile-nav-tabs .nav-link {
    padding: 0.5rem 0.88rem !important;
    font-size: 0.82rem !important;
  }

  /* Library Panel */
  #libraryBooksContainer .col {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .library-book-card {
    padding: 1rem 0.85rem;
  }

  .library-book-cover {
    height: 160px;
  }

  .library-read-overlay {
    opacity: 1 !important;
    visibility: visible !important;
    background: rgba(17, 24, 39, 0.25) !important;
  }

  .btn-reading-hover {
    transform: translateY(0) !important;
    font-size: 0.78rem !important;
    padding: 0.45rem 1rem !important;
  }

  /* Orders Panel */
  #orders-panel .bg-white.rounded-4 {
    padding: 1rem !important;
    margin-bottom: 0.85rem !important;
  }

  #orders-panel .bg-white.rounded-4 img {
    max-width: 75px !important;
    height: 100px !important;
  }

  #orders-panel .d-flex.flex-wrap.align-items-center.gap-2 {
    gap: 0.5rem !important;
  }

  #orders-panel .d-flex.flex-wrap.align-items-center.gap-2>* {
    flex: 1 1 100% !important;
    width: 100% !important;
    text-align: center !important;
  }

  /* Wishlist Panel 2-Column Grid on Mobile for compact display */
  #wishlistBooksContainer .col {
    flex: 0 0 50%;
    max-width: 50%;
    padding-left: 6px;
    padding-right: 6px;
  }

  #wishlistBooksContainer {
    margin-left: -6px;
    margin-right: -6px;
  }

  #wishlistBooksContainer .card {
    padding: 0.75rem 0.6rem 0.85rem 0.6rem !important;
    border-radius: 14px !important;
  }

  .wishlist-cover-box {
    height: 140px !important;
    padding: 0.35rem !important;
    margin-bottom: 0.5rem !important;
    border-radius: 10px !important;
  }

  .wishlist-cover-box img {
    max-height: 115px !important;
  }

  #wishlistBooksContainer .badge {
    font-size: 0.58rem !important;
    padding: 0.2rem 0.45rem !important;
    margin: 6px !important;
  }

  #wishlistBooksContainer .btn-remove-wishlist {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.7rem !important;
    margin: 6px !important;
  }

  #wishlistBooksContainer h6 {
    font-size: 0.82rem !important;
  }

  #wishlistBooksContainer p {
    font-size: 0.72rem !important;
    margin-bottom: 0.5rem !important;
  }

  #wishlistBooksContainer .mt-auto a {
    width: 100% !important;
    font-size: 0.72rem !important;
    padding: 0.4rem 0.25rem !important;
    border-radius: 8px !important;
    margin-bottom: 0.35rem !important;
  }

  /* Reviews Panel */
  .review-book-card {
    padding: 1rem !important;
    margin-bottom: 0.85rem !important;
  }

  .review-book-card img {
    width: 70px !important;
    height: 95px !important;
  }

  .review-book-card h5 {
    font-size: 0.95rem !important;
  }

  .review-book-card p {
    font-size: 0.78rem !important;
    margin-bottom: 0.5rem !important;
  }

  #reviewPlaceholderState {
    min-height: 200px !important;
    padding: 1.5rem 1rem !important;
    border-radius: 16px !important;
  }

  #reviewActiveFormState {
    padding: 1.25rem 1rem !important;
    border-radius: 16px !important;
  }

  #reviewStarContainer {
    font-size: 1.5rem !important;
    gap: 0.6rem !important;
  }

  #btnSubmitReview {
    width: 100% !important;
    font-size: 0.88rem !important;
    padding: 0.6rem 1rem !important;
  }

  /* Settings Panel */
  #settings-panel .bg-white.rounded-4 {
    padding: 1.15rem 0.9rem !important;
    margin-bottom: 1rem !important;
    border-radius: 16px !important;
  }

  #settings-panel h5 {
    font-size: 1rem !important;
  }

  #settings-panel label {
    font-size: 0.68rem !important;
  }

  #settings-panel .form-control {
    padding: 0.6rem 0.75rem !important;
    font-size: 0.82rem !important;
  }

  /* Modal Responsiveness */
  #trackOrderModal .modal-content {
    padding: 1.25rem 1rem !important;
    border-radius: 20px !important;
  }

  #trackOrderModal .order-tracking-stepper {
    padding: 1.25rem 0.5rem !important;
    border-radius: 16px !important;
  }

  #trackOrderModal .order-tracking-stepper .rounded-circle {
    width: 38px !important;
    height: 38px !important;
    font-size: 0.9rem !important;
  }

  #trackOrderModal .order-tracking-stepper h6 {
    font-size: 0.78rem !important;
  }

  #trackOrderModal .order-tracking-stepper span {
    font-size: 0.68rem !important;
  }
}

/* ==========================================
   11. PDF READER MODAL MOBILE REDESIGN STYLES
   ========================================== */

/* Thumb-friendly minimum touch targets (44x44px) */
.reader-btn-touch {
  min-width: 44px !important;
  min-height: 44px !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  font-size: 1.1rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.reader-drawer-trigger-btn {
  min-height: 44px !important;
  padding: 0.5rem 1rem !important;
  border-radius: 30px !important;
  font-size: 0.82rem !important;
  background-color: #c41e3a !important;
  color: #ffffff !important;
  border: none !important;
}

@media (max-width: 991px) {

  /* Reader Modal Fullscreen Mobile Overrides */
  #fullPdfReaderModal .modal-body {
    padding: 0 !important;
  }

  .pdf-viewer-container {
    border-radius: 0 !important;
    border: none !important;
    padding: 0.5rem !important;
  }

  #pdf-spread-container {
    min-height: calc(100vh - 130px) !important;
  }

  /* Compact Top Header Bar for Mobile */
  .reader-top-toolbar {
    padding: 0.4rem 0.65rem !important;
    min-height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }

  .reader-left-bar {
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }

  .reader-title-wrap h6 {
    font-size: 0.85rem !important;
    max-width: 110px !important;
  }

  .reader-controls-right {
    flex-shrink: 0 !important;
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
  }

  .reader-top-toolbar .reader-btn-touch {
    min-width: 36px !important;
    min-height: 36px !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 0.95rem !important;
  }

  .reader-top-toolbar .btn-close {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0.25rem !important;
  }

  .reader-zoom-val {
    font-size: 0.78rem !important;
    min-width: 34px !important;
    padding: 0 2px !important;
  }

  .reader-progress-container {
    padding: 0.35rem 0.75rem !important;
  }

  /* Compact Floating Page Control Bar */
  .reader-nav-bar {
    width: calc(100% - 24px) !important;
    max-width: 450px !important;
    bottom: 12px !important;
    padding: 0.4rem 0.85rem !important;
    justify-content: space-between !important;
    border-radius: 40px !important;
  }

  .reader-page-indicator {
    font-size: 0.78rem !important;
    white-space: nowrap;
  }

  /* Bottom Sheet Overlay Drawer Styling */
  .reader-bottom-sheet {
    box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.22) !important;
  }

  .drawer-drag-handle:active {
    background-color: #cbd5e1 !important;
  }
}

@media (max-width: 768px) {

  /* Single-page reader layout for mobile viewports */
  #readerCanvasRight {
    display: none !important;
  }

  #readerCanvasLeft {
    max-width: 100%;
    max-height: 100%;
    border-right: none !important;
  }

  /* Hide center fold line divider on mobile */
  #pdf-spread-container>div.position-absolute.start-50 {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .reader-top-toolbar {
    padding: 0.35rem 0.4rem !important;
  }

  .reader-title-wrap h6 {
    max-width: 90px !important;
    font-size: 0.8rem !important;
  }

  .reader-top-toolbar .reader-btn-touch {
    min-width: 34px !important;
    min-height: 34px !important;
    width: 34px !important;
    height: 34px !important;
    font-size: 0.88rem !important;
  }

  .reader-top-toolbar .btn-close {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
  }

  .reader-nav-bar {
    padding: 0.35rem 0.6rem !important;
    gap: 0.35rem !important;
  }

  .reader-drawer-trigger-btn span {
    font-size: 0.75rem !important;
  }
}

/*--------------------------------------------------------------
# 18. LAW CHAMBERS PAGE - MOBILE & RESPONSIVE OVERHAUL
# Strictly scoped to body.page-law to prevent affecting other pages
--------------------------------------------------------------*/

/* ==========================================
   1. NAVBAR ALIGNMENT & TOP SPACER (body.page-law)
   ========================================== */
body.page-law #header {
  padding: 14px 0 !important;
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}

body.page-law #header .container {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

@media (min-width: 640px) {
  body.page-law #header .container {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

@media (min-width: 992px) {
  body.page-law #header {
    padding: 20px 0 !important;
  }
}

body.page-law #header.scrolled {
  padding: 10px 0 !important;
}

@media (min-width: 992px) {
  body.page-law #header.scrolled {
    padding: 12px 0 !important;
  }
}

/* Navbar Collapse Compatibility on Mobile */
@media (max-width: 991.98px) {
  body.page-law #header .navbar-collapse.collapse:not(.show),
  body.page-law .navbar-expand-lg .navbar-collapse.collapse:not(.show) {
    display: none !important;
  }

  body.page-law #header .navbar-collapse.collapse.show,
  body.page-law .navbar-expand-lg .navbar-collapse.collapse.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Top Margin Spacer for Hero so Fixed Header never collides */
body.page-law .law-hero-viewport {
  margin-top: 92px !important;
}

@media (min-width: 769px) and (max-width: 991.98px) {
  body.page-law .law-hero-viewport {
    margin-top: 92px !important;
  }
}

@media (min-width: 992px) {
  body.page-law .law-hero-viewport {
    margin-top: 88px !important;
    height: calc(100vh - 88px) !important;
    max-height: calc(100vh - 55px) !important;
  }
}

/* ==========================================
   2. HERO SECTION (BBS TEAM BANNER & INFINITE MARQUEE)
   ========================================== */
@keyframes lawTeamMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  body.page-law #law-hero,
  body.page-law .law-hero-viewport {
    height: 72vh !important;
    min-height: 480px !important;
    max-height: 580px !important;
    overflow: hidden !important;
    position: relative !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  body.page-law #law-hero::-webkit-scrollbar,
  body.page-law .law-hero-viewport::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  /* Pinned BBS logo stays comfortably positioned */
  body.page-law #law-hero > div.absolute.top-4 {
    top: 1.15rem !important;
    left: 1rem !important;
    position: absolute !important;
    z-index: 40 !important;
    pointer-events: none !important;
  }

  body.page-law #law-hero > div.absolute.top-4 img {
    height: 34px !important;
    width: auto !important;
  }

  /* Infinite Seamless Closed-Loop Marquee Track */
  body.page-law .mobile-team-track {
    display: flex !important;
    width: max-content !important;
    height: 100% !important;
    animation: lawTeamMarquee 22s linear infinite !important;
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
  }

  body.page-law .mobile-team-track:hover,
  body.page-law .mobile-team-track:active {
    animation-play-state: paused !important;
  }

  /* Each team group width & proportions on mobile */
  body.page-law .law-team-group {
    width: 750px !important;
    min-width: 750px !important;
    height: 100% !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    flex-shrink: 0 !important;
  }

  body.page-law .law-team-group svg {
    min-width: 750px !important;
    width: 100% !important;
    height: 100% !important;
  }

  body.page-law .law-team-clone {
    display: flex !important;
  }

  body.page-law .person-cutout {
    width: 135% !important;
    max-width: 135% !important;
    height: auto !important;
  }

  body.page-law .law-person-name {
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.08 !important;
    letter-spacing: 0.02em !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95) !important;
  }

  body.page-law .hero-bottom-overlay {
    height: 120px !important;
    min-width: 750px !important;
  }
}

@media (max-width: 480px) {
  body.page-law #law-hero,
  body.page-law .law-hero-viewport {
    height: 68vh !important;
    min-height: 440px !important;
  }

  body.page-law .law-team-group {
    width: 690px !important;
    min-width: 690px !important;
  }

  body.page-law .law-team-group svg {
    min-width: 690px !important;
  }

  body.page-law .hero-bottom-overlay {
    min-width: 690px !important;
  }

  body.page-law .law-person-name {
    font-size: 12px !important;
  }
}

/* Desktop styles: Hide clone, stop animation, full width */
@media (min-width: 769px) {
  body.page-law .mobile-team-track {
    display: block !important;
    width: 100% !important;
    animation: none !important;
    transform: none !important;
  }

  body.page-law .law-team-clone {
    display: none !important;
  }

  body.page-law .law-team-group {
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
  }

  body.page-law .law-team-group svg {
    width: 100% !important;
    height: 100% !important;
  }
}

/* ==========================================
   3. OUR SERVICES / OUR EXPERTISE (CIRCULAR CARDS)
   ========================================== */
@media (max-width: 768px) {
  body.page-law .law-services-section {
    padding: 3.5rem 0 4rem 0 !important;
  }

  body.page-law .law-heading-line {
    width: clamp(35px, 12vw, 65px) !important;
  }

  body.page-law .scales-icon-box svg {
    width: 24px !important;
    height: 24px !important;
  }

  body.page-law .law-services-section .section-subtitle {
    font-size: 1.15rem !important;
    letter-spacing: 0.5px !important;
  }

  /* Single clean column of luxury circular cards */
  body.page-law .service-circle-card {
    width: 100% !important;
    max-width: 250px !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 auto !important;
    padding: 1.8rem 1.4rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-shadow: 0 8px 24px -6px rgba(34, 55, 198, 0.12), 0 3px 10px rgba(246, 196, 69, 0.08) !important;
  }

  body.page-law .service-icon-badge {
    width: 52px !important;
    height: 52px !important;
    font-size: 1.35rem !important;
    margin-bottom: 0.75rem !important;
    flex-shrink: 0 !important;
  }

  body.page-law .service-card-title {
    font-size: 1.12rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.45rem !important;
    line-height: 1.25 !important;
  }

  body.page-law .service-card-desc {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
    max-width: 180px !important;
    color: #64748b !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 430px) {
  body.page-law .service-circle-card {
    max-width: 235px !important;
    padding: 1.6rem 1.2rem !important;
  }

  body.page-law .service-icon-badge {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.25rem !important;
    margin-bottom: 0.6rem !important;
  }

  body.page-law .service-card-title {
    font-size: 1.05rem !important;
  }

  body.page-law .service-card-desc {
    font-size: 0.78rem !important;
    max-width: 165px !important;
  }
}

/* ==========================================
   4. COMMUNICATION OPTIONS (BLUE BACKGROUND SECTION)
   ========================================== */
@media (max-width: 768px) {
  body.page-law .law-consultation-section {
    padding: 3.5rem 0 4rem 0 !important;
    position: relative !important;
    overflow: visible !important;
  }

  /* Wax Seal Stamp Graphic repositioned proportionally */
  body.page-law .law-consultation-section img[alt="Official Seal"] {
    width: 76px !important;
    max-width: 76px !important;
    height: auto !important;
    top: -38px !important;
    right: 14px !important;
    transform: none !important;
    opacity: 0.95 !important;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)) !important;
    z-index: 25 !important;
    pointer-events: none !important;
  }

  /* Title sizing and centering without collision */
  body.page-law .law-consultation-section .section-subtitle {
    font-size: 1.05rem !important;
    line-height: 1.4 !important;
    padding: 0 10px !important;
    max-width: 82% !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
  }

  /* 6 Consultation Option Cards: 1 column, max-width 360px centered */
  body.page-law .consultation-card {
    width: 100% !important;
    max-width: 360px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border-radius: 1rem !important; /* rounded-2xl */
    padding: 1.25rem !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  body.page-law .consultation-card-icon {
    font-size: 1.35rem !important;
    color: #c9a84c !important;
    margin-bottom: 0.5rem !important;
  }

  body.page-law .consultation-card-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 0.35rem !important;
  }

  body.page-law .consultation-card-desc {
    font-size: 0.85rem !important;
    line-height: 1.45 !important;
    color: #64748b !important;
    margin-bottom: 0.85rem !important;
  }

  body.page-law .consultation-card-link {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 44px !important; /* Comfortable tap target */
    padding-top: 0.65rem !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    border-top: 1px solid #f1f5f9 !important;
  }
}

/* ==========================================
   5. WHY CLIENTS TRUST AISHA LAW CHAMBERS
   ========================================== */
@media (max-width: 768px) {
  body.page-law .why-trust-section {
    padding: 3.5rem 0 !important;
    overflow: hidden !important;
  }

  body.page-law .why-trust-header {
    text-align: center !important;
    margin-bottom: 2rem !important;
  }

  body.page-law .why-trust-title-dark,
  body.page-law .why-trust-title-blue {
    text-align: center !important;
    font-size: 1.85rem !important;
    line-height: 1.2 !important;
  }

  body.page-law .why-trust-boxes-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    max-width: 360px !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  /* Remove extreme rotation angles on mobile to prevent edge cutoffs */
  body.page-law .why-trust-card-wrapper,
  body.page-law .why-trust-card-left,
  body.page-law .why-trust-card-right {
    transform: none !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto !important;
  }

  body.page-law .why-trust-card-content {
    padding: 1.75rem 1.5rem !important;
    min-height: auto !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 18px rgba(34, 55, 198, 0.08) !important;
  }

  body.page-law .frame-bracket-top,
  body.page-law .frame-bracket-bottom {
    border-radius: 16px !important;
    border-width: 3.5px double #2237C6 !important;
  }

  body.page-law .why-trust-item {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.9rem !important;
  }

  body.page-law .why-trust-item:last-child {
    margin-bottom: 0 !important;
  }

  body.page-law .trust-check {
    font-size: 1.15rem !important;
    margin-right: 0.75rem !important;
    color: #10b981 !important;
    font-weight: 800 !important;
    flex-shrink: 0 !important;
  }

  body.page-law .trust-text {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    line-height: 1.35 !important;
    text-align: left !important;
  }

  body.page-law .why-trust-illustration-col {
    justify-content: center !important;
    margin-top: 2rem !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  body.page-law .why-trust-blob-backdrop {
    width: 250px !important;
    height: 250px !important;
  }

  body.page-law .why-trust-img {
    width: 80% !important;
    max-width: 290px !important;
    height: auto !important;
    margin: 0 auto !important;
    display: block !important;
  }
}

/* ==========================================
   6. OUR OFFICE & REQUEST CONSULTATION FORMS
   ========================================== */
@media (max-width: 768px) {
  /* Section 5: Our Office Card */
  body.page-law #our-office {
    padding: 2.5rem 0 !important;
  }

  body.page-law #our-office .bg-white {
    padding: 1.25rem 1rem !important;
    border-radius: 20px !important;
  }

  body.page-law #our-office h2 {
    font-size: 1.5rem !important;
    margin-bottom: 0.75rem !important;
  }

  body.page-law #our-office .h-36 {
    height: 140px !important;
  }

  body.page-law #our-office a[href="#appointment"] {
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
  }

  /* Section 6: Request Consultation Forms */
  body.page-law #appointment {
    padding: 2.5rem 0 3.5rem 0 !important;
    overflow: hidden !important;
  }

  /* Ambient glow circles clamped */
  body.page-law #appointment .blur-3xl,
  body.page-law #appointment .blur-\[100px\] {
    max-width: 250px !important;
    max-height: 250px !important;
  }

  /* Card containers spacious padding (p-4 sm:p-6) */
  body.page-law #consultationBookingForm .bg-white {
    padding: 1.25rem 1rem !important;
    border-radius: 16px !important;
  }

  /* Section Subtitles / Part Titles */
  body.page-law #consultationBookingForm h3 {
    font-size: 1.25rem !important;
  }

  /* Single-column input stacking on mobile */
  body.page-law #consultationBookingForm .grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Input heights (min-height: 48px) & typography */
  body.page-law #consultationBookingForm input,
  body.page-law #consultationBookingForm select {
    min-height: 48px !important;
    height: 48px !important;
    font-size: 0.95rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    border-radius: 12px !important;
  }

  body.page-law #consultationBookingForm textarea {
    min-height: 110px !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
    padding: 0.85rem 1rem !important;
  }

  /* Legible Label sizing (13px-14px) */
  body.page-law #consultationBookingForm label {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 0.45rem !important;
    letter-spacing: 0.03em !important;
  }

  /* Part 3: Payment & Fee Card Clean Layout */
  body.page-law #appointment .flex.justify-between.items-center.pb-2 {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.75rem !important;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.85rem !important;
  }

  body.page-law #appointment .flex.justify-between.items-center.pb-2 span:first-child {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
  }

  body.page-law #appointment .flex.justify-between.items-center.pb-2 span:last-child {
    font-size: 1.65rem !important;
    font-weight: 800 !important;
    color: #2237C6 !important;
    flex-shrink: 0 !important;
  }

  /* Payment Badges wrapping naturally without text truncation */
  body.page-law #appointment .flex.flex-wrap.gap-3.my-6 {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    margin: 1.25rem 0 !important;
  }

  body.page-law #appointment .flex.flex-wrap.gap-3.my-6 span {
    padding: 0.45rem 0.75rem !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* Full-width action button */
  body.page-law #btnSubmitConsultation {
    width: 100% !important;
    min-height: 50px !important;
    padding: 0.85rem 1rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

@media (min-width: 576px) and (max-width: 768px) {
  body.page-law #consultationBookingForm .bg-white {
    padding: 1.5rem !important;
  }
}

/* ==========================================================================
   NFBF PARTY PAGE MOBILE STYLES (nfbf-party.html)
   ========================================================================== */

/* Strict Horizontal Overflow Prevention */
html:has(body.nfbf-party),
html:has(body.page-nfbf),
body.nfbf-party,
body.page-nfbf {
  overflow-x: clip !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Mobile Navbar Collapse Compatibility */
@media (max-width: 991.98px) {
  body.nfbf-party #header .navbar-collapse.collapse:not(.show),
  body.page-nfbf #header .navbar-collapse.collapse:not(.show) {
    display: none !important;
  }

  body.nfbf-party #header .navbar-collapse.collapse.show,
  body.page-nfbf #header .navbar-collapse.collapse.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

@media (max-width: 768px) {
  /* Scroll Margin Top to ensure fixed navigation never obscures section tops */
  body.nfbf-party section,
  body.page-nfbf section,
  #nfbf-hero,
  #voice-beyond-control,
  #party-constitution,
  #party-members,
  #party-membership-count,
  #be-part-of-the-change {
    scroll-margin-top: 76px !important;
  }

  /* -------------------------------------------------------------------------
     1. HERO SECTION (Mobile Optimization)
     ------------------------------------------------------------------------- */
  body.nfbf-party #nfbf-hero,
  body.page-nfbf #nfbf-hero,
  #nfbf-hero {
    min-height: 500px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    position: relative !important;
    overflow: hidden !important;
    padding-top: 5rem !important;
    padding-bottom: 3.5rem !important;
    margin-top: 70px !important;
  }

  /* Silhouette Graphic: Positioned neatly without aggressive collision */
  body.nfbf-party #nfbf-hero img[alt="NFBF Hero"],
  body.page-nfbf #nfbf-hero img[alt="NFBF Hero"],
  #nfbf-hero img[alt="NFBF Hero"] {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: 85% center !important;
    opacity: 0.4 !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }

  /* Subtle dark radial overlay behind typography for maximum readability */
  body.nfbf-party #nfbf-hero .bg-gradient-to-r,
  body.page-nfbf #nfbf-hero .bg-gradient-to-r,
  #nfbf-hero .bg-gradient-to-r {
    background: radial-gradient(circle at 12% 50%, rgba(24, 24, 27, 0.98) 0%, rgba(24, 24, 27, 0.92) 50%, rgba(24, 24, 27, 0.55) 100%) !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    pointer-events: none !important;
  }

  /* Content Wrapper */
  body.nfbf-party #nfbf-hero > div.relative.z-10,
  body.page-nfbf #nfbf-hero > div.relative.z-10,
  #nfbf-hero > div.relative.z-10 {
    position: relative !important;
    z-index: 10 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1rem !important; /* pl-4 */
    padding-right: 1rem !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    text-align: left !important;
    box-sizing: border-box !important;
  }

  /* Brand Logo (Top Left): Scale down to w-20 (80px) and align with left edge spacing pl-4 */
  body.nfbf-party #nfbf-hero img[alt="NFBF Party Logo"],
  body.page-nfbf #nfbf-hero img[alt="NFBF Party Logo"],
  #nfbf-hero img[alt="NFBF Party Logo"] {
    width: 5rem !important; /* w-20 = 80px */
    max-width: 80px !important;
    height: auto !important;
    margin-top: 0 !important;
    margin-bottom: 2rem !important;
    margin-left: 0 !important;
    object-fit: contain !important;
  }

  /* Headline (Enlighten Minds / Empower Voices): Font size text-2xl sm:text-3xl */
  body.nfbf-party #nfbf-hero .slogan-headline,
  body.page-nfbf #nfbf-hero .slogan-headline,
  #nfbf-hero .slogan-headline {
    margin-top: 0 !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.nfbf-party #nfbf-hero .slogan-headline h1,
  body.page-nfbf #nfbf-hero .slogan-headline h1,
  #nfbf-hero .slogan-headline h1 {
    font-size: 1.5rem !important; /* text-2xl */
    line-height: 1.25 !important;
    text-align: left !important;
    margin: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  body.nfbf-party #nfbf-hero .slogan-headline div,
  body.page-nfbf #nfbf-hero .slogan-headline div,
  #nfbf-hero .slogan-headline div {
    font-size: 1.5rem !important; /* text-2xl */
    line-height: 1.25 !important;
    text-align: left !important;
    margin-top: 0.35rem !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* Accent Line & Constitution label */
  body.nfbf-party #nfbf-hero div.h-\[2px\],
  body.page-nfbf #nfbf-hero div.h-\[2px\],
  #nfbf-hero div.h-\[2px\] {
    width: 140px !important;
    margin-top: 1.25rem !important;
    margin-bottom: 1rem !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  body.nfbf-party #nfbf-hero p,
  body.page-nfbf #nfbf-hero p,
  #nfbf-hero p {
    font-size: 0.95rem !important;
    text-align: left !important;
    letter-spacing: 0.04em !important;
    margin: 0 !important;
  }

  /* -------------------------------------------------------------------------
     2. SECTION 2: "A Voice Beyond Control"
     ------------------------------------------------------------------------- */
  body.nfbf-party #voice-beyond-control,
  body.page-nfbf #voice-beyond-control,
  #voice-beyond-control {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    overflow: hidden !important;
  }

  /* Stack layout into a single vertical column */
  body.nfbf-party #voice-beyond-control > div.max-w-7xl,
  body.page-nfbf #voice-beyond-control > div.max-w-7xl,
  #voice-beyond-control > div.max-w-7xl {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1.5rem !important;
    width: 100% !important;
  }

  /* Puppet Illustration (Marionette.svg): Center at top with max-w-[280px] w-full h-auto mb-8 */
  body.nfbf-party #voice-beyond-control div:has(> img[alt*="Marionette"]),
  body.page-nfbf #voice-beyond-control div:has(> img[alt*="Marionette"]),
  #voice-beyond-control div:has(> img[alt*="Marionette"]) {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    transform: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.nfbf-party #voice-beyond-control img[alt*="Marionette"],
  body.page-nfbf #voice-beyond-control img[alt*="Marionette"],
  #voice-beyond-control img[alt*="Marionette"] {
    max-width: 280px !important;
    width: 100% !important;
    height: auto !important;
    margin-bottom: 2rem !important; /* mb-8 = 2rem */
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
  }

  /* Content & Call to Actions Column: Centered */
  body.nfbf-party #voice-beyond-control div.flex-col.items-start,
  body.page-nfbf #voice-beyond-control div.flex-col.items-start,
  #voice-beyond-control div.flex-col.items-start {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    padding-left: 0 !important;
    transform: none !important;
  }

  /* Top Gold Accent Stroke Centered */
  body.nfbf-party #voice-beyond-control .h-\[2px\],
  body.page-nfbf #voice-beyond-control .h-\[2px\],
  #voice-beyond-control .h-\[2px\] {
    width: 140px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 1.25rem !important;
    background: linear-gradient(90deg, transparent, #ca8a04, transparent) !important;
  }

  /* Title & Body Text Centered */
  body.nfbf-party #voice-beyond-control h2,
  body.page-nfbf #voice-beyond-control h2,
  #voice-beyond-control h2 {
    text-align: center !important;
    font-size: 1.85rem !important;
    line-height: 1.25 !important;
    width: 100% !important;
  }

  body.nfbf-party #voice-beyond-control p,
  body.page-nfbf #voice-beyond-control p,
  #voice-beyond-control p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    max-width: 100% !important;
    margin-top: 0.75rem !important;
    margin-bottom: 1.75rem !important;
  }

  /* Buttons (About Us & Membership Form): Full-width touch targets (w-full py-3.5 rounded-xl) */
  body.nfbf-party #voice-beyond-control .flex-col.sm\:flex-row,
  body.page-nfbf #voice-beyond-control .flex-col.sm\:flex-row,
  #voice-beyond-control .flex-col.sm\:flex-row {
    width: 100% !important;
    max-width: 380px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.nfbf-party #voice-beyond-control .flex-col.sm\:flex-row a,
  body.page-nfbf #voice-beyond-control .flex-col.sm\:flex-row a,
  #voice-beyond-control .flex-col.sm\:flex-row a {
    width: 100% !important;
    min-height: 48px !important;
    padding: 0.875rem 1.25rem !important; /* py-3.5 */
    border-radius: 0.75rem !important; /* rounded-xl */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  /* -------------------------------------------------------------------------
     3. SECTION 3: "The NFBF Party Constitution"
     ------------------------------------------------------------------------- */
  body.nfbf-party #party-constitution,
  body.page-nfbf #party-constitution,
  #party-constitution {
    padding-top: 4.5rem !important;
    padding-bottom: 3.5rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    overflow: hidden !important;
  }

  /* Stack text on top, book presentation below */
  body.nfbf-party #party-constitution > div.max-w-7xl,
  body.page-nfbf #party-constitution > div.max-w-7xl,
  #party-constitution > div.max-w-7xl {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 2.25rem !important;
    width: 100% !important;
  }

  /* Content Column Centered */
  body.nfbf-party #party-constitution .lg\:col-span-6:first-child,
  body.page-nfbf #party-constitution .lg\:col-span-6:first-child,
  #party-constitution .lg\:col-span-6:first-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Gold Accent Stroke Centered */
  body.nfbf-party #party-constitution .h-\[2px\],
  body.page-nfbf #party-constitution .h-\[2px\],
  #party-constitution .h-\[2px\] {
    width: 140px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 1.25rem !important;
    background: linear-gradient(90deg, transparent, #facc15, transparent) !important;
  }

  /* Headline Typography Centered */
  body.nfbf-party #party-constitution h2,
  body.page-nfbf #party-constitution h2,
  #party-constitution h2 {
    text-align: center !important;
    font-size: 1.85rem !important;
    line-height: 1.25 !important;
    width: 100% !important;
  }

  /* Subtext Centered */
  body.nfbf-party #party-constitution p,
  body.page-nfbf #party-constitution p,
  #party-constitution p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.75rem !important;
  }

  /* Action buttons (READ CONSTITUTION and UNLOCK ACCESS) stack cleanly with gap-3 */
  body.nfbf-party #party-constitution .flex-col.sm\:flex-row,
  body.page-nfbf #party-constitution .flex-col.sm\:flex-row,
  #party-constitution .flex-col.sm\:flex-row {
    width: 100% !important;
    max-width: 380px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important; /* gap-3 */
    margin-left: auto !important;
    margin-right: auto !important;
    align-items: stretch !important;
  }

  body.nfbf-party #btnReadConstitution,
  body.page-nfbf #btnReadConstitution,
  #btnReadConstitution,
  body.nfbf-party #btnUnlockAccess,
  body.page-nfbf #btnUnlockAccess,
  #btnUnlockAccess {
    width: 100% !important;
    min-height: 48px !important;
    padding: 0.875rem 1.25rem !important;
    border-radius: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.05em !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  /* Book Presentation: Scale down 3D book mockup (max-w-[240px] md:max-w-[280px]) */
  /* and anchor glowing neon pill base proportionally without protruding off screen */
  body.nfbf-party #party-constitution .lg\:col-span-6:last-child,
  body.page-nfbf #party-constitution .lg\:col-span-6:last-child,
  #party-constitution .lg\:col-span-6:last-child {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin-top: 0.5rem !important;
    position: relative !important;
    overflow: visible !important;
  }

  body.nfbf-party #party-constitution img[alt*="Constitution Book"],
  body.page-nfbf #party-constitution img[alt*="Constitution Book"],
  #party-constitution img[alt*="Constitution Book"] {
    max-width: 280px !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.7)) !important;
  }

  /* -------------------------------------------------------------------------
     4. SECTION 4: "Party Members"
     ------------------------------------------------------------------------- */
  body.nfbf-party #party-members,
  body.page-nfbf #party-members,
  #party-members {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    overflow: hidden !important;
  }

  body.nfbf-party #party-members h2,
  body.page-nfbf #party-members h2,
  #party-members h2 {
    font-size: 1.85rem !important;
    margin-bottom: 0.75rem !important;
  }

  body.nfbf-party #party-members p.max-w-2xl,
  body.page-nfbf #party-members p.max-w-2xl,
  #party-members p.max-w-2xl {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin-bottom: 2.25rem !important;
    padding: 0 0.5rem !important;
  }

  /* Grid adjustment: modern clean 1-column stack with centered cards */
  body.nfbf-party #party-members .grid,
  body.page-nfbf #party-members .grid,
  #party-members .grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important; /* gap-5 */
    max-width: 380px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
  }

  /* Member card layout & aspect ratios */
  body.nfbf-party #party-members .group,
  body.page-nfbf #party-members .group,
  #party-members .group {
    width: 100% !important;
    max-width: 380px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
  }

  body.nfbf-party #party-members .h-72,
  body.page-nfbf #party-members .h-72,
  #party-members .h-72 {
    height: 270px !important;
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
  }

  body.nfbf-party #party-members .h-72 img,
  body.page-nfbf #party-members .h-72 img,
  #party-members .h-72 img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top !important;
  }

  /* Bottom sector bar sits neatly inside each card without text truncation */
  body.nfbf-party #party-members div.mx-4.mb-4,
  body.page-nfbf #party-members div.mx-4.mb-4,
  #party-members div.mx-4.mb-4 {
    margin-left: 1rem !important;
    margin-right: 1rem !important;
    margin-bottom: 1rem !important;
    padding: 0.75rem 0.85rem !important;
    min-height: 52px !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    border-radius: 0.75rem !important;
    box-sizing: border-box !important;
  }

  body.nfbf-party #party-members div.mx-4.mb-4 span,
  body.page-nfbf #party-members div.mx-4.mb-4 span,
  #party-members div.mx-4.mb-4 span {
    font-size: 11px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  /* -------------------------------------------------------------------------
     5. SECTION 5: "Party Membership Count"
     ------------------------------------------------------------------------- */
  body.nfbf-party #party-membership-count,
  body.page-nfbf #party-membership-count,
  #party-membership-count {
    padding-top: 3rem !important;
    padding-bottom: 3.5rem !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    overflow: hidden !important;
    position: relative !important;
  }

  /* Clamp ambient yellow glow circles to prevent horizontal overflow */
  body.nfbf-party #party-membership-count .blur-3xl,
  body.page-nfbf #party-membership-count .blur-3xl,
  #party-membership-count .blur-3xl {
    max-width: 180px !important;
    max-height: 180px !important;
    opacity: 0.15 !important;
  }

  body.nfbf-party #party-membership-count h2,
  body.page-nfbf #party-membership-count h2,
  #party-membership-count h2 {
    font-size: 1.65rem !important;
    line-height: 1.25 !important;
  }

  body.nfbf-party #party-membership-count p.max-w-xl,
  body.page-nfbf #party-membership-count p.max-w-xl,
  #party-membership-count p.max-w-xl {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.75rem !important;
    padding: 0 0.5rem !important;
  }

  /* Keep all 5 flip cards in a SINGLE horizontal row without breaking lines */
  body.nfbf-party #flip-clock-display,
  body.page-nfbf #flip-clock-display,
  #flip-clock-display {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: flex-start !important;
    gap: 0.375rem !important; /* gap-1.5 = 6px */
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 2rem !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  body.nfbf-party #flip-clock-display > div,
  body.page-nfbf #flip-clock-display > div,
  #flip-clock-display > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    max-width: 66px !important;
  }

  /* Card dimensions on mobile: w-14 h-22 (56px x 88px) with font size text-3xl */
  body.nfbf-party .flip-digit-card,
  body.page-nfbf .flip-digit-card,
  .flip-digit-card {
    width: 3.5rem !important; /* w-14 = 56px */
    height: 5.5rem !important; /* h-22 = 88px */
    border-radius: 0.65rem !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
  }

  body.nfbf-party .stat-top-digit,
  body.nfbf-party .stat-bottom-digit,
  body.nfbf-party .flap-top-digit,
  body.nfbf-party .flap-bottom-digit,
  body.page-nfbf .stat-top-digit,
  body.page-nfbf .stat-bottom-digit,
  body.page-nfbf .flap-top-digit,
  body.page-nfbf .flap-bottom-digit,
  .stat-top-digit,
  .stat-bottom-digit,
  .flap-top-digit,
  .flap-bottom-digit {
    font-size: 1.875rem !important; /* text-3xl = 30px */
    line-height: 1 !important;
  }

  /* Sub-label pills: Adjust to text-[9px] px-1.5 py-0.5 directly below each digit */
  body.nfbf-party #flip-clock-display span.rounded-full,
  body.page-nfbf #flip-clock-display span.rounded-full,
  #flip-clock-display span.rounded-full {
    font-size: 9px !important; /* text-[9px] */
    padding: 2px 4px !important; /* py-0.5 px-1.5 */
    margin-top: 0.5rem !important;
    letter-spacing: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* Verified badge & growth text scale down legibly below */
  body.nfbf-party #party-membership-count .bg-\[\#ecfdf5\],
  body.page-nfbf #party-membership-count .bg-\[\#ecfdf5\],
  #party-membership-count .bg-\[\#ecfdf5\] {
    padding: 0.5rem 1.15rem !important;
    font-size: 0.8rem !important;
    gap: 0.5rem !important;
    margin-bottom: 0.75rem !important;
  }

  body.nfbf-party #party-membership-count .bg-\[\#ecfdf5\] svg,
  body.page-nfbf #party-membership-count .bg-\[\#ecfdf5\] svg,
  #party-membership-count .bg-\[\#ecfdf5\] svg {
    width: 1.1rem !important;
    height: 1.1rem !important;
  }

  body.nfbf-party #party-membership-count p.text-stone-400:last-child,
  body.page-nfbf #party-membership-count p.text-stone-400:last-child,
  #party-membership-count p.text-stone-400:last-child {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
    text-align: center !important;
  }

  /* -------------------------------------------------------------------------
     6. SECTION 6: "Be Part of the Change"
     ------------------------------------------------------------------------- */
  body.nfbf-party #be-part-of-the-change,
  body.page-nfbf #be-part-of-the-change,
  #be-part-of-the-change {
    padding-top: 3rem !important;
    padding-bottom: 3.5rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    overflow: hidden !important;
  }

  /* Stack layout: content column on top, ballot box below */
  body.nfbf-party #be-part-of-the-change > div.max-w-7xl,
  body.page-nfbf #be-part-of-the-change > div.max-w-7xl,
  #be-part-of-the-change > div.max-w-7xl {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 2.25rem !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* Left Column: Center headings and make action buttons full-width touch targets */
  body.nfbf-party #be-part-of-the-change .lg\:col-span-5,
  body.page-nfbf #be-part-of-the-change .lg\:col-span-5,
  #be-part-of-the-change .lg\:col-span-5 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    padding: 0 !important;
  }

  body.nfbf-party #be-part-of-the-change h2,
  body.page-nfbf #be-part-of-the-change h2,
  #be-part-of-the-change h2 {
    text-align: center !important;
    font-size: 1.85rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.75rem !important;
  }

  body.nfbf-party #be-part-of-the-change p.max-w-lg,
  body.page-nfbf #be-part-of-the-change p.max-w-lg,
  #be-part-of-the-change p.max-w-lg {
    text-align: center !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 1.75rem !important;
  }

  /* Action Buttons: Full-width touch targets */
  body.nfbf-party #be-part-of-the-change .flex.flex-wrap.items-center.gap-4,
  body.page-nfbf #be-part-of-the-change .flex.flex-wrap.items-center.gap-4,
  #be-part-of-the-change .flex.flex-wrap.items-center.gap-4 {
    width: 100% !important;
    max-width: 380px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 1.25rem !important;
  }

  body.nfbf-party #be-part-of-the-change .flex.flex-wrap.items-center.gap-4 a,
  body.page-nfbf #be-part-of-the-change .flex.flex-wrap.items-center.gap-4 a,
  #be-part-of-the-change .flex.flex-wrap.items-center.gap-4 a {
    width: 100% !important;
    min-height: 48px !important;
    padding: 0.875rem 1.25rem !important;
    border-radius: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  /* Contact Us link */
  body.nfbf-party #be-part-of-the-change a[href="contact.html"],
  body.page-nfbf #be-part-of-the-change a[href="contact.html"],
  #be-part-of-the-change a[href="contact.html"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 1.5rem !important;
    min-height: 44px !important;
    font-size: 0.95rem !important;
  }

  /* Trust features checklist */
  body.nfbf-party #be-part-of-the-change .grid.grid-cols-1.sm\:grid-cols-2,
  body.page-nfbf #be-part-of-the-change .grid.grid-cols-1.sm\:grid-cols-2,
  #be-part-of-the-change .grid.grid-cols-1.sm\:grid-cols-2 {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    width: 100% !important;
    max-width: 320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.nfbf-party #be-part-of-the-change .grid.grid-cols-1.sm\:grid-cols-2 > div,
  body.page-nfbf #be-part-of-the-change .grid.grid-cols-1.sm\:grid-cols-2 > div,
  #be-part-of-the-change .grid.grid-cols-1.sm\:grid-cols-2 > div {
    font-size: 0.85rem !important;
    text-align: left !important;
  }

  /* Ballot Box Presentation: Remove fixed 726px desktop width */
  body.nfbf-party #be-part-of-the-change .lg\:col-span-7,
  body.page-nfbf #be-part-of-the-change .lg\:col-span-7,
  #be-part-of-the-change .lg\:col-span-7 {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
  }

  body.nfbf-party #be-part-of-the-change .lg\:col-span-7 > div.rounded-2xl,
  body.page-nfbf #be-part-of-the-change .lg\:col-span-7 > div.rounded-2xl,
  #be-part-of-the-change .lg\:col-span-7 > div.rounded-2xl {
    width: 100% !important;
    max-width: 100% !important;
    height: 280px !important;
    border-radius: 1rem !important; /* rounded-2xl */
    left: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 auto !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
  }

  body.nfbf-party #be-part-of-the-change img[alt="Ballot Box"],
  body.page-nfbf #be-part-of-the-change img[alt="Ballot Box"],
  #be-part-of-the-change img[alt="Ballot Box"] {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  /* Bottom Caption Pill: stays fully visible and wraps/scales text cleanly */
  body.nfbf-party #be-part-of-the-change .absolute.bottom-6,
  body.page-nfbf #be-part-of-the-change .absolute.bottom-6,
  #be-part-of-the-change .absolute.bottom-6 {
    bottom: 0.75rem !important;
    left: 0.5rem !important;
    right: 0.5rem !important;
    width: calc(100% - 1rem) !important;
    max-width: calc(100% - 1rem) !important;
    display: flex !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
  }

  body.nfbf-party #be-part-of-the-change .absolute.bottom-6 > div,
  body.page-nfbf #be-part-of-the-change .absolute.bottom-6 > div,
  #be-part-of-the-change .absolute.bottom-6 > div {
    max-width: 100% !important;
    width: auto !important;
    padding: 0.5rem 0.75rem !important; /* py-2 px-3 */
    border-radius: 9999px !important;
    box-sizing: border-box !important;
    display: inline-block !important;
  }

  body.nfbf-party #be-part-of-the-change .absolute.bottom-6 span,
  body.page-nfbf #be-part-of-the-change .absolute.bottom-6 span,
  #be-part-of-the-change .absolute.bottom-6 span {
    font-size: 0.75rem !important; /* text-xs */
    line-height: 1.35 !important;
    white-space: normal !important; /* Allow wrapping */
    text-align: center !important;
    display: block !important;
  }
}

/* ---------------------------------------------------------------------------
   Tablet & Medium Mobile Refinements (576px - 768px)
   --------------------------------------------------------------------------- */
@media (min-width: 576px) and (max-width: 768px) {
  /* Headline scales to text-3xl on sm */
  body.nfbf-party #nfbf-hero .slogan-headline h1,
  body.page-nfbf #nfbf-hero .slogan-headline h1,
  #nfbf-hero .slogan-headline h1,
  body.nfbf-party #nfbf-hero .slogan-headline div,
  body.page-nfbf #nfbf-hero .slogan-headline div,
  #nfbf-hero .slogan-headline div {
    font-size: 1.875rem !important; /* sm:text-3xl */
  }

  /* Section 4: 2-column grid on sm */
  body.nfbf-party #party-members .grid,
  body.page-nfbf #party-members .grid,
  #party-members .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: 720px !important;
    gap: 1.25rem !important;
  }

  /* Section 5: sm:w-16 sm:h-26 with font size text-4xl & gap-2.5 */
  body.nfbf-party #flip-clock-display,
  body.page-nfbf #flip-clock-display,
  #flip-clock-display {
    gap: 0.625rem !important; /* gap-2.5 = 10px */
  }

  body.nfbf-party .flip-digit-card,
  body.page-nfbf .flip-digit-card,
  .flip-digit-card {
    width: 4rem !important; /* sm:w-16 = 64px */
    height: 6.5rem !important; /* sm:h-26 = 104px */
  }

  body.nfbf-party .stat-top-digit,
  body.nfbf-party .stat-bottom-digit,
  body.nfbf-party .flap-top-digit,
  body.nfbf-party .flap-bottom-digit,
  body.page-nfbf .stat-top-digit,
  body.page-nfbf .stat-bottom-digit,
  body.page-nfbf .flap-top-digit,
  body.page-nfbf .flap-bottom-digit,
  .stat-top-digit,
  .stat-bottom-digit,
  .flap-top-digit,
  .flap-bottom-digit {
    font-size: 2.25rem !important; /* sm:text-4xl = 36px */
  }

  /* Section 6: Ballot box sm:h-[340px] */
  body.nfbf-party #be-part-of-the-change .lg\:col-span-7 > div.rounded-2xl,
  body.page-nfbf #be-part-of-the-change .lg\:col-span-7 > div.rounded-2xl,
  #be-part-of-the-change .lg\:col-span-7 > div.rounded-2xl {
    height: 340px !important;
  }
}

/* ---------------------------------------------------------------------------
   Small Mobile Refinements (<= 360px)
   --------------------------------------------------------------------------- */
@media (max-width: 360px) {
  body.nfbf-party .flip-digit-card,
  body.page-nfbf .flip-digit-card,
  .flip-digit-card {
    width: 3.15rem !important; /* ~50px */
    height: 5rem !important; /* ~80px */
  }

  body.nfbf-party .stat-top-digit,
  body.nfbf-party .stat-bottom-digit,
  body.nfbf-party .flap-top-digit,
  body.nfbf-party .flap-bottom-digit,
  body.page-nfbf .stat-top-digit,
  body.page-nfbf .stat-bottom-digit,
  body.page-nfbf .flap-top-digit,
  body.page-nfbf .flap-bottom-digit,
  .stat-top-digit,
  .stat-bottom-digit,
  .flap-top-digit,
  .flap-bottom-digit {
    font-size: 1.65rem !important;
  }

  body.nfbf-party #flip-clock-display,
  body.page-nfbf #flip-clock-display,
  #flip-clock-display {
    gap: 0.25rem !important;
  }

  body.nfbf-party #party-constitution img[alt*="Constitution Book"],
  body.page-nfbf #party-constitution img[alt*="Constitution Book"],
  #party-constitution img[alt*="Constitution Book"] {
    max-width: 240px !important;
  }
}

