:root{
  --primary:#0B2F66;
  --primary-light:#1C5DB6;
  --secondary:#0E7490;
  --secondary-dark:#0A5C72;

  --accent:#F2B705;
  --accent-hover:#D99C04;
  --accent-soft:#FFF4CC;

  --navy:#102848;
  --text:#1C2E4A;
  --muted:#6B7A90;

  --bg:#F4F8FC;
  --bg-soft:#EEF4FA;
  --white:#ffffff;

  --danger:#E86C6C;
  --success:#43B08A;

  --border:rgba(15,63,136,.12);
  --shadow:0 18px 45px rgba(11,47,102,.12);
  --shadow-soft:0 10px 28px rgba(11,47,102,.08);

  --radius-xl:28px;
  --radius-lg:22px;
  --radius-md:18px;
  --container:1280px;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:'Inter',sans-serif;
  background:linear-gradient(180deg,#f8fbff 0%, var(--bg) 100%);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a{text-decoration:none;color:inherit}
img{display:block;max-width:100%}
.container{width:min(var(--container),calc(100% - 44px));margin:0 auto}

header{
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}

.nav{
  min-height:84px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  color:#fff;
  min-width:290px;
}

.brand img{width:74px;height:auto;object-fit:contain;filter:drop-shadow(0 3px 8px rgba(0,0,0,.12))}

.brand-text{display:flex;flex-direction:column;line-height:1;gap:4px}
.brand-text small{font-size:12px;font-weight:600;letter-spacing:.16em;opacity:.92}
.brand-text strong{font-size:18px;font-weight:800;letter-spacing:.08em}

.menu{
  display:flex;
  align-items:center;
  gap:34px;
  color:rgba(255,255,255,.98);
  font-weight:600;
  flex-wrap:wrap;
  justify-content:center;
}

.menu a{position:relative;transition:.25s ease}
.menu a:hover{opacity:.95}
.menu a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-7px;
  width:0;
  height:2px;
  border-radius:999px;
  background:var(--accent);
  transition:.25s ease;
}
.menu a:hover::after{width:100%}

.btn-top{
  background:linear-gradient(180deg,var(--accent) 0%, var(--accent-hover) 100%);
  color:#1f2d3a;
  padding:14px 22px;
  border-radius:16px;
  font-weight:800;
  white-space:nowrap;
  box-shadow:0 12px 24px rgba(242,183,5,.28);
  transition:.25s ease;
}
.btn-top:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 28px rgba(242,183,5,.35);
}

.hero{
  position:relative;
  overflow:hidden;
  background:
    linear-gradient(10deg,rgba(11,47,102,.62) 48%,rgba(28,93,182,.34) 70%,rgba(255,255,255,.07) 100%),
    url('https://upload.wikimedia.org/wikipedia/commons/thumb/5/5d/Ruta_5_Sur_entrada_a_Codegua.JPG/1280px-Ruta_5_Sur_entrada_a_Codegua.JPG') center/cover no-repeat;
  min-height:690px;
}

.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 12% 24%, rgba(255, 255, 255, 0.342), transparent 28%),
    radial-gradient(circle at 86% 74%, rgba(255,255,255,.10), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0) 70%, #f8fafc 100%);
  pointer-events:none;
}

.hero-wrap{position:relative;z-index:2;padding:36px 0 90px}

.utility-bar{
  width:max-content;
  max-width:100%;
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:28px;
  flex-wrap:wrap;
  padding:14px 22px;
  border-radius:18px;
  background:rgba(255,255,255,.88);
  box-shadow:var(--shadow-soft);
  color:#536272;
  font-size:15px;
  font-weight:500;
  backdrop-filter:blur(10px);
}

.utility-bar span{display:flex;align-items:center;gap:9px}

.hero-grid{
  display:grid;
  grid-template-columns:1.1fr .76fr;
  gap:34px;
  align-items:center;
  margin-top:34px;
}

.hero-content{
  color:#fff;
  max-width:720px;
  padding-top:28px;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 16px;
  border-radius:999px;
  margin-bottom:18px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.14);
  backdrop-filter:blur(10px);
  font-size:.95rem;
  font-weight:600;
  color:rgba(255,255,255,.95);
}

.hero-content h1{
  font-size:clamp(3.2rem,6vw,5.6rem);
  line-height:.95;
  margin-bottom:20px;
  font-weight:900;
  letter-spacing:-.04em;
  text-shadow:0 8px 28px rgba(0,0,0,.12);
}

.hero-content p{
  font-size:clamp(1.12rem,1.7vw,1.55rem);
  line-height:1.5;
  color:rgba(255,255,255,.95);
  max-width:650px;
  margin-bottom:30px;
}

.hero-actions{display:flex;gap:16px;flex-wrap:wrap}

.btn-primary,.btn-secondary{
  min-height:60px;
  padding:0 32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:20px;
  font-size:1.05rem;
  font-weight:800;
  box-shadow:var(--shadow);
  transition:.25s ease;
}
.btn-primary{
  background:linear-gradient(180deg,var(--primary-light) 0%, var(--primary) 100%);
  color:#fff;
}
.btn-secondary{
  background:rgba(255,255,255,.96);
  color:var(--primary);
}
.btn-primary:hover,.btn-secondary:hover{transform:translateY(-2px)}

.hero-highlights{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin-top:24px;
}

.hero-highlights span{
  display:inline-flex;
  align-items:center;
  gap:9px;
  color:#fff;
  padding:10px 15px;
  border-radius:999px;
  background:rgba(255,255,255,.11);
  border:1px solid rgba(255,255,255,.14);
  backdrop-filter:blur(8px);
  font-size:.94rem;
  font-weight:500;
}

.hero-side{
  display:flex;
  justify-content:flex-end;
}

.hero-panel{
  width:100%;
  max-width:410px;
  background:rgba(16,40,72,.82);
  border:1px solid rgba(255,255,255,.10);
  backdrop-filter:blur(16px);
  color:#fff;
  border-radius:32px;
  box-shadow:0 18px 48px rgba(0,0,0,.18);
  overflow:hidden;
}

.hero-panel-top{padding:26px 26px 18px}
.hero-panel h3{font-size:1.7rem;line-height:1.05;margin-bottom:10px;font-weight:800}
.hero-panel p{color:rgba(255,255,255,.84);line-height:1.5}

.hero-panel-card{
  margin:0 18px 18px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(255,255,255,.14);
  border-radius:24px;
  overflow:hidden;
}

.hero-panel-card img{width:100%;height:190px;object-fit:cover}
.hero-panel-body{padding:18px}

.section{padding:46px 0 0}

.section-shell{
  background:linear-gradient(180deg,#fff 0%,#fafbfd 100%);
  border-radius:34px;
  box-shadow:var(--shadow-soft);
  padding:38px;
}

.section-grid{
  display:grid;
  grid-template-columns:390px 1fr;
  gap:28px;
  align-items:start;
}

.section-copy h2{
  font-size:clamp(2rem,3vw,3.1rem);
  line-height:1.02;
  margin-bottom:14px;
  font-weight:900;
  letter-spacing:-.03em;
  color:var(--text);
}

.section-copy p{
  color:var(--muted);
  max-width:320px;
  font-size:1.05rem;
  line-height:1.6;
}

.cards-row{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}

.card,.service-card,.stats-card{
  background:#fff;
  border-radius:24px;
  overflow:hidden;
  box-shadow:var(--shadow-soft);
  transition:.25s ease;
}
.card:hover,.service-card:hover,.stats-card:hover{
  transform:translateY(-5px);
  box-shadow:0 20px 36px rgba(11,47,102,.12);
}

.card img,.service-card img{width:100%;height:180px;object-fit:cover}

.card-body,.service-body{padding:16px 18px 20px}

.badge,.service-tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius:999px;
  padding:8px 12px;
  line-height:1;
  font-size:.82rem;
  font-weight:800;
  margin-bottom:14px;
}

.warning{background:var(--accent-soft);color:#7a5a00}
.danger{background:var(--danger);color:#fff}
.success{background:var(--success);color:#fff}
.info{background:#dfefff;color:#29507d}

.card h3,.service-body h3{
  font-size:1.18rem;
  line-height:1.25;
  margin-bottom:10px;
  font-weight:800;
  color:var(--text);
}

.card p,.service-body p{
  color:#58697a;
  line-height:1.52;
  margin-bottom:14px;
  font-size:.98rem;
}

.link{color:var(--primary-light);font-weight:700;display:inline-block}

.services-wrap{padding:34px 0 0}

.services-header{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:20px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.services-title{display:flex;align-items:baseline;gap:18px;flex-wrap:wrap}
.services-title h2{
  font-size:clamp(2rem,3vw,3.1rem);
  font-weight:900;
  letter-spacing:-.03em;
  color:var(--text);
}
.services-title p{color:var(--muted);font-size:1.02rem}
.services-link{color:var(--primary-light);font-weight:700;font-size:1.02rem}

.services-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.service-card img{height:165px}

.mini-banner{
  margin-top:28px;
  border-radius:30px;
  overflow:hidden;
  background:
    linear-gradient(100deg,rgba(11,47,102,.96) 0%,rgba(28,93,182,.90) 100%),
    url('banner-comuna.jpg') center/cover no-repeat;
  box-shadow:var(--shadow);
}

.mini-banner-inner{
  display:grid;
  grid-template-columns:1.2fr auto;
  gap:24px;
  align-items:center;
  padding:34px;
  color:#fff;
}

.mini-banner h3{
  font-size:clamp(1.8rem,3vw,2.8rem);
  line-height:1.05;
  margin-bottom:12px;
  font-weight:900;
  letter-spacing:-.03em;
}
.mini-banner p{max-width:760px;color:rgba(255,255,255,.90);line-height:1.6}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
  margin-top:28px;
}

.stats-card{padding:24px}
.stats-card strong{
  display:block;
  font-size:2rem;
  font-weight:900;
  color:var(--primary);
  margin-bottom:8px;
}
.stats-card span{
  display:block;
  font-size:1rem;
  font-weight:700;
  color:var(--text);
  margin-bottom:8px;
}
.stats-card p{color:var(--muted);line-height:1.55}

footer{
  margin-top:40px;
  background:linear-gradient(180deg,#102848 0%,#0a1c33 100%);
  color:rgba(255,255,255,.82);
  padding:58px 0 26px;
}

.footer-grid{
  display:grid;
  grid-template-columns:1.25fr 1fr 1fr 1fr;
  gap:26px;
  margin-bottom:28px;
}

footer h4{color:#fff;font-size:1.08rem;margin-bottom:14px}
footer p,footer li,footer a{color:rgba(255,255,255,.76)}
footer ul{list-style:none;display:grid;gap:10px}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.08);
  padding-top:20px;
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  font-size:.94rem;
}

@media (max-width:1200px){
  .hero-grid,.section-grid,.mini-banner-inner,.footer-grid{grid-template-columns:1fr}
  .cards-row{grid-template-columns:1fr 1fr}
  .services-grid,.stats-grid{grid-template-columns:1fr 1fr}
  .section-copy p{max-width:none}
  .hero-side{justify-content:flex-start}
}

@media (max-width:920px){
  .nav{flex-direction:column;padding:16px 0}
  .menu{gap:18px}
  .utility-bar{width:100%;justify-content:center;border-radius:18px}
  .hero{min-height:auto}
  .hero-wrap{padding:26px 0 64px}
  .hero-grid{margin-top:20px}
}

@media (max-width:700px){
  .container{width:min(var(--container),calc(100% - 22px))}
  .cards-row,.services-grid,.stats-grid,.footer-grid{grid-template-columns:1fr}
  .services-title{gap:10px}
  .section-shell{padding:24px}
  .hero-content h1{font-size:2.8rem}
  .hero-content p{font-size:1rem}
  .btn-primary,.btn-secondary,.btn-top{width:100%}
  .hero-actions{flex-direction:column}
  .mini-banner-inner{padding:24px}
}

/* HEADER NORMAL */
.site-header{
  width: 100%;
}

.desktop-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 80px;
  background:transparent;
  padding: 0 20px;
  color: white;
}

/* BOTÓN FLOTANTE */
.floating-menu-btn{
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 2000;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 26px;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,.2);
  cursor: pointer;
}

/* MENU MOBILE */
.mobile-menu{
  position: fixed;
  top: 0;
  left: -100%;
  width: 260px;
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: 0.3s ease;
  z-index: 1999;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
}

.mobile-menu.active{
  left: 0;
}

.mobile-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  margin-bottom: 10px;
}

.mobile-header button{
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
}

.mobile-menu a{
  color: white;
  padding: 10px;
  border-radius: 10px;
  font-weight: 600;
}

.mobile-menu a:hover{
  background: rgba(255,255,255,0.1);
}

.mobile-btn{
  background: var(--accent);
  color: #1f2d3a !important;
  text-align: center;
  font-weight: 800;
  margin-top: 10px;
}

/* RESPONSIVE */
@media(max-width:768px){
  .desktop-header{
    display: none;
  }

  .floating-menu-btn{
    display: block;
  }
}