/* Poslanikova sira - Main Styles */

:root {
    /* Mekteb.net paleta — duboki tirkiz + topla narandža na kremastoj pozadini */
    --primary: hsl(180, 60%, 35%);
    --primary-dark: hsl(180, 65%, 25%);
    --secondary: hsl(25, 85%, 60%);
    --accent: hsl(40, 95%, 55%);
    --bg-light: hsl(40, 33%, 98%);
    --bg-white: #ffffff;
    --text-dark: hsl(180, 40%, 15%);
    --text-light: hsl(180, 15%, 45%);
    --border-color: hsl(40, 20%, 88%);
    --shadow: 0 4px 6px rgba(35, 122, 122, 0.08);
    --shadow-lg: 0 10px 25px rgba(35, 122, 122, 0.15);
    --border-radius: 16px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
}

/* Custom header logo styling */
.header .logo-icon {
    /* Remove default gradient background when displaying logo image */
    background: none;
    box-shadow: none;
}

.header .logo-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: hsl(48, 70%, 94%);
    pointer-events: none;
    z-index: -1;
}

.background-pattern::before,
.background-pattern::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 220px;
    background-image: url('../images/bg-side.png');
    background-repeat: repeat-y;
    background-size: 220px auto;
    background-position: top center;
    opacity: 0.95;
}

.background-pattern::before {
    left: 0;
}

.background-pattern::after {
    right: 0;
    transform: scaleX(-1);
}

@media (max-width: 1100px) {
    .background-pattern::before,
    .background-pattern::after {
        width: 130px;
        background-size: 130px auto;
        opacity: 0.6;
    }
}

@media (max-width: 768px) {
    .background-pattern::before,
    .background-pattern::after {
        width: 70px;
        background-size: 70px auto;
        opacity: 0.45;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Header */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    padding: var(--spacing-lg) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    /* Add subtle separation from content */
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.arabic-text {
    font-size: 2rem;
    color: white;
    font-family: 'Amiri', serif;
}

/* Custom style for quiz name on results page. We avoid using .arabic-text
   here because .arabic-text sets text color to white, which is hard to
   read on light backgrounds. */
.quiz-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.logo-text h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.auth-nav {
    display: flex;
    gap: var(--spacing-sm);
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.user-icon {
    font-size: 1.25rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
}

.user-points {
    font-size: 0.875rem;
    color: var(--text-light);
    padding-left: var(--spacing-sm);
    border-left: 2px solid var(--border-color);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.nav-btn .icon {
    font-size: 1.1rem;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.logout-btn:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Main Content */
.main-content {
    padding: var(--spacing-xxl) 0;
}

.hero-section {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
}

.hero-title {
    font-family: 'Amiri', serif;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
    line-height: 1.8;
}

.stats-overview {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-lg);
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    min-width: 120px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Poppins', sans-serif;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: var(--spacing-xs);
}

/* Quizzes Section */
.quizzes-section {
    margin-top: var(--spacing-xxl);
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.quizzes-grid {
    display: grid;
    /* Always show two columns for quizzes. On smaller screens the cards will stack due to container width constraints */
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
}

.quiz-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.quiz-icon {
    font-size: 2.5rem;
}

.quiz-difficulty {
    display: flex;
    gap: 0.25rem;
}

.star {
    color: #ffc107;
    font-size: 1rem;
}

.quiz-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.quiz-description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.quiz-info {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.9rem;
    color: var(--text-light);
}

.info-item .icon {
    font-size: 1.1rem;
}

.start-quiz-btn {
    width: 100%;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, hsl(25, 90%, 58%), hsl(20, 85%, 50%));
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(240, 133, 66, 0.3);
    letter-spacing: 0.3px;
}

.start-quiz-btn:hover {
    background: linear-gradient(135deg, hsl(25, 95%, 55%), hsl(18, 90%, 45%));
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(240, 133, 66, 0.45);
}

/* Footer (mekteb.net minimalistički stil) */
.footer {
    background: hsl(40, 33%, 97%);
    background-image: radial-gradient(circle, hsl(40, 30%, 85%) 1px, transparent 1px);
    background-size: 22px 22px;
    color: var(--text-dark);
    padding: 0 0 var(--spacing-xl) 0;
    margin-top: var(--spacing-xxl);
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, hsl(180, 60%, 35%), hsl(40, 95%, 55%), hsl(25, 85%, 60%)) 1;
}

/* Diskretna meta traka na vrhu footera */
.footer-meta {
    background: hsl(40, 25%, 93%);
    padding: 10px 0;
    margin-bottom: var(--spacing-xl);
    border-bottom: 1px solid hsl(40, 20%, 88%);
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.5;
}

.footer-meta-item {
    display: inline;
}

.footer-meta-sep {
    margin: 0 0.5rem;
    color: var(--secondary);
    opacity: 0.6;
}

.footer-sources {
    font-style: italic;
    opacity: 0.85;
}

/* Footer minimalistički blok — pčela + brand + copyright + coffee link */
.footer-minimal {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
    max-width: 600px;
    margin: 0 auto;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: var(--spacing-md);
}

.footer-bee {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
}

.footer-brand-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.footer-brand-accent {
    color: var(--secondary);
    font-weight: 700;
}

.footer-copyright {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: var(--spacing-sm) 0 var(--spacing-lg);
    font-weight: 400;
}

.footer-coffee-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.footer-coffee-link:hover {
    background: hsl(25, 85%, 95%);
    color: hsl(20, 90%, 45%);
}

.footer-coffee-link .coffee-icon {
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .nav {
        width: 100%;
        justify-content: center;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .stats-overview {
        gap: var(--spacing-md);
    }

    .stat-item {
        min-width: 100px;
        padding: var(--spacing-md);
    }

    .stat-number {
        font-size: 2rem;
    }
}
/* =========================
   SVEČANO ZAGLAVLJE
========================= */

/* BIJELI HEADER (mekteb.net stil) */
.header {
    position: relative;
    background: #ffffff;
    color: var(--text-dark);
    padding: 20px 0 22px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, hsl(180, 60%, 35%), hsl(40, 95%, 55%), hsl(25, 85%, 60%)) 1;
    overflow: hidden;
}

.header::after { content: none; }

/* LOGO BLOK */
.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Override tamnog gradient kruga oko logo-icon — bijela pozadina sa suptilnim border-om */
.header .logo-icon {
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(35, 122, 122, 0.15) !important;
    border: 2px solid hsl(40, 60%, 90%);
    width: 56px !important;
    height: 56px !important;
}

.header .logo-icon img,
.logo-img {
    width: 48px !important;
    height: 48px !important;
    object-fit: contain;
    border-radius: 50%;
    filter: none;
    display: block;
}

/* NASLOV — tamna mekteb tirkiz boja na bijeloj pozadini */
.logo-text h1 {
    font-family: "Amiri", serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.3px;
    color: var(--primary) !important;
    text-shadow: none;
    line-height: 1.1;
}

/* Span boje — Mekteb tirkiz, separator narandžast, Sira tamniji tirkiz */
.logo-text h1 span:nth-child(1) {
    color: var(--primary) !important;
    font-weight: 800 !important;
}

.logo-text h1 span:nth-child(2) {
    color: var(--secondary) !important;
    font-weight: 400 !important;
}

/* PODNASLOV */
.logo-text .subtitle {
    font-family: "Inter", sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    margin-top: 2px;
    color: var(--text-light);
}

/* NAV DUGMAD — tirkiz outline na bijeloj pozadini */
.nav-btn {
    background: #ffffff;
    border: 1.5px solid hsl(180, 30%, 85%);
    color: var(--text-dark);
    backdrop-filter: none;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* USER INFO */
.user-info {
    color: var(--text-dark);
    background: hsl(40, 33%, 96%);
    border: 1px solid hsl(40, 30%, 88%);
}
/* Centered welcome text – elegant version */
.welcome-section {
  margin: 28px 0 36px;
}

.welcome-centered {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: 0 16px;
}

.welcome-lead {
  margin: 0;
  font-family: "Amiri", serif;
  font-size: 1.25rem;
  line-height: 1.75;
  color: rgba(30, 40, 45, 0.9);
}

/* Estetski razdjelnik */
.welcome-divider {
  margin: 22px auto 0;
  width: 140px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(212, 175, 55, 0.9),
    transparent
  );
}
/* Centered welcome text – elegant version */
.welcome-section {
  margin: 28px 0 36px;
}

.welcome-centered {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: 0 16px;
}

.welcome-lead {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 1.1rem;
  line-height: 1.75;
  color: rgba(30, 40, 45, 0.9);
}

/* Estetski razdjelnik */
.welcome-divider {
  margin: 22px auto 0;
  width: 440px;
  height: 3px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(212, 175, 55, 0.9),
    transparent
  );
}
