/* Maruman Express — site styles. Built on Bootstrap 5 (MIT). */

/* ============================================================
   Tokens
   ============================================================ */
:root {
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --heading-font: "Raleway", sans-serif;
  --nav-font: "Nunito", sans-serif;

  --background-color: #ffffff;
  --default-color: #444444;
  --heading-color: #1F3060;
  --accent-color: #F7931E;
  --surface-color: #ffffff;
  --contrast-color: #ffffff;

  --brand-navy: #1F3060;
  --brand-blue: #3FA9F5;
  --brand-orange: #F7931E;
  --brand-pink: #EC008C;
  --brand-purple: #7B2CBF;

  --brand-gradient: linear-gradient(135deg, #3FA9F5 0%, #F7931E 50%, #EC008C 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(63,169,245,0.12) 0%, rgba(247,147,30,0.12) 50%, rgba(236,0,140,0.12) 100%);

  --nav-color: #1F3060;
  --nav-hover-color: #F7931E;
  --nav-mobile-background-color: #ffffff;
  --nav-dropdown-background-color: #ffffff;
  --nav-dropdown-color: #1F3060;
  --nav-dropdown-hover-color: #F7931E;

  scroll-behavior: smooth;
}

/* ============================================================
   Section presets (override tokens within a section)
   ============================================================ */
.light-background {
  --background-color: rgba(255, 255, 255, 0.78);
  --surface-color: #ffffff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.dark-background {
  --background-color: #1F3060;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --surface-color: #2a4080;
  --contrast-color: #ffffff;
}

.accent-background {
  --background-color: #F7931E;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --accent-color: #ffffff;
  --surface-color: #fbb15b;
  --contrast-color: #ffffff;
}

/* ============================================================
   Brand utilities
   ============================================================ */
.btn-brand {
  background: var(--brand-gradient);
  color: #fff !important;
  border: 0;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.btn-brand:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(31,48,96,0.25);
  color: #fff !important;
}

.text-brand-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.section-brand-bar {
  height: 4px;
  background: var(--brand-gradient);
  border: 0;
  margin: 0;
}

/* ============================================================
   Generic
   ============================================================ */
body {
  margin: 0;
  color: var(--default-color);
  background-color: var(--background-color);
  background-image: url("../img/site-background.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  font-family: var(--default-font);
  line-height: 1.6;
}
@media (max-width: 991px) {
  body {
    background-attachment: scroll;
    background-size: 100% auto;
  }
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.25s ease;
}
a:hover {
  color: color-mix(in srgb, var(--accent-color), transparent 25%);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-family: var(--heading-font);
}

img {
  max-width: 100%;
  height: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* General sectioning */
section {
  padding: 80px 0;
  scroll-margin-top: 100px;
  overflow: clip;
}

/* Section title */
.section-title {
  text-align: center;
  padding-bottom: 60px;
  position: relative;
}
.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  padding-bottom: 20px;
  position: relative;
}
.section-title h2:after {
  content: "";
  position: absolute;
  display: block;
  width: 80px;
  height: 4px;
  background: var(--brand-gradient);
  border-radius: 2px;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}
.section-title p {
  margin-bottom: 0;
}

/* php-email-form messages (used by Bootstrap-style validation feedback) */
.php-email-form .error-message {
  display: none;
  background: #df1529;
  color: #fff;
  text-align: left;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}
.php-email-form .sent-message {
  display: none;
  background: #059652;
  color: #fff;
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}
.php-email-form .loading {
  display: none;
  background: var(--surface-color);
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
}
.php-email-form .loading::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  margin: 0 10px -6px 0;
  border-radius: 50%;
  border: 3px solid var(--accent-color);
  border-top-color: var(--surface-color);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Header
   ============================================================ */
.header {
  background-color: var(--background-color);
  color: var(--default-color);
  padding: 14px 0;
  z-index: 997;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 18px rgba(0,0,0,0.08);
}
.header .logo {
  text-decoration: none;
  line-height: 1;
}
.header .logo img,
.header .logo .site-logo {
  display: block;
  width: auto;
  max-height: 72px;
}
.header .logo h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--heading-color);
}
.header .logo span {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-color);
}
.header .header-social-links {
  padding: 0 0 0 15px;
  display: flex;
  align-items: center;
}
.header .header-social-links a {
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  margin-left: 10px;
  font-size: 16px;
  transition: color 0.25s ease;
  line-height: 1;
}
.header .header-social-links a:hover {
  color: var(--accent-color);
}

/* Admin gear-icon dropdown (Change password / Logout) */
.admin-menu {
  position: relative;
  margin-left: 12px;
}
.admin-menu-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.admin-menu-toggle:hover {
  transform: rotate(30deg);
  box-shadow: 0 4px 14px rgba(31,48,96,0.25);
}
.admin-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(31,48,96,0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 9998;
}
.admin-menu.open .admin-menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.admin-menu-dropdown li { margin: 0; padding: 0; }
.admin-menu-dropdown a,
.admin-menu-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-family: var(--default-font);
  color: var(--brand-navy);
  background: transparent;
  border: 0;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.admin-menu-dropdown a:hover,
.admin-menu-dropdown button:hover {
  background: rgba(247,147,30,0.1);
  color: var(--brand-orange);
}
.admin-menu-dropdown form { margin: 0; }
.admin-menu-dropdown i { font-size: 14px; }

@media (max-width: 1199px) {
  .header .logo img,
  .header .logo .site-logo { max-height: 56px; }
  .header .logo h1 { font-size: 22px; }
  .header .logo { order: 1; }
  .header .header-social-links { order: 2; padding: 0 12px 0 0; }
  .header .navmenu { order: 3; }
}

/* ============================================================
   Nav menu — desktop
   ============================================================ */
@media (min-width: 1200px) {
  .navmenu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
  }
  .navmenu li { position: relative; }
  .navmenu a {
    display: flex;
    align-items: center;
    padding: 18px 14px;
    color: var(--nav-color);
    font-family: var(--nav-font);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.25s ease;
  }
  .navmenu a i {
    margin-left: 5px;
    font-size: 12px;
    transition: transform 0.25s ease;
  }
  .navmenu li:last-child a { padding-right: 0; }
  .navmenu li:hover > a,
  .navmenu .active,
  .navmenu .active:focus {
    color: var(--nav-hover-color);
  }
  .navmenu .dropdown ul {
    position: absolute;
    top: 130%;
    left: 0;
    min-width: 200px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background: var(--nav-dropdown-background-color);
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    z-index: 99;
    transition: opacity 0.25s ease, top 0.25s ease;
  }
  .navmenu .dropdown ul a {
    padding: 10px 18px;
    font-size: 14px;
    text-transform: none;
    color: var(--nav-dropdown-color);
  }
  .navmenu .dropdown ul a:hover { color: var(--nav-dropdown-hover-color); }
  .navmenu .dropdown:hover > ul {
    opacity: 1;
    top: 100%;
    visibility: visible;
  }
}

/* ============================================================
   Nav menu — mobile
   ============================================================ */
@media (max-width: 1199px) {
  .mobile-nav-toggle {
    cursor: pointer;
    color: var(--nav-color);
    font-size: 28px;
    margin-right: 8px;
    transition: color 0.25s ease;
  }
  .navmenu { z-index: 9997; }
  .navmenu ul {
    display: none;
    /* Fixed (not absolute) so the menu is positioned to the viewport,
       not the sticky <header> which would collapse it to zero height. */
    position: fixed;
    inset: 70px 20px 20px;
    margin: 0;
    padding: 10px 0;
    list-style: none;
    background: var(--nav-mobile-background-color);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    overflow-y: auto;
    z-index: 9998;
  }
  .navmenu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: var(--nav-dropdown-color);
    font-family: var(--nav-font);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
  }
  .navmenu a i {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    font-size: 12px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent-color), transparent 88%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, color 0.25s ease;
  }
  .navmenu a:hover,
  .navmenu .active {
    color: var(--nav-hover-color);
  }
  .navmenu .toggle-dropdown { transition: transform 0.25s ease; }
  .navmenu .dropdown > ul {
    position: static;
    display: none;
    padding: 6px 0 6px 20px;
    margin: 6px 0 0;
    box-shadow: none;
    background: rgba(0,0,0,0.03);
  }
  .navmenu .dropdown.active > ul,
  .navmenu .dropdown.dropdown-active > ul {
    display: block;
  }
  .navmenu .dropdown.active > a .toggle-dropdown,
  .navmenu .dropdown.dropdown-active > a .toggle-dropdown {
    transform: rotate(180deg);
  }
  body.mobile-nav-active { overflow: hidden; }
  body.mobile-nav-active .navmenu > ul { display: block; }
  /* Lift the sticky header above the backdrop so the menu (which lives
     inside the header's stacking context) renders on top, not under it. */
  body.mobile-nav-active .header { z-index: 9998; }
  /* Backdrop behind the open menu so the page underneath dims */
  body.mobile-nav-active::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(31,48,96,0.5);
    z-index: 9996;
  }
  /* The hamburger sits above the menu so it can be tapped to close */
  .mobile-nav-toggle {
    position: relative;
    z-index: 9999;
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: 0; }
/* Width = 100vw, height = 56.25vw (= 9/16) → carousel is always a 16:9
   block scaled by the device width. Image fills via object-fit: cover. */
.hero .carousel,
.hero .carousel-inner,
.hero .carousel-item {
  width: 100%;
  height: 56.25vw;
  min-height: 0;
}
.hero .carousel-item {
  position: relative;
  background-color: var(--brand-navy);
  overflow: hidden;
}
.hero .carousel-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero .carousel-item::after {
  content: none;
}
.hero .carousel-control-prev,
.hero .carousel-control-next {
  width: 50px;
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 16px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  opacity: 1;
  z-index: 5;
  transition: background 0.25s ease;
}
.hero .carousel-control-prev:hover,
.hero .carousel-control-next:hover {
  background: rgba(255,255,255,0.3);
}
.hero .carousel-control-prev-icon,
.hero .carousel-control-next-icon {
  background: none;
  font-size: 24px;
  color: #fff;
  width: auto;
  height: auto;
}
.hero .carousel-indicators {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
  display: flex;
  justify-content: center;
  z-index: 5;
}
.hero .carousel-indicators li,
.hero .carousel-indicators [data-bs-target] {
  list-style: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  border: 0;
  margin: 0 4px;
  padding: 0;
  cursor: pointer;
  opacity: 1;
}
.hero .carousel-indicators li::marker,
.hero .carousel-indicators [data-bs-target]::marker {
  content: "";   /* belt-and-suspenders: kill the list-marker glyph */
}
.hero .carousel-indicators .active {
  background: var(--brand-orange);
}

/* Admin upload slide is fully styled inline in the partial — only minor helpers here */
.upload-area {
  transition: background 0.3s ease, border-color 0.3s ease;
}
.upload-area:hover {
  background: rgba(255,255,255,0.15) !important;
  border-color: rgba(255,255,255,0.8) !important;
}

/* ============================================================
   About — text on left, image on right
   ============================================================ */
.about {
  position: relative;
}
.about::before {
  content: "";
  position: absolute;
  top: 80px;
  right: 0;
  width: 280px;
  height: 280px;
  background: var(--brand-gradient);
  filter: blur(120px);
  opacity: 0.18;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}
.about .container { position: relative; z-index: 1; }

.about .about-img {
  position: relative;
}
.about .about-img .admin-image-wrapper {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(31,48,96,0.18);
}
.about .about-img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  transition: transform 0.5s ease;
}
.about .about-img:hover img {
  transform: scale(1.03);
}
.about .about-img::after {
  content: "";
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 70%;
  height: 70%;
  background: var(--brand-gradient);
  border-radius: 18px;
  z-index: -1;
  opacity: 0.18;
}

.about .inner-title {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--brand-navy);
}
.about .our-story h4 {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--brand-orange);
  margin: 0 0 8px;
  font-weight: 700;
}
.about .our-story h3 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 18px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.about .our-story p {
  margin-bottom: 22px;
  font-size: 16px;
  line-height: 1.75;
  color: color-mix(in srgb, var(--default-color), transparent 5%);
}

@media (max-width: 991px) {
  .about::before { display: none; }
  .about .about-img::after { display: none; }
}

/* ============================================================
   Services
   ============================================================ */
.services .service-item {
  position: relative;
  background: var(--surface-color);
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  height: 100%;
}
.services .service-item:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}
.services .service-item .icon {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
}
.services .service-item .icon svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.services .service-item .icon i {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  z-index: 2;
  transition: color 0.3s ease;
}
.services .service-item:hover .icon path {
  transition: fill 0.3s ease;
}
.services .service-item h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}
.services .service-item p {
  margin-bottom: 0;
  color: color-mix(in srgb, var(--default-color), transparent 10%);
}
.services .service-item .stretched-link {
  text-decoration: none;
  color: inherit;
}

/* Service card icon colors mapped to Maruman brand palette */
.services .service-item.item-cyan i { color: var(--brand-blue); }
.services .service-item.item-cyan:hover .icon i { color: #fff; }
.services .service-item.item-cyan:hover .icon path { fill: var(--brand-blue); }

.services .service-item.item-orange i { color: var(--brand-orange); }
.services .service-item.item-orange:hover .icon i { color: #fff; }
.services .service-item.item-orange:hover .icon path { fill: var(--brand-orange); }

.services .service-item.item-teal i { color: var(--brand-purple); }
.services .service-item.item-teal:hover .icon i { color: #fff; }
.services .service-item.item-teal:hover .icon path { fill: var(--brand-purple); }

.services .service-item.item-red i { color: var(--brand-pink); }
.services .service-item.item-red:hover .icon i { color: #fff; }
.services .service-item.item-red:hover .icon path { fill: var(--brand-pink); }

.services .service-item.item-indigo i { color: var(--brand-navy); }
.services .service-item.item-indigo:hover .icon i { color: #fff; }
.services .service-item.item-indigo:hover .icon path { fill: var(--brand-navy); }

.services .service-item.item-pink i { color: var(--brand-pink); }
.services .service-item.item-pink:hover .icon i { color: #fff; }
.services .service-item.item-pink:hover .icon path { fill: var(--brand-pink); }

/* ============================================================
   Why-choose-us cards
   ============================================================ */
.why-card {
  background: #fff;
  padding: 30px 24px;
  border-radius: 16px;
  text-align: center;
  height: 100%;
  box-shadow: 0 2px 12px rgba(31,48,96,0.06);
  border-top: 4px solid transparent;
  border-image: var(--brand-gradient);
  border-image-slice: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(31,48,96,0.12);
}
.why-card .why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--brand-gradient-soft);
}
.why-card .why-icon i {
  font-size: 32px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.why-card h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 10px;
}
.why-card p {
  font-size: 14px;
  margin-bottom: 12px;
}

/* ============================================================
   Testimonials
   ============================================================ */
.testimonials .swiper { padding-bottom: 50px; }
.testimonials .testimonial-wrap { padding: 30px; }
.testimonials .testimonial-item {
  position: relative;
  background: #fff;
  padding: 30px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  height: 100%;
}
.testimonials .testimonial-admin-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 5;
}
.testimonials .testimonial-item:hover .testimonial-admin-actions,
.testimonials .testimonial-item:focus-within .testimonial-admin-actions {
  opacity: 1;
  transform: translateY(0);
}
.testimonials .testimonial-admin-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  background: rgba(31,48,96,0.88);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, background 0.15s ease;
}
.testimonials .testimonial-admin-btn:hover {
  transform: scale(1.08);
  background: var(--brand-navy);
}
.testimonials .testimonial-admin-btn-danger {
  background: rgba(220,53,69,0.92);
}
.testimonials .testimonial-admin-btn-danger:hover {
  background: #dc3545;
}
.testimonials .testimonial-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 4px solid #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}
.testimonials h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 8px 0 4px;
}
.testimonials h4 {
  font-size: 13px;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  margin-bottom: 10px;
}
.testimonials .stars {
  margin-bottom: 12px;
}
.testimonials .stars i {
  color: #FFC107;
  margin: 0 1px;
}
.testimonials .quote-icon-left,
.testimonials .quote-icon-right {
  color: color-mix(in srgb, var(--brand-orange), transparent 60%);
  font-size: 26px;
}
.testimonials .quote-icon-left { display: inline-block; transform: scale(-1, -1); margin-right: 6px; }
.testimonials .quote-icon-right { display: inline-block; margin-left: 6px; }
.testimonials .swiper-pagination {
  text-align: center;
}
.testimonials .swiper-pagination-bullet {
  background: var(--brand-navy);
  opacity: 0.3;
}
.testimonials .swiper-pagination-bullet-active {
  background: var(--brand-gradient);
  opacity: 1;
}

/* ============================================================
   Gallery
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #f0f0f0;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

.gallery-add-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border: 3px dashed rgba(31,48,96,0.4);
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  color: var(--brand-navy);
  background: var(--brand-gradient-soft);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.gallery-add-tile:hover {
  background: rgba(247,147,30,0.18);
  transform: scale(1.02);
}
.gallery-add-tile i {
  font-size: 36px;
  display: block;
  margin-bottom: 6px;
}

/* ============================================================
   Contact
   ============================================================ */
.contact .info-item {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  text-align: center;
  height: 100%;
}
.contact .info-item i {
  font-size: 36px;
  color: var(--brand-orange);
  margin-bottom: 12px;
}
.contact .info-item h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.contact .info-item p {
  margin: 0;
  color: color-mix(in srgb, var(--default-color), transparent 10%);
}
.contact iframe {
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}
.contact .form-control {
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.contact .form-control:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(247,147,30,0.18);
  outline: none;
}

/* ============================================================
   Floating WhatsApp
   ============================================================ */
.floating-wa {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  font-size: 32px;
  color: #fff;
  background: #25D366;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37,211,102,0.45), 0 0 0 4px rgba(247,147,30,0.25);
  z-index: 9999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.floating-wa:hover {
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(37,211,102,0.6), 0 0 0 6px rgba(247,147,30,0.35);
}
.floating-wa::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--brand-gradient) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

/* ============================================================
   Admin image overlay (auth-only)
   ============================================================ */
.admin-image-wrapper { position: relative; display: block; }
.admin-image-wrapper .admin-image-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 18px;
  color: #fff;
  background: rgba(31,48,96,0.85);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 5;
}
.admin-image-wrapper:hover .admin-image-overlay { opacity: 1; }
.admin-image-wrapper .admin-image-delete {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 16px;
  color: #fff;
  background: rgba(220,53,69,0.9);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 5;
}
.admin-image-wrapper:hover .admin-image-delete { opacity: 1; }

.admin-image-wrapper .admin-image-hint {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #fff;
  background: rgba(31,48,96,0.78);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 5;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.admin-image-wrapper .admin-image-hint i {
  font-size: 13px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.admin-image-wrapper:hover .admin-image-hint { opacity: 1; }

/* Toast — used for testimonial save/delete confirmations */
.testimonial-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  animation: testimonial-toast-in 0.28s ease-out;
  max-width: calc(100vw - 48px);
}
.testimonial-toast i { font-size: 18px; }
.testimonial-toast-success {
  background: linear-gradient(135deg, #1F8A4C, #22C55E);
}
.testimonial-toast-error {
  background: linear-gradient(135deg, #B91C1C, #EF4444);
}
.testimonial-toast-hide {
  animation: testimonial-toast-out 0.4s ease-in forwards;
}
@keyframes testimonial-toast-in {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
@keyframes testimonial-toast-out {
  from { transform: translateY(0);     opacity: 1; }
  to   { transform: translateY(-12px); opacity: 0; }
}

/* Hint also visible on add-tile (gallery + add new) */
.gallery-add-tile .admin-image-hint-inline {
  font-size: 11px;
  font-weight: 500;
  margin-top: 4px;
  display: block;
  opacity: 0.7;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  position: relative;
  background-color: var(--background-color);
  color: var(--default-color);
  padding: 60px 0 30px;
  font-size: 14px;
}
.footer .footer-top {
  padding-top: 20px;
}
.footer h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  position: relative;
}
.footer h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background: var(--brand-gradient);
  border-radius: 2px;
}
.footer .footer-about p {
  font-size: 14px;
  margin-bottom: 6px;
  font-family: var(--heading-font);
}
.footer .footer-about .logo {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.footer .footer-about .logo img.site-logo,
.footer .footer-about .site-logo {
  display: block;
  width: auto;
  max-height: 100px !important;
  margin: 0 !important;
  padding: 0 !important;
  filter: brightness(0) invert(1);
}
@media (max-width: 768px) {
  .footer .footer-about .logo img.site-logo,
  .footer .footer-about .site-logo { max-height: 80px !important; }
}

.footer .footer-links { margin-bottom: 24px; }
.footer .footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer .footer-links ul li {
  padding: 6px 0;
}
.footer .footer-links ul li a {
  color: color-mix(in srgb, var(--default-color), transparent 25%);
  text-decoration: none;
  transition: color 0.25s ease;
}
.footer .footer-links ul li a:hover { color: var(--brand-orange); }

.footer .social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.footer .social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 50%);
  font-size: 16px;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  text-decoration: none;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.footer .social-links a:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}
.footer .footer-follow .social-links a {
  width: 48px;
  height: 48px;
  font-size: 22px;
  color: #fff;
  background: var(--brand-gradient);
  border: 0;
}
.footer .footer-follow .social-links a:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(247,147,30,0.45);
}

.footer .copyright {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
}
.footer .copyright p { margin: 0; font-size: 14px; }
.footer .copyright .credits {
  margin-top: 6px;
  font-size: 8px;
  color: color-mix(in srgb, var(--default-color), transparent 35%);
}
.footer .copyright .credits a {
  color: var(--brand-orange);
  font-weight: 600;
}
.footer .copyright .credits a:hover {
  color: var(--brand-pink);
}

/* ============================================================
   Scroll-to-top
   ============================================================ */
.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 24px;
  color: #fff;
  background: var(--brand-navy);
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  visibility: hidden;
  opacity: 0;
  z-index: 9998;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.2s ease;
}
.scroll-top:hover { color: #fff; transform: translateY(-3px); }
.scroll-top.active {
  visibility: visible;
  opacity: 1;
}

/* ============================================================
   Preloader
   ============================================================ */
#preloader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#preloader::before {
  content: "";
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 5px solid var(--brand-gradient);
  border-top-color: var(--brand-orange);
  border-right-color: var(--brand-pink);
  border-bottom-color: var(--brand-blue);
  border-left-color: var(--brand-navy);
  animation: spin 1.1s linear infinite;
}
body.loaded #preloader,
body:not(.preload) #preloader {
  opacity: 0;
  visibility: hidden;
}

/* ============================================================
   Responsive overrides — mobile polish
   ============================================================ */

/* Hero — uses aspect-ratio: 16/9 (set above) so the image always fits the
   device width edge-to-edge with no cropping/scroll. Only control sizing
   needs responsive adjustment. */
@media (max-width: 768px) {
  .hero .carousel-control-prev,
  .hero .carousel-control-next {
    width: 40px;
    height: 40px;
    margin: 0 8px;
  }
}

/* Contact map iframe — shorter on mobile */
.contact iframe {
  width: 100%;
  height: 400px;
}
@media (max-width: 768px) {
  .contact iframe { height: 280px; }
}

/* Floating WhatsApp + scroll-top — shrink and tighten on narrow viewports */
@media (max-width: 480px) {
  .floating-wa {
    width: 52px;
    height: 52px;
    font-size: 26px;
    right: 14px;
    bottom: 14px;
  }
  .scroll-top {
    width: 40px;
    height: 40px;
    font-size: 20px;
    right: 14px;
    bottom: 78px;
  }
}

/* Tighter section padding on mobile */
@media (max-width: 768px) {
  section { padding: 56px 0; }
  .section-title { padding-bottom: 36px; }
  .section-title h2 { font-size: 26px; }
}

/* Header logo a touch smaller on phones */
@media (max-width: 480px) {
  .header .logo img,
  .header .logo .site-logo { max-height: 44px; }
  .header { padding: 10px 0; }
}

/* Footer logo a bit smaller on small screens */
@media (max-width: 480px) {
  .footer .footer-about .logo img.site-logo,
  .footer .footer-about .site-logo { max-height: 72px !important; }
}

/* ============================================================
   Responsive pass — full breakpoint coverage (576/768/992/1200)
   ============================================================ */

/* Hero — image dictates height (width:100% × natural aspect-ratio).
   Only the controls need responsive shrinking on phones. */
@media (max-width: 768px) {
  .hero .carousel-control-prev,
  .hero .carousel-control-next {
    width: 40px;
    height: 40px;
    margin: 0 8px;
  }
}

/* Mobile nav polish — wrap protection + tighter inset on tiny screens */
@media (max-width: 1199px) {
  .navmenu a { word-break: break-word; white-space: normal; line-height: 1.35; }
  .navmenu a i.toggle-dropdown { flex: 0 0 auto; }
}
@media (max-width: 575px) {
  .navmenu ul { inset: 56px 12px 12px; }
  .navmenu a { padding: 11px 16px; font-size: 15px; }
}
@media (max-width: 380px) {
  .navmenu ul { inset: 56px 8px 8px; }
  .header .header-social-links { padding-right: 6px; }
  .header .header-social-links a { font-size: 14px; }
}

/* Header logo — smooth ramp between desktop (56px) and phone (44px) */
@media (max-width: 768px) and (min-width: 481px) {
  .header .logo img,
  .header .logo .site-logo { max-height: 50px; }
}

/* Testimonials — small-screen avatar + padding */
@media (max-width: 480px) {
  .testimonials .testimonial-item img { width: 72px; height: 72px; }
  .testimonials .testimonial-wrap { padding: 22px; }
}

/* Services — responsive padding + icon scaling */
@media (max-width: 768px) {
  .services .service-item { padding: 24px; }
  .services .service-item h3 { font-size: 18px; }
  .services .service-item .icon { width: 80px; height: 80px; }
  .services .service-item .icon svg { width: 80px; height: 80px; }
}
@media (max-width: 480px) {
  .services .service-item { padding: 20px; }
  .services .service-item .icon { width: 64px; height: 64px; }
  .services .service-item .icon svg { width: 64px; height: 64px; }
}

/* Contact — textarea min-height instead of fixed rows + form padding ramp */
.contact .php-email-form textarea,
.contact textarea#whatsapp-message { min-height: 180px; }
@media (max-width: 768px) {
  .contact .php-email-form textarea,
  .contact textarea#whatsapp-message { min-height: 130px; }
  .contact .info-item { padding: 22px; }
  .contact .php-email-form { padding: 24px; }
}
@media (max-width: 480px) {
  .contact .php-email-form { padding: 18px; }
  .contact .info-item i { font-size: 24px; }
}

/* Section padding ramp — tablet + phone tightening, footer rhythm */
@media (max-width: 991px) and (min-width: 769px) {
  section { padding: 64px 0; }
  .section-title { padding-bottom: 40px; }
  .section-title h2 { font-size: 30px; }
}
@media (max-width: 480px) {
  section { padding: 44px 0; }
  .section-title h2 { font-size: 22px; }
}
@media (max-width: 768px) {
  .footer { padding-left: 20px; padding-right: 20px; }
  .footer .footer-top { padding: 36px 0 0; }
  .footer .footer-links h4,
  .footer .footer-about h4 { font-size: 16px; margin-top: 18px; }
}
@media (max-width: 480px) {
  /* Tighter side padding + center single-column content for visual balance */
  .footer { padding-left: 24px; padding-right: 24px; }
  .footer .footer-top,
  .footer .copyright { text-align: center; }
  .footer .footer-about .logo,
  .footer .footer-about .footer-contact,
  .footer .footer-follow .social-links { justify-content: center; }
  .footer .footer-about .logo { display: inline-flex; }
  .footer h4::after { left: 50%; transform: translateX(-50%); }
}

/* Defensive horizontal-scroll guard */
html, body { overflow-x: hidden; }
img, video, iframe, svg { max-width: 100%; }

/* ============================================================
   Tracking Section (resi lookup)
   ============================================================ */
.tracking .tracking-form {
  background: linear-gradient(135deg, rgba(31,48,96,0.04), rgba(247,147,30,0.06));
  border-radius: 999px;
  padding: 10px;
  box-shadow:
    0 18px 48px rgba(31, 48, 96, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(31, 48, 96, 0.06);
}

/* Unified pill: icon + input + button on one row, no gaps */
.tracking .tracking-pill {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(31, 48, 96, 0.08);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.tracking .tracking-pill:focus-within {
  box-shadow:
    0 10px 28px rgba(31, 48, 96, 0.14),
    0 0 0 4px color-mix(in srgb, var(--brand-orange), transparent 78%);
  transform: translateY(-1px);
}

.tracking .tracking-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  font-size: 22px;
  color: var(--brand-orange);
  background: linear-gradient(180deg, rgba(247,147,30,0.10), rgba(247,147,30,0.04));
  border-right: 1px solid rgba(31, 48, 96, 0.06);
}

.tracking .tracking-pill-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 60px;
  border: 0;
  background: transparent;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--brand-navy);
  outline: none;
}
.tracking .tracking-pill-input::placeholder {
  color: color-mix(in srgb, var(--brand-navy), transparent 55%);
  font-weight: 400;
}

.tracking .tracking-pill-btn {
  flex: 0 0 auto;
  border: 0;
  margin: 6px;
  padding: 0 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-navy, #1F3060), var(--brand-orange, #F7931E));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.4px;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.tracking .tracking-pill-btn i { font-size: 18px; }
.tracking .tracking-pill-btn:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 24px rgba(31, 48, 96, 0.22);
  transform: translateY(-1px);
}
.tracking .tracking-pill-btn:active {
  transform: translateY(0);
}
.tracking .tracking-pill-btn:disabled {
  opacity: 0.7;
  cursor: progress;
  filter: none;
  transform: none;
  box-shadow: none;
}

/* Admin form still uses the old square submit (.tracking-submit) below */
.tracking .tracking-submit {
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--brand-navy, #1F3060), var(--brand-orange, #F7931E));
  color: #fff;
  border: 0;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.tracking .tracking-submit:hover {
  color: #fff;
  filter: brightness(1.05);
  box-shadow: 0 6px 18px rgba(31, 48, 96, 0.18);
}

.tracking .tracking-result {
  margin-top: 20px;
  min-height: 0;
}

.tracking-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 24px;
  border: 1px solid rgba(31, 48, 96, 0.08);
  box-shadow: 0 8px 24px rgba(31, 48, 96, 0.06);
}

.tracking-card--loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brand-navy);
  font-weight: 500;
}

.tracking-card--empty {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
}
.tracking-card--empty i {
  font-size: 28px;
  color: var(--brand-orange);
  line-height: 1;
}

.tracking-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  border-bottom: 1px dashed rgba(31, 48, 96, 0.12);
  padding-bottom: 12px;
}

.tracking-card-resi {
  font-weight: 700;
  color: var(--brand-navy);
  font-size: 18px;
  letter-spacing: 0.4px;
}

.tracking-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
}
.tracking-status i { font-size: 14px; }
.tracking-status--success {
  background: color-mix(in srgb, #2ecc71, transparent 82%);
  color: #1b7a3f;
}
.tracking-status--progress {
  background: color-mix(in srgb, var(--brand-orange), transparent 82%);
  color: #b15a00;
}
.tracking-status--unknown {
  background: rgba(31, 48, 96, 0.08);
  color: var(--brand-navy);
}

.tracking-card-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 24px;
  margin: 0;
}
.tracking-card-meta dt {
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  font-weight: 600;
  margin-bottom: 2px;
}
.tracking-card-meta dd {
  margin: 0;
  color: var(--brand-navy);
  font-weight: 500;
  font-size: 15px;
}
.tracking-card-meta .tracking-card-meta__notes {
  grid-column: 1 / -1;
}

/* Admin sub-form (only rendered when @auth) */
.tracking .tracking-admin {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px dashed rgba(31, 48, 96, 0.25);
  background: rgba(255, 255, 255, 0.7);
}
.tracking .tracking-admin-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tracking .tracking-admin-help {
  font-size: 13px;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
  margin-bottom: 14px;
}
.tracking .tracking-admin-form .form-control {
  border-radius: 10px;
}
.tracking .tracking-admin-feedback {
  margin-top: 10px;
  font-size: 13px;
  min-height: 18px;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
}
.tracking .tracking-admin-feedback.is-success { color: #1b7a3f; }

/* Compact pill button on small screens — keep input + button inline */
@media (max-width: 575.98px) {
  .tracking .tracking-form { padding: 8px; }
  .tracking .tracking-pill-icon { width: 44px; font-size: 18px; }
  .tracking .tracking-pill-input { height: 52px; padding: 0 12px; font-size: 15px; }
  .tracking .tracking-pill-btn { padding: 0 16px; font-size: 14px; margin: 4px; }
  .tracking .tracking-pill-btn span { display: none; }
  .tracking .tracking-pill-btn i { font-size: 20px; margin: 0; }
}
