/* ==========================================================================
   1) ROOT & RESET
   ========================================================================== */

:root{
  --c-bg: #6b6b6b;
  --c-surface: #ffffff;
  --c-text: #111827;
  --c-muted: #6b7280;
  --c-line: #e5e7eb;

  --brand: #10b981;        /* emerald-500 */
  --brand-600: #059669;    /* emerald-600 */
  --brand-acc: #0ea5e9;    /* sky-500 */
  --accent: #1450a3;

  --radius: 12px;
  --shadow-1: 0 2px 10px rgba(0,0,0,.08);
  --shadow-2: 0 8px 38px rgba(0,0,0,.30);
}

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

html, body { height: 100%; }

body{
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.5;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; padding: 0; margin: 0; }
button{ font: inherit; }

/* Fokus – dostopnost */
:focus-visible{
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

/* Prednostno manj animacij za uporabnike */
@media (prefers-reduced-motion: reduce){
  * { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   2) LAYOUT: HEADER, NAV, MAIN, FOOTER
   ========================================================================== */

header, footer{ padding: 0; }
main{
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  background: rgba(255,255,255,.60);
  border-radius: 10px;
}

/* Hero “header” (če ga uporabljaš na straneh – ne popup) */
.hero-header{
  position: relative;
  overflow: hidden;
  min-height: 100px;
  box-shadow: var(--shadow-2);
}
.hero-bg{
  position: absolute; inset: 0;
  background:
    linear-gradient(110deg, #061a08c0 0%, #0d1a0c99 20%, #1a232ca4 100%),
    url('../slike/hero-car.jpg') center/cover no-repeat;
  animation: heroBgZoom 16s ease-in-out infinite alternate;
}
@keyframes heroBgZoom { from{background-size:100%} to{background-size:110%} }

.hero-content{ position: relative; z-index: 1; padding: 24px 3vw 56px; }
.hero-topbar{
  display:flex; justify-content:space-between; align-items:center; gap: 10px 24px; flex-wrap: wrap;
}
.logo-wrap{ display:flex; align-items:center; gap:14px; }
.hero-logo{ height: 55px; width:auto; filter: drop-shadow(0 3px 18px #12ff2e96); }
.hero-title{ font-size: 2.3em; font-weight: 800; color: #12ff2e; letter-spacing: 2px; text-shadow: 0 2px 10px #000b; }

.hero-topbar nav ul{ display:flex; gap:22px; flex-wrap:wrap; }
.hero-topbar nav a{
  color:#fff; font-weight:600; position:relative; padding:3px 2px; transition: color .17s;
}
.hero-topbar nav a::after{
  content:""; display:block; height:3px; width:0; background: linear-gradient(90deg,#12ff2e 60%,#fff 100%);
  transition: width .26s; border-radius:4px;
}
.hero-topbar nav a:hover::after,
.hero-topbar nav a:focus::after{ width:100%; }

.hero-main{
  margin: 28px auto 0; max-width: 560px; text-align:center;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  animation: heroFadeIn 1.2s cubic-bezier(.77,0,.18,1);
}
@keyframes heroFadeIn{ from{opacity:0; transform:translateY(40px)} to{opacity:1; transform:none} }

.hero-heading{ font-size: 2.3em; color:#fff; font-weight:800; margin:.12em 0; text-shadow: 0 4px 32px #12ff2e66, 0 1px 7px #000; }
.hero-subtitle{ font-size: 1em; color:#b9ffc3; text-shadow: 0 1px 8px #0f5; margin:0 0 10px; }

/* ==========================================================================
   3) KOMPONENTE: GUMBI, TABELA, OBRAZCI, KOMENTARJI
   ========================================================================== */

/* Gumbi – enoten sistem */
.btn{
  display:inline-block; border-radius: 12px; border:1px solid transparent;
  padding: 10px 16px; font-weight:700; cursor:pointer; text-align:center;
  transition: transform .12s, box-shadow .2s, background .2s, color .2s, border-color .2s;
  box-shadow: 0 3px 17px rgba(16,185,129,.35);
  background: #fff; color: #111;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }

.btn--primary{ background: var(--brand); color:#062a22; }
.btn--primary:hover{ background: var(--brand-600); color:#e6fffa; }
.btn--secondary{ background: transparent; color:#e5e7eb; border-color: rgba(255,255,255,.25); }
.btn--secondary:hover{ border-color: var(--brand); box-shadow: 0 0 0 4px rgba(16,185,129,.25); }
.btn--card{ background: var(--brand-acc); color:#00111a; }
.btn--card:hover{ background:#0284c7; }

/* Tabela vozil */
.cars-table-wrap{
  width: 90%; max-width: 1020px; margin: 15px auto; background: #fff;
  border-radius: 14px; box-shadow: var(--shadow-1); padding: 18px 16px 12px;
}
.cars-table{ width:100%; border-collapse: collapse; border-radius: 12px; overflow: hidden; }
.cars-table th, .cars-table td{ border-bottom:1px solid var(--c-line); padding: 10px 9px; text-align:left; }
.cars-table th{ background:#f3f6fa; font-weight:700; }
.cars-table tr:last-child td{ border-bottom:0; }
.cars-table img{ box-shadow: 0 1px 8px rgba(0,0,0,.12); background:#fff; }

/* Obrazci */
form input, form textarea{
  width:100%; padding:10px 12px; border-radius: 8px; border:1px solid #ccc; margin: 10px 0 14px;
}
form input:focus, form textarea:focus{ border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16,185,129,.25); }
form button{ border:0; }

/* Komentarji */
.comments-section{
  max-width: 700px; margin: 24px auto; padding: 20px; background: #e2eafc; border-radius: 10px;
}
.comment{
  background:#fff; padding: 12px; border-radius: 10px; margin-bottom: 12px;
  border-left: 4px solid #12ff2e;
}
.comment strong{ color: var(--accent); }

/* Filtri (če se uporabljajo) */
.filters{ display:flex; gap:12px; flex-wrap:wrap; margin-bottom: 18px; }
.filters select, .filters input{ padding:8px; border-radius:8px; border:1px solid #ccc; }
#resetFiltri{ padding:8px 16px; background: var(--accent); color:#fff; border:0; border-radius:8px; cursor:pointer; }

/* ==========================================================================
   4) FULLSCREEN POPUP (AC Hero Modal)
   ========================================================================== */

.ac-hero-modal{
  position: fixed; inset: 0; display: none; z-index: 100000;
  align-items: center; justify-content: center;
}
.ac-hero-modal[aria-hidden="false"]{ display:flex; }
.ac-hero-modal__bg{
  position:absolute; inset:0;
  background: url('../slike/hero.jpg') center/cover no-repeat;
  filter: brightness(.6);
}
.ac-hero-modal__shade{
  position:absolute; inset:0;
  background: radial-gradient(60% 70% at 50% 40%, rgba(0,0,0,.2), rgba(0,0,0,.65) 60%, rgba(0,0,0,.8) 100%);
  backdrop-filter: blur(2px);
}
.ac-hero-modal__content{
  position:relative; text-align:center; padding: clamp(16px, 3vw, 32px);
  color:#e5e7eb; max-width:1100px; margin:0 16px; animation: modalPop .23s;
}
@keyframes modalPop{ from{transform:scale(.88); opacity:0} to{transform:none; opacity:1} }

.ac-hero-modal__logo{ display:inline-flex; align-items:center; gap:12px; margin-bottom:8px; opacity:.95; }
.ac-hero-modal__logo img{ height: clamp(40px, 8vw, 64px); width:auto; }

.ac-hero-modal__title{
  margin: 4px 0 10px; font-size: clamp(28px, 5.2vw, 56px); line-height:1.1; font-weight: 800;
  color: #22c55e; text-shadow: 0 2px 10px rgba(34,197,94,.35);
}
.ac-hero-modal__subtitle{
  margin: 0 auto 18px; max-width: 900px; font-size: clamp(14px, 2.2vw, 18px); line-height: 1.5; color: #d1fae5;
}
.ac-hero-modal__actions{ display:inline-flex; gap:12px; flex-wrap:wrap; justify-content:center; }

.ac-hero-modal__close{
  position:absolute; top:14px; right:14px;
  background: rgba(0,0,0,.45); color:#e5e7eb; border:1px solid rgba(255,255,255,.25);
  border-radius:10px; padding:8px 10px; cursor:pointer;
}
.ac-hero-modal__close:hover{ border-color: var(--brand); box-shadow: 0 0 0 4px rgba(16,185,129,.25); }
body.ac-no-scroll{ overflow:hidden; }

/* ==========================================================================
   5) ENOVRSTIČNE KARTICE (trak)
   ========================================================================== */

.cars-strip-wrap{ position:relative; max-width: 1300px; margin: 24px auto; padding: 0 48px; }
.cars-title{ text-align:center; margin: 18px 0 10px; font-size: clamp(20px, 2.6vw, 28px); }

.cars-strip{
  display:flex; gap:16px; overflow-x:auto; padding: 8px 0 12px;
  scroll-snap-type:x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
}
.cars-strip::-webkit-scrollbar{ height: 10px; }
.cars-strip::-webkit-scrollbar-thumb{ background:#cbd5e1; border-radius:999px; }

.car-card{
  flex: 0 0 auto; width: clamp(270px, 26vw, 340px); scroll-snap-align: start;
  background: linear-gradient(180deg, #111827, #0b1220); border: 1px solid #0f2a48;
  border-radius: 16px; overflow:hidden; display:flex; flex-direction:column;
  transition: transform .18s ease, box-shadow .18s ease; box-shadow: var(--shadow-1);
}
.car-card:hover{ transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,.35); }

.car-media{ aspect-ratio: 16/10; background:#0b1220; }
.car-media img{ width:100%; height:100%; object-fit:cover; }

.car-body{ padding: 12px 14px; display:grid; gap:8px; }
.car-title{ font-weight: 800; font-size: 16px; line-height: 1.25; color:#e5e7eb; }
.car-specs{ display:flex; flex-wrap:wrap; gap:8px; color:#9ca3af; font-size: 13px; }
.car-specs .chip{ border: 1px solid #12365c; padding: 6px 8px; border-radius: 999px; }
.car-price{ margin-top: 4px; font-size: 18px; font-weight: 900; color:#e5f3ff; }

.car-actions{ padding: 12px 14px; display:flex; gap:10px; margin-top:auto; }

/* Navigacijska gumba za trak (po želji) */
.strip-nav{
  position:absolute; top:50%; transform: translateY(-50%);
  width:42px; height:42px; border-radius:999px; border:1px solid rgba(15,42,72,.8);
  background: rgba(17,24,39,.85); color:#e5e7eb; cursor:pointer; display:grid; place-items:center; z-index:10;
}
.strip-nav:hover{ border-color: var(--brand-acc); box-shadow: 0 0 0 4px rgba(14,165,233,.25); }
.strip-prev{ left: 6px; }
.strip-next{ right: 6px; }

/* ==========================================================================
   6) ADMIN DASHBOARD
   ========================================================================== */

.top-nav{
  display:flex; align-items:center; justify-content:space-between; padding: 10px 30px;
}
.top-nav .nav-left a{ margin-right: 28px; }
.user-nav{ display:flex; gap:12px; align-items:center; }
.user-name{ opacity:.85; font-weight:700; }
.logout-btn{
  background:#f05a5a; color:#fff !important; padding:6px 10px; border-radius: 10px;
  text-decoration:none; box-shadow: 0 1px 6px rgba(0,0,0,.12);
}
.logout-btn:hover{ filter: brightness(1.05); }

.admin-grid{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap:18px; margin-top:10px;
}
.card-btn{
  display:flex; flex-direction:column; align-items:flex-start;
  background:#f7f9fc; color:#122; text-decoration:none;
  border-radius:14px; padding:16px;
  box-shadow: 0 2px 12px rgba(207,214,232,.2); border:1px solid #e9eef7;
  transition: transform .08s ease, box-shadow .12s ease;
}
.card-btn:hover{ transform: translateY(-2px); box-shadow: 0 6px 18px rgba(207,214,232,.35); }
.card-ico{ font-size: 28px; margin-bottom: 8px; }
.card-title{ font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }
.card-sub{ font-size: .92rem; opacity: .8; }

/* ==========================================================================
   7) FOOTER
   ========================================================================== */

footer{
  background: linear-gradient(135deg, #363636 0%, #eeeded 100%);
  position:relative; overflow:hidden; border-radius: 0 0 10px 10px;
}
.footer-banner{
  display:flex; align-items:center; justify-content:center; gap:16px;
  padding: 32px 10px 18px; font-size: 1em;
}
.car-icon{ font-size: 2em; filter: drop-shadow(0 2px 6px #0008); }
.footer-text{ font-weight: 500; letter-spacing: .5px; }

.footer-cta{
  display:inline-block; background:#fff; color:#000; font-weight: 800; margin-left: 10px;
  border-radius: 8px; padding: 7px 17px; text-decoration:none; box-shadow: 0 2px 8px rgba(20,80,163,.24);
  transition: background .3s, color .3s;
}
.footer-cta:hover{ background:#12ff2e; color:#000; }

.footer-copy{
  text-align:center; font-size: 1em; padding: 8px 0 15px;
}

/* ==========================================================================
   8) MEDIA QUERIES (mobile-first)
   ========================================================================== */

@media (max-width: 1050px){
  .car-card{ width: clamp(260px, 44vw, 420px); }
}
@media (max-width: 950px){
  .hero-logo{ height: 38px; }
  .hero-title{ font-size: 1.2em; }
}
@media (max-width: 700px){
  .cars-table-wrap{ padding: 6px 3px; }
  .cars-table th, .cars-table td{ padding: 6px 3px; font-size: .95em; }
}
@media (max-width: 650px){
  .hero-header{ min-height: 240px; }
  .hero-content{ padding-bottom: 18px; }
  .hero-topbar{ flex-direction: column; align-items: flex-start; gap: 7px; }
  .hero-topbar nav ul{ flex-direction: column; gap: 2px; }
  .hero-main{ margin-top: 18px; }
  .footer-banner{ flex-direction: column; gap: 8px; text-align: center; }
  .cars-strip-wrap{ padding: 0 12px; }
  .strip-nav{ display:none; }
}
