/* =========================================================
   Saiber HR Services — custom overrides
   Complements assets/css/main.css (Quiety theme)
   Brand: blue #292A92 / #212162 · gold #FBB900 / #FFC20E
   ========================================================= */

:root {
  --saiber-blue: #292a92;
  --saiber-blue-dark: #212162;
  --saiber-blue-deep: #1a1a4a;
  --saiber-gold: #fbb900;
  --saiber-gold-soft: #ffc20e;
  --saiber-text: #525252;
  --saiber-heading: #14142b;
  --saiber-surface: #f7f8fc;
  --saiber-radius: 12px;
  --saiber-shadow: 14px 14px 56px rgba(33, 38, 106, 0.1);
}

/* ---------- Base polish ---------- */
body {
  color: var(--saiber-text);
}

h1, h2, h3, h4, h5, h6,
.heading-dg-color {
  color: var(--saiber-heading);
}

a {
  transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.main-wrapper {
  overflow-x: hidden;
}

/* Logo sizing (extends .logo-w in main.css) */
.navbar-brand .logo-w,
.navbar-brand .logo-white,
.navbar-brand .logo-color,
.offcanvas-header .logo-w,
.offcanvas-title img,
.footer-single-col .logo-w,
.footer-single-col .logo-white,
.footer-single-col .logo-color {
  height: 72px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

@media (max-width: 575.98px) {
  .navbar-brand .logo-w,
  .navbar-brand .logo-white,
  .navbar-brand .logo-color {
    height: 56px;
    max-width: 170px;
  }
}

/* Sticky header readability on light pages */
.navbar-light.sticky-header.affix .main-menu li a.nav-link {
  color: #fff;
}

.navbar-light.sticky-header.affix .main-menu li a.nav-link:hover {
  color: var(--saiber-gold);
}

/* ---------- Utilities missing from main.css ---------- */
.min-vh-70 {
  min-height: 70vh;
}

.list-two-col-full {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  padding-left: 0;
  list-style: none;
}

.list-two-col-full > li {
  flex: 0 0 50%;
  max-width: 50%;
  padding-right: 16px;
}

@media (max-width: 767.98px) {
  .list-two-col-full > li {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0;
  }
}

/* Section spacing helpers */
.pt-60 {
  padding-top: 60px;
}

.pb-60 {
  padding-bottom: 60px;
}

/* ---------- Hero (home) — show header-bg.jpg with light overlay for text ---------- */
.hero-section.bg-dark {
  background-color: var(--saiber-blue-dark);
  background-image:
    linear-gradient(105deg, rgba(22, 22, 74, 0.82) 0%, rgba(33, 33, 98, 0.55) 45%, rgba(33, 33, 98, 0.25) 100%),
    url("../img/header-bg.jpg");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}

.hero-section .hero-content-wrap h1 {
  color: #fff;
  font-weight: 700;
}

.hero-section .hero-content-wrap .lead {
  color: rgba(255, 255, 255, 0.88);
}

.hero-section .hero-content-wrap .text-warning {
  color: var(--saiber-gold-soft) !important;
  letter-spacing: 0.02em;
}

.hero-section .btn-outline-light:hover {
  color: var(--saiber-blue-dark);
}

/* ---------- Inner page headers ---------- */
.page-header.bg-dark {
  background-color: var(--saiber-blue-dark);
  background-image: url("../img/page-header-bg.svg");
  background-repeat: no-repeat;
  background-position: bottom left;
  background-size: cover;
  color: #fff;
}

.page-header h1 {
  color: #fff;
}

.page-header .bg-circle.bg-dark-light {
  background: rgba(251, 185, 0, 0.12) !important;
  width: 280px;
  height: 280px;
  opacity: 0.9;
}

/* ---------- About / content sections ---------- */
.ah-service::after {
  /* soft fallback if agency-home/service_bg2.png is missing */
  background-image: none;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fc 100%);
}

.section-heading p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--saiber-text);
}

.section-heading h3.text-primary {
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.feature-promo .section-heading + .row,
.feature-promo .row + .row {
  margin-top: 0.5rem;
}

.feature-promo ul li {
  line-height: 1.7;
}

/* ---------- Services grid (home) ---------- */
.dg-service-section {
  padding-top: 80px;
}

.dg-service-section .section-title span.dg-text-primary {
  color: var(--saiber-gold);
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.dg-service-item {
  height: 100%;
  border: 1px solid rgba(33, 38, 106, 0.06);
  box-shadow: 0 8px 30px rgba(33, 38, 106, 0.04);
}

.dg-service-item a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.dg-service-item h5 {
  font-weight: 700;
  min-height: 3.2rem;
}

.dg-service-item:hover {
  transform: translateY(-4px);
  border-color: transparent;
}

/* Icon fallbacks when s-icon-*.png are missing */
.dg-service-item .icon-wrapper span {
  position: relative;
  overflow: hidden;
}

.dg-service-item .icon-wrapper span img {
  max-width: 36px;
  height: auto;
  filter: brightness(0) invert(1);
}

.dg-service-item .icon-wrapper span:has(img[src*="s-icon"]):empty::after,
.dg-service-item .icon-wrapper span img[src*="s-icon"] {
  /* keep white icons when present */
}

/* Decorative line fallback (sr-line.png) */
.dg-service-section > img.sr-line {
  opacity: 0.35;
  max-width: 180px;
  pointer-events: none;
}

.dg-service-section > img.sr-line[src*="sr-line"] {
  /* if broken, hide visual gap */
  min-height: 0;
}

.sr-circle-1.dg-circle-style-1,
.sr-circle-2.dg-circle-style-2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(251, 185, 0, 0.08), transparent 70%);
  pointer-events: none;
}

.sr-circle-1 {
  top: 10%;
  left: -120px;
}

.sr-circle-2 {
  bottom: 5%;
  right: -100px;
  background: radial-gradient(circle, rgba(41, 42, 146, 0.08), transparent 70%);
}

/* ---------- Why choose ---------- */
.why-choose-us .why-choose-content ul li {
  font-size: 1.05rem;
  color: var(--saiber-heading);
}

.why-choose-us .why-choose-content hr {
  opacity: 0.12;
  margin: 0.35rem 0;
}

/* Service / feature images — no placeholder box behind photos */
.why-choose-img {
  position: relative;
  background: transparent;
  min-height: 0;
  overflow: visible;
}

.why-choose-img::before,
.why-choose-img::after {
  content: none !important;
  display: none !important;
}

.why-choose-img img {
  display: block;
  position: relative;
  z-index: 1;
  border-radius: var(--saiber-radius);
  box-shadow: var(--saiber-shadow);
  width: 100%;
  height: auto;
  object-fit: cover;
  background: transparent;
  min-height: 0;
}

/* About image on home */
.ah-service .rounded {
  border-radius: var(--saiber-radius) !important;
  box-shadow: var(--saiber-shadow);
  width: 100%;
  min-height: 280px;
  object-fit: cover;
  background:
    linear-gradient(145deg, #e8ebff 0%, #fff6d6 100%);
}

/* ---------- Contact page ---------- */
.digi-contact {
  background: var(--saiber-surface);
  overflow: visible;
}

.digi-contact-left h6 {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--saiber-heading);
  font-weight: 500;
}

.digi-contact-left .contact-box {
  height: 100%;
  position: relative;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.digi-contact-left .contact-box:hover {
  box-shadow: var(--saiber-shadow);
  transform: translateY(-3px);
}

.digi-contact-left .contact-box img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 16px;
}

/* Form card — keeps all fields + button inside white panel */
.contact-form-card {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
  position: relative;
  z-index: 2;
  background: #fff;
  padding: 40px 32px;
  border-radius: 12px;
  box-shadow: var(--saiber-shadow);
}

.contact-form-card form {
  display: block;
  width: 100%;
}

.contact-form-card .form-control,
.digi-contact .form-control {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(33, 38, 106, 0.12);
  background: #fff;
  position: static;
  box-sizing: border-box;
}

.contact-form-card textarea.form-control {
  min-height: 140px;
  resize: vertical;
  margin-bottom: 0;
}

.contact-form-card .form-control:focus,
.digi-contact .form-control:focus {
  border-color: var(--saiber-gold);
  box-shadow: 0 0 0 0.2rem rgba(251, 185, 0, 0.2);
  outline: 0;
}

.contact-form-card .bg-orange,
.digi-contact .bg-orange {
  display: inline-block;
  background-color: var(--saiber-gold) !important;
  color: var(--saiber-blue-dark) !important;
  border: 1px solid var(--saiber-gold) !important;
  font-weight: 600;
  padding: 10px 32px;
  white-space: nowrap;
  position: static;
}

.contact-form-card .bg-orange:hover,
.digi-contact .bg-orange:hover {
  background-color: transparent !important;
  color: var(--saiber-gold) !important;
}

.contact-form-card .alert {
  border-radius: 8px;
  font-size: 0.95rem;
}

@media (max-width: 575.98px) {
  .contact-form-card {
    padding: 28px 20px;
  }
}

/* ---------- Footer — fallback for footer-bg.png ---------- */
.footer-top.bg-dark {
  background-color: var(--saiber-blue-dark) !important;
  background-image:
    radial-gradient(ellipse at bottom right, rgba(251, 185, 0, 0.15), transparent 45%),
    linear-gradient(160deg, #1a1a4a 0%, #212162 60%, #16163f 100%) !important;
  background-repeat: no-repeat !important;
  background-position: bottom right !important;
  background-size: cover !important;
}

.footer-section .footer-nav-list a:hover {
  color: var(--saiber-gold) !important;
}

.footer-social-list a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.footer-social-list a:hover {
  background: var(--saiber-gold);
  color: var(--saiber-blue-dark) !important;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Hide password-manager junk if injected into footer forms */
kpm-field-badge {
  display: none !important;
}

/* ---------- Flaticon fallback (local icon fonts missing) ---------- */
.flaticon-menu::before {
  content: "\f0c9";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.5rem;
  color: #fff;
}

.navbar-light.sticky-header:not(.affix) .flaticon-menu::before {
  color: var(--saiber-blue-dark);
}

.navbar-light.sticky-header.affix .flaticon-menu::before,
.hero-section ~ * .flaticon-menu::before {
  color: #fff;
}

/* Home header sits on dark hero — keep hamburger light */
.main-header.z-10 .flaticon-menu::before {
  color: #fff;
}

.flaticon-cancel::before {
  content: "\f00d";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.25rem;
}

/* ---------- Preloader ---------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#preloader .preloader-icon {
  max-width: 64px;
  height: auto;
}

#preloader .loading-bar {
  background: linear-gradient(90deg, var(--saiber-blue), var(--saiber-gold));
}

/* ---------- Buttons ---------- */
.btn-primary {
  font-weight: 600;
  color: #14142b;
}

.btn-primary:hover {
  filter: brightness(0.95);
}

/* ---------- Services page alternating rows ---------- */
.feature-promo .why-choose-img img.rounded-3 {
  border-radius: var(--saiber-radius) !important;
}

@media (max-width: 991.98px) {
  .feature-promo .why-choose-img {
    margin-bottom: 1.5rem;
  }

  .dg-service-item h5 {
    min-height: 0;
  }
}

/* ---------- Typography alignment with loaded Google fonts ---------- */
body,
.main-wrapper {
  font-family: "DM Sans", "Open Sans", sans-serif;
}

h1, h2, h3, h4, h5, h6,
.display-5,
.navbar .nav-link,
.btn {
  font-family: "Plus Jakarta Sans", "Poppins", sans-serif;
}

/* ---------- Smooth image load / broken-image polish ---------- */
img {
  max-width: 100%;
}

/* When browser shows broken-image icon, keep layout calm */
.icon-wrapper img {
  display: block;
  max-height: 40px;
}
