:root {
  --x-blue: #0b5ed7;
  --x-black: #05070b;
  --x-gray: #121720;
  --x-gray-2: #202937;
  --x-white: #ffffff;
  --x-silver: #d6dfed;
  --x-gradient: linear-gradient(120deg, #07101f 0%, #0c1f3f 48%, #0b5ed7 100%);
  --shadow-soft: 0 12px 35px rgba(5, 7, 11, 0.25);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Sora", sans-serif;
  color: var(--x-white);
  background: var(--x-black);
  line-height: 1.6;
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.section-kicker,
.btn,
.nav-link {
  font-family: "Rajdhani", sans-serif;
  letter-spacing: 0.5px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
}

#site-loader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, #15315f, #04060a 65%);
  z-index: 2000;
  display: grid;
  place-items: center;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#site-loader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader-core {
  text-align: center;
}

.loader-ring {
  width: 76px;
  height: 76px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--x-blue);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 1s linear infinite;
}

.loader-core p {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 3px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.section-pad {
  padding: 4.5rem 0;
}

.section-kicker {
  color: var(--x-blue);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.section-heading h2 {
  margin: 0;
  color: #edf4ff;
  font-size: clamp(1.8rem, 3vw, 2.9rem);
  font-weight: 700;
}

.section-subtitle {
  color: #acbedf;
  margin-top: 0.8rem;
}

.bg-light-custom {
  background: linear-gradient(180deg, #0b111b 0%, #111a29 100%);
}

.navbar {
  padding: 0.95rem 0;
  transition: background-color 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
}

.navbar.scrolled {
  background: rgba(4, 8, 14, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(1, 3, 8, 0.35);
}

.navbar-brand {
  color: var(--x-white);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  flex-direction: column;
}

.navbar-brand small {
  font-size: 0.57rem;
  color: #c8d6ef;
  font-weight: 500;
  margin-top: 4px;
  font-family: "Sora", sans-serif;
}

.brand-mark,
.footer-brand span {
  color: var(--x-blue);
}

.nav-link {
  color: #f2f6fc;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 0.35rem;
  position: relative;
  font-size: 0.98rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--x-blue);
  transition: width 0.28s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.social-mini a,
.footer-social a {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--x-white);
  transition: 0.25s ease;
}

.social-mini a:hover,
.footer-social a:hover {
  border-color: var(--x-blue);
  color: var(--x-blue);
  transform: translateY(-2px);
}

.btn {
  border-radius: 999px;
  font-size: 0.95rem;
  letter-spacing: 0.8px;
  font-weight: 700;
  padding: 0.72rem 1.4rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-xl {
  padding: 0.85rem 1.7rem;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--x-blue);
  border-color: var(--x-blue);
  box-shadow: 0 10px 24px rgba(11, 94, 215, 0.35);
}

.btn-primary:hover {
  background: #1a70ef;
  border-color: #1a70ef;
}

.btn-outline-light,
.btn-outline-primary {
  backdrop-filter: blur(6px);
}

.hero-section {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  padding-top: 5rem;
}

.hero-parallax {
  position: absolute;
  inset: -5% 0 0 0;
  background-image: url("https://www.xlibrio.cl/web/image/528-cabb139c/Mantenimiento-Industrial.02.webp");
  background-size: cover;
  background-position: center;
  transform: translateY(0);
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(3, 9, 17, 0.92) 20%, rgba(3, 9, 17, 0.68) 60%, rgba(4, 22, 52, 0.42) 100%);
}

.hero-kicker {
  color: #b9d0f6;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

.hero-section h1 {
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 1.02;
  font-weight: 700;
  margin-bottom: 1rem;
  max-width: 13ch;
}

.hero-section h1 span {
  color: var(--x-blue);
}

.hero-description {
  max-width: 56ch;
  color: #d8e2f3;
  margin-bottom: 2rem;
}

.benefits-strip {
  background: linear-gradient(180deg, #0c1322 0%, #080d18 100%);
  margin-top: -1px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.6rem 0;
}

.benefit-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(130, 162, 214, 0.25);
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
  height: 100%;
}

.benefit-item i {
  color: var(--x-blue);
  font-size: 1.3rem;
}

.benefit-item h3 {
  margin: 0.55rem 0 0.12rem;
  font-size: 1.25rem;
}

.benefit-item p {
  margin: 0;
  color: #b8cae8;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.service-card,
.blog-card {
  background: linear-gradient(180deg, #141e2f 0%, #0e1522 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s ease, border-color 0.35s ease;
}

.service-card:hover,
.blog-card:hover {
  transform: translateY(-8px);
  border-color: rgba(11, 94, 215, 0.75);
}

.service-card img,
.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.service-card:hover img,
.blog-card:hover img {
  transform: scale(1.06);
}

.service-card-body,
.blog-card-body {
  padding: 1.05rem;
}

.service-card h3,
.blog-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.45rem;
}

.service-card p,
.blog-card p,
.about-section p {
  color: #bed0ee;
  font-size: 0.95rem;
}

.service-link {
  color: #5fa4ff;
  font-weight: 700;
  font-family: "Rajdhani", sans-serif;
  letter-spacing: 0.8px;
}

.service-link i {
  margin-left: 4px;
  transition: transform 0.25s ease;
}

.service-link:hover i {
  transform: translateX(4px);
}

.about-media {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-soft);
}

.about-media img {
  min-height: 350px;
  object-fit: cover;
}

.about-checks {
  list-style: none;
  padding-left: 0;
  margin-top: 1.2rem;
  color: #d9e7ff;
}

.about-checks li {
  margin-bottom: 0.65rem;
}

.about-checks i {
  color: var(--x-blue);
  margin-right: 0.5rem;
}

.projects-section {
  background: var(--x-gradient);
}

.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 9, 17, 0.05), rgba(3, 9, 17, 0.88));
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.project-overlay h3 {
  margin: 0;
}

.project-overlay p {
  margin: 0;
  color: #bfd1ee;
}

.project-card:hover img {
  transform: scale(1.08);
}

.projects-swiper .swiper-pagination-bullet {
  background: #d8e5fa;
}

.projects-swiper .swiper-pagination-bullet-active {
  background: var(--x-blue);
}

.social-grid,
.linkedin-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}

.feed-card {
  border: 1px solid rgba(135, 167, 215, 0.25);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(18, 25, 36, 0.95);
  box-shadow: var(--shadow-soft);
}

.feed-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.feed-card-body {
  padding: 0.9rem 1rem;
}

.feed-meta {
  color: #9db4d8;
  font-size: 0.85rem;
}

.embed-fallback {
  background: linear-gradient(145deg, rgba(17, 24, 34, 0.9), rgba(12, 16, 25, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  padding: 1.3rem;
  color: #c8d8f4;
}

.final-cta {
  background: url("https://www.xlibrio.cl/web/image/526-095a7303/construction-8429929_1920-1536x1024.webp") center/cover no-repeat;
  position: relative;
}

.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 9, 17, 0.92), rgba(3, 9, 17, 0.5));
}

.final-cta-box {
  position: relative;
  z-index: 1;
  text-align: center;
  background: rgba(6, 11, 20, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 22px;
  padding: 2rem 1.2rem;
  backdrop-filter: blur(6px);
}

.final-cta-box h2 {
  font-size: clamp(1.7rem, 4vw, 3rem);
}

.final-cta-box p {
  color: #d5e3f8;
  margin: 0.6rem auto 1.35rem;
}

.site-footer {
  background: #060b12;
  padding: 4rem 0 1.5rem;
}

.footer-brand {
  font-size: 1.7rem;
}

.site-footer p,
.site-footer li,
.site-footer a {
  color: #c8d3e7;
}

.site-footer h4 {
  color: #ecf4ff;
  margin-bottom: 0.8rem;
}

.site-footer ul {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a:hover {
  color: var(--x-blue);
}

.contact-list i {
  color: var(--x-blue);
  width: 18px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
}

.whatsapp-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  font-size: 1.6rem;
  box-shadow: 0 12px 24px rgba(9, 18, 10, 0.35);
  z-index: 1200;
}

.whatsapp-float:hover {
  transform: translateY(-3px);
  color: #fff;
}

@media (min-width: 576px) {
  .social-grid,
  .linkedin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .section-pad {
    padding: 5.5rem 0;
  }

  .project-card {
    min-height: 420px;
  }

  .service-card img,
  .blog-card img {
    height: 220px;
  }
}

@media (min-width: 992px) {
  .social-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .linkedin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(4, 8, 14, 0.95);
    margin-top: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 1rem;
  }

  .nav-actions {
    justify-content: space-between;
    margin-top: 0.6rem;
  }

  .hero-section {
    min-height: 90vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
