/* ============================================================
   Dom Zdravlja 012 — Custom Overrides
   Project: domzdravlja012.com | Astro + Mediox
   ============================================================ */

/* --- Brand Colors ------------------------------------------ */
:root {
  --dz-primary: #0ea5e9;       /* Medicinski plavi */
  --dz-primary-dark: #0284c7;
  --dz-primary-light: #38bdf8;
  --dz-accent: #06b6d4;
  --dz-success: #10b981;
  --dz-dark: #0f172a;
  --dz-text: #334155;
  --dz-muted: #94a3b8;
  --dz-bg-light: #f8fafc;
  --dz-white: #ffffff;
}

/* --- Serbian grammar: kill ALL capitalize transforms ------- */
/* Mediox uses text-transform:capitalize everywhere which is    */
/* grammatically WRONG for Serbian. Only first word uppercase.  */
h1, h2, h3, h4, h5, h6,
.sec-title__title,
.sec-title__tagline,
.page-header__title,
.mediox-breadcrumb li,
.main-menu__list li a,
.mediox-btn span,
.footer-widget__title,
.contact-page__info__title,
.contact-map__btn span,
.main-slider-one__sub-title,
.main-slider-one__title,
.service-card-two__title,
.team-card-two__name,
.portfolio-card__title,
.main-footer__contact__title {
  text-transform: none !important;
}

/* --- Footer MSD branding ----------------------------------- */
.main-footer__copyright a[href*="msdagencija"] {
  color: #ffffff !important;
  text-decoration: none;
  transition: opacity 0.3s ease;
}
.main-footer__copyright a[href*="msdagencija"]:hover {
  opacity: 0.8;
}

/* --- Service carousel enhance ------------------------------ */
.service-card-two__title {
  text-transform: capitalize;
}

/* --- Team card polish -------------------------------------- */
.team-card-two__image__inner img {
  object-fit: cover;
  aspect-ratio: 3/4;
}

/* --- Gallery strip enhance --------------------------------- */
.gallery-instagram__image img {
  object-fit: cover;
  aspect-ratio: 1/1;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.gallery-instagram__image:hover img {
  transform: scale(1.08);
}

/* --- Stats counters ---------------------------------------- */
.funfact-one__item__number {
  font-weight: 800;
}

/* --- Page header gap --------------------------------------- */
.page-header {
  padding: 25px 0 0 0;
}

.page-header + section,
.page-header + .section-space-top,
.page-header + .contact-page {
  padding-top: 25px !important;
}

/* --- Page header breadcrumb -------------------------------- */
.page-header__breadcrumb a {
  transition: color 0.3s ease;
}

/* --- Smooth scroll ----------------------------------------- */
html {
  scroll-behavior: smooth;
}

/* --- Focus styles for accessibility ------------------------ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--dz-primary);
  outline-offset: 2px;
}

/* --- Custom preloader optimization ------------------------- */
.preloader {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* --- Form select styling ----------------------------------- */
.form-one__control select {
  display: block;
  width: 100%;
  height: 55px;
  padding: 0 20px;
  font-family: var(--mediox-font, "Manrope", sans-serif);
  background-color: var(--mediox-white2, #ECF0F5);
  font-size: 14px;
  color: var(--mediox-text, #707882);
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23707882' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  transition: all 400ms ease;
}
.form-one__control select:focus {
  color: var(--mediox-black, #0A2241);
  border-color: var(--mediox-base, #33C1ED);
}

/* --- Search Button & Popup Polish -------------------------- */
.main-header__search {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 50px !important;
  height: 50px !important;
  background-color: #f0f7ff !important; /* Force a very light blue instead of var for certainty */
  border: 1px solid var(--dz-primary) !important;
  border-radius: 50% !important;
  color: var(--dz-primary) !important;
  font-size: 20px !important;
  cursor: pointer !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  margin-left: 20px !important;
  padding: 0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.main-header__search:hover {
  background-color: var(--dz-primary) !important;
  color: #ffffff !important;
  transform: scale(1.1) rotate(5deg) !important;
  box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.4) !important;
}

.main-header__search i {
  color: inherit !important;
  display: inline-block !important;
  line-height: 1 !important;
  position: relative !important;
  top: 1px; /* Optical adjustment */
}

/* Search Popup Form Polish */
.search-popup__form {
  position: relative;
  display: flex !important;
  align-items: center;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.search-popup__form input[type="text"] {
  height: 70px !important;
  background-color: var(--dz-white) !important;
  border: none !important;
  border-radius: 35px !important;
  padding: 0 80px 0 35px !important;
  font-size: 18px !important;
  color: var(--dz-dark) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
}

.search-popup__form .mediox-btn {
  position: absolute !important;
  right: 10px !important;
  top: 10px !important;
  bottom: 10px !important;
  width: 50px !important;
  height: 50px !important;
  min-height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background-color: var(--dz-primary) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease !important;
}

.search-popup__form .mediox-btn::before,
.search-popup__form .mediox-btn::after {
  display: none !important; /* Kill the weird mediox background animation here */
}

.search-popup__form .mediox-btn i {
  font-size: 20px;
}

.search-popup__form .mediox-btn:hover {
  background-color: var(--dz-primary-dark) !important;
  transform: scale(1.05);
}

.search-popup__close {
  position: absolute;
  top: 40px;
  right: 40px;
  color: var(--dz-white);
  font-size: 40px;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10;
}

.search-popup__close:hover {
  transform: rotate(90deg);
  opacity: 0.8;
}

