/* ============================================================
   GeoWeb – Responsive Styles (vabrp.css)
   Mobile First approach
   ============================================================ */

/* ---------- Tablet (max 992px) ---------- */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-grid-2 {
        grid-template-columns: 1fr;
    }

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

    .contact-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Mobile / Tablet (max 768px) ---------- */
@media (max-width: 768px) {
    /* Header mobile menu */
    .main-nav {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: var(--blue);
        flex-direction: column;
        align-items: stretch;
        padding: 70px 20px 20px;
        z-index: 999;
        transition: right 0.3s ease;
        box-shadow: -4px 0 20px rgba(0,0,0,0.2);
        overflow-y: auto;
    }

    .main-nav.open {
        right: 0;
    }

    .main-nav .nav-link {
        padding: 14px 16px;
        border-radius: 8px;
        font-size: 1rem;
    }

    .main-nav .btn {
        margin-top: 8px;
        text-align: center;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-overlay.active {
        display: block;
    }

    /* Hero */
    .hero {
        padding: 48px 0;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }

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

    /* Forms */
    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 24px 20px;
    }

    /* Admin sidebar */
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-overlay.active {
        display: block;
    }

    .admin-wrapper {
        margin-left: 0;
    }

    .admin-menu-btn {
        display: block;
    }

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

    .admin-content {
        padding: 16px;
    }

    .admin-topbar {
        padding: 0 16px;
    }

    /* Tables */
    .table th, .table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }

    /* Search */
    .search-form {
        flex-direction: column;
    }
    .search-form input {
        min-width: 100%;
    }

    .page-header {
        padding: 28px 0;
    }
    .page-header h1 {
        font-size: 1.4rem;
    }

    .content-card {
        padding: 20px 16px;
    }
}

/* ---------- Small phones (max 480px) ---------- */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .btn-lg {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .header-inner {
        height: 56px;
    }

    .logo span {
        font-size: 1.05rem;
    }

    .error-content h1 {
        font-size: 3.5rem;
    }
}

/* ---------- Large screens ---------- */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* ---------- Accessibility focus ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 2px;
}

/* ---------- Print ---------- */
@media print {
    .site-header,
    .site-footer,
    .admin-sidebar,
    .admin-topbar,
    .mobile-menu-btn {
        display: none !important;
    }
    .admin-wrapper {
        margin-left: 0;
    }
    body {
        background: white;
    }
}

/* Hero slider responsive */
@media (max-width: 992px) {
    .hero-slider {
        min-height: 340px;
    }
    .slide-box {
        padding: 36px 32px;
        max-width: 90%;
    }
    .box-face h2 { font-size: 1.6rem; }
    .box-face p { font-size: 1rem; }
    .moon { font-size: 2.2rem; right: 3%; }
}

@media (max-width: 768px) {
    .hero-slider-wrap { padding: 32px 12px 48px; }
    .hero-slider { min-height: 300px; }
    .slide-box {
        padding: 28px 20px;
        animation: boxRotateMobile 10s linear infinite;
    }
    @keyframes boxRotateMobile {
        0%, 100% { transform: perspective(600px) rotateY(0deg); }
        50% { transform: perspective(600px) rotateY(3deg); }
    }
    .box-face h2 { font-size: 1.35rem; }
    .box-face i { font-size: 2.2rem; }
    .slider-btn { width: 36px; height: 36px; font-size: 0.85rem; }
    .slider-btn.prev { left: 2px; }
    .slider-btn.next { right: 2px; }
    .star { font-size: 0.8rem !important; }
    .moon { font-size: 1.8rem; top: 6%; }
}

@media (max-width: 480px) {
    .box-face h2 { font-size: 1.2rem; }
    .box-face p { font-size: 0.9rem; margin-bottom: 20px; }
    .btn-lg { padding: 10px 16px; font-size: 0.9rem; }
}

/* Header / Nav responsive */
@media (max-width: 992px) {
    .main-nav {
        gap: 2px;
    }
    .nav-link {
        padding: 7px 10px;
        font-size: 0.85rem;
    }
    .desktop-only { display: none !important; }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: var(--blue);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 72px 18px 24px;
        z-index: 999;
        transition: right 0.3s ease;
        box-shadow: -6px 0 24px rgba(0,0,0,0.25);
        overflow-y: auto;
        gap: 2px;
    }
    .main-nav.open { right: 0; }
    .main-nav .nav-link {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 10px;
    }
    .nav-mobile-extra {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid rgba(255,255,255,0.15);
    }
    .nav-mobile-extra .btn {
        margin-top: 8px;
        text-align: center;
    }
    .desktop-only { display: none !important; }
    .mobile-menu-btn { display: block; }
    .mobile-overlay.active { display: block; }

    .lang-menu {
        right: 0;
        left: auto;
    }
}

@media (min-width: 769px) {
    .nav-mobile-extra { display: none !important; }
}
