/* ============================================================
   TCAM — Global Responsive Stylesheet
   Breakpoints:
     1200px  Large tablets / small desktops
     1024px  Tablets landscape
      768px  Tablets portrait / phablets
      480px  Mobile phones
      360px  Small phones
   ============================================================ */

/* ── Base reset helpers ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; }

/* ── Hamburger button ─────────────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 1200;
    flex-shrink: 0;
}
.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ── Mobile nav overlay (dim background) ─────────────────── */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1050;
}
.nav-overlay.open { display: block; }

/* Desktop: hamburger hidden, original space-between layout */
@media (min-width: 769px) {
    .hamburger { display: none !important; }
    .nav-container { justify-content: space-between !important; gap: 0; }
}

/* ═══════════════════════════════════════════════════════════
   ≤ 1200px  —  Large tablets / small desktops
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .nav-container      { padding: 0 1.2rem; }
    .nav-menu           { gap: 0.75rem; }
    .nav-menu a         { font-size: 0.82rem; }
    .header-register-btn { padding: 0.42rem 0.7rem !important; font-size: 0.78rem !important; }
    .hero-content       { max-width: 900px; }
    .container          { padding: 0 1.5rem; }
    /* gallery: keep 4 columns down to 1200px, just tighten the gap */
    .gallery-grid       { gap: 14px; }
}

/* ═══════════════════════════════════════════════════════════
   ≤ 1024px  —  Tablets landscape
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .nav-menu           { gap: 0.65rem; }
    .nav-menu a         { font-size: 0.8rem; }
    .header-register-btn { padding: 0.38rem 0.6rem !important; font-size: 0.76rem !important; }
    .section-title      { font-size: 2rem; }
    .features-grid      { grid-template-columns: repeat(2, 1fr); }
    .why-tennis-row     { flex-wrap: wrap !important; justify-content: center !important; }
    .why-tennis-card    { max-width: 45%; }
    /* gallery: 3 columns → 12 images = 4 full rows, no orphans */
    .gallery-grid       { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .gallery-item img   { height: 190px; }
}

/* ═══════════════════════════════════════════════════════════
   ≤ 768px  —  Tablets portrait / phablets
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── Hamburger appears, desktop nav slides in ── */
    .hamburger { display: flex; }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: -100%;
        width: 78vw;
        max-width: 290px;
        height: 100vh;
        background: #0a0a19;
        padding: 88px 1.5rem 2rem;
        gap: 0 !important;
        z-index: 1100;
        transition: left 0.32s cubic-bezier(.4,0,.2,1);
        overflow-y: auto;
        box-shadow: 6px 0 28px rgba(0,0,0,0.45);
    }
    .nav-menu.open {
        display: flex;
        left: 0;
    }
    .nav-menu li {
        display: block !important;
        border-bottom: 1px solid rgba(255,255,255,0.07);
    }
    .nav-menu a {
        display: block;
        padding: 0.9rem 0.2rem;
        font-size: 1.05rem;
        color: #fff !important;
    }
    /* Register Now inside drawer */
    .nav-menu .mobile-register-row {
        margin-top: 1.2rem;
        text-align: center;
    }

    /* Hide header buttons — available in drawer */
    .header-register-btn { display: none !important; }

    /* ── Navigation container: hamburger + logo together on the left ── */
    .nav-container {
        padding: 0 1rem;
        justify-content: flex-start !important;
        gap: 0.75rem;
    }
    /* Push desktop register buttons to the far right */
    .nav-container > nav  { flex: 1; }
    .nav-container > div:last-child { margin-left: auto; }

    /* ── Hero ── */
    .hero            { min-height: 100svh; min-height: 100vh; }
    .hero-content    { padding: 1.4rem 1.1rem; margin: 0 10px; border-radius: 10px; }
    .hero h1, .hero .hero-title  { font-size: 1.75rem !important; line-height: 1.25; }
    .hero p, .hero .hero-subtitle { font-size: 0.93rem !important; }
    .hero-slide      { height: 300px !important; }
    .cta-buttons     { flex-direction: column; align-items: center; gap: 0.7rem; }
    .cta-buttons a, .cta-btn { width: 100%; max-width: 260px; text-align: center; }

    /* ── Sections general ── */
    .section-title   { font-size: 1.5rem; margin-bottom: 1.8rem; }
    .features        { padding: 3rem 1rem; }
    .features-grid   { grid-template-columns: 1fr; }
    .feature-card    { padding: 1.5rem; }

    /* ── Stats ── */
    .stats           { padding: 2rem 1rem; }
    .stats-grid      { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .stat-item h3    { font-size: 2rem; }

    /* ── Booking form ── */
    .booking         { padding: 3rem 1rem; }
    .booking-form    { padding: 1.4rem 1rem; max-width: 100%; }

    /* ── Gallery ── */
    .gallery-section { padding: 35px 0 45px; }
    /* 2 columns → 12 images = 6 full rows, no orphans */
    .gallery-grid    { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .gallery-item    { border-radius: 10px; }
    .gallery-item img { height: 160px; }

    /* ── Why Tennis cricket cards ── */
    .why-tennis-row  { flex-direction: column !important; }
    .why-tennis-card { max-width: 100% !important; min-width: unset !important; width: 100%; }

    /* ── Footer ── */
    .footer          { padding: 2rem 1rem 1rem; }
    .footer-content  { grid-template-columns: 1fr !important; gap: 1.5rem; }


    /* ── Admin tables ── */
    table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
    table th, table td { white-space: nowrap; font-size: 0.85rem; padding: 6px 10px; }

    /* ── Person photo cards (Mayuri / Meenakshi) — index.html ── */
    .person-photo-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        min-width: unset !important;
        width: 100% !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .person-photo-col img {
        width: 75% !important;
        max-width: 280px !important;
        border-radius: 16px !important;
    }

    /* ── Person photos — about.html ── */
    .about-person-photo {
        max-width: 80% !important;
        width: 80% !important;
        display: block;
        margin: 0 auto 16px !important;
        flex-shrink: 0;
    }

    /* ── About page ── */
    .about-container  { margin: 80px 12px 20px !important; padding: 22px 14px 18px !important; }
    .about-title      { font-size: 1.9rem !important; letter-spacing: 1px !important; }
    .about-subtitle   { font-size: 0.97rem; }
    .about-section h2 { font-size: 1.4rem; }

    /* ── Contact page ── */
    .contact-flex   { flex-direction: column; gap: 18px; }
    .contact-details, .contact-form { min-width: unset; width: 100%; }

    /* ── Tournament page ── */
    .tournament-grid { grid-template-columns: 1fr; }

    /* ── Generic container (contact, tournament, etc.) ── */
    body > .container { margin: 80px 12px 20px !important; padding: 22px 14px 18px !important; }

    /* ── Registration success page ── */
    #idCard { max-width: 100% !important; padding: 16px 12px 20px !important; }

    /* ── Enhanced registration form ── */
    .form-row           { grid-template-columns: 1fr !important; }
    .form-group.full-width { grid-column: 1 !important; }
    .search-existing    { padding: 1rem; }
    .search-existing > div > div,
    .search-existing > div > button { min-width: unset !important; width: 100% !important; flex: 1 1 100% !important; }
    .search-existing > div { flex-direction: column !important; }
}

/* ═══════════════════════════════════════════════════════════
   ≤ 480px  —  Mobile phones
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .nav-container      { padding: 0 0.75rem; }
    .logo               { font-size: 1.25rem !important; }
    .logo img           { height: 30px !important; }

    .hero h1, .hero .hero-title  { font-size: 1.35rem !important; }
    .hero p, .hero .hero-subtitle { font-size: 0.85rem !important; }
    .hero-slide         { height: 220px !important; }
    .hero-content       { padding: 1rem 0.9rem; margin: 0 6px; }

    .section-title      { font-size: 1.2rem; margin-bottom: 1.2rem; }
    .stat-item h3       { font-size: 1.6rem; }
    .stat-item p        { font-size: 0.85rem; }

    .gallery-grid       { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .gallery-item img   { height: 130px; }

    .feature-card       { padding: 1.2rem 0.9rem; }
    .feature-icon       { font-size: 2rem; }
    .feature-card h3    { font-size: 1rem; }
    .feature-card p     { font-size: 0.88rem; }

    .booking-form       { padding: 1rem 0.7rem; }
    .submit-btn         { font-size: 0.97rem; padding: 0.85rem; }

    .about-container    { margin: 72px 8px 16px !important; padding: 16px 10px !important; }
    .about-title        { font-size: 1.5rem !important; }
    body > .container   { margin: 72px 8px 16px !important; padding: 16px 10px !important; }

    .owl-prev, .owl-next { width: 36px !important; height: 36px !important; font-size: 16px !important; margin: 0 8px !important; }
}

/* ═══════════════════════════════════════════════════════════
   ≤ 360px  —  Small phones
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
    .hero h1, .hero .hero-title { font-size: 1.1rem !important; }
    .section-title  { font-size: 1rem; }
    .gallery-grid   { gap: 5px; }
    .gallery-item img { height: 90px; }
    .booking-form   { padding: 0.8rem 0.6rem; }
    .about-title    { font-size: 1.2rem !important; }
}

/* ── Utility ──────────────────────────────────────────────── */
@media (max-width: 768px)  { .hide-mobile { display: none !important; } }
@media (min-width: 769px)  { .show-mobile-only { display: none !important; } }

/* ============================================================
   TCAM — Site-wide Footer
   ============================================================ */
.site-footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ccc;
    padding: 3rem 2rem 0;
    font-family: Arial, sans-serif;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.footer-logo-row img {
    height: 42px;
    width: auto;
}

.footer-brand-name {
    font-size: 1.45rem;
    font-weight: bold;
    color: #ff6b35;
}

.footer-tagline {
    font-size: 0.88rem;
    color: #aaa;
    line-height: 1.65;
    max-width: 260px;
    margin-bottom: 0;
}

.footer-heading {
    color: #ff6b35;
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: 0.55rem; }

.footer-links a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s, padding-left 0.2s;
    display: block;
}

.footer-links a:hover {
    color: #ff6b35;
    padding-left: 5px;
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #bbb;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.social-link img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
}

.social-link:hover { color: #ff6b35; }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 1.2rem 0;
    color: #777;
    font-size: 0.82rem;
}

/* Footer responsive */
@media (max-width: 1024px) {
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-tagline { max-width: 100%; }
}

@media (max-width: 600px) {
    .site-footer { padding: 2rem 1rem 0; }
    .footer-inner { grid-template-columns: 1fr; gap: 1.6rem; }
}
