/* ===================================================
   gradivo.css  –  Stilovi za gradivo.html
   Povijest 6. razred
   =================================================== */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #0d1b2a;
    color: #c8d8e8;
    min-height: 100vh;
    padding-bottom: 60px;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px;
}

a { color: #64b4ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- HEADER ---------- */
header {
    text-align: center;
    padding: 36px 20px 28px;
    background: linear-gradient(135deg, #0f2744 0%, #1a3a5c 100%);
    border-radius: 20px;
    margin-bottom: 24px;
    border: 1px solid #2a5080;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

header .badge {
    display: inline-block;
    background: rgba(240,192,64,0.15);
    border: 1px solid #f0c040;
    color: #f0c040;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
    text-transform: uppercase;
}

header h1 {
    color: #f0c040;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

header p {
    color: #8ab4d4;
    font-size: 0.95rem;
}

/* ---------- INSTRUCTIONS BAR ---------- */
.instructions {
    background: rgba(100,180,255,0.08);
    border: 1px solid rgba(100,180,255,0.25);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 28px;
    font-size: 0.9rem;
    color: #b8d8f0;
    line-height: 1.6;
}

.instructions strong { color: #64b4ff; }

/* ---------- COLLAPSIBLE SECTION ---------- */
.gradivo-section {
    background: linear-gradient(135deg, #1e2a3a 0%, #162032 100%);
    border: 1px solid #2a3f5f;
    border-radius: 16px;
    margin-bottom: 28px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.gradivo-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #1a3a5c 0%, #0f2744 100%);
    border-bottom: 2px solid #2a5080;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s;
}

.gradivo-section-header:hover {
    background: linear-gradient(135deg, #1e4a72 0%, #132f54 100%);
}

.gradivo-section-header .section-icon {
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
}

.gradivo-section-header h2 {
    color: #f0c040;
    font-size: 1.15rem;
    margin: 0;
    flex: 1;
}

.toggle-arrow {
    color: #8ab4d4;
    font-size: 1.2rem;
    transition: transform 0.35s ease;
    min-width: 20px;
    text-align: center;
}

.gradivo-section-header.open .toggle-arrow {
    transform: rotate(180deg);
}

.gradivo-section-body {
    padding: 24px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.gradivo-section-body.open {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- SUBHEADINGS ---------- */
.gradivo-podnaslov {
    color: #8ab4d4;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 22px 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.gradivo-podnaslov:first-child { margin-top: 0; }

/* ---------- POJAM KARTICA (pojmovnik) ---------- */
.pojam-kartica {
    background: rgba(255,255,255,0.04);
    border-left: 4px solid #f0c040;
    border-radius: 0 10px 10px 0;
    padding: 14px 18px;
    margin-bottom: 12px;
    transition: background 0.2s;
}

.pojam-kartica:hover {
    background: rgba(255,255,255,0.08);
}

.pojam-naziv {
    color: #f0c040;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 5px;
}

.pojam-opis {
    color: #c8d8e8;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ---------- CINJENICA GRID ---------- */
.cinjenica-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}

.cinjenica-kartica {
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 16px;
    border-top: 3px solid #69f0ae;
    transition: transform 0.2s, background 0.2s;
}

.cinjenica-kartica:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.08);
}

.cinjenica-kartica .cf-broj {
    font-size: 1.6rem;
    font-weight: 900;
    color: #69f0ae;
    line-height: 1.1;
    margin-bottom: 6px;
}

.cinjenica-kartica .cf-opis {
    color: #c8d8e8;
    font-size: 0.86rem;
    line-height: 1.5;
}

/* ---------- TABLICA ---------- */
.gradivo-tablica {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 6px;
    margin-bottom: 6px;
}

.gradivo-tablica th {
    background: #1a3a5c;
    color: #f0c040;
    padding: 11px 14px;
    text-align: left;
    border-bottom: 2px solid #2a5080;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gradivo-tablica td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    color: #c8d8e8;
    vertical-align: top;
    line-height: 1.5;
}

.gradivo-tablica tr:hover td {
    background: rgba(255,255,255,0.05);
}

.gradivo-tablica tr:last-child td {
    border-bottom: none;
}

/* ---------- TAGOVI ---------- */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 2px 2px 2px 0;
}

.tag-zeleni { background: rgba(105,240,174,0.15); color: #69f0ae; border: 1px solid #69f0ae; }
.tag-zuti   { background: rgba(240,192,64,0.15);  color: #f0c040; border: 1px solid #f0c040; }
.tag-plavi  { background: rgba(100,180,255,0.15); color: #64b4ff; border: 1px solid #64b4ff; }
.tag-crveni { background: rgba(255,100,100,0.15); color: #ff8080; border: 1px solid #ff8080; }

/* ---------- TIMELINE ---------- */
.timeline {
    position: relative;
    padding-left: 30px;
    margin-top: 10px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: linear-gradient(to bottom, #f0c040, #64b4ff, #69f0ae);
    border-radius: 3px;
}

.tl-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 20px;
}

.tl-item:last-child { margin-bottom: 0; }

.tl-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f0c040;
    border: 2px solid #1e2a3a;
    box-shadow: 0 0 0 3px rgba(240,192,64,0.3);
}

.tl-godina {
    color: #f0c040;
    font-weight: 700;
    font-size: 0.95rem;
}

.tl-tekst {
    color: #c8d8e8;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-top: 2px;
}

/* ---------- CITAT BOX ---------- */
.citat-box {
    background: rgba(240,192,64,0.07);
    border: 1px solid rgba(240,192,64,0.3);
    border-radius: 12px;
    padding: 20px 22px 16px 36px;
    margin: 16px 0;
    position: relative;
}

.citat-box::before {
    content: '\275D';
    font-size: 2.5rem;
    color: rgba(240,192,64,0.25);
    position: absolute;
    top: 8px;
    left: 12px;
    line-height: 1;
}

.citat-tekst {
    color: #e8d090;
    font-style: italic;
    font-size: 0.97rem;
    line-height: 1.7;
}

.citat-izvor {
    color: #8ab4d4;
    font-size: 0.8rem;
    margin-top: 8px;
}

.citat-izvor strong { color: #f0c040; }

/* ---------- INFO BOX ---------- */
.info-box {
    background: rgba(100,180,255,0.08);
    border-left: 4px solid #64b4ff;
    border-radius: 0 10px 10px 0;
    padding: 14px 18px;
    margin: 14px 0;
    color: #b8d8f0;
    font-size: 0.9rem;
    line-height: 1.7;
}

.info-box strong { color: #64b4ff; }

/* ---------- USPOREDBA GRID ---------- */
.usporedba-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 10px;
}

.usporedba-kolona {
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 16px;
}

.usporedba-kolona h4 {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    padding-bottom: 8px;
    border-bottom: 2px solid;
}

.usporedba-kolona.lijeva h4 { color: #69f0ae; border-color: #69f0ae; }
.usporedba-kolona.desna  h4 { color: #64b4ff; border-color: #64b4ff; }

.usporedba-kolona ul {
    margin: 0;
    padding-left: 18px;
    color: #c8d8e8;
    font-size: 0.88rem;
    line-height: 1.85;
}

/* ---------- NAVLINKS ---------- */
.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.nav-links a {
    padding: 9px 18px;
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    color: #8ab4d4;
    border: 1px solid rgba(255,255,255,0.1);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.nav-links a:hover {
    background: rgba(100,180,255,0.15);
    color: #ffffff;
    border-color: #64b4ff;
    text-decoration: none;
}

.nav-links a.active {
    background: rgba(240,192,64,0.15);
    color: #f0c040;
    border-color: #f0c040;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
    header h1       { font-size: 1.5rem; }
    .usporedba-grid { grid-template-columns: 1fr; }
    .cinjenica-grid { grid-template-columns: 1fr 1fr; }
    .gradivo-section-header h2 { font-size: 1rem; }
    .gradivo-tablica { font-size: 0.82rem; }
    .gradivo-tablica th,
    .gradivo-tablica td { padding: 8px 10px; }
}

@media (max-width: 400px) {
    .cinjenica-grid { grid-template-columns: 1fr; }
}
