/* Siaco site styles — custom look; section flow unchanged */

#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease-out, visibility 0s linear .4s;
  z-index: 99999;
  background: var(--av-paper, #f7f4ef);
}
#spinner.show {
  transition: opacity .4s ease-out;
  visibility: visible;
  opacity: 1;
}

.btn { font-weight: 600; transition: .25s ease; border-radius: 4px; }
.btn-square, .btn-sm-square, .btn-md-square, .btn-lg-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-square { width: 40px; height: 40px; }
.btn-sm-square { width: 34px; height: 34px; }
.btn-md-square { width: 46px; height: 46px; }
.btn-lg-square { width: 56px; height: 56px; }

.back-to-top {
  position: fixed;
  width: 44px;
  height: 44px;
  right: 24px;
  bottom: 24px;
  z-index: 99;
  border-radius: 4px !important;
}

/* —— Top bar —— */
.av-topbar {
  background: var(--av-ink);
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
}
.av-topbar a { color: rgba(255,255,255,.7); text-decoration: none; }
.av-topbar a:hover { color: #fff; }
.av-topbar .accent { color: var(--av-gold); }

/* —— Nav —— */
.av-nav {
  background: #fff;
  border-bottom: 1px solid var(--av-line);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.av-nav .navbar {
  padding-top: .85rem;
  padding-bottom: .85rem;
}
.av-nav .navbar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
}
.av-nav .brand-logo { width: 36px; height: 36px; display: block; }
.av-nav .brand-mark {
  width: 34px;
  height: 34px;
  background: var(--av-navy);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 4px;
}
.av-nav .brand-text {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--av-ink);
  margin: 0;
}
.av-nav .brand-text span { color: var(--av-accent); font-weight: 500; }
.av-nav .nav-link {
  color: var(--av-muted) !important;
  font-weight: 600;
  font-size: .95rem;
  padding: .5rem .85rem !important;
}
.av-nav .nav-link:hover,
.av-nav .nav-link.active {
  color: var(--av-navy) !important;
}
.av-nav .nav-cta {
  background: var(--av-accent);
  color: #fff !important;
  padding: .55rem 1.1rem !important;
  border-radius: 4px;
  margin-left: .5rem;
}
.av-nav .nav-cta:hover { background: var(--av-primary-dark); color: #fff !important; }
.av-nav .navbar-toggler {
  border: 1px solid var(--av-line);
  background: #fff;
  padding: .45rem .6rem;
  border-radius: 4px;
}
.av-nav .navbar-toggler:focus {
  box-shadow: 0 0 0 .2rem rgba(30, 58, 95, .15);
}
.av-nav .navbar-toggler-icon {
  /* Dark bars on light nav — do not invert (that made a white icon on white) */
  width: 1.4rem;
  height: 1.4rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2818, 21, 28, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-size: 100%;
}
@media (max-width: 991.98px) {
  .av-nav .navbar-collapse {
    background: #fff;
    border: 1px solid var(--av-line);
    border-radius: 4px;
    margin-top: .75rem;
    padding: .75rem;
    box-shadow: 0 12px 28px rgba(18, 21, 28, .08);
  }
  .av-nav .nav-link {
    padding: .7rem .85rem !important;
    border-radius: 4px;
  }
  .av-nav .nav-link:hover,
  .av-nav .nav-link.active {
    background: var(--av-sand);
  }
  .av-nav .nav-cta {
    margin-left: 0;
    margin-top: .35rem;
    text-align: center;
  }
}

/* —— Hero / carousel —— */
.carousel-item {
  position: relative;
  min-height: 560px;
  overflow: hidden;
}
.carousel-item img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  filter: grayscale(20%) contrast(1.05);
}
.carousel-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(105deg, rgba(18,21,28,.88) 0%, rgba(18,21,28,.55) 55%, rgba(15,94,90,.35) 100%);
}
.carousel-caption {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  text-align: left;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 5.5rem;
  /* Full-bleed caption was eating clicks on prev/next/indicators */
  pointer-events: none;
}
.carousel-content {
  max-width: 720px;
  pointer-events: auto;
  width: 100%;
}
.carousel-item h1 {
  font-size: clamp(2.1rem, 5vw, 3.75rem);
  line-height: 1.12;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.carousel-lead,
.carousel-item p {
  color: rgba(255,255,255,.82) !important;
  max-width: 36rem;
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
  line-height: 1.55;
}
.carousel-item h6 {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem !important;
  font-family: "Manrope", sans-serif !important;
  font-weight: 700;
  color: var(--av-gold) !important;
}
.carousel-actions .btn {
  white-space: nowrap;
}
.carousel-content-btn1,
.carousel-content-btn2 {
  border-radius: 4px !important;
  font-weight: 700;
  letter-spacing: .02em;
}
.carousel-content-btn1 {
  background: var(--av-accent) !important;
  border-color: var(--av-accent) !important;
}
.carousel-content-btn2 {
  background: transparent !important;
  border: 2px solid rgba(255,255,255,.7) !important;
  color: #fff !important;
}
.carousel-content-btn2:hover {
  background: #fff !important;
  color: var(--av-ink) !important;
  border-color: #fff !important;
}
.carousel-control-prev,
.carousel-control-next {
  width: 48px;
  height: 48px;
  top: 50%;
  transform: translateY(-50%);
  bottom: auto;
  opacity: 1;
  z-index: 5;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 4px;
  pointer-events: auto;
}
.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: var(--av-accent);
  border-color: var(--av-accent);
  opacity: 1;
}
.carousel-control-prev { left: 24px; }
.carousel-control-next { right: 24px; }
#carouselId .carousel-indicators {
  gap: 8px;
  z-index: 5;
  margin-bottom: 1.25rem;
}
#carouselId .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  border: 0;
  opacity: 1;
  text-indent: -9999px;
  padding: 0;
  margin: 0;
}
#carouselId .carousel-indicators .active,
#carouselId .carousel-indicators [data-bs-target]:hover {
  background: var(--av-accent);
}

/* Tablet and below: caption drives height so CTAs are never clipped */
@media (max-width: 991.98px) {
  .carousel-item {
    min-height: 0;
    height: auto;
  }
  .carousel-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: 0;
  }
  .carousel-caption {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    bottom: auto;
    min-height: 420px;
    padding: 3rem 4.5rem 3.75rem;
  }
  .carousel-content { max-width: 100%; }
  .carousel-item h1 {
    font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  }
  .carousel-control-prev,
  .carousel-control-next {
    width: 40px;
    height: 40px;
  }
  .carousel-control-prev { left: 12px; }
  .carousel-control-next { right: 12px; }
}

@media (max-width: 575.98px) {
  .carousel-caption {
    min-height: 0;
    padding: 2rem 1.15rem 3.25rem;
    align-items: flex-end;
  }
  .carousel-item h1 {
    font-size: clamp(1.55rem, 7.5vw, 2rem);
  }
  .carousel-lead {
    font-size: 0.95rem !important;
  }
  .carousel-actions .btn {
    width: 100%;
    white-space: normal;
  }
  /* Side arrows overlap copy on narrow screens; dots are enough */
  .carousel-control-prev,
  .carousel-control-next {
    display: none;
  }
  #carouselId .carousel-indicators {
    margin-bottom: 0.85rem;
  }
}

/* —— Page header —— */
.page-header {
  background: linear-gradient(120deg, rgba(18,21,28,.92), rgba(15,94,90,.85)),
    url(../img/carousel-1.jpg) center/cover no-repeat;
  border-bottom: 4px solid var(--av-gold);
}
.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
}
.breadcrumb { background: transparent; }
.breadcrumb-item a { color: rgba(255,255,255,.75); text-decoration: none; }
.breadcrumb-item.active,
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.55); }

/* —— Stats strip —— */
.av-facts {
  background: var(--av-navy);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.av-facts .counter h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.75rem;
  color: var(--av-gold) !important;
  margin: 0;
}
.av-facts .counter h5 {
  font-family: "Manrope", sans-serif;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.4;
  opacity: .9;
}

/* —— About —— */
#about img { border-radius: 4px !important; box-shadow: 0 18px 40px rgba(18,21,28,.12); }
#about h5 {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-family: "Manrope", sans-serif !important;
  font-weight: 700;
  color: var(--av-accent) !important;
}
.about-images {
  min-height: 280px;
}
.about-img-main {
  width: 75%;
  margin-bottom: 25%;
}
.about-img-accent {
  position: absolute;
  top: 25%;
  left: 25%;
  width: 75%;
}
@media (max-width: 767.98px) {
  .about-images {
    min-height: 0;
    display: grid;
    gap: 0.85rem;
  }
  .about-img-main {
    width: 100%;
    margin-bottom: 0;
  }
  .about-img-accent {
    position: static;
    top: auto;
    left: auto;
    width: 100%;
  }
}

/* —— Services —— */
.services { background: #fff; }
.services h5, .project h5, .blog h5 {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-family: "Manrope", sans-serif !important;
  font-weight: 700;
}
.services-item {
  border: 1px solid var(--av-line);
  background: var(--av-paper) !important;
  border-radius: 4px;
  height: 100%;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.services-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(18,21,28,.08);
  border-color: var(--av-navy);
}
.services-content-icon i {
  font-size: 2.5rem !important;
  margin-bottom: 1rem !important;
  color: var(--av-navy) !important;
}
.services-item h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

/* —— Products / projects —— */
.project { background: var(--av-sand); }
.project-item { overflow: hidden; border-radius: 4px; }
.project-img { position: relative; overflow: hidden; border-radius: 4px; }
.project-img img {
  transition: transform .45s ease;
  filter: saturate(.9);
}
.project-item:hover img { transform: scale(1.05); }
.project-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.25rem;
  background: linear-gradient(transparent, rgba(18,21,28,.92));
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  opacity: 1;
  transition: none;
}
.project-content a { text-decoration: none; text-align: left !important; }
.project-content h4 {
  color: #fff !important;
  font-size: 1.2rem;
  margin-bottom: .25rem;
}
.project-content p { color: var(--av-gold) !important; font-weight: 600; font-size: .85rem; }

/* —— Blog —— */
.blog-item {
  border: 1px solid var(--av-line);
  background: #fff !important;
  border-radius: 4px;
  overflow: hidden;
  height: 100%;
}
.blog-item > img { border-radius: 0 !important; }
.blog-item > span {
  background: var(--av-ink) !important;
  border-radius: 4px !important;
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  top: 12px !important;
  right: 12px !important;
}
.blog-btn { margin-top: -48px !important; }
.blog-icon {
  background: var(--av-accent) !important;
  border-radius: 4px !important;
}
.blog-icon a { font-size: .85rem; font-weight: 700; }
.blog-btn-icon { display: none !important; }
.blog-content {
  margin-top: 0 !important;
  padding-top: 1.5rem !important;
}
.blog-content img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-color: var(--av-sand) !important;
}
.blog-content h5 {
  font-size: 1.15rem;
  text-transform: none;
  letter-spacing: 0;
  font-family: "Fraunces", Georgia, serif !important;
  color: var(--av-ink) !important;
}
.blog-coment {
  background: var(--av-navy) !important;
  border: 0 !important;
  border-radius: 0 !important;
}
.blog-coment a { font-size: .8rem; }

/* —— Footer —— */
.footer {
  background: var(--av-ink) !important;
  border-top: 4px solid var(--av-gold);
}
.footer h1 {
  font-size: 1.6rem;
  font-family: "Fraunces", Georgia, serif;
}
.footer .text-secondary { color: var(--av-gold) !important; }
.footer a.h3 {
  font-size: 1rem;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  text-decoration: none;
}
.short-link a, .help-link a, .contact-link a, .contact-link span {
  font-size: .92rem;
}
.av-social a,
.footer .btn-square {
  background: rgba(255,255,255,.08) !important;
  border-radius: 4px !important;
}
.av-social a:hover { background: var(--av-accent) !important; }
.av-social a i { color: #fff !important; }

/* —— Contact —— */
.contact-detail {
  background: #fff;
  border: 1px solid var(--av-line);
  border-radius: 4px;
}
.contact-detail .btn-square { border-radius: 4px !important; }

/* —— Misc —— */
.alert { border-radius: 4px; }
.form-control {
  border-radius: 4px;
  border-color: var(--av-line);
}
.form-control:focus {
  border-color: var(--av-navy);
  box-shadow: 0 0 0 .2rem rgba(15,94,90,.15);
}

/* Quiet down stock WOW defaults if present */
.wow { visibility: visible; }

/* —— Global small-screen hardening —— */
html,
body {
  overflow-x: hidden;
}
img {
  max-width: 100%;
  height: auto;
}
/* Hero images keep explicit cover sizing from the carousel rules above */
.carousel-item > img {
  max-width: none;
  height: 560px;
}
@media (max-width: 991.98px) {
  .carousel-item > img {
    height: 100%;
  }
}

@media (max-width: 767.98px) {
  .av-nav .brand-text {
    font-size: 1.15rem;
    max-width: min(52vw, 11rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .page-header {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  .page-header .container {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }
  .page-header h1 {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
  }
  .av-facts .counter {
    gap: 0.35rem;
  }
  .av-facts .counter h1 {
    font-size: 2.25rem;
  }
  .av-facts .counter h5 {
    font-size: 0.9rem;
  }
  .services-item .btn,
  #about .btn {
    width: 100%;
    max-width: 20rem;
  }
  .project-content {
    padding: 1rem;
  }
  .blog-item > span {
    padding: 0.55rem 0.9rem !important;
    font-size: 0.7rem;
  }
  .footer .row > [class*="col-"] {
    text-align: left;
  }
  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 575.98px) {
  .container,
  .container-sm {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  #about h1,
  .services h1,
  .project h1,
  .blog h1 {
    font-size: clamp(1.55rem, 7vw, 1.9rem);
  }
}
