/* 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: 20px;
  right: 20px;
  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;
}

/* Izleti */
.izleti {
  max-width: 1000px;
  margin: 40px auto 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 0 20px;
}
.izlet-box {
  background: white;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgb(0 0 0 /0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.izlet-img-wrapper {
  position: relative;
  overflow: hidden; /* reže višak slike pri zoomu */
  height: 160px;
}
.izlet-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-in-out; /* <- 's' + glatka krivulja */
}
.izlet-box:hover .izlet-img-wrapper img {
  transform: scale(1.08); /* ili 1.05 za diskretniji zoom */
}
.izlet-content {
  padding: 15px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.izlet-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #333;
}
.izlet-date {
  font-size: 0.9rem;
  color: #666;
}
.btn-izlet {
  margin-top: 14px;
  align-self: flex-start;
  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,
.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.popup label,
.modal-content 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"],
.modal-content input[type="email"],
.modal-content input[type="password"] {
  padding: 8px 12px;
  border: 1px solid #bbb;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}
.popup input:focus,
.modal-content input:focus {
  outline: none;
  border-color: #1976d2;
}
.popup button.submit-btn,
.modal-content 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,
.modal-content 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: #333;
  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 -------------- */

.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;
  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);
}

/***  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;
}

.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-col.menu-links a::before,
.footer-col.legal-links 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;
}

.footer-bottom {
  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;
}
