/* CST Systems overrides */
/* Removed obsolete pre-header styles */

body {
  margin: 0;
}

/* Compact primary header inspired by ursadmin.ro */
.header-area {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: auto;
  padding: 6px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  z-index: 120;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

/* General nav item resets */
.header-area .main-nav .nav li { border: none !important; }
.header-area .main-nav .nav li a { background: none !important; }

/* Remove animation offset flicker */
.header-area.slideInDown {
  animation: none !important;
  -webkit-animation: none !important;
  transform: translateY(0) !important;
}

/* Ensure no stray margin above */
html, body { margin:0; padding:0; height: 100%; }

/* Sticky footer without wrapper: body as flex container */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Ensure main content flows without overlap with fixed header */
body > header.header-area + * { padding-top: 90px; }
@media (max-width: 991.98px) { body > header.header-area + * { padding-top: 110px; } }

/* Neutralize legacy negative top margins causing section overlap */
.main-banner,
.about.section,
.services.section,
.free-quote,
.our-portfolio.section,
.blog,
.contact-us.section { margin-top: 0 !important; position: relative; z-index: 1; }

/* Restore vertical rhythm: give each major section top spacing except first */
header + .main-banner { margin-top: 0 !important; }
.main-banner { padding-top: 180px !important; padding-bottom: 120px !important; z-index:2; }
.main-banner { min-height: 620px; }
.about.section { margin-top: 80px !important; }
.about.section, #about { padding-top: 60px !important; }

/* Remove legacy negative margin on skills content block */
.skills-content { margin-top: 0 !important; }

/* Ensure banner and about do not visually fuse */
.main-banner + .about.section { border-top: 1px solid rgba(0,0,0,0.06); }
.services.section { margin-top: 80px !important; }
.our-portfolio.section { margin-top: 80px !important; }
.blog { margin-top: 80px !important; }
.contact-us.section { margin-top: 80px !important; }

/* Prevent about image from overlapping previous banner */
.about.section .about-left-image { position: relative; z-index:1; }

/* Owl carousel negative margin compensation */
.owl-carousel, .owl-stage-outer { margin-top: 0 !important; }

/* Sticky footer wrapper removed per request */

/* Offset main content for fixed header height */
main, .main-banner, .about.section, .services.section, .free-quote, .our-portfolio.section {
  scroll-margin-top: 80px;
}

.header-area .main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.background-header {
  background: rgba(255,255,255,0.85) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

/* Prevent layout jump when background-header class toggles */
.background-header .main-nav .logo { line-height: inherit !important; }
.background-header .main-nav .nav { margin-top: 0 !important; }

@media (max-width: 991.98px) {
  .header-area {
    padding: 10px 0;
  }

  .header-area .main-nav {
    align-items: center;
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .header-area .main-nav .nav {
    width: 100%;
    float: none;
    margin-top: 0;
    background: rgba(255,255,255,0.85) !important;
    background-color: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 16px 40px rgba(15,23,42,0.12);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 10px 16px;
    z-index: 110;
  }

  /* Show language selector inside the mobile menu */
  .header-area .main-nav .nav .lang-switch {
    display: inline-flex;
  }

  /* Hide the separate mobile language button to avoid duplication */
  .mobile-lang-switch {
    display: none;
  }

  .menu-trigger {
    margin-left: auto;
  }
}

.mobile-lang-switch {
  display: none;
  position: relative;
}

.mobile-lang-switch .lang-menu {
  right: 0;
  left: auto;
}

@media (min-width: 992px) {
  .mobile-lang-switch {
    display: none !important;
  }
}

@media (min-width: 992px) {
  .header-area .main-nav {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 0;
  }

  .header-area .main-nav .logo {
    display: flex !important;
    align-items: center;
    line-height: 1;
  }

  .header-area .main-nav .logo img {
    height: 42px;
    width: auto;
  }

  .header-area .main-nav .nav {
    margin-top: 0;
    margin-right: 0;
    float: none;
    display: flex;
    align-items: center;
    gap: 28px;
  }

  .header-area .main-nav .nav li,
  .header-area .main-nav .nav li:last-child {
    padding: 0;
  }

  .header-area .main-nav .nav li a {
    display: inline-flex;
    align-items: center;
    height: auto;
    line-height: 1;
    padding: 12px 0;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f172a;
    position: relative;
  }

  .header-area .main-nav .nav li a:after {
    content: none;
  }

  .header-area .main-nav .nav li a:hover,
  .header-area .main-nav .nav li a.active {
    color: #0f172a !important;
  }

  .header-area .main-nav .nav li a:hover:after,
  .header-area .main-nav .nav li a.active:after {
    opacity: 1;
    transform: scaleX(1);
  }

  .lang-switch {
    margin-left: 8px;
  }
}

/* Footer spacing fixes: ensure no extra gap below */
/* Keep no gap below footer */
footer { margin-bottom: 0 !important; padding-bottom: 0 !important; }
/* Push footer to the bottom on short pages */
footer { margin-top: auto !important; }
footer p { margin-bottom: 0 !important; }

/* Language switch dropdown */
/* Override template hover color for last nav item */
.header-area .main-nav .nav li:last-child a:hover,
.background-header .main-nav .nav li:last-child a:hover {
  color: #726ae3 !important;
}
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-switch--mobile { /* variant hook if needed */ }
.lang-toggle {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 4px 6px;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.lang-toggle:hover {
  opacity: 0.75;
}
.lang-toggle .flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.lang-toggle .flag img {
  width: 18px;
  height: 12px;
  border-radius: 3px;
  box-shadow: 0 0 4px rgba(15,23,42,0.25);
}
.lang-toggle .caret {
  font-size: 10px;
}
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.15);
  padding: 8px 0;
  min-width: 150px;
  display: none;
  z-index: 50;
  outline: none;
}
.lang-menu.show {
  display: block;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  color: #111;
  text-decoration: none;
  font-size: 14px;
  outline: none;
  border: none;
}
.lang-menu .lang-option:first-child {
  margin-bottom: 10px;
}
.lang-option:hover {
  background: transparent;
  color: #726ae3 !important;
}

/* =====================
   Footer (site-footer)
   ===================== */
.site-footer { 
  background: linear-gradient(135deg,#f8c5d3 0%, #f3b6c5 60%, #eea7b8 100%); 
  color: #442934; 
  background-image: none !important;
}
.site-footer a { color: #442934; text-decoration: none; }
.site-footer a:hover { color: #2c1a22; }
.site-footer .footer-main { padding: 56px 0 28px; }
.site-footer .footer-title { 
  color: #ffffff; 
  font-size: 16px; 
  font-weight: 700; 
  margin-bottom: 14px; 
}
.site-footer .footer-logo { height: 40px; width: auto; }
.site-footer .footer-links li { margin: 8px 0; }

.site-footer .info-item { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  background: rgba(255,255,255,0.55); 
  border-radius: 10px; 
  padding: 10px 12px; 
  margin-bottom: 10px; 
  color:#442934;
}
.site-footer .info-item .icon { 
  width: 34px; height: 34px; 
  border-radius: 8px; 
  display: inline-flex; 
  align-items: center; justify-content: center; 
  background: rgba(255,255,255,0.75);
  color:#442934;
}
.site-footer .badge-card {
  display:inline-flex; align-items:center; justify-content:center;
  padding:0; background:none; border:none; box-shadow:none; backdrop-filter:none;
}
.site-footer .badge-card img { display:block; height:60px; width:auto; }
.site-footer .badge-card:hover { background:none; }

.site-footer .footer-bottom { 
  background: #e99ab1; 
  padding: 14px 0; 
  border-top: 1px solid rgba(255,255,255,0.4); 
  color:#442934;
}
.site-footer .bottom-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

@media (max-width: 767.98px) {
  .site-footer .bottom-inner { flex-direction: column; text-align: center; }
}

/* Ensure focus state matches hover for accessibility */
.lang-option:focus {
  outline: none;
  color: #726ae3 !important;
  background: transparent;
}
.lang-option.active {
  font-weight: 600;
}
.lang-option .flag {
  display: inline-flex;
  align-items: center;
}
.lang-option .flag img {
  width: 20px;
  height: 14px;
  border-radius: 3px;
  box-shadow: 0 0 4px rgba(15,23,42,0.25);
}
.lang-option .label {
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Optional legacy centered logo (unused currently) */
.header-area .logo-centered {
  display: inline-block;
}
.header-area .logo-centered img {
  max-height: 56px;
  width: auto;
}
