/* ═══════════════════════════════════════════════════════════
   GlobalTrust Bank — Responsive (phone, tablet, desktop)
   ═══════════════════════════════════════════════════════════ */

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 80px;
}

/* ── Tablet & small laptop (≤1024px) ── */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1100;
        box-shadow: var(--shadow-xl);
    }
    .sidebar.active { transform: translateX(0); }
    .sidebar-toggle-btn { display: flex; }
    .dashboard-main { margin-left: 0; }
    .dashboard-content { padding: 20px; }
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .support-layout-premium { grid-template-columns: 1fr; }
    .withdraw-layout { grid-template-columns: 1fr; }
}

/* ── Mobile navigation ── */
@media (max-width: 991px) {
    .nav-container {
        height: 64px;
    }

    .nav-toggle {
        display: flex;
        z-index: 1002;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 0 16px;
        margin: 0;
        background: rgba(10, 22, 40, 0.98);
        border-bottom: 1px solid rgba(201, 162, 39, 0.25);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
        z-index: 1001;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: none;
        transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease, visibility 0.25s;
    }

    .nav-links.active {
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        opacity: 1;
        visibility: visible;
        padding: 16px;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links li {
        width: 100%;
        list-style: none;
    }

    .nav-links a {
        display: block;
        padding: 14px 16px;
        border-radius: 10px;
        font-size: 16px;
    }

    .nav-links a:hover {
        background: rgba(201, 162, 39, 0.12);
    }

    .nav-links .btn {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
        padding: 14px 20px;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* ── Landing page — tablet ── */
@media (max-width: 1024px) {
    .hero-premium .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
        padding: 48px 0 64px;
    }

    .hero-premium .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-trust-row {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-visual {
        max-width: 420px;
        margin: 0 auto;
        width: 100%;
    }

    .features-premium,
    .about-premium,
    .gallery-section,
    .services-bento,
    .experience-showcase,
    .why-parallax,
    .steps-timeline,
    .stats-parallax,
    .testimonials-premium,
    .faq-premium,
    .cta-premium {
        padding: 72px 0;
    }

    .cta-content h2 {
        font-size: clamp(1.75rem, 4vw, 2.75rem);
    }

    .section-header-premium h2 {
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }
}

/* ── Landing page — phone ── */
@media (max-width: 767px) {
    html { scroll-padding-top: 64px; }

    .hero-premium {
        min-height: auto;
        padding-top: 64px;
        overflow-x: clip;
    }

    .hero-premium h1 {
        font-size: clamp(1.65rem, 7vw, 2.25rem);
        margin-bottom: 16px;
    }

    .hero-premium .hero-desc {
        font-size: 15px;
        line-height: 1.65;
        margin-bottom: 24px;
    }

    .hero-badge {
        font-size: 11px;
        padding: 6px 12px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-trust-row {
        flex-direction: column;
        gap: 16px;
        margin-top: 28px;
        padding-top: 24px;
        text-align: center;
    }

    .hero-avatars {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
        max-width: 100%;
    }

    .card-stack {
        height: 200px;
        max-width: min(100%, 300px);
        margin: 0 auto;
    }

    .bank-card-3d.secondary,
    .bank-card-3d.tertiary {
        display: none;
    }

    .bank-card-3d.primary {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        animation: none;
        padding: 20px;
    }

    .bank-card-3d .card-number {
        font-size: 16px;
        letter-spacing: 2px;
        margin-bottom: 16px;
    }

    .bank-card-3d .card-chip {
        width: 40px;
        height: 30px;
        margin-bottom: 20px;
    }

    .floating-badge {
        display: none;
    }

    .marquee-item {
        padding: 0 24px;
        font-size: 12px;
        letter-spacing: 1px;
    }

    .features-premium,
    .about-premium,
    .gallery-section,
    .services-bento,
    .experience-showcase,
    .why-parallax,
    .steps-timeline,
    .stats-parallax,
    .testimonials-premium,
    .faq-premium,
    .cta-premium {
        padding: 48px 0;
    }

    .cta-content h2 {
        font-size: 1.65rem;
    }

    .cta-content p {
        font-size: 15px;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .features-grid-premium {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card-body {
        padding: 20px;
    }

    .about-premium-grid {
        gap: 32px;
    }

    .about-image-stack {
        height: 280px;
        max-width: 100%;
    }

    .about-experience-badge {
        padding: 16px 20px;
    }

    .about-experience-badge strong {
        font-size: 28px;
    }

    .experience-showcase-grid {
        gap: 32px;
    }

    .experience-showcase-text h2 {
        font-size: 1.75rem;
    }

    .experience-image-wrap {
        border-radius: 16px;
        min-height: 220px;
    }

    .experience-image-badge {
        left: 16px;
        right: 16px;
        bottom: 16px;
        padding: 12px 16px;
    }

    .bento-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .bento-item,
    .bento-item:nth-child(n) {
        grid-column: unset !important;
        grid-row: unset !important;
        height: 200px !important;
        min-height: 200px;
    }

    .service-bento-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-bento-card {
        min-height: 260px;
        padding: 24px;
    }

    .why-parallax {
        background-attachment: scroll;
    }

    .why-cards-grid {
        grid-template-columns: 1fr;
    }

    .steps-timeline-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .stats-parallax-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .testimonial-premium-grid {
        grid-template-columns: 1fr;
    }

    .faq-premium-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .faq-side-image {
        height: 220px;
        border-radius: 16px;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}

/* ── Small phones ── */
@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

    .logo-tagline {
        display: none;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .logo-name {
        font-size: 16px;
    }

    .nav-container {
        height: 60px;
    }

    .nav-links {
        top: 60px;
    }

    .stats-parallax-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        gap: 28px;
    }

    .footer-brand p {
        font-size: 13px;
    }

    .balance-amount {
        font-size: 26px;
        word-break: break-word;
    }

    .balance-meta {
        flex-direction: column;
        gap: 8px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .quick-action {
        padding: 14px 10px;
    }

    .quick-action i {
        font-size: 22px;
    }

    .quick-action span {
        font-size: 12px;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr;
    }

    .card-type-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .dashboard-header h1 {
        font-size: 18px;
    }

    .dashboard-content {
        padding: 12px;
    }

    .card {
        padding: 14px;
        border-radius: 12px;
    }

    .btn-lg {
        width: 100%;
        padding: 14px 20px;
    }

    .table-responsive {
        margin: 0 -14px;
        padding: 0 14px;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive table {
        min-width: 480px;
    }

    .auth-split-visual {
        min-height: 180px;
        padding: 20px;
    }

    .auth-split-content h2 {
        font-size: 1.35rem;
    }

    .auth-split-form {
        padding: 20px 14px;
    }

    .support-page-header {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .support-page-header h1 {
        font-size: 17px;
    }

    .chat-panel {
        min-height: 360px;
        border-radius: 14px;
    }

    .chat-bubble-premium,
    .chat-bubble {
        max-width: 90%;
    }

    .composer-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .composer-send {
        width: 100%;
        height: 48px;
        min-width: auto;
        border-radius: 12px;
    }
}

/* ── iPad / tablet landscape ── */
@media (min-width: 768px) and (max-width: 1024px) {
    .features-grid-premium {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-bento-card:last-child {
        grid-column: span 2;
    }

    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .page-grid-2-1,
    .page-grid-1-2 {
        grid-template-columns: 1fr;
    }
}

/* ── Large desktop polish ── */
@media (min-width: 1400px) {
    .container {
        max-width: 1280px;
    }
}
