/* ============================================================
   Arcanmu RESPONSIVE ENGINE v5.0 — SENIOR EDITION
   Breakpoints:
     Mobile:       < 480px
     Large Mobile: 480px - 768px
     Tablet:       769px - 1024px
     Notebook:     1025px - 1280px
     Desktop+:     > 1281px (UltraWide Support)
   ============================================================ */

/* ── 1. GLOBAL OVERRIDES ── */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100%;
}

.mmenu-active { overflow: hidden !important; } /* Bloqueo de scroll al abrir menú */

.main-wrapper, .section-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ── 2. MOBILE MENU DRAWER (SaaS Style) ── */
.Arcan-mmenu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(15px);
    z-index: 10000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
}
.Arcan-mmenu.open { transform: translateX(-300px); }

#Arcan-mmenu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}
#Arcan-mmenu-overlay.open { opacity: 1; visibility: visible; }

/* REGLA DE ORO: ELIMINAR DEL TODO EN PC (> 1024px) */
@media (min-width: 1025px) {
    .Arcan-mmenu, #Arcan-mmenu-overlay, .snav-hamburger {
        display: none !important;
    }
}

.mmenu-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mmenu-logo { height: 35px; }
.mmenu-close { background: none; border: none; color: #fff; font-size: 32px; cursor: pointer; }

.mmenu-body { padding: 20px; overflow-y: auto; flex: 1; }
.mmenu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    color: #cbd5e1;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    transition: 0.2s;
    margin-bottom: 5px;
}
.mmenu-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.mmenu-item i { width: 20px; color: var(--ColorTemplate); }
.mmenu-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 15px 0; }
.mmenu-logout { color: #ef4444; }
.mmenu-register { background: var(--ColorTemplate); color: #fff; }

/* Hamburger Icon Animation */
.snav-hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10001;
}
.snav-hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: #fff;
    border-radius: 4px;
    transition: 0.3s;
}
.snav-hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.snav-hamburger.open span:nth-child(2) { opacity: 0; }
.snav-hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ── 3. BREAKPOINTS ── */

/* NOTEBOOK (1025px - 1280px) */
@media (max-width: 1280px) {
    .main-wrapper, .section-container, .Arcanmu-navbar-inner { max-width: 1000px; }
    .hero-inner { padding: 40px 20px; }
}

/* TABLET (769px - 1024px) */
@media (max-width: 1024px) {
    .main-wrapper, .section-container { max-width: 95%; }
    .snav-center-section { display: none; } /* Ocultar menu PC */
    .snav-hamburger { display: flex; } /* Mostrar hamburguesa */
    
    .hero-stats-row { gap: 15px; }
    .hero-stat-side { min-width: 140px; }
    
    .rankings-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 24px; }
}

/* LARGE MOBILE (480px - 768px) */
@media (max-width: 768px) {
    .hero-section { min-height: 500px; }
    .hero-logo-img { max-height: 140px; }
    .hero-stats-row { flex-direction: column; align-items: center; }
    .hero-stat-center { order: -1; width: 140px; height: 140px; }
    .hero-stat-side { width: 100%; max-width: 320px; }
    
    .hero-cta { flex-direction: column; width: 100%; align-items: center; }
    .hero-btn-main, .hero-btn-outline { width: 100%; max-width: 320px; justify-content: center; }
    
    .hero-rates { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .hero-rate-div { display: none; }
    
    .col-lg-8, .col-lg-4 { width: 100% !important; flex: 0 0 100% !important; max-width: 100% !important; }
    
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
    }

    /* Navbar Móvil Premium */
    .Arcanmu-navbar {
        height: 60px !important;
        padding: 0 10px !important;
    }
    .snav-logo-img {
        height: 30px !important;
    }
    .snav-right-section {
        margin-left: auto;
    }
}

/* MOBILE (< 480px) */
@media (max-width: 480px) {
    .hero-logo-img { max-height: 110px; }
    .hero-stat-side .hero-stat-num { font-size: 32px; }
    .hero-stat-num-big { font-size: 32px; }
    .hero-stat-center { width: 110px; height: 110px; }
    
    .section-title { font-size: 19px; letter-spacing: 1px; }
    .section-label { font-size: 9px; }
    
    .unique-grid { grid-template-columns: 1fr !important; }
    
    /* Inputs optimizados para touch en iPhone/Android */
    input[type="text"], input[type="password"], input[type="email"], select, textarea {
        font-size: 16px !important; /* Evita zoom forzado en iOS */
        height: 48px !important;
    }
    
    .btn { height: 48px; display: flex; align-items: center; justify-content: center; }
}

/* ── 4. ULTRA-WIDE SUPPORT (> 1281px) ── */
@media (min-width: 1281px) {
    .main-wrapper, .section-container, .Arcanmu-navbar-inner {
        max-width: 1400px;
    }
    .hero-inner { max-width: 1400px; margin: 0 auto; }
}

/* ── 5. TOUCH OPTIMIZATIONS ── */
@media (pointer: coarse) {
    .mmenu-item, .hero-btn-main, .hero-btn-outline, .cs-btn, .snav-item {
        min-height: 44px;
    }
}
