/* ============================================================
   MASTERCLASS AZERBAIJAN — FRONTEND ORTAQ STİLLƏR
   Bütün frontend səhifələrdə istifadə olunur (header/footer/drawer/düymələr).
   Səhifəyə özəl stillər assets/css/pages/{page}.css fayllarındadır.
   ============================================================ */

:root {
    --yellow: #FFD43B; /* Fresh, bright yellow */
    --yellow-hover: #F8C300;
    --black: #0F172A; /* Deep slate instead of pure black */
    --dark-gray: #1E293B;
    --light-bg: #F8FAFC; /* Very light cool grey */
    --white: #FFFFFF;
    --text-main: #334155;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --success: #10B981;
    --danger: #EF4444;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 20px 25px -5px rgba(0, 0, 0, 0.03), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 20px; /* Big rounded corners for Bento style */
}

html { scroll-behavior: smooth; }
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    background-color: var(--light-bg);
    line-height: 1.6;
    overflow-x: clip;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; color: var(--black); letter-spacing: -0.03em; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: 1536px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

main { flex: 1; padding: 40px 0 60px; }

/* --- BREADCRUMB (bütün daxili səhifələrdə) --- */
.breadcrumb { font-size: 13px; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a { color: var(--black); font-weight: 600; }
.breadcrumb i { font-size: 16px; }

/* --- BUTTONS --- */
.btn-primary { 
    background-color: var(--black); color: var(--white); 
    border: none; padding: 12px 24px; border-radius: 12px; 
    font-size: 15px; font-weight: 700; cursor: pointer; 
    transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: 8px; 
}
.btn-primary:hover { background-color: var(--yellow); color: var(--black); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(255,212,59,0.3); }

.btn-outline { 
    background-color: var(--white); color: var(--black); 
    border: 2px solid var(--border); padding: 10px 22px; border-radius: 12px; 
    font-size: 15px; font-weight: 700; cursor: pointer; 
    transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: 8px; 
}
.btn-outline:hover { border-color: var(--black); background: var(--black); color: var(--white); transform: translateY(-2px); }

/* --- FLOATING HEADER --- */
header {
    background-color: var(--white);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    position: sticky; top: 16px; z-index: 1000;
    transition: all 0.3s ease;
    margin: 16px auto;
    max-width: 1536px;
    width: calc(100% - 48px);
    border-radius: 20px;
    border: 1px solid var(--border-light);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 70px; padding: 0 16px; flex-wrap: wrap; gap: 15px; }

.logo { display: flex; align-items: center; gap: 12px; transition: transform 0.2s ease; }
.logo:hover { transform: scale(1.02); }
.logo-icon { width: 48px; height: 48px; background: var(--black); color: var(--yellow); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.master-class { font-size: 18px; font-weight: 900; letter-spacing: 0.5px; color: var(--black); font-family: 'Plus Jakarta Sans', sans-serif; }
.azerbaijan { font-size: 12px; font-weight: 800; color: var(--text-muted); letter-spacing: 3px; }

.desktop-nav ul { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.desktop-nav a { font-weight: 700; font-size: 15px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; transition: all 0.2s ease; }
.desktop-nav a:hover { color: var(--black); background: rgba(0,0,0,0.03); transform: translateY(-1px); }
.desktop-nav a.active { color: var(--black); background: var(--light-bg); }
.desktop-nav a i { font-size: 20px; color: var(--text-muted); transition: 0.2s; }
.desktop-nav a.active i, .desktop-nav a:hover i { color: var(--yellow-hover); }

.header-actions { display: flex; gap: 12px; align-items: center; }

.icon-btn-header { width: 44px; height: 44px; border-radius: 14px; background: transparent; border: 1px solid transparent; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--text-main); cursor: pointer; transition: 0.2s; position: relative; }
.icon-btn-header:hover { background: var(--light-bg); border-color: var(--border); color: var(--black); transform: translateY(-2px); }

.badge-pill { position: absolute; top: -2px; right: -2px; background: var(--danger); color: var(--white); font-size: 10px; font-weight: 800; border-radius: 10px; padding: 2px 6px; box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4); border: 2px solid var(--white); display: flex; align-items: center; justify-content: center; }

.user-profile-menu { display: flex; align-items: center; gap: 10px; padding: 4px 16px 4px 4px; border-radius: 20px; background: var(--white); border: 1px solid var(--border); cursor: pointer; transition: 0.2s; margin-left: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.user-profile-menu:hover { border-color: var(--black); box-shadow: 0 4px 15px rgba(0,0,0,0.05); transform: translateY(-2px); }
.user-profile-menu img { width: 36px; height: 36px; border-radius: 16px; object-fit: cover; }
.u-info { display: flex; flex-direction: column; }
.u-name { font-size: 13px; font-weight: 800; color: var(--black); line-height: 1.1; }
.u-score { font-size: 11px; font-weight: 700; color: var(--yellow-hover); display: flex; align-items: center; gap: 2px; }

.mobile-menu-btn { display: none; font-size: 28px; background: none; border: none; cursor: pointer; color: var(--black); padding: 4px; }

/* --- MOBİL DRAWER MENYU --- */
.mobile-drawer-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 10000; opacity: 0; visibility: hidden; transition: 0.3s; }
.mobile-drawer-overlay.active { opacity: 1; visibility: visible; }
.mobile-drawer { position: fixed; top: 0; right: -100%; width: 80%; max-width: 320px; height: 100vh; background: var(--white); z-index: 10001; padding: 30px 20px; box-shadow: -10px 0 40px rgba(0,0,0,0.1); transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; }
.mobile-drawer.active { right: 0; }
.mobile-drawer-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 24px; }
.icon-btn { background: none; border: none; font-size: 26px; cursor: pointer; color: var(--black); }
.mobile-drawer-nav ul { display: flex; flex-direction: column; gap: 22px; margin-bottom: 30px; }
.mobile-drawer-nav a { font-size: 16px; font-weight: 600; color: var(--black); display: flex; align-items: center; gap: 14px; }
.mobile-drawer-nav a i { font-size: 22px; color: var(--text-muted); }
.mobile-drawer-nav a.active, .mobile-drawer-nav a.active i { color: var(--yellow-hover); }
.mobile-drawer-footer { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.mobile-drawer-footer button { width: 100%; padding: 13px; }

/* --- AXTARIŞ TÖVSİYƏ DROPDOWN (index hero-search + search.php ortaq) --- */
.search-suggestions { position: absolute; top: calc(100% + 10px); left: 0; right: 0; background: var(--white); border: 1px solid var(--border-light); border-radius: 16px; box-shadow: 0 15px 40px rgba(0,0,0,0.1); z-index: 500; overflow: hidden; display: none; text-align: left; }
.search-suggestions.active { display: block; }
.search-suggestions a { display: flex; align-items: center; gap: 12px; padding: 14px 20px; font-size: 16px; font-weight: 600; color: var(--black); border-bottom: 1px solid var(--border-light); transition: 0.2s; }
.search-suggestions a::before { content: '\eb8b'; font-family: 'boxicons'; font-size: 20px; color: var(--text-muted); transition: 0.2s; }
.search-suggestions a:last-child { border-bottom: none; }
.search-suggestions a:hover { background: var(--light-bg); color: var(--yellow); padding-left: 24px; }
.search-suggestions a:hover::before { color: var(--yellow); }

/* --- XƏTA/MƏLUMAT BANNER --- */
.error-banner { background: rgba(255, 43, 43, 0.08); border: 1px solid rgba(255, 43, 43, 0.2); color: var(--danger); font-size: 13px; font-weight: 600; padding: 12px 14px; border-radius: 8px; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }

/* --- BOŞ VƏZİYYƏT (search/category/topic ortaq) --- */
.empty-state { text-align: center; padding: 60px 20px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); }
.empty-state i { font-size: 48px; color: var(--text-muted); margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--text-muted); }

/* --- SIDEBAR WIDGET (index/topic/profile ortaq) --- */
.sidebar-widget { background: var(--white); border: 1px solid var(--border-light); border-radius: 16px; padding: 24px; margin-bottom: 24px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); transition: transform 0.3s ease; }
.sidebar-widget:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
.widget-title { font-size: 15px; font-weight: 800; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.stats-list li { display: flex; justify-content: space-between; font-size: 13px; padding: 10px 0; border-bottom: 1px dashed var(--border-light); }
.stats-list li:last-child { border-bottom: none; padding-bottom: 0; }
.stats-list .s-label { color: var(--text-muted); font-weight: 500; }
.stats-list .s-value { font-weight: 700; color: var(--black); }

/* --- MODERN FOOTER --- */
.site-footer { 
    background: var(--light-bg); 
    color: var(--black); 
    margin-top: 60px; 
    border-radius: 40px 40px 0 0; 
    padding-top: 40px; 
    position: relative; 
    overflow: hidden; 
    border-top: 1px solid var(--border-light);
}
.site-footer::before {
    content: '';
    position: absolute;
    top: -50%; left: -20%;
    width: 80%; height: 200%;
    background: radial-gradient(circle, rgba(255,212,59,0.3) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.site-footer::after {
    content: '';
    position: absolute;
    bottom: -50%; right: -20%;
    width: 80%; height: 200%;
    background: radial-gradient(circle, rgba(255,212,59,0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.footer-bg-vectors { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; z-index: 1; }

.footer-cta { position: relative; z-index: 2; background: var(--yellow); padding: 40px 0; margin: 0 24px 40px; border-radius: 24px; box-shadow: 0 10px 30px rgba(255,212,59,0.2); }
.footer-cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.footer-cta-text h3 { font-size: 28px; font-weight: 900; color: var(--black); margin-bottom: 8px; letter-spacing: -0.5px; }
.footer-cta-text p { font-size: 16px; color: rgba(0,0,0,0.7); font-weight: 600; }
.footer-cta-btn { background: var(--black); color: var(--yellow); padding: 14px 28px; border-radius: 14px; font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; transition: 0.3s; }
.footer-cta-btn:hover { background: var(--white); color: var(--black); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

.footer-main-grid { display: grid; grid-template-columns: 2fr 3fr 1fr; gap: 40px; padding-bottom: 40px; position: relative; z-index: 2; }

.footer-logo-link { display: inline-block; text-decoration: none; margin-bottom: 20px; }
.footer-logo-badge { background: var(--white); padding: 12px 18px; border-radius: 14px; display: inline-block; border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }
.footer-logo-badge .master-class { color: var(--black); font-size: 18px; font-weight: 900; letter-spacing: 0.5px; display: block; font-family: 'Plus Jakarta Sans', sans-serif; }
.footer-logo-badge .azerbaijan { color: var(--yellow); font-size: 11px; font-weight: 800; letter-spacing: 2px; display: block; }
.footer-brand-block p { color: var(--text-muted); font-size: 15px; line-height: 1.7; max-width: 320px; margin-bottom: 24px; font-weight: 500; }
.social-links { display: flex; gap: 12px; }
.social-links a { width: 44px; height: 44px; background: var(--white); border: 1px solid var(--border-light); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--black); transition: 0.3s; box-shadow: var(--shadow-sm); }
.social-links a:hover { background: var(--yellow); color: var(--black); border-color: var(--yellow); transform: translateY(-4px); }

.footer-links-block { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.footer-links-group h4 { color: var(--black); font-size: 14px; font-weight: 800; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
.footer-links-group ul { display: flex; flex-direction: column; gap: 14px; }
.footer-links-group ul a { color: var(--text-main); font-size: 15px; font-weight: 600; transition: 0.3s; display: inline-block; }
.footer-links-group ul a:hover { color: var(--yellow-hover); transform: translateX(4px); }

.footer-contact-block h4 { color: var(--black); font-size: 14px; font-weight: 800; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
.footer-contact-item { display: flex; align-items: center; gap: 12px; color: var(--text-main); font-size: 15px; font-weight: 600; margin-bottom: 16px; transition: 0.3s; }
.footer-contact-item i { color: var(--yellow-hover); font-size: 20px; flex-shrink: 0; }
.footer-contact-item:hover { color: var(--black); }
.footer-top-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--white); color: var(--black); padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; margin-top: 10px; transition: 0.3s; border: 1px solid var(--border-light); font-family: 'Plus Jakarta Sans', sans-serif; box-shadow: var(--shadow-sm); }
.footer-top-btn:hover { background: var(--yellow); border-color: var(--yellow); color: var(--black); transform: translateY(-2px); }

.footer-bottom { border-top: 1px solid var(--border-light); position: relative; z-index: 2; }
.footer-bottom-inner { padding: 24px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--text-muted); font-size: 14px; font-weight: 600; }
.footer-bottom-inner strong { color: var(--black); }

/* --- KUKİ BANNERİ --- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: -200px; z-index: 20000; display: flex; justify-content: center; padding: 0 20px 20px; opacity: 0; transition: bottom 0.4s ease, opacity 0.4s ease; pointer-events: none; }
.cookie-banner.active { bottom: 0; opacity: 1; pointer-events: auto; }
.cookie-banner-inner { background: var(--black); color: var(--white); max-width: 920px; width: 100%; border-radius: 16px; padding: 20px 24px; display: flex; align-items: center; gap: 20px; box-shadow: 0 -10px 40px rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.08); }
.cookie-banner-icon { font-size: 30px; color: var(--yellow); flex-shrink: 0; }
.cookie-banner-inner p { font-size: 13.5px; color: #C9C9CD; line-height: 1.6; flex: 1; }
.cookie-banner-inner p a { color: var(--yellow); font-weight: 700; text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn { padding: 11px 20px; border-radius: 9px; font-size: 13.5px; font-weight: 700; font-family: 'Montserrat'; cursor: pointer; white-space: nowrap; transition: var(--transition); border: none; }
.cookie-btn-primary { background: var(--yellow); color: var(--black); }
.cookie-btn-primary:hover { background: var(--yellow-hover); }
.cookie-btn-ghost { background: rgba(255,255,255,0.08); color: var(--white); border: 1px solid rgba(255,255,255,0.15); }
.cookie-btn-ghost:hover { background: rgba(255,255,255,0.15); }

@media (max-width: 640px) {
    .cookie-banner { padding: 0 10px 10px; }
    .cookie-banner-inner { flex-direction: column; text-align: center; padding: 22px 18px; }
    .cookie-banner-actions { width: 100%; }
    .cookie-btn { flex: 1; }
}

/* --- RESPONSİV (ortaq) --- */
@media (max-width: 1100px) {
    .footer-main-grid { grid-template-columns: 1fr 1fr; row-gap: 36px; }
    .footer-contact-block { grid-column: span 2; }
}

@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .header-actions button:not(.mobile-menu-btn) { display: none; }
    .mobile-menu-btn { display: block; }

    .footer-cta-inner { flex-direction: column; text-align: center; }
    .footer-main-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
    .footer-brand-block p { margin-left: auto; margin-right: auto; }
    .social-links { justify-content: center; }
    .footer-links-block { grid-template-columns: 1fr 1fr; text-align: left; }
    .footer-contact-block { grid-column: auto; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }

    /* Make buttons and inputs slightly smaller and full-width on mobile where applicable */
    .btn-primary, .btn-outline {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .container {
        padding: 0 15px;
    }

    /* Fix Sidebar Responsiveness on Mobile */
    .sidebar { display: flex; flex-direction: column; gap: 24px; width: 100%; margin-top: 24px; }
    .sidebar-widget { margin-bottom: 0; width: 100%; }
}

/* --- MOBILE APP BOTTOM NAVIGATION BAR --- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 10000;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav ul {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.mobile-bottom-nav li {
    flex: 1;
    text-align: center;
}

.mobile-bottom-nav a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: color 0.3s;
}

.mobile-bottom-nav a i {
    font-size: 24px;
}

.mobile-bottom-nav a.active, .mobile-bottom-nav a:hover {
    color: var(--yellow-hover);
}

@media (max-width: 768px) {
    .mobile-bottom-nav { display: block; }
    body { padding-bottom: 70px; } /* Add padding to body so content isn't hidden behind the bar */
    .cookie-banner.active { bottom: 70px; } /* Adjust cookie banner */
    .site-footer { margin-bottom: 60px; }
}

/* Aesthetically pleasing file input fields */
input[type="file"] {
    padding: 6px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--light-bg);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    transition: 0.2s border-color;
}

input[type="file"]:hover {
    border-color: var(--yellow);
}

input[type="file"]::file-selector-button {
    background: var(--yellow);
    color: var(--black);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 12px;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    font-size: 13px;
}

input[type="file"]::file-selector-button:hover {
    background: var(--yellow-hover);
}

input[type="file"]::file-selector-button:active {
    transform: scale(0.98);
}

/* --- FLOATING VECTORS (Global for Hero & Footer) --- */
.floating-vector {
    position: absolute;
    color: var(--yellow);
    opacity: 0.8;
    z-index: 0;
    animation: floatVector 12s ease-in-out infinite alternate;
}

.fv-1 { top: 15%; left: 10%; font-size: 80px; animation-duration: 18s; animation-delay: 0s; transform: rotate(15deg); }
.fv-2 { top: 60%; left: 5%; font-size: 60px; animation-duration: 15s; animation-delay: -3s; transform: rotate(-20deg); }
.fv-3 { top: 20%; right: 12%; font-size: 100px; animation-duration: 22s; animation-delay: -7s; transform: rotate(45deg); opacity: 0.6; }
.fv-4 { bottom: 10%; right: 15%; font-size: 70px; animation-duration: 14s; animation-delay: -2s; transform: rotate(-10deg); }
.fv-5 { top: 50%; right: 5%; font-size: 50px; animation-duration: 10s; animation-delay: -5s; transform: rotate(90deg); color: var(--black); opacity: 0.1; }
.fv-6 { bottom: 20%; left: 20%; font-size: 40px; animation-duration: 16s; animation-delay: -4s; transform: rotate(30deg); color: var(--black); opacity: 0.1; }

@keyframes floatVector {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    50% { transform: translateY(-30px) rotate(15deg) scale(1.1); }
    100% { transform: translateY(20px) rotate(-10deg) scale(0.9); }
}


