/* ==============================
   GLOBALNA OSNOVA
============================== */
html {
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* ==============================
   BARVNE SPREMENLJIVKE
============================== */
:root {
    --bg: #edf3f2;
    --bg2: #e0e7e6;
    --text: #000000;

    --header-grad1: #8fa9a9;
    --header-grad2: #c0d0d0;

    --nav-bg: #bcc6c6;
    --nav-item-bg: #dce3e3;
    --nav-item-hover: #9fb3b3;

    --tile-bg: #bcc6c6;
    --tile-hover: #c9d3d3;

    --footer-bg: #708c8b;

    --link: #004f7a;
    --link-hover: #002f4a;
}

/* TEMNA TEMA */
body.dark-mode {
    --bg: #1f2627;
    --bg2: #141a1b;
    --text: #f2f5f5;

    --header-grad1: #283738;
    --header-grad2: #364849;

    --nav-bg: #222c2d;
    --nav-item-bg: #364445;
    --nav-item-hover: #4a6163;

    --tile-bg: #2c3839;
    --tile-hover: #3a4a4b;

    --footer-bg: #1f2c2c;

    --link: #8fd3ff;
    --link-hover: #ffffff;
}

/* ==============================
   OSNOVNO TELO
============================== */
body {
    font-family: "Verdana", sans-serif;
    margin: 0;
    background: linear-gradient(to bottom, var(--bg) 0%, var(--bg2) 100%);
    color: var(--text);
    line-height: 1.6;
    max-width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--link);
    text-decoration: underline;
}

a:hover {
    color: var(--link-hover);
}

#na-vrh {
    display: none;
}

/* ==============================
   GLAVA
============================== */
.header-left {
    background: linear-gradient(180deg, var(--header-grad1) 0%, var(--header-grad2) 100%);
    color: #ffffff;
    padding: 15px 40px;
    border-bottom: 3px solid #607676;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    text-align: left;
}

.logo-left {
    max-width: 430px;
    width: 100%;
    height: auto;
}

.header-text h1 {
    font-size: 26px;
    margin: 0 0 6px 0;
}

.header-text p {
    font-size: 22px;
    margin: 0;
    color: #ffffff;
}

/* ==============================
   NAVIGACIJA + GUMB ZA TEMO
============================== */
nav {
    background-color: var(--nav-bg);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px 0;
    gap: 10px;
    border-bottom: 2px solid #a2b4b4;
}

nav a,
.tema-gumb {
    background-color: var(--nav-item-bg);
    color: var(--text);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

nav a:hover,
nav a.active,
.tema-gumb:hover {
    background-color: var(--nav-item-hover);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.tema-gumb {
    margin-left: 10px;
}

/* ==============================
   OGLASI (index)
============================== */
.oglasi {
    width: 90%;
    margin: 40px auto;
    border-radius: 10px;
    background-color: var(--bg);
    border: 2px dashed #cbd1d1;
    padding: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.oglas-levo {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.oglas-levo img {
    max-height: 120px;
    width: auto;
    border-radius: 6px;
}

.oglas-desno {
    flex: 1;
    height: 120px;
    border: 2px dashed #b0b0b0;
    border-radius: 6px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: 700;
}

/* ==============================
   PLOŠČICE (index)
============================== */
.ploscice {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 60px;
    width: 90%;
    margin: 60px auto;
}

.ploscica {
    background-color: var(--tile-bg);
    border-radius: 14px;
    border: 1px solid #aebaba;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.12);
    overflow: hidden;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.ploscica:hover {
    background-color: var(--tile-hover);
    box-shadow: 3px 3px 8px rgba(0,0,0,0.18);
    border-color: #97aaaa;
}

.ploscica a {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.ploscica img {
    width: 45%;
    height: 220px;
    object-fit: cover;
    border-right: 3px solid #aab7b7;
    border-radius: 10px 0 0 10px;
}

.ploscica .opis {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.ploscica .opis h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* ==============================
   PODSTRANI – GLAVNA VSEBINA
============================== */
main.vsebina-strani {
    width: 90%;
    margin: 40px auto;
    background-color: var(--bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

main.vsebina-strani h2 {
    color: #2d4040;
    border-bottom: 2px solid #aab7b7;
    padding-bottom: 4px;
    margin-top: 35px;
}

main.vsebina-strani p,
main.vsebina-strani li {
    font-size: 16px;
}

ul {
    margin-left: 25px;
}

/* gumb Nazaj na domov */
.nazaj {
    display: inline-block;
    margin-top: 40px;
    background-color: #bcc6c6;
    color: #000000;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.2s;
}

.nazaj:hover {
    background-color: #9fb3b3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ==============================
   YOUTUBE PROSTOR (index)
============================== */
.youtube-prostor {
    width: 90%;
    margin: 40px auto 40px auto;
    padding: 25px;
    background-color: var(--bg);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.youtube-prostor h2 {
    color: #2d4040;
    margin-bottom: 20px;
    font-size: 1.6em;
    border-bottom: 2px solid #aab7b7;
    display: inline-block;
    padding-bottom: 4px;
}

.youtube-vsebina {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.youtube-box {
    background-color: #ffffff;
    border: 1px solid #ccd7d7;
    border-radius: 8px;
    width: 220px;
    height: 125px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    text-decoration: none;
}

.youtube-box:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.youtube-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==============================
   Kombinirana YouTube kanal ploščica (levo logo, desno you.webp)
============================== */
.yt-kanal-kombiniran {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    gap: 12px;
}

.yt-kanal-kombiniran .yt-levo,
.yt-kanal-kombiniran .yt-desno {
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-kanal-kombiniran .yt-levo img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.yt-kanal-kombiniran .yt-desno img {
    width: 75px;
    height: auto;
    object-fit: contain;
}

/* ==============================
   ANKETA – BLOK IN GUMB
============================== */
.anketa-blok {
    width: 90%;
    margin: 40px auto;
    padding: 25px;
    background-color: var(--bg);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.anketa-blok h2 {
    font-size: 1.6em;
    margin-bottom: 10px;
    border-bottom: 2px solid #aab7b7;
    display: inline-block;
    padding-bottom: 4px;
    color: #2d4040;
}

.anketa-blok p {
    margin-bottom: 20px;
}

.anketa-gumb {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 6px;
    background-color: var(--nav-item-bg);
    color: var(--text);
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.anketa-gumb:hover {
    background-color: var(--nav-item-hover);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

body.dark-mode .anketa-blok h2 {
    color: #ffffff;
}

body.dark-mode .anketa-gumb {
    color: #f5f5f5;
}

/* ==============================
   GUMB NA VRH
============================== */
#backToTop {
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding: 8px 14px;
    border-radius: 6px;
    border: none;
    background-color: #708c8b;
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;
    display: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 999;
}

#backToTop.show {
    display: block;
}

/* ==============================
   NOGA
============================== */
footer {
    background-color: var(--footer-bg);
    color: #ffffff;
    text-align: center;
    padding: 20px;
    margin-top: 60px;
    border-top: 3px solid #607676;
}

footer p {
    margin: 5px 0;
    font-size: 13px;
}

footer .social {
    margin-top: 8px;
}

footer a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 5px;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

/* ==============================
   TEMNA TEMA – DROBNI POPRAVKI
============================== */
body.dark-mode main.vsebina-strani h2,
body.dark-mode .youtube-prostor h2 {
    color: #ffffff;
}

/* ==============================
   MOBILNI PRIKAZ – ploščice, vsebina, youtube
============================== */
@media (max-width: 900px) {
    .ploscice {
        grid-template-columns: 1fr;
        width: 95%;
        gap: 40px;
    }

    .ploscica a {
        flex-direction: column;
    }

    .ploscica img {
        width: 100%;
        height: 240px;
        border-right: none;
        border-bottom: 3px solid #aab7b7;
        border-radius: 10px 10px 0 0;
    }

    .ploscica .opis {
        text-align: center;
        padding: 20px;
    }

    .ploscica .opis h3 {
        font-size: 20px;
    }

    main.vsebina-strani {
        width: 95%;
        padding: 20px;
    }

    .youtube-box {
        width: 100%;
        max-width: 320px;
        height: 140px;
    }

    .youtube-prostor h2 {
        font-size: 1.4em;
    }

    /* oglasi na mobilnem – v stolpec */
    .oglasi {
        flex-direction: column;
        align-items: stretch;
    }

    .oglas-desno {
        width: 100%;
    }

    .oglas-levo {
        justify-content: center;
    }
}

/* ==============================
   MOBILNI PRIKAZ – header in nav
============================== */
@media (max-width: 768px) {
    .header-left {
        padding: 12px 16px;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .header-text h1 {
        font-size: 22px;
    }

    .header-text p {
        font-size: 18px;
    }

    nav {
        padding: 8px 8px;
        gap: 8px;
    }
}

@media (max-width: 380px) {
    nav {
        flex-direction: column;
        align-items: stretch;
    }

    nav a,
    .tema-gumb {
        width: 100%;
        text-align: center;
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .youtube-box {
        max-width: 260px;
        height: 120px;
    }

    .logo-left {
        max-width: 190px;
    }

    .header-text h1 {
        font-size: 20px;
    }

    .header-text p {
        font-size: 16px;
    }

    #backToTop {
        bottom: 14px;
        right: 10px;
        padding: 7px 11px;
        font-size: 0.9rem;
    }
}