* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body, html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

h1 {
  font-size: 1.8rem;
  font-family: Tahoma, sans-serif;
  line-height: 1.5;
}

.meni_kontejner {
  position: fixed;
  z-index: 2000;
  width: 100%;
  transition: background-color 0.5s ease, box-shadow 0.3s ease;
  background-color: transparent;
}

.meni_kontejner.scrolled {
  background-color: #0077cc;
  box-shadow: 0 2px 10px #0077cc;
}
/* Desktop meni */
ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

ul li a {
  display: block;
  color: white;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 20px;
}

ul li a:hover {
  color: #ff0000;
}

/* Moblni meni */
.topnav {

  display: none;
  overflow: hidden;
  background-color: #333;
}

.topnav #sakri_linkove {
  position: relative;
  display: none;
  z-index: 10;
  background-color: #333;
}

.topnav a {
  color: white;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
  display: block;
}

.topnav a.icon {
  z-index: 2000;
  display: block;
  position: absolute;
  right: 0;
  top: 0;
}

.topnav a:hover {
  background-color: transparent;
  color: rgb(255, 255, 255);
}

.active {
  background-color: #04AA6D;
  color: white;
}

.centrirano {
  text-align: center;
}

.velika {
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.glavni_naslov {
  margin-bottom: 30px;
}

.glavna_poruka {
  margin-bottom: 30px;
}

.bela {
  color: #fff;
  z-index: 1000;
}

#logo {
  position: fixed;
  top: 50px;
  left: 50px;
  z-index: 8;
}

#logo img {
  height: 200px;
}

/* WRAPPER MORA BITI relative */
.video-wrapper {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  margin-bottom: 100px;
}

.video-desktop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-mobile {
  width: 100%;
  height: 100dvh;
  object-fit: cover;
  display: none; /* default sakriveno */
}
/* OVERLAY */
.video-overlay {
  position: absolute;
  inset: 0; /* top:0 right:0 bottom:0 left:0 */
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
  height: 100%;
  width: 100%;
  pointer-events: none;
}

.centered {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  z-index: 9;
  font-weight: bold;
  width: 70%;
}

.kontejner {
  width: 70%;
  margin: 0 auto;
}

#podaci_dole_kontejner {
  position: absolute;
  bottom: 0px;
  left: 0;          /* ne centriramo sa translateX */
  width: 100%;       /* ključ: pun width */
  display: flex;
  justify-content: space-between; /* ravnomerno rasporedi elemente po širini */
  padding: 0 40px;   /* unutrašnji razmak sa leve i desne strane */
  z-index: 1001;
  box-sizing: border-box; /* da padding ne probija width */
  font-size: 30px;
}

#podaci_dole_kontejner .fa-map-marker, .fa-facebook, .fa-clock-o  {
  padding-right: 10px;
  color: #ff0000;
}

.blur-section {
  position: relative;
  overflow: hidden;
  height: 800px;
}

.blur-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/slika.jpg");
  background-size: cover;
  background-position: center;
  filter: blur(25px);
  transform: scale(1.1);
  z-index: 0;
}

/* Dodaj ovo za tamni overlay */
.blur-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.blur-section .content {
  position: relative;
  z-index: 2; /* mora biti iznad blur i overlay */
}

.glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
}

.logos {
  display: flex;
  justify-content: center; /* centriranje */
  align-items: center;
  gap: 40px;               /* razmak između logoa */
  margin: 40px 0px;
}

/* Desktop – u jednom redu (default) */
.logos img {
  max-height: 150px;
  width: auto;
}

#odbrojavac {
  position: absolute;
  bottom: 100px;
  text-align: center;
  width: 100%;
  z-index: 1000;
  font-size: 3rem;
  color: #fff;
}

.slova_brojaca {
  font-size: 1rem;
}

.kontejner_raspis {
  display: grid;
  grid-template-columns: auto auto;
  gap: 5px;
  padding: 5px;
}

.elemenat1 {
  grid-row: 1 / span 3;
}

.race-info {
  margin-bottom: 100px;
  padding: 40px 0px;
  background-color: #f8f8f8; /* Blaga pozadina da istakne sekciju */
  border-radius: 10px;       /* Zaobljeni uglovi */
  box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Lagana senka */
}

.race-info p {
  text-align: justify;
  padding: 5px 60px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

.race-title {
  font-weight: bold;
  font-size: 1.3em;
}

.race-buttons {
  display: flex;
  justify-content: center; /* centriranje dugmadi */
  gap: 20px;               /* razmak između dugmadi */
  margin-bottom: 150px;        
}

/* Dugmad */
.btn {
  padding: 12px 24px;
  background-color: #0077cc;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.3s;
}

.btn:hover {
  background-color: #005fa3;
}

.single-logo {
  margin-bottom: 100px;
}

.single-logo img {
  display: block;
  margin: 0px auto;     /* centriranje */
  width: 30%;         /* desktop širina */
  height: auto;       /* proporcionalno */
}

.partners {
  margin-bottom: 150px;
  text-align: center;
}

.partners h2 {
  margin-bottom:100px;
  font-size: 1.8em;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 180px);
  gap: 40px 20px;
  justify-content: space-between;
}

.partners-grid a {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.partners-grid img {
  max-height: 80px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.partners-grid a:hover img {
  transform: translateZ(80px) scale(1.15) rotateX(8deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.text-section-naslovna {
  max-width: 60%;
  margin: 80px auto;
  text-align: left;
}

.text-section-naslovna h2 {
  font-size: 2rem;
  margin-bottom: 30px;
}

.text-section-naslovna p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.news-section {
  margin-bottom: 100px;
}

.news-section h2 {
  font-size: 2rem;
  margin-bottom: 40px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.news-item {
  padding: 25px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Lagana senka */
  background: #fafafa;
}

.news-date {
  display: block;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 10px;
}

.news-item h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.news-item p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.testimonial-section {
  margin-bottom: 100px;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 40px;
  align-items: center;
}

.testimonial-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
  transition: transform 0.4s ease;
}

.testimonial-image img:hover {
  transform: scale(1.05);
}

.testimonial-text blockquote {
  margin-bottom: 30px;
  padding-left: 20px;
  border-left: 5px solid #ff6600;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.7;
}

.site-footer {
  width: 100%;
  background-color: #222;
  color: #fff;
  padding: 60px 0 30px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px; /* horizontalni padding */
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  word-wrap: break-word; /* sprečava dug tekst da štrči */
}

.footer-column h4 {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.footer-column p,
.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-column ul li a:hover {
  color: #ff6600;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #444;
  padding-top: 15px;
  font-size: 0.85rem;
  color: #ccc;
}

/* Tablet */
@media (max-width: 1024px) {

  .kontejner {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .testimonial-text blockquote {
    padding-left: 15px;
  }
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .text-section-naslovna {
    max-width: 75%;
  }
}

/* Media query za mobilne uređaje */
@media screen and (max-width: 768px) {
  .meni_kontejner {
    display: none;
  }
  .topnav {
    display: block;
  }
  .video-desktop {
    display: none;
  }
  .video-mobile {
    display: block;
  }
  .scroll-text{
    animation: slideText 10s linear infinite;
  }

  h1 {
    font-size: 1.2rem;
  }

  h3 {
    font-size: 1rem;
  }

  .kontejner {
    width: 100%;
  }

  #dani, #sati, #minuti, #sekunde {
    font-size: 1.1rem;
  }

.slova_brojaca {
  font-size: 0.5rem;
}

  #podaci_dole_kontejner {
    flex-direction: column;
    align-items: center;
    font-size: 16px;
  }

  #logo {
    top: 25px;
    left: 25px;
  }

  #logo img {
    height: 100px;
  }

  .logos {
    flex-direction: column; /* jedan ispod drugog */
  }

  .logos img {
    max-width: 120px;
  }

  .race-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .btn {
    width: 80%;       /* dugmad zauzimaju punu širinu */
    margin: 0px auto;
    text-align: center; /* centriranje teksta */
  }

  .single-logo img {
    width: 60%;       /* veća na mobilnom, da bude čitljivo */
  }

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

  .partners-grid {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
  }

  .partners-grid img {
    max-height: 50px;
  }

  .text-section-naslovna {
    max-width: 88%;
  }

  .text-section-naslovna h2 {
    font-size: 1.8rem;
  }

  .text-section-naslovna h3 {
    font-size: 1.2rem;
  }

  .text-section-naslovna p {
    font-size: 1rem;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .footer-column ul li {
    display: inline-block;
    margin: 0 5px 10px;
  }

  .footer-content {
    padding: 0 10px; /* još manji padding */
  }

  .footer-column ul {
    flex-wrap: wrap;
  }

  .race-info p {
    padding: 5px;
  }

}

/* Media query za mobilne uređaje */
@media screen and (max-width: 480px) {

  h1 {
    font-size: 1rem;
  }

  h3 {
    font-size: 0.7rem;
  }

  .kontejner {
    width: 100%;
  }

   #dani, #sati, #minuti, #sekunde {
    font-size: 1.3rem;
  }


  .race-info {
    margin: 40px 20px;
  }

  .race-info p {
    padding: 5px;
  }
}