/* Reset */
:root {
  --blue: #0d3f76;
  --orange: #ff761b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #f9f9f9;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-bar {
  background-color: var(--blue);
  color: white;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  padding: 6px 20px;
  align-items: center;
  flex-wrap: wrap;
  height: 38px;
}

.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.top-bar-left span,
.top-bar-right a {
  margin-right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: white;
}

.top-bar-left span a {
  text-decoration: none;
  color: white;
}

.top-bar-right a:hover {
  text-decoration: none;
}

.top-bar img {
  height: 16px;
  width: 16px;
  object-fit: contain;
}

/* Hero */
.hero {
  position: relative;
  background: url("images/hero-background-map.webp") center/cover no-repeat;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
  padding: 0 20px;
}

/* Header */
header {
  position: absolute;
  top: 20px;
  left: 60px;
  right: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  font-weight: 600;
}

.logo {
  height: 40px;
  object-fit: contain;
}

.btn-login {
  background: var(--orange);
  color: #fff;
  font-size: 1.1em;
  text-transform: uppercase;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.btn-login:hover {
  background: var(--blue);
}

.btn-logout {
  background: var(--blue);
  color: #fff;
  font-size: 1.1em;
  text-transform: uppercase;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn-logout:hover {
  background: #115293;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background: white;
  padding: 30px;
  max-width: 400px;
  width: 100%;
  border-radius: 8px;
  position: relative;
}

.hero h1 {
  font-size: 2.8rem;
  text-align: center;
  width: 100%;
  pointer-events: none;
}

.pretraga {
  margin-top: 20px;
  padding: 1rem 3rem;
  gap: 20px;
  color: var(--blue);
  display: flex;
}
#searchInput {
  flex-grow: 3;
}
#filterSkola {
  flex-grow: 1;
}
#searchInput,
#filterSkola {
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

/* Izleti */
.izleti-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}
.izleti {
  max-width: 85%;
  width: 100%;
  margin: 40px auto 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-column-gap: 30px; 
  grid-row-gap: 35px;
  padding: 0 20px;
}
.izlet-box {
  background: white;
  border-radius: 10px;
  border: 0 solid #69727d;
  box-shadow: 0 3px 10px rgb(0 0 0 /0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.izlet-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.15);
}
.izlet-img-wrapper {
  height: 300px;
}
.izlet-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.izlet-content {
  padding: 35px 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.izlet-title {
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 5px;
  margin-bottom: 10px;
  color: #333;
}
.izlet-datum {
  color: #777;
    font-size: 0.9rem;
    line-height: 1.5em;
    margin-bottom: 15px;
}
.izlet-content .btn-izlet {
  margin-top: 14px;
  width: 100%;
  background: var(--blue);
  color: #fff;
  text-transform: uppercase;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.btn-izlet:hover {
  background: #115293;
}

/* Popup */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.popup-overlay.active {
  display: flex;
}

.popup {
  background: white;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  padding: 25px 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
}
.popup h2 {
  margin-bottom: 20px;
  font-weight: 700;
  color: #1976d2;
  text-align: center;
}
.popup form,
#step1,
#step2 {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.popup label,
#step1 label,
#step2 label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #444;
}
.popup input[type="text"],
.popup input[type="email"],
.popup input[type="password"],
.popup input[type="date"],
#step1 input[type="text"],
#step2 input[type="text"] {
  padding: 8px 12px;
  border: 1px solid #bbb;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}
.popup input:focus,
#step1 input:focus,
#step2 input:focus {
  outline: none;
  border-color: #1976d2;
}
.popup button.submit-btn,
#step1 button,
#step2 button {
  margin-top: 10px;
  background: #1976d2;
  color: #fff;
  border: none;
  padding: 10px 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.popup button.submit-btn:hover,
#step1 button:hover,
#step2 button:hover {
  background: #115293;
}
.popup .close-btn,
.modal .close {
  position: absolute;
  top: 12px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
  transition: color 0.3s ease;
}
.popup .close-btn:hover {
  color: #1976d2;
}

/* Responsive */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  .btn-login {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}

/***** DETALJI IZLETA  *****/
.detalji-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem;
}

/* ----------------- L I J E V I   D I O   (detalji izleta) ----------------- */
.detalji-wrap .left {
  flex: 1 1 55%;
  padding-right: 2rem; /* malo odmaka od forme desno */
  line-height: 1.6;
}

.left .trip-date,
.left .trip-price {
  background: #f0f6ff; /* lagano plava pozadina za isticanje */
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #0d3f76;
}

.left .trip-desc {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  color: #0d3f76;
  padding-left: 10px;
}

.left h2 {
  margin: 2rem 0 1rem;
  font-size: 1.4rem;
  color: #0d3f76;
  position: relative;
}

/* ukrasna crta ispod naslova Program putovanja */
.left h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #0d3f76;
  margin-top: 6px;
  border-radius: 2px;
}

.left .trip-program {
  padding-left: 1.2rem;
  list-style: disc;
  color: #222;
}

.left .trip-program li {
  margin-bottom: 0.4rem;
}

/* gumb Nazad na izlete */
.left .btn-izlet {
  margin-top: 2rem;
  background: var(--blue);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.left .btn-izlet:hover {
  background: #115293;
}

/* -------------- kraj lijevog dijela -------------- */
.obavijest-rok {
    background-color: #f8d7da;
    color: #721c24;
    padding: 20px;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    text-align: center;
}
.obavijest-rok h2 {
    color: #721c24;
    margin-bottom: 10px;
}

.detalji-wrap .right {
  flex: 1 1 40%;
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

form label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
}

form input,
form select {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.3rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.form-row {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap; /* da se na manjim ekranima raspadne uredno */
}

.form-row > label {
  min-width: 120px; /* ili širina po potrebi */
}

.radio-group {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 300;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* malo razmaka između checkboxa i teksta */
  margin-top: 1rem;
  font-size: 0.95rem;
}

.checkbox-container input[type="checkbox"] {
  width: auto; /* sprječava da se raširi */
  height: auto;
  margin: 0;
  accent-color: #0d3f76; /* plava kvačica ako browser podržava */
}

.submit-btn {
  margin-top: 1.5rem;
  width: 100%;
  background-color: var(--orange);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/*** MOJ PROFIL ***/
/* ----- GLAVNI GRID: dvije kolone ----- */
.dash-wrap {
  display: flex;
  gap: 2rem;
  margin: 2rem;
}

/* ----- LIJEVA KOLONA kao stupac ----- */
.dash-left {
  display: flex;
  flex: 4;
  flex-direction: column; /* >>> stack sekcija vertikalno */
  gap: 1.5rem; /* razmak između Izlet i Ugovor */
}

/* premjesti dash-info i dash-contract u lijevu kolonu */
.dash-info,
.dash-contract {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgb(0 0 0 / 0.1);
}

/* ----- DESNA KOLONA ----- */
.dash-payments {
  flex: 3;
  background-color: #f7f9fc;
}

.dash-payments table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem; /* razmak između redaka */
  font-size: 1rem;
}

.dash-payments th,
.dash-payments td {
  padding: 0.7rem 1rem;
  text-align: left;
}

.dash-payments thead th {
  background-color: var(--orange-light, #ffe6cc);
  color: var(--orange, #ff761b);
  font-weight: 700;
  border-bottom: 2px solid var(--orange);
  border-radius: 6px 6px 0 0;
}

.dash-payments tbody tr {
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.dash-payments tbody tr:hover {
  background-color: #fff4e6;
}

.dash-payments td.paid {
  color: green;
  font-weight: 600;
}

.dash-payments td.due {
  color: #d2691e; /* tamnija narančasta */
  font-weight: 600;
}

.dash-payments button.btn-izlet {
  margin-top: 1rem;
  background-color: var(--blue);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dash-payments button.btn-izlet:hover {
  background-color: #115293;
}

.dash-notify {
  flex: 2;
  background-color: #fff4e8;
}

.dash-notify h2 {
  margin-bottom: 0.8rem;
  font-weight: 600;
  font-size: 1.3rem;
}

.dash-notify ul {
  margin: 0;
}

.dash-notify ul li {
  font-size: 1rem;
  margin-bottom: 0.6rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-notify ul li:last-child {
  margin-bottom: 0;
}
.dash-payments,
.dash-notify {
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgb(0 0 0 / 0.05);
}

/*** LEGAL ***/
.legal {
    margin: -120px 0 60px;
    z-index: 1;
}

.legal-container {
    background-color: #fff;
    max-width: 840px;
    width: 100%;
    padding: 40px;
    margin-right: auto;
    margin-left: auto;
    box-shadow: 0px 0px 32px 0px rgba(0, 0, 0, 0.23);
}

.legal-container h1 {
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 25px;
    color: #1c2741;
}
.legal-container p {
    line-height: 1.4em;
    margin-bottom: 25px;
    font-size: 1em;
}
.legal-container ul {
    padding-left: 20px;
}
.legal-container ul li a {
    color: #222;
}
.legal-container ul li a:hover {
    color: var(--orange);
}
.legal-container table {
    font-size: 0.85em;
    border-collapse:collapse;
    margin-bottom: 20px;
}
.legal-container thead {
    border-bottom: 1px solid #e6e7e8;
}
.legal-container th {
    text-align: left;
    padding: 5px 10px;
}
.legal-container td {
    padding: 5px 10px;
}

/* ==========================================================================
   STRANICA S OPĆIM UVJETIMA (LEGAL SECTION)
   ========================================================================== */

/* Stil za PDF Gumb */
.pdf-gumb {
    display: inline-block;
    background-color: var(--blue);
    color: #ffffff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 40px;
    transition: background-color 0.2s ease;
}

.pdf-gumb:hover {
    background-color: #115293;
}

/* KUTIJA HARMONIKE */
.harmonika {
    background-color: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease;
}

/* NASLOV HARMONIKE (Klikabilna traka) */
.harmonika summary {
    padding: 18px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1B262C;
    cursor: pointer;
    list-style: none; /* Miče defaultnu strelicu */
    position: relative;
    user-select: none;
}

/* Skrivanje defaultne strelice za Safari */
.harmonika summary::-webkit-details-marker {
    display: none;
}

/* Naša moderna CSS kvačica/strelica */
.harmonika summary::after {
    content: "➔";
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    color: #0F4C75;
    font-size: 0.85rem;
    transition: transform 0.25s ease;
}

/* Aktivno/Otvoreno stanje harmonike [open] */
.harmonika[open] {
    box-shadow: 0 10px 25px rgba(15, 76, 117, 0.06);
    border-color: #0F4C75;
}

.harmonika[open] summary {
    color: #0F4C75;
    border-bottom: 1px solid #F0F4F8;
}

.harmonika[open] summary::after {
    transform: translateY(-50%) rotate(-90deg);
}

/* TEKSTUALNI SADRŽAJ UNUTAR HARMONIKE */
.harmonika-sadrzaj {
    padding: 25px;
    background-color: #ffffff;
    border-radius: 0 0 8px 8px;
}

.harmonika-sadrzaj p {
    font-size: 1rem;
    color: #4A5568;
    line-height: 1.65;
    margin-top: 0;
    margin-bottom: 16px;
}

.harmonika-sadrzaj p:last-of-type {
    margin-bottom: 0;
}

/* Specifični stilovi za listu plaćanja u Članku 5 */
.nacin-placanja-naslov {
    font-weight: 600;
    color: #1B262C !important;
    margin-top: 20px;
    margin-bottom: 10px !important;
}

.legal-lista {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.legal-lista li {
    font-size: 1rem;
    color: #4A5568;
    line-height: 1.6;
    padding: 6px 12px;
    background-color: #F8FAFC;
    margin-bottom: 6px;
    border-left: 3px solid #0F4C75;
    border-radius: 0 4px 4px 0;
}

.legal-podlista {
    padding-left: 50px !important;
}
.legal-podlista li {
    border-left: none;
}

/***  FOOTER **/
.site-footer {
  background: url("images/map-lightgray.webp") no-repeat center;
  background-size: cover;
  border-top: 2px solid var(--orange);
  color: #333;
  padding: 40px 20px 20px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: space-between;
}

.footer-col:first-child {
  flex: 2 1 300px; /* veći osnovni size i može rasti 2x više */
}

.footer-col:not(:first-child) {
  flex: 1 1 200px;
  padding-top: 50px;
}

.footer-logo img {
  max-width: 230px;
  margin-bottom: 1rem;
}

.footer-hours h3,
.footer-col h3 {
  color: var(--blue);
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 1.1rem;
}

.footer-hours p,
.footer-col p,
.footer-col ul {
  font-size: 0.9rem;
  line-height: 1.5;
}
.footer-hours {
    padding-left: 10px;
}

.footer-col.menu-links ul li a::before,
.footer-col.legal-links ul li a::before {
  content: "➔";
  color: var(--orange);
  margin-right: 6px;
  font-weight: bold;
  display: inline-block;
  vertical-align: middle;
}

.footer-col ul {
  list-style: none;
  padding-left: 0;
}

.footer-col ul li {
  margin-bottom: 6px;
}

.footer-col ul li a {
  color: #333;
  text-decoration: none;
}

.footer-col ul li a:hover {
  color: var(--orange);
  text-decoration: underline;
}

.payment-icons {
    margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap; /* omogućava responsivnost */
}

.payment-icons a {
    display: inline-flex;
}

.payment-icons img {
  height: 40px;      /* ista visina za sve */
  width: auto;       /* zadržava proporcije */
  object-fit: contain;
}

img.card-small {
    height: 26px;
}

/* mobilni uređaji */
@media (max-width: 600px) {
  .payment-icons {
    gap: 12px;
  }

  .payment-icons img {
    height: 26px;
  }
}

.footer-bottom, .payment-means {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  color: #666;
}

.footer-bottom a {
  color: var(--orange);
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: none;
}

/* ============================= */
/* TABLET (do 1024px) */
/* ============================= */
@media (max-width: 1024px) {
  .izleti-grid {
    grid-template-columns: 1fr;
  }

  .detalji-wrap {
    flex-direction: column;
  }

  .detalji-wrap .left,
  .detalji-wrap .right {
    flex: 1 1 100%;
    padding-right: 0;
  }

  .dash-wrap {
    flex-direction: column;
  }

  .dash-left,
  .dash-payments,
  .dash-notify {
    width: 100%;
  }

  .footer-inner {
    justify-content: flex-start;
  }
}

/* ============================= */
/* MOBITEL (do 768px) */
/* ============================= */
@media (max-width: 768px) {
  .top-bar {
    flex-direction: column;
    height: auto;
    padding: 8px 10px;
    gap: 5px;
    text-align: center;
  }

  .top-bar-left {
    justify-content: center;
  }
  .top-bar-right {
    display: none;
  }

  header {
    flex-direction: column;
    gap: 20px;
    z-index: 2;
  }

  .hero {
    height: 220px;
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3); /* jačina tamnog sloja */
    z-index: 1;
  }

  .hero h1 {
    display: none;
  }

  .pretraga {
    padding: 10px;
  }

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

  .form-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .radio-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

/* ============================= */
/* MALI MOBITEL (do 480px) */
/* ============================= */
@media (max-width: 480px) {
  .hero {
    height: 180px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .logo {
    height: 32px;
  }

  .btn-login,
  .btn-logout {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .izlet-title {
    font-size: 1rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-col {
    width: 100%;
  }
}

.cookie-mini-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #e2e8f0;
    padding: 15px 20px;
    z-index: 9999; /* Da uvijek bude na vrhu */
    box-sizing: border-box;
}

.cookie-sadrzaj {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cookie-sadrzaj p {
    margin: 0;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.5;
    flex: 1;
    min-width: 250px;
}

.cookie-sadrzaj a {
    color: var(--blue);
    text-decoration: none;
    font-weight: bold;
}

.cookie-sadrzaj a:hover {
    text-decoration: underline;
}

.btn-cookie-ok {
    background-color: var(--orange);
    color: white;
    border: none;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cookie-ok:hover {
    background-color: #0056b3;
}

/* Prilagodba za mobitele */
@media (max-width: 600px) {
    .cookie-sadrzaj {
        text-align: center;
        flex-direction: column;
    }
    .btn-cookie-ok {
        width: 100%;
    }
}
