/* =========================================================
T5.SI – GLAVNI SLOG
Mobile first
========================================================= */

:root {
--green: #16a34a;
--green-light: #ecfdf5;
--green-border: #22c55e;

--bg: #f4f8f5;
--bg-gradient-start: #f8fafc;
--bg-gradient-end: #eef7f0;

--card: rgba(255, 255, 255, 0.94);
--text: #222;
--muted: #666;

--radius: 14px;
--shadow: 0 4px 14px rgba(34, 197, 94, 0.13);
}

* {
box-sizing: border-box;
}

html {
scroll-behavior: smooth;
}

body {
margin: 0;
font-family: 'Inter', Arial, sans-serif;
background: linear-gradient(
    135deg,
    var(--bg-gradient-start),
    var(--bg-gradient-end)
);
color: var(--text);
letter-spacing: -0.2px;
min-width: 320px;
}

/* =========================================================
CONTAINER
========================================================= */

.container {
width: min(1100px, calc(100% - 24px));
margin: 0 auto;
}

/* =========================================================
HEADER
========================================================= */

.site-header {
padding: 14px 0 8px;
}

.header-inner {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}

.site-title {
display: flex;
align-items: center;
gap: 10px;
}

.site-title-icon {
font-size: 30px;
}

.site-title h1 {
margin: 0;
font-size: clamp(20px, 4vw, 30px);
line-height: 1.15;
}

.site-title p {
margin: 3px 0 0;
color: var(--muted);
font-size: 13px;
}

/* =========================================================
THEME BUTTON
========================================================= */

.theme-toggle {
width: 42px;
height: 42px;
flex: 0 0 42px;

border: 1.5px solid var(--green-border);
border-radius: 50%;

background: var(--green-light);
color: var(--green);

cursor: pointer;
font-size: 17px;

transition: 0.2s;
}

.theme-toggle:hover {
background: var(--green);
color: white;
}

/* =========================================================
GLAVNI LAYOUT
========================================================= */

.layout {
display: grid;
grid-template-columns: 1fr;
gap: 15px;
margin-top: 10px;
}

.main-column,
.side-column {
display: flex;
flex-direction: column;
gap: 15px;
}

/* =========================================================
CARD
========================================================= */
.card {
background: var(--card);
border: 1.5px solid var(--green-border);
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 10px;
overflow: hidden;

transition:
transform 0.2s ease,
box-shadow 0.2s ease;
}

.card:hover {
transform: translateY(-2px);
box-shadow: 0 9px 24px rgba(0, 0, 0, 0.10);
}

.card-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-bottom: 8px;
}

.card-header h2 {
margin: 0;
font-size: clamp(16px, 2.5vw, 20px);
}

/* =========================================================
LIVE OZNAKA
========================================================= */

.live-badge {
display: inline-flex;
align-items: center;
gap: 5px;

padding: 4px 7px;

border-radius: 20px;
background: #f0fdf4;
color: #15803d;

font-size: 10px;
font-weight: 700;
white-space: nowrap;
}

.live-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: #ef4444;
}

/* =========================================================
KAMERE
========================================================= */

.camera-card {
padding: 10px;
}

.camera-link {
display: block;
text-decoration: none;
color: inherit;
}

.camera-frame {
position: relative;
width: 100%;
overflow: hidden;
border-radius: 10px;
background: #e5e7eb;
aspect-ratio: 16 / 9;
}

.camera-frame img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}

.camera-status {
position: absolute;
inset: 0;

display: flex;
align-items: center;
justify-content: center;

background: rgba(255, 255, 255, 0.72);

color: var(--muted);
font-size: 13px;

pointer-events: none;
}

.camera-status.hidden {
display: none;
}

.camera-footer {
display: flex;
justify-content: space-between;
gap: 10px;

margin-top: 7px;

color: var(--muted);
font-size: 11px;
}

/* =========================================================
VREME
========================================================= */

.weather-content {
font-size: 14px;
line-height: 1.65;
}

.source {
margin-top: 7px;
color: var(--muted);
font-size: 10px;
}

.source a {
color: var(--muted);
text-decoration: none;
}

.source a:hover {
text-decoration: underline;
}

/* =========================================================
WIND COMPASS
========================================================= */

.wind-compass {
width: 60px;
height: 60px;

flex: 0 0 60px;

border: 2px solid var(--green-border);
border-radius: 50%;

position: relative;
}

.wind-arrow {
width: 2px;
height: 24px;

background: var(--green);

position: absolute;
top: 8px;
left: 50%;

transform-origin: bottom center;
}

.wind-labels span {
position: absolute;

font-size: 10px;
font-weight: 600;
}

.wind-labels .n {
top: 2px;
left: 50%;
transform: translateX(-50%);
}

.wind-labels .s {
bottom: 2px;
left: 50%;
transform: translateX(-50%);
}

.wind-labels .e {
right: 4px;
top: 50%;
transform: translateY(-50%);
}

.wind-labels .w {
left: 4px;
top: 50%;
transform: translateY(-50%);
}

/* =========================================================
WINDY
========================================================= */

.windy-buttons {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 5px;
margin-bottom: 7px;
}

.windy-buttons button {
min-height: 34px;

border: 1px solid var(--green-border);
border-radius: 7px;

background: var(--green-light);
color: var(--green);

cursor: pointer;
font-family: inherit;
font-size: 12px;
}

.windy-buttons button:hover {
background: var(--green);
color: white;
}

.windy-frame {
width: 100%;
height: 300px;
overflow: hidden;
border-radius: 10px;
}

.windy-frame iframe {
width: 100%;
height: 100%;
border: 0;
}

/* =========================================================
HITRE POVEZAVE
========================================================= */

.quick-links {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 9px;

margin: 18px 0;
}

.quick-links a {
min-height: 64px;

display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 5px;

border: 1.5px solid var(--green-border);
border-radius: 12px;

background: var(--card);
color: var(--green);

text-decoration: none;

font-size: 11px;

box-shadow: var(--shadow);

transition: 0.2s;
}

.quick-links a i {
font-size: 20px;
}

.quick-links a:hover {
background: var(--green);
color: white;
transform: translateY(-2px);
}

/* =========================================================
SKRITI RADIO
========================================================= */

#secret-radio {
position: fixed;

right: 15px;
bottom: 15px;

width: 32px;
height: 32px;

border: 0;
border-radius: 50%;

background: var(--green);
color: white;

display: flex;
align-items: center;
justify-content: center;

cursor: pointer;

z-index: 1000;
}

/* =========================================================
FOOTER
========================================================= */

#footer {
text-align: center;

margin-top: 20px;
padding: 10px 0 25px;

color: var(--muted);
font-size: 11px;
}

#footer p {
margin: 5px 0;
}

.counter {
min-height: 20px;
}

/* =========================================================
TABLICA
========================================================= */

@media (min-width: 600px) {

.quick-links {
grid-template-columns: repeat(5, 1fr);
}

}

/* =========================================================
NAMIZNI RAČUNALNIK
========================================================= */

@media (min-width: 769px) {

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

.quick-links {
margin-top: 20px;
}

}

/* =========================================================
MAJHNI TELEFONI
========================================================= */

@media (max-width: 420px) {

.container {
width: min(100% - 14px, 1100px);
}

.site-title h1 {
font-size: 19px;
}

.site-title-icon {
font-size: 25px;
}

.theme-toggle {
width: 38px;
height: 38px;
flex-basis: 38px;
}

.card {
padding: 8px;
border-radius: 12px;
}

.camera-footer {
flex-direction: column;
gap: 2px;
}

.windy-frame {
height: 250px;
}

}

/* =========================================================
TEMNI NAČIN
========================================================= */

body.dark {
--bg: #111827;
--bg-gradient-start: #111827;
--bg-gradient-end: #0f172a;

--card: rgba(31, 41, 55, 0.95);
--text: #f3f4f6;
--muted: #a1a1aa;
--green-light: #12351f;

background: linear-gradient(
    135deg,
    var(--bg-gradient-start),
    var(--bg-gradient-end)
);
}

body.dark .live-badge {
background: #12351f;
color: #86efac;
}

body.dark .camera-status {
background: rgba(17, 24, 39, 0.80);
}

body.dark .theme-toggle {
background: #12351f;
}

/* =========================================================
VREMENSKI PODATKI
========================================================= */

.arso-current {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
}

.arso-data-grid,
.weather-data-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 7px;
}

.weather-item {
display: flex;
align-items: center;
gap: 8px;

padding: 8px;

border-radius: 9px;
background: var(--green-light);
}

.weather-item > span {
font-size: 20px;
}

.weather-item small {
display: block;
color: var(--muted);
font-size: 10px;
}

.weather-item strong {
display: block;
font-size: 14px;
}

.weather-main {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 10px;
}

.weather-icon {
font-size: 38px;
line-height: 1;
}

.weather-title {
color: var(--muted);
font-size: 12px;
}

.weather-temperature {
font-size: 24px;
font-weight: 700;
}

.wind-row {
display: flex;
align-items: center;
gap: 12px;
margin-top: 10px;
}

.wind-info {
font-size: 13px;
line-height: 1.8;
}

.weather-update {
margin-top: 10px;
color: var(--muted);
font-size: 10px;
line-height: 1.5;
}

/* TELEFON */

@media (max-width: 420px) {

.arso-data-grid,
.weather-data-grid {
grid-template-columns: 1fr 1fr;
}

.weather-temperature {
font-size: 22px;
}

}

/* =========================================================
DISABLED CAMERA
========================================================= */

.disabled-camera {
opacity: 0.45;
cursor: default;
}

.disabled-camera:hover {
background: transparent !important;
color: inherit !important;
}

/* =================================================
MODAL T5 KAMERA
Privzeto skrit
================================================= */

#camModal {
display: none;
position: fixed;
inset: 0;
z-index: 9999;
background: rgba(0, 0, 0, 0.90);
align-items: center;
justify-content: center;
padding: 20px;
}

#camModal img {
display: block;
max-width: 95vw;
max-height: 90vh;
width: auto;
height: auto;
}

#camClose {
position: absolute;
top: 20px;
right: 30px;
color: white;
font-size: 40px;
line-height: 1;
cursor: pointer;
z-index: 10000;
}

/* =================================================
   SPIN 112 – IKONA
   ================================================= */

.card-header h2 .fa-truck-medical {
    color: #dc2626 !important;
}

/* =================================================
   SPIN 112 – DODATKI
   ================================================= */

.spin-no-events .fa-circle-check {
    color: var(--green);
    margin-right: 5px;
}

.spin-updated {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 10px;
}
/* =================================================
   SPIN 112 – ZELENA KLJUKICA
   ================================================= */

.spin-no-events i.fa-circle-check {
    color: #16a34a !important;
}
/* =================================================
   IZREDNI DOGODKI – PERUN
   ================================================= */

.perun-icon {
    color: #16a34a;
}

.event-action {
    margin-top: 12px;
}

.event-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 9px 14px;

    border: 1.5px solid var(--green-border);
    border-radius: 9px;

    background: var(--green-light);
    color: var(--green);

    text-decoration: none;

    font-size: 12px;
    font-weight: 600;

    transition: 0.2s;
}

.event-button:hover {
    background: var(--green);
    color: white;
    transform: translateY(-1px);
}
