* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #172136;
  background: #fff;
  line-height: 1.6;
}

.wrap {
  width: min(1160px, calc(100% - 40px));
  margin: auto;
}

.top {
  background: #0b2f62;
  color: #fff;
  font-size: 14px;
}

.topin {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.top a,
.dark a,
footer a {
  color: #fff;
}

.nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .97);
  z-index: 20;
  box-shadow: 0 2px 20px #102b5014;
}

.navin {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand img {
  width: 220px;
  height: 90px;
  object-fit: contain;
}

.links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.links a {
  color: #18304f;
  text-decoration: none;
  font-weight: 700;
}

.smallbtn,
.btn {
  display: inline-block;
  background: #16a6d7;
  color: #fff !important;
  padding: 13px 22px;
  border-radius: 5px;
  text-decoration: none;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}

.menu {
  display: none;
  background: none;
  border: 0;
  font-size: 28px;
}

.hero {
  min-height: 660px;
  background-image: var(--hero);
  background-size: cover;
  background-position: center;
  position: relative;
  display: grid;
  align-items: center;
}

.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 23, 49, .9), rgba(4, 23, 49, .55), rgba(4, 23, 49, .18));
}

.heroContent {
  position: relative;
  color: #fff;
  max-width: 1160px;
}

.heroContent h1 {
  font-size: clamp(42px, 6vw, 72px);
  max-width: 820px;
  line-height: 1.05;
  margin: 14px 0;
}

.heroContent p {
  font-size: 20px;
  max-width: 680px;
}

.eyebrow {
  font-weight: 900;
  letter-spacing: 2px;
  color: #58d0f5;
}

.blue {
  color: #119bc9;
}

.actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
}

.ghost {
  color: #fff;
  border: 1px solid #fff;
  padding: 12px 22px;
  border-radius: 5px;
  text-decoration: none;
}

.intro,
.section {
  padding: 90px 0;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

h2 {
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.12;
  margin: 10px 0 22px;
}

h3 {
  line-height: 1.25;
}

.pale {
  background: #f3f7fb;
}

.heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.cards article {
  background: #fff;
  padding: 32px 26px;
  border-top: 4px solid #17a7d7;
  box-shadow: 0 12px 35px #0b2f6210;
}

.cards b {
  font-size: 36px;
  color: #d7e7f3;
}

.dark {
  background: #0a2d5e;
  color: #fff;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
}

.steps i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #16a6d7;
  font-style: normal;
  font-weight: bold;
  font-size: 22px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.photo {
  border: 0;
  padding: 0;
  background: #ddd;
  cursor: pointer;
  overflow: hidden;
  height: 280px;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .35s;
}

.photo:hover img {
  transform: scale(1.05);
}

.cta {
  background: linear-gradient(120deg, #149bc9, #0b3f80);
  color: white;
  padding: 65px 0;
}

.white {
  background: #fff;
  color: #0b3f80 !important;
}

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
}

.contact ul {
  padding: 0;
  list-style: none;
}

.contact a {
  color: #0b5799;
}

form {
  background: #fff;
  padding: 34px;
  box-shadow: 0 15px 40px #0b2f6216;
}

label {
  display: block;
  font-weight: bold;
  margin-bottom: 16px;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 13px;
  margin-top: 6px;
  border: 1px solid #cbd7e2;
  border-radius: 4px;
  font: inherit;
}

footer {
  background: #071f42;
  color: #fff;
}

.foot {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 50px 0;
}

.foot img {
  width: 210px;
  background: white;
  border-radius: 5px;
}

.copy {
  text-align: center;
  border-top: 1px solid #ffffff22;
  padding: 16px;
}

.whatsapp {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #20b85a;
  color: #fff;
  text-decoration: none;
  padding: 13px 18px;
  border-radius: 30px;
  font-weight: bold;
  z-index: 25;
}

dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  max-width: min(1000px, 92vw);
  background: #000;
}

dialog::backdrop {
  background: #000c;
}

dialog img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
}

dialog button {
  position: absolute;
  right: 8px;
  top: 4px;
  background: #fff;
  border: 0;
  border-radius: 50%;
  font-size: 25px;
  width: 38px;
  height: 38px;
}

@media (max-width: 850px) {
  .menu {
    display: block;
  }

  .links {
    display: none;
    position: absolute;
    top: 82px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 25px;
    flex-direction: column;
  }

  .links.open {
    display: flex;
  }

  .hero {
    min-height: 570px;
  }

  .split,
  .contact {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .cards,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .foot {
    grid-template-columns: 1fr;
  }

  .topin {
    gap: 10px;
  }

  .brand img {
    width: 180px;
  }
}

@media (max-width: 540px) {
  .wrap {
    width: min(100% - 28px, 1160px);
  }

  .cards,
  .steps,
  .gallery {
    grid-template-columns: 1fr;
  }

  .photo {
    height: 250px;
  }

  .actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .topin {
    font-size: 12px;
  }

  .heroContent h1 {
    font-size: 42px;
  }
}

#gallery{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
    gap:20px;
}

.project-card{
    background:#fff;
    border-radius:10px;
    overflow:hidden;
    box-shadow:0 5px 15px rgba(0,0,0,.15);
}

.project-card img{
    width:100%;
    height:250px;
    object-fit:cover;
}

.project-card h3{
    padding:10px;
    margin:0;
}

.project-card p{
    padding:0 10px 15px;
}
#gallery{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:20px;
}

.project-card{
    background:white;
    border-radius:10px;
    overflow:hidden;
    box-shadow:0 5px 15px rgba(0,0,0,.15);
}

.project-card img{
    width:100%;
    height:250px;
    object-fit:cover;
    display:block;
}

.project-card h3{
    padding:15px 15px 5px;
    margin:0;
}

.project-card p{
    padding:0 15px 15px;
    margin:0;
}

#gallery-preview{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:20px;
}

.project-card{
    background:white;
    border-radius:10px;
    overflow:hidden;
    box-shadow:0 4px 12px rgba(0,0,0,.15);
}

.project-card img{
    width:100%;
    height:250px;
    object-fit:cover;
}

.project-card h3{
    padding:15px 15px 5px;
    margin:0;
}

.project-card p{
    padding:0 15px 15px;
}

#loadMoreBtn{
    display:block;
    margin:30px auto;
    padding:12px 24px;
    background:#0d6efd;
    color:white;
    border:none;
    border-radius:5px;
    cursor:pointer;
}
/* Galería modular */
#gallery, #gallery-preview { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:22px; }
.project-card { background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 6px 20px rgba(11,47,98,.14); }
.gallery-image { width:100%; height:250px; object-fit:cover; display:block; cursor:zoom-in; transition:transform .25s ease; }
.gallery-image:hover { transform:scale(1.035); }
.project-content { padding:16px; }
.project-content h3 { margin:5px 0 8px; }
.project-content p { margin:0; }
.project-category { color:#119bc9; font-size:.82rem; font-weight:800; text-transform:uppercase; letter-spacing:1px; }
#loadMoreBtn { display:block; margin:32px auto 0; padding:13px 26px; border:0; border-radius:5px; color:#fff; background:#0d6efd; font-weight:800; cursor:pointer; }
#loadMoreBtn[hidden] { display:none; }
.viewer { width:min(1100px,96vw); height:min(88vh,820px); max-width:none; max-height:none; padding:0; border:0; border-radius:10px; overflow:hidden; background:#050505; color:#fff; }
.viewer::backdrop { background:rgba(0,0,0,.88); }
.viewer figure { width:100%; height:100%; margin:0; display:grid; grid-template-rows:1fr auto; align-items:center; justify-items:center; }
.viewer-image { max-width:100%; max-height:calc(88vh - 58px); object-fit:contain; }
.viewer figcaption { width:100%; min-height:58px; padding:14px 80px; display:flex; justify-content:space-between; gap:20px; background:#111; }
.viewer-close, .viewer-nav { position:absolute; z-index:2; border:0; color:#fff; background:rgba(0,0,0,.55); cursor:pointer; }
.viewer-close { top:12px; right:14px; width:44px; height:44px; border-radius:50%; font-size:32px; line-height:1; }
.viewer-nav { top:50%; transform:translateY(-50%); width:52px; height:70px; font-size:32px; }
.viewer-prev { left:12px; }
.viewer-next { right:12px; }
.no-scroll { overflow:hidden; }
.gallery-error { color:#a00; font-weight:700; }
@media(max-width:600px){ .viewer figcaption{padding:12px 18px;font-size:.9rem}.viewer-nav{width:42px}.gallery-image{height:230px} }
