/* ============================================================
   Shri Maharudra Pathsanstha - Responsive Stylesheet
   ============================================================ */

/* ============================================================
   TABLET - max 1024px
   ============================================================ */
@media (max-width: 1024px) {
  .container { max-width: 920px; }
  .nav-inner { gap: 16px; }
  .nav-logo { flex-basis: 360px; }
  .nav-links a { padding: 8px 10px; font-size: 0.82rem; }
  .nav-cta .btn { padding: 11px 22px; }
  .nav-hanuman img { height: 34px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .staff-grid { grid-template-columns: repeat(3, 1fr); }
  .staff-grid.staff-grid-team { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .about-intro-inner { gap: 36px; }
  .history-content { gap: 36px; }
  .hero-shapes { width: 40%; }
  .hero-grid { gap: 22px; }
  .hero-visual-stage { height: 250px; }
  .hvs-backdrop { width: 235px; height: 214px; }
  .hvs-ring { width: 182px; height: 182px; }
  .hvs-main { width: 148px; height: 148px; }
  .hvs-chip-a { width: 52px; height: 52px; }
  .hvs-chip-b { width: 48px; height: 48px; }
  .hvs-bars { width: 54px; height: 52px; }
  .hvs-bar { width: 9px; }
}

/* ============================================================
   NAV COLLAPSE - max 1080px
   (raised from 960px: the full org name + 6 nav links + CTA button
   could not fit comfortably between 960-1080px, causing the org
   name to be squeezed/truncated — the hamburger menu handles that
   range cleanly instead.)
   ============================================================ */
@media (max-width: 1080px) {
  :root { --nav-height: 66px; }

  .navbar { height: var(--nav-height); }
  .nav-inner { gap: 12px; }
  .nav-logo { flex: 1 1 auto; }
  .logo-icon { height: 40px; }
  .logo-text .bank-name { font-size: 0.86rem; max-width: 58vw; }
  .logo-text .bank-subtitle { font-size: 0.68rem; max-width: 58vw; }

  .hamburger { display: flex; }
  .nav-links  { display: none; }
  .nav-cta .btn { display: none; }
  .nav-hanuman { display: none; }

  .sidebar-overlay { display: block; pointer-events: none; }
  .sidebar-overlay.active { pointer-events: all; }
}

/* ============================================================
   SMALL TABLET - max 900px
   ============================================================ */
@media (max-width: 900px) {
  .hero-slides { min-height: 600px; }
  .hero-shapes { display: none; }
  .hero-content { max-width: 100%; }
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-content { order: 1; }
  .hero-visual-stage { order: 2; height: 230px; }

  .about-intro-inner { grid-template-columns: 1fr; }
  .about-img-wrap { max-width: 480px; }

  .history-content { grid-template-columns: 1fr; }
  .vm-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

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

  .cta-inner { flex-direction: column; text-align: center; }
}

/* ============================================================
   HAMBURGER BREAKPOINT - max 768px
   ============================================================ */
@media (max-width: 768px) {
  :root { --nav-height: 62px; }

  body { font-size: 15px; }

  .container { padding: 0 18px; }

  .announcement-bar { padding: 7px 0; }
  .ticker-inner span { margin-right: 36px; }
  .ann-contact { display: none; }

  .logo-text .bank-name { max-width: calc(100vw - 118px); }
  .logo-text .bank-subtitle { max-width: calc(100vw - 118px); }
  .sidebar { width: min(86vw, 320px); }
  .sidebar-header { padding: 20px 18px; }
  .sidebar-nav a { padding: 14px 22px; }

  /* Hero adjustments */
  .hero { padding: 22px 0 14px; }
  .hero-slides { min-height: 630px; }
  .hero-grid { gap: 20px; }
  .hero-visual-stage { height: 200px; width: calc(100% - 48px); }
  .hvs-glow-a { width: 150px; height: 150px; }
  .hvs-glow-b { width: 120px; height: 120px; }
  .hvs-backdrop { width: 200px; height: 182px; }
  .hvs-ring { width: 156px; height: 156px; }
  .hvs-main { width: 126px; height: 126px; border-width: 3px; }
  .hvs-chip-a { width: 44px; height: 44px; }
  .hvs-chip-b { width: 40px; height: 40px; }
  .hvs-bars { width: 46px; height: 44px; bottom: 8%; }
  .hvs-bar { width: 8px; }
  .hero-controls { margin-top: 12px; padding-top: 12px; }
  .hero-badge {
    max-width: 100%;
    border-radius: 12px;
    line-height: 1.4;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 6px 12px;
  }
  .hero-content h1 { margin-bottom: 6px; }
  .hero-content p { max-width: none; margin-bottom: 14px; }
  .hero-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 0;
  }
  .hero-buttons .btn {
    justify-content: center;
    padding: 11px 14px;
    min-height: 46px;
  }
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
  }
  .stat-item { min-width: 0; }
  .stat-number { font-size: 1.28rem; line-height: 1.2; overflow-wrap: anywhere; }
  .stat-label { font-size: 0.64rem; letter-spacing: 0.4px; line-height: 1.35; }

  /* Page Hero */
  .page-hero { padding: 40px 0 32px; }
  .breadcrumb { flex-wrap: wrap; row-gap: 4px; }

  /* Sections */
  .section-pad { padding: 55px 0; }
  .section-pad-sm { padding: 36px 0; }
  .section-header { margin-bottom: 34px; }
  .section-badge { letter-spacing: 0.8px; }

  /* Grids */
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .notice-grid { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: repeat(2, 1fr); }
  .staff-grid.staff-grid-team { grid-template-columns: repeat(3, 1fr); }
  .leadership-special { gap: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .deposit-card[style*="grid-column"],
  .loan-card[style*="grid-column"] {
    grid-column: auto !important;
  }
  .service-card[style*="display:flex"] {
    flex-direction: column;
    text-align: left !important;
  }
  .service-card[style*="display:flex"] .service-icon {
    margin: 0 0 4px;
  }
  .highlight-tag {
    margin: 8px 6px 0 0 !important;
    line-height: 1.35;
  }
  table {
    min-width: 640px;
  }
  th,
  td {
    white-space: nowrap;
  }
  [style*="min-width:200px"] {
    min-width: 0 !important;
  }

  /* Deposit rate table: collapse to a stacked card list instead of
     horizontal scroll — each row becomes one card, each cell shows its
     own column label next to the value. */
  .rate-table, .rate-table thead, .rate-table tbody, .rate-table tr, .rate-table td {
    display: block;
    min-width: 0;
    white-space: normal;
  }
  .rate-table thead { display: none; }
  .rate-table tbody tr {
    padding: 14px 16px;
  }
  .rate-table .rate-scheme {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    padding: 0 0 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
  }
  .rate-table td:not(.rate-scheme) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    text-align: right;
  }
  .rate-table .rate-label {
    display: inline;
    font-size: 0.8rem;
    color: var(--text-gray);
    font-weight: 500;
  }

  /* Loan detail modal: near-full-screen sheet on mobile */
  .loan-modal-overlay { padding: 0; align-items: flex-end; }
  .loan-modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding: 32px 20px 24px;
  }
  .loan-modal-steps { grid-template-columns: 1fr; }

  .about-img-wrap { max-width: none; width: 100%; }
  .about-img, .about-img-tall, .about-visual { height: 300px; }
  .about-visual-hanuman { height: 68%; }
  .about-badge-overlay { bottom: 14px; left: 14px; padding: 12px 14px; }
  .about-badge-overlay .num { font-size: 1.45rem; }

  .history-content { gap: 28px; }
  .timeline { padding-left: 18px; }
  .timeline-item { padding-left: 18px; }
  .vm-card { padding: 28px 22px; }

  .contact-info-card,
  .contact-form-card {
    padding: 26px 20px;
  }
  .contact-item { gap: 12px; }
  .contact-detail .value { overflow-wrap: anywhere; }
  .map-wrapper iframe { height: 320px; }
  .map-section p {
    padding: 0 8px;
    overflow-wrap: anywhere;
  }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom .container { flex-direction: column; text-align: center; }
  .footer-brand .logo-wrap { align-items: flex-start; }
  .footer-links a { padding: 2px 0; }
  .footer-contact-item p { overflow-wrap: anywhere; }

  /* Language switcher - move to smaller position */
  .lang-switcher {
    top: auto;
    right: 14px;
    bottom: 68px;
    transform: none;
    gap: 4px;
  }
  .lang-btn { width: 34px; height: 34px; font-size: 0.64rem; }

  /* Scroll top - avoid overlap */
  .scroll-top { bottom: 20px; right: 14px; }
}

/* ============================================================
   MOBILE - max 480px
   ============================================================ */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  h1 { font-size: 1.68rem; line-height: 1.18; }
  h2 { font-size: 1.42rem; }
  h3 { font-size: 1.05rem; }
  p { font-size: 0.9rem; line-height: 1.7; }

  .announcement-bar { font-size: 0.76rem; }
  .logo-icon { height: 34px; }
  .logo-text .bank-name { font-size: 0.78rem; }
  .logo-text .bank-subtitle { font-size: 0.62rem; }

  .hero-slides { min-height: 630px; }
  .hero-visual-stage { height: 168px; width: calc(100% - 48px); }
  .hvs-glow-a { width: 120px; height: 120px; }
  .hvs-glow-b { width: 96px; height: 96px; }
  .hvs-backdrop { width: 168px; height: 152px; }
  .hvs-ring { width: 130px; height: 130px; }
  .hvs-main { width: 104px; height: 104px; border-width: 3px; }
  .hvs-chip-a { width: 38px; height: 38px; }
  .hvs-chip-b { width: 34px; height: 34px; }
  .hvs-bars { width: 38px; height: 36px; }
  .hvs-bar { width: 6px; }
  .hero-badge { font-size: 0.74rem; padding: 7px 12px; }
  .hero-buttons { grid-template-columns: 1fr; }
  .hero-buttons .btn { width: 100%; }

  .hero-stats { gap: 10px; margin-top: 16px; }
  .stat-number { font-size: 1.08rem; }
  .btn {
    justify-content: center;
    text-align: center;
  }

  .staff-grid { grid-template-columns: 1fr 1fr; }
  .staff-card { padding: 20px 14px; }
  .staff-avatar { width: 64px; height: 64px; font-size: 1.55rem; }
  .staff-photo { width: 64px; height: 64px; }
  .leadership-special { gap: 20px 32px; }
  .special-photo { width: 88px; height: 88px; }
  .staff-grid.staff-grid-team { grid-template-columns: 1fr 1fr; gap: 12px; }
  .staff-card.sm { padding: 16px 10px; }
  .staff-name { font-size: 0.85rem; }

  .hero-buttons .btn { font-size: 0.85rem; padding: 10px 20px; }

  .card, .deposit-card, .loan-card, .service-card {
    padding: 20px 18px;
  }
  .service-card {
    text-align: left;
  }
  .service-icon,
  .loan-icon,
  .deposit-card .dep-icon {
    width: 52px;
    height: 52px;
    font-size: 1.35rem;
  }
  .service-icon { margin-bottom: 14px; }

  .contact-form-card { padding: 24px 18px; }
  .contact-info-card { padding: 24px 18px; }
  .contact-item {
    align-items: flex-start;
    margin-bottom: 18px;
  }
  .contact-icon { width: 40px; height: 40px; }
  .form-group input,
  .form-group select,
  .form-group textarea {
    min-height: 46px;
    font-size: 16px;
  }
  .form-group textarea { min-height: 130px; }
  .vm-card { padding: 26px 20px; }

  .section-header { margin-bottom: 34px; }
  .section-pad { padding: 46px 0; }
  .section-pad-sm { padding: 32px 0; }
  .page-hero { padding: 34px 0 28px; }

  .about-img,
  .about-img-tall,
  .about-visual {
    height: 240px;
  }
  .about-visual { align-items: flex-start; padding-top: 22px; }
  .about-visual-hanuman { display: none; }
  .about-visual-crest { height: 74px; }
  .about-visual-motto { font-size: 0.96rem; }
  .about-visual-name { display: none; }
  .about-visual-content { gap: 8px; }
  .about-highlights { gap: 10px; }
  .highlight-item { font-size: 0.86rem; }

  .cta-strip { padding: 38px 0; }
  .cta-inner { align-items: stretch; gap: 18px; }
  .cta-inner .btn { justify-content: center; width: 100%; }

  .footer-top { padding: 40px 0 28px; }
  .footer-brand .logo-wrap { margin-bottom: 14px; }
  .footer-bottom { padding-bottom: 72px; }
  .map-wrapper iframe { height: 280px; }
  table {
    min-width: 560px;
  }
}

/* ============================================================
   EXTRA SMALL - max 360px
   ============================================================ */
@media (max-width: 360px) {
  .container { padding: 0 14px; }
  h1 { font-size: 1.48rem; }
  .staff-grid { grid-template-columns: 1fr; }
  .hero-slides { min-height: 640px; }
  .hero-visual-stage { height: 150px; width: calc(100% - 44px); }
  .hvs-backdrop { width: 150px; height: 136px; }
  .hvs-ring { width: 116px; height: 116px; }
  .hvs-main { width: 92px; height: 92px; }
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .stat-number { font-size: 1.18rem; }
  .stat-label { font-size: 0.68rem; }
  .logo-text .bank-name { max-width: calc(100vw - 108px); }
  .logo-text .bank-subtitle { max-width: calc(100vw - 108px); }
  .lang-btn { width: 38px; height: 38px; }
  .about-img, .about-img-tall, .about-visual { height: 220px; }
}

/* ============================================================
   TOUCH IMPROVEMENTS
   ============================================================ */
@media (hover: none) {
  .card:hover, .service-card:hover, .loan-card:hover,
  .deposit-card:hover, .notice-card:hover, .staff-card:hover {
    transform: none;
  }
  .btn-primary:hover, .btn-outline:hover, .btn-white:hover {
    transform: none;
  }
}
