/* ========================================
   MysticX Mobile Base Styles
   Shared mobile components and breakpoints
   ======================================== */

:root {
    --mobile-header-height: 60px;
    --touch-target-min: 44px;
    --mobile-padding: 16px;
}

/* ========================================
   MOBILE HEADER
   ======================================== */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: var(--mobile-header-height);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--mobile-padding);
}

.mobile-logo img {
    height: 36px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(217, 162, 124, 0.3));
}

.mobile-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ========================================
   HAMBURGER MENU
   ======================================== */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 22px;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--mx-rose, #D9A27C);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ========================================
   MOBILE MENU DRAWER
   ======================================== */
.mobile-menu-drawer {
    display: none;
    position: fixed;
    top: var(--mobile-header-height);
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    z-index: 999;
    padding: var(--mobile-padding);
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - var(--mobile-header-height));
    overflow-y: auto;
}

.mobile-menu-drawer.active {
    display: flex;
}

.mobile-menu-drawer a {
    color: rgba(245, 245, 240, 0.9);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 16px 20px;
    min-height: var(--touch-target-min);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.mobile-menu-drawer a:last-child {
    border-bottom: none;
}

.mobile-menu-drawer a:hover,
.mobile-menu-drawer a:active {
    color: var(--mx-rose, #D9A27C);
    background: rgba(217, 162, 124, 0.1);
}

.mobile-menu-drawer a.highlight {
    color: var(--mx-gold, #D4AF37);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    justify-content: center;
    margin-top: 8px;
}

/* ========================================
   LANG SWITCHER MOBILE
   ======================================== */
.lang-switch-mobile {
    display: flex;
    gap: 6px;
}

.lang-switch-mobile .lang-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 8px;
    font-size: 0.65rem;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.1em;
    border: 1px solid rgba(212, 175, 55, 0.3);
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.lang-switch-mobile .lang-btn:hover {
    border-color: var(--mx-gold, #D4AF37);
    color: var(--mx-gold, #D4AF37);
}

.lang-switch-mobile .lang-btn.active {
    background: var(--mx-gold, #D4AF37);
    border-color: var(--mx-gold, #D4AF37);
    color: #000;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Desktop - hide mobile components */
@media (min-width: 1025px) {
    .mobile-header,
    .mobile-menu-drawer {
        display: none !important;
    }
}

/* Tablet and below - show mobile header */
@media (max-width: 1024px) {
    .mobile-header {
        display: flex;
    }

    .desktop-header,
    .desktop-nav {
        display: none !important;
    }

    body {
        padding-top: var(--mobile-header-height);
    }
}

/* Tablets */
@media (max-width: 768px) {
    .mobile-header {
        padding: 0 12px;
    }

    .mobile-logo img {
        height: 32px;
    }

    /* Typography scaling */
    h1 {
        font-size: clamp(1.8rem, 6vw, 2.8rem);
    }

    h2 {
        font-size: clamp(1.4rem, 5vw, 2.2rem);
    }

    /* Container padding */
    .container,
    .main,
    main {
        padding-left: var(--mobile-padding);
        padding-right: var(--mobile-padding);
    }
}

/* Large phones */
@media (max-width: 600px) {
    h1 {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
    }

    h2 {
        font-size: clamp(1.3rem, 5.5vw, 1.8rem);
    }

    p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
}

/* Small phones */
@media (max-width: 480px) {
    :root {
        --mobile-header-height: 56px;
    }

    .mobile-header {
        min-height: 56px;
    }

    .mobile-logo img {
        height: 28px;
    }

    /* Touch targets - ensure minimum 44px */
    button,
    .btn,
    a.cta,
    a.cta-btn,
    input[type="submit"],
    input[type="button"] {
        min-height: var(--touch-target-min);
        padding: 12px 20px;
    }

    /* Typography */
    body {
        font-size: 14px;
    }

    h1 {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }

    h2 {
        font-size: clamp(1.2rem, 6vw, 1.6rem);
    }

    /* Form inputs - 16px prevents iOS zoom */
    input,
    textarea,
    select {
        font-size: 16px !important;
        min-height: var(--touch-target-min);
    }

    /* Lang buttons smaller on very small screens */
    .lang-switch-mobile .lang-btn {
        min-width: 36px;
        min-height: 36px;
        padding: 6px;
        font-size: 0.6rem;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 1024px) {
    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }
}

/* Hide scrollbar on mobile menu */
.mobile-menu-drawer::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
    .mobile-header {
        padding-left: max(var(--mobile-padding), env(safe-area-inset-left));
        padding-right: max(var(--mobile-padding), env(safe-area-inset-right));
    }

    .mobile-menu-drawer {
        padding-left: max(var(--mobile-padding), env(safe-area-inset-left));
        padding-right: max(var(--mobile-padding), env(safe-area-inset-right));
        padding-bottom: max(var(--mobile-padding), env(safe-area-inset-bottom));
    }
}
