/* ==============================================
   MOBILE RESPONSIVE STYLES – Arches Cricket Club
   ============================================== */

/* ---- BASE MOBILE RESETS ---- */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure tap targets are large enough (44px min) */
.nav-menu a,
.btn,
button,
a.btn-primary,
a.btn-secondary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Table responsive wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Nav overlay for mobile menu */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   TABLET BREAKPOINT (≤ 968px)
   ============================================ */
@media (max-width: 968px) {

    /* --- NAVIGATION --- */
    .nav-toggle {
        display: flex !important;
        flex-direction: column;
        cursor: pointer;
        gap: 5px;
        z-index: 1001;
    }

    .nav-toggle span {
        width: 25px;
        height: 3px;
        background: #fff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        background: linear-gradient(180deg, #0d0d0d 0%, #1a1a1a 100%);
        padding: 5rem 2rem 2rem;
        transition: left 0.3s ease;
        z-index: 999;
        gap: 0;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 0.5rem 0;
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 0.8rem 1rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        min-height: 48px;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: rgba(255, 107, 26, 0.15);
        color: #ff6b1a;
    }

    /* Hamburger animated X */
    .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(7px, -7px);
    }

    /* --- LAYOUT --- */
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .match-teams {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .vs-divider {
        transform: rotate(90deg);
    }

    .team-logo {
        width: 90px;
        height: 90px;
        font-size: 2rem;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Gallery grid */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Sponsor cards stacking */
    .sponsor-cards {
        grid-template-columns: 1fr;
    }

    .sponsor-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PHONE BREAKPOINT (≤ 576px)
   ============================================ */
@media (max-width: 576px) {

    .hero h1 {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .section {
        padding: 3rem 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .stat-number {
        font-size: 2rem;
    }

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

    .news-grid {
        grid-template-columns: 1fr;
    }

    .match-highlight {
        padding: 1.5rem;
    }

    .match-title {
        font-size: 1.3rem;
    }

    .match-details {
        flex-direction: column;
        gap: 1rem;
    }

    /* Gallery single-column */
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }

    /* Table font reduction */
    .table-responsive table {
        font-size: 0.85rem;
    }

    .table-responsive th,
    .table-responsive td {
        padding: 0.6rem 0.5rem;
    }

    /* Sponsor section */
    .sponsors-track {
        gap: 2rem;
    }

    .sponsor-logo {
        min-width: 150px;
        height: 90px;
    }

    /* Footer */
    .footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-content {
        gap: 2rem;
    }

    /* Page header for sub-pages */
    .page-header {
        padding: 2.5rem 1rem 1.5rem;
    }

    .page-header h2 {
        font-size: 1.8rem;
    }

    /* Logo sizing */
    .logo-icon,
    .logo img {
        width: 45px !important;
        height: 45px !important;
    }

    .logo-text h1 {
        font-size: 1.1rem !important;
    }

    .logo-text p {
        font-size: 0.65rem !important;
    }
}

/* ============================================
   SMALL PHONE (≤ 380px)
   ============================================ */
@media (max-width: 380px) {
    .hero h1 {
        font-size: 1.7rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .nav-menu {
        width: 250px;
    }
}