/* =====================================
   Responsive CSS – Dr. Bipin Kumar Site
   ===================================== */

/* Large desktops & small laptops */
@media (max-width: 1200px) {
  .hero-container { gap: 40px; padding: 100px 24px 60px; }
  .hero-img-frame { width: 320px; height: 400px; }
  .float-1 { left: -30px; }
  .float-2 { right: -20px; }
  .awards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1180px) and (min-width: 1025px) {
  .nav-container { padding: 0 14px; }
  .nav-brand-title { display: none; }
  .nav-brand-logo { width: 36px; height: 36px; font-size: 0.95rem; }
  .nav-brand-name { font-size: 0.92rem; }
  .nav-links { gap: 2px; }
  .nav-links a { font-size: 0.78rem; padding: 5px 6px; }
  .nav-links a.nav-cta { padding: 5px 10px; }
}

/* Tablets / iPad / Small Screens (<= 1024px) */
@media (max-width: 1024px) {
  /* Hide standard desktop nav */
  .nav-links { display: none !important; }

  /* Show mobile controls in header */
  .nav-mobile-right {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }
  .nav-toggle {
    display: flex !important;
  }

  /* Mobile quick language pill in header */
  .mobile-lang-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 213, 79, 0.15);
    border: 1.5px solid rgba(255, 213, 79, 0.45);
    color: #FFFFFF;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
  }
  .mobile-lang-pill-btn:hover {
    background: rgba(230, 81, 0, 0.4);
    border-color: #FFD54F;
  }
  .m-lang-pill-active { color: #FFD54F; font-weight: 800; }
  .m-lang-pill-sep { color: rgba(255,255,255,0.4); font-size: 0.7rem; margin: 0 1px; }
  .m-lang-pill-alt { color: rgba(255,255,255,0.7); font-size: 0.72rem; }

  /* ─── APP DRAWER BACKDROP OVERLAY ─── */
  .mobile-drawer-overlay {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 2, 4, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.32s ease;
  }
  .mobile-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* ─── APP DRAWER CONTAINER ─── */
  .mobile-nav-drawer {
    display: block !important;
    position: fixed;
    top: 0;
    right: -100%;
    width: 86%;
    max-width: 380px;
    height: 100%;
    height: 100dvh;
    background: linear-gradient(180deg, #32080D 0%, #1E0305 100%);
    border-left: 2px solid #FFD54F;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.65);
    z-index: 999999;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
  }
  .mobile-nav-drawer.open {
    right: 0;
  }
  body.drawer-open {
    overflow: hidden !important;
  }

  .mobile-drawer-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 18px 80px;
  }

  /* Drawer Header */
  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 213, 79, 0.2);
    margin-bottom: 14px;
    gap: 12px;
  }
  .mobile-drawer-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }
  .mobile-drawer-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #FFD54F;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.35);
    flex-shrink: 0;
  }
  .mobile-drawer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
  }
  .mobile-drawer-meta {
    min-width: 0;
  }
  .mobile-drawer-name {
    font-family: var(--font-hindi);
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }
  .m-verified-badge {
    color: #FFD54F;
    font-size: 0.92rem;
  }
  .mobile-drawer-sub {
    font-size: 0.68rem;
    color: #FFE0B2;
    opacity: 0.85;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* CROSS CLOSE ICON BUTTON */
  .mobile-drawer-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 213, 79, 0.4);
    color: #FFD54F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
  }
  .mobile-drawer-close:hover,
  .mobile-drawer-close:active {
    background: var(--saffron);
    border-color: #FFD54F;
    color: #FFFFFF;
    transform: rotate(90deg) scale(1.08);
  }

  /* Language Switch Tabs inside Drawer */
  .mobile-drawer-tools {
    margin-bottom: 14px;
  }
  .mobile-drawer-lang-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: rgba(0, 0, 0, 0.35);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 213, 79, 0.2);
  }
  .m-drawer-lang-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
  }
  .m-drawer-lang-btn.active {
    background: linear-gradient(135deg, var(--saffron), #FF7043);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.35);
  }
  .lang-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #FFD54F;
  }

  /* Drawer Navigation List */
  .mobile-drawer-nav {
    flex-grow: 1;
  }
  .mobile-drawer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
  }
  .m-drawer-item {
    list-style: none;
  }
  .m-drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none;
    color: #FFFFFF;
    transition: all 0.2s ease;
  }
  .m-drawer-link:hover,
  .m-drawer-link:active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 213, 79, 0.35);
    transform: translateX(3px);
  }
  .m-drawer-item.active .m-drawer-link {
    background: linear-gradient(90deg, rgba(230, 81, 0, 0.32) 0%, rgba(212, 175, 55, 0.18) 100%);
    border-color: #FFD54F;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  }
  .m-drawer-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    color: #FFFFFF;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  }
  .m-drawer-label-wrap {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
  }
  .m-drawer-title {
    font-size: 0.90rem;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.25;
  }
  .m-drawer-subtitle {
    font-size: 0.67rem;
    color: #FFE0B2;
    opacity: 0.75;
  }
  .m-drawer-chevron {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    transition: transform 0.2s ease;
  }
  .m-drawer-link:hover .m-drawer-chevron {
    color: #FFD54F;
    transform: translateX(2px);
  }

  /* Contact CTA Row in Drawer */
  .m-drawer-item.is-cta .m-drawer-link {
    background: linear-gradient(135deg, var(--saffron), #FF7043);
    border-color: #FFD54F;
    margin-top: 4px;
    box-shadow: 0 4px 15px rgba(230, 81, 0, 0.35);
  }
  .m-drawer-item.is-cta .m-drawer-subtitle {
    color: #FFF9F2;
    opacity: 0.92;
  }

  /* Drawer Footer */
  .mobile-drawer-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 213, 79, 0.2);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .mobile-drawer-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, #4A0E17, #6D1B24);
    border: 1.5px solid #FFD54F;
    color: #FFD54F;
    padding: 10px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
  }
  .mobile-drawer-cta-btn:hover {
    background: var(--saffron);
    color: #FFFFFF;
  }
  .mobile-drawer-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .m-quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 0.80rem;
    font-weight: 600;
    text-decoration: none;
    color: #FFFFFF;
    transition: var(--transition);
  }
  .m-quick-btn.wa {
    background: #25D366;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
  }
  .m-quick-btn.call {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  .mobile-drawer-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 2px;
  }
  .mobile-drawer-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 213, 79, 0.25);
    color: #FFD54F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    text-decoration: none;
    transition: var(--transition);
  }
  .mobile-drawer-social a:hover {
    background: var(--saffron);
    color: #FFFFFF;
    transform: translateY(-2px);
  }
  .mobile-drawer-copyright {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 20px 40px;
    gap: 36px;
  }
  .hero-image-wrap { order: -1; }
  .hero-img-frame { width: 280px; height: 350px; margin: 0 auto; }
  .hero-badge-float, .float-1, .float-2, .float-3 { display: none !important; }
  .hero-btns { justify-content: center; }
  .hero-stats { justify-content: center; gap: 20px; }
  .hero-social { justify-content: center; }
  .hero-quote { text-align: left; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-img-wrap { max-width: 360px; margin: 0 auto; }
  .about-award-badge { bottom: -12px; right: 0; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2)::after { display: none; }
  .stat-item:nth-child(3) { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; }
  .stat-item:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; }
  .stat-item:nth-child(4)::after { display: none; }

  .awards-grid { grid-template-columns: repeat(2, 1fr); }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .press-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .about-info-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ─── MOBILE APP BOTTOM BAR (<= 768px) ─── */
@media (max-width: 768px) {
  body {
    padding-bottom: 68px !important;
  }
  .mobile-app-bottom-bar {
    display: block !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(30, 4, 8, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1.5px solid rgba(255, 213, 79, 0.35);
    z-index: 99990;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
  }
  .m-bottom-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 4px;
  }
  .m-bottom-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    cursor: pointer;
    flex: 1;
    padding: 4px 0;
    transition: all 0.2s ease;
  }
  .m-bottom-icon {
    font-size: 1.15rem;
    line-height: 1;
    transition: transform 0.2s ease;
  }
  .m-bottom-label {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
  }
  .m-bottom-btn.active {
    color: #FFD54F;
  }
  .m-bottom-btn.active .m-bottom-icon {
    transform: translateY(-2px);
    color: #FFD54F;
  }
  .m-bottom-btn.active .m-bottom-label {
    color: #FFD54F;
    font-weight: 700;
  }
  .m-bottom-toggle-btn {
    color: #FFD54F;
  }
  .m-bottom-toggle-btn .m-bottom-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--saffron), #FF7043);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 0.90rem;
    box-shadow: 0 3px 10px rgba(230, 81, 0, 0.45);
  }

  /* WhatsApp float adjust to avoid bottom bar overlap */
  .whatsapp-float {
    bottom: 74px !important;
    right: 18px !important;
  }
  .back-top {
    bottom: 132px !important;
    right: 18px !important;
  }
}

/* Mobile (<= 640px) */
@media (max-width: 640px) {
  .section-pad { padding: 50px 0; }
  .hero-name { font-size: 2.1rem; }
  .hero-img-frame {
    width: 270px;
    height: 335px;
    border-radius: 24px;
  }
  .hero-img-frame::before {
    border: 2px solid rgba(255, 213, 79, 0.85);
    border-radius: 28px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  }
  .hero-portrait {
    border-radius: 20px;
    border: 3.5px solid #FFD54F;
  }
  .hero-stats { gap: 16px; }
  .hero-stat-num { font-size: 1.5rem; }

  .awards-grid { grid-template-columns: 1fr; }
  .books-grid { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0; }

  .quote-text { font-size: 1.15rem; padding: 0 12px; }
  .contact-info-card, .contact-form { padding: 24px 16px; }

  /* Amit Shah Portal Mobile Rules */
  .utility-bar-inner { display: none !important; } /* On small mobile, utility bar is hidden to let clean app navbar shine */
  .amit-timeline::before { left: 16px; }
  .amit-timeline-item { padding-left: 50px; }
  .amit-timeline-badge { left: 0; width: 32px; height: 32px; font-size: 0.8rem; }
  .amit-timeline-content { padding: 18px 16px; }
  .stalwarts-grid { grid-template-columns: 1fr; }
  .press-portal-grid { grid-template-columns: 1fr; }
  .quotes-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .myviews-hero-quote { padding: 26px 18px; }
  .myviews-hero-text { font-size: 1.1rem; }
}

/* Print */
@media print {
  .navbar, .back-top, .whatsapp-float, .scroll-indicator { display: none; }
  .hero { min-height: auto; padding: 40px; }
  * { box-shadow: none !important; }
}
