
/* =========================================================
   GFC RESPONSIVE SYSTEM
   Mobile / Tablet / Desktop
========================================================= */

html { width: 100%; overflow-x: hidden; }
body { width: 100%; min-width: 0; overflow-x: hidden; }

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.navbar { min-width: 0; }
.hamburger {
    border: 0;
    background: transparent;
    padding: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10001;
}
.hamburger span {
    display: block;
    transition: transform .25s ease, opacity .2s ease;
    transform-origin: center;
}
.navbar.mobile-open .hamburger span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.navbar.mobile-open .hamburger span:nth-child(2) { opacity: 0; }
.navbar.mobile-open .hamburger span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 1200px) {
    .navbar { padding: 0 35px; }
    .nav-links { gap: 22px; }
    .nav-links a { font-size: 14px; }
    .nav-right { gap: 10px; }
    .primary-btn, .secondary-btn { padding: 14px 26px; }
    .hero h1 { font-size: clamp(58px, 8vw, 82px); }
    section { padding: 90px 0; }
}

@media (max-width: 980px) {
    .navbar {
        height: 76px;
        padding: 0 24px;
    }
    .logo img { width: 58px; }

    .nav-links {
        display: none;
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - 76px);
        overflow-y: auto;
        padding: 24px;
        margin: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(5,5,5,.98);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255,255,255,.08);
        border-bottom: 1px solid rgba(255,255,255,.08);
        z-index: 10000;
    }
    .navbar.mobile-open .nav-links { display: flex; }

    .nav-links li { width: 100%; }
    .nav-links a {
        display: block;
        width: 100%;
        padding: 15px 4px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,.07);
    }
    .nav-links a::after { display: none; }

    .nav-right {
        margin-left: auto;
        margin-right: 8px;
    }
    .nav-right .primary-btn { display: none; }
    .language-switch { display: none; }

    .hamburger { display: flex; }

    body.menu-open { overflow: hidden; }

    .container {
        width: min(92%, 760px);
    }

    section { padding: 75px 0; }

    .hero {
        min-height: 100svh;
        height: auto;
        padding: 120px 20px 70px;
    }
    .hero-content { width: 100%; }
    .hero h1 { font-size: clamp(52px, 11vw, 78px); }
    .hero p { font-size: clamp(17px, 3vw, 21px); }
    .hero-buttons {
        flex-wrap: wrap;
        gap: 12px;
    }

    .event-section .container,
    .events-intro-grid,
    .about-grid,
    .contact-grid,
    .cage-grid,
    .sponsors-grid {
        grid-template-columns: 1fr !important;
    }

    .event-section .container { gap: 40px; }
    .event-left h2 { font-size: clamp(40px, 8vw, 58px); }

    .section-title h2,
    .events-intro-title h2 {
        font-size: clamp(38px, 8vw, 58px);
        line-height: 1.05;
    }

    .fighter-grid,
    .fighters-grid,
    .sponsor-grid,
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .events-grid,
    .fightcards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    table, .table-wrap { width: 100%; }
    .table-wrap, .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 700px) {
    .navbar { padding: 0 16px; }
    .logo img { width: 52px; }

    .container { width: calc(100% - 32px); }

    section { padding: 60px 0; }

    .primary-btn, .secondary-btn {
        width: 100%;
        max-width: 340px;
        padding: 14px 22px;
        text-align: center;
    }

    .hero {
        padding: 105px 16px 55px;
        align-items: center;
    }
    .hero h5 {
        font-size: 13px;
        letter-spacing: 2px;
        margin-bottom: 14px;
    }
    .hero h1 {
        font-size: clamp(42px, 14vw, 64px);
        line-height: .95;
        word-break: normal;
    }
    .hero p {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 28px;
    }
    .hero-buttons {
        width: 100%;
        flex-direction: column;
        align-items: center;
    }

    .event-section .container { gap: 30px; }
    .event-left h2 { font-size: clamp(34px, 11vw, 48px); }
    .event-left p, .event-right p { line-height: 1.65; }

    .fighter-grid,
    .fighters-grid,
    .sponsor-grid,
    .cards-grid,
    .events-grid,
    .fightcards-grid {
        grid-template-columns: 1fr !important;
    }

    .fighter-card,
    .event-card,
    .sponsor-card,
    .card {
        width: 100%;
        min-width: 0;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    .events-hero {
        min-height: 100svh;
        height: auto !important;
        padding: 120px 16px 65px;
    }
    .events-hero-content { width: 100%; }
    .events-hero h1 {
        font-size: clamp(42px, 14vw, 68px);
        line-height: .95;
    }
    .events-hero-subtitle {
        font-size: 14px;
        letter-spacing: 2px;
    }
    .events-hero-info {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 12px;
        text-align: center;
    }
    .events-divider { display: none; }

    .events-intro,
    .events-intro-title,
    .events-intro-grid { width: 100%; }
    .events-intro-title h2 { font-size: clamp(36px, 11vw, 52px); }

    .fighter-filters {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        flex-wrap: nowrap !important;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    .fighter-filter { flex: 0 0 auto; }

    .gallery,
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }

    .contact-form,
    form {
        width: 100%;
    }

    input, textarea, select {
        max-width: 100%;
        width: 100%;
        font-size: 16px; /* prevents iOS zoom */
    }

    .modal,
    .modal-content,
    .popup {
        width: calc(100% - 28px) !important;
        max-width: none !important;
        margin: 14px;
    }

    iframe, video {
        max-width: 100%;
    }

    .hero video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Prevent long URLs / text from breaking the layout */
    p, h1, h2, h3, h4, h5, h6, a, li, td, th {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 420px) {
    .navbar { height: 70px; }
    .nav-links { top: 70px; max-height: calc(100vh - 70px); }

    .logo img { width: 48px; }
    .hamburger { padding: 8px; }
    .hamburger span { width: 26px; height: 3px; }

    .hero h1 { font-size: clamp(38px, 15vw, 54px); }
    .section-title h2,
    .events-intro-title h2 { font-size: 34px; }

    section { padding: 52px 0; }
}

/* Safety for common fixed-width components */
@media (max-width: 700px) {
    [style*="width: 50%"],
    [style*="width:50%"],
    [style*="width: 600px"],
    [style*="width:600px"] {
        max-width: 100% !important;
    }
}

/* =========================================================
   GFC GLOBAL MOBILE NAV + LANGUAGE
========================================================= */
.language-switch {
    display: flex;
    align-items: center;
    gap: 4px;
}
.language-switch button,
.mobile-language button {
    border: 1px solid rgba(255,255,255,.18);
    background: transparent;
    color: #fff;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.language-switch button.active,
.mobile-language button.active,
.language-switch button:hover,
.mobile-language button:hover {
    background: var(--red);
    border-color: var(--red);
}
.mobile-language {
    display: none;
    padding-top: 14px;
    gap: 8px;
}
.mobile-language button { display: inline-flex; width: auto; }

@media (max-width: 980px) {
    .mobile-language { display: flex; }
    .nav-right { margin-left: auto; }
    .hamburger {
        display: flex !important;
        flex-shrink: 0;
        width: 48px;
        height: 48px;
    }
}
