:root {
    --navy: #002b50;
    --navy-deep: #001c36;
    --blue: #07598b;
    --orange: #ff7a00;
    --orange-dark: #ea6900;
    --ink: #06284a;
    --muted: #5c6a78;
    --paper: #f4f7f9;
    --white: #fff;
    --shadow: 0 14px 35px rgba(3, 40, 73, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; color: var(--ink); background: white; font-family: Inter, Arial, sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button, input, textarea { font: inherit; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.section { padding: 90px 0; }
.center { display: flex; justify-content: center; margin-top: 42px; }

.site-header { position: sticky; z-index: 100; top: 0; height: 84px; background: rgba(255,255,255,.97); border-bottom: 1px solid rgba(3,40,73,.08); backdrop-filter: blur(12px); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 30px; }
.brand { width: 162px; height: 74px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.brand img { width: 100%; height: 100%; object-fit: contain; }
.main-nav { display: flex; align-items: stretch; justify-content: center; gap: 33px; margin-left: auto; height: 100%; }
.main-nav a { position: relative; display: flex; align-items: center; color: var(--ink); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 20px; height: 2px; background: var(--orange); transition: right .2s ease; }
.main-nav a:hover::after, .main-nav a.active::after { right: 0; }
.menu-toggle { display: none; border: 0; color: var(--navy); background: transparent; padding: 8px; cursor: pointer; }
.menu-toggle svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; }

.btn { min-height: 51px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 0 22px; border: 1px solid transparent; border-radius: 3px; font-size: 12px; font-weight: 800; text-transform: uppercase; cursor: pointer; transition: transform .2s, background .2s, border .2s; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.btn-primary { color: white; background: var(--orange); box-shadow: 0 10px 24px rgba(255,122,0,.24); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-outline-light { color: white; border-color: rgba(255,255,255,.75); background: transparent; }
.btn-outline-light:hover { border-color: white; background: rgba(255,255,255,.1); }
.btn-outline-dark { color: var(--ink); border-color: var(--ink); background: white; }
.header-cta { margin-left: 4px; white-space: nowrap; background: var(--blue); box-shadow: 0 8px 20px rgba(4,80,128,.16); }

.hero { min-height: 650px; display: flex; position: relative; align-items: center; color: white; background: url("assets/fotos/portada-bienvenidos.webp") center/cover no-repeat; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,36,68,.98) 0%, rgba(0,44,81,.9) 39%, rgba(0,42,74,.48) 70%, rgba(0,22,40,.25) 100%); }
.hero-content { z-index: 1; padding-block: 72px; }
.eyebrow { margin: 0 0 18px; color: var(--orange); font-size: 12px; font-weight: 800; letter-spacing: .55px; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 3px; display: inline-block; margin-right: 13px; vertical-align: 4px; background: var(--orange); }
.section-heading .eyebrow::before { display: none; }
.hero h1 { max-width: 720px; margin: 0 0 18px; font-size: clamp(43px, 5.2vw, 68px); line-height: 1.02; letter-spacing: -2.5px; text-transform: uppercase; }
.hero-lead { max-width: 570px; margin: 0; font-size: 18px; line-height: 1.65; }
.hero-rule { width: 210px; height: 2px; margin: 27px 0 22px; background: rgba(255,255,255,.9); }
.sector-list { display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 35px; }
.sector-list span { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 20px; border-right: 2px solid var(--orange); font-size: 13px; font-weight: 700; text-transform: uppercase; }
.sector-list span:first-child { padding-left: 0; }
.sector-list span:last-child { border-right: 0; }
.sector-list svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-note { margin: 0 0 37px; font-size: 16px; font-weight: 500; }
.hero-actions { display: flex; gap: 18px; }

.services { background: radial-gradient(circle at 50% 20%, #fff 0, #f6f8fa 52%, #eef2f5 100%); }
.section-heading { margin-bottom: 42px; text-align: center; }
.section-heading .eyebrow { margin-bottom: 10px; }
.section-heading h2 { margin: 0; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.12; letter-spacing: -1.4px; }
.service-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.service-card { min-height: 235px; display: flex; align-items: center; flex-direction: column; justify-content: center; padding: 26px 16px; text-align: center; background: rgba(255,255,255,.83); border: 1px solid rgba(0,43,80,.04); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 20px 45px rgba(3,40,73,.13); }
.service-card svg { width: 64px; height: 64px; margin-bottom: 23px; fill: none; stroke: #07598b; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { min-height: 48px; display: flex; align-items: center; margin: 0; font-size: 14px; line-height: 1.45; }
.service-card span { width: 28px; height: 2px; margin-top: 20px; background: var(--orange); }

.about { min-height: 560px; display: grid; grid-template-columns: 44% 56%; color: white; background: var(--navy); }
.about-copy { display: flex; justify-content: flex-end; background: linear-gradient(135deg, #003963, #002344); }
.about-inner { width: min(100%, 515px); align-self: center; padding: 75px 52px 75px 24px; }
.light { color: var(--orange); }
.about h2, .contact h2 { margin: 0 0 24px; font-size: clamp(32px, 3.5vw, 46px); line-height: 1.12; letter-spacing: -1.4px; }
.about p:not(.eyebrow) { max-width: 520px; margin: 0 0 16px; color: #e4edf4; font-size: 15px; line-height: 1.65; }
.about .btn { margin-top: 14px; }
.about-photo { min-height: 460px; background: url("assets/fotos/sobre-nosotros-portada.webp") center/cover no-repeat; }

.projects { background: #fff; }
.project-carousel { position: relative; padding-inline: 32px; }
.carousel-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; min-height: 300px; }
.gallery-card { display: none; overflow: hidden; padding: 0; background: white; border: 0; border-radius: 5px; box-shadow: var(--shadow); cursor: zoom-in; }
.gallery-card.is-visible { display: block; }
.gallery-card img { width: 100%; height: 300px; object-fit: cover; background: #e9eef2; transition: transform .35s ease; }
.gallery-card:hover img { transform: scale(1.025); }
.gallery-card:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.carousel-btn { width: 46px !important; height: 46px !important; min-width: 46px; min-height: 46px; max-width: 46px; max-height: 46px; position: absolute; z-index: 5; top: 127px; display: flex; align-items: center; justify-content: center; padding: 0; color: white; border: 0; border-radius: 999px; background: var(--blue); box-shadow: 0 10px 28px rgba(0,31,57,.22); cursor: pointer; transition: background .2s, opacity .2s; font: 700 34px/1 Arial, sans-serif; }
.carousel-btn:hover { background: var(--orange); }
.carousel-btn span { display: block; width: 100%; height: 100%; line-height: 42px; text-align: center; }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }
.carousel-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.carousel-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: #c8d5df; cursor: pointer; transition: width .2s, background .2s; }
.carousel-dots button.active { width: 24px; background: var(--orange); }

.contact { color: white; background: linear-gradient(115deg, rgba(0,45,81,.98), rgba(0,25,49,.96)), url("assets/fotos/portada-bienvenidos.webp") center/cover; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; align-items: start; }
.contact-intro { max-width: 510px; color: #d9e6ef; font-size: 17px; }
.contact-list { display: grid; gap: 18px; margin: 36px 0 0; padding: 0; list-style: none; }
.contact-list li { display: flex; align-items: center; gap: 15px; }
.contact-list svg { width: 27px; height: 27px; flex: 0 0 auto; fill: none; stroke: var(--orange); stroke-width: 1.8; }
.contact-list span { display: flex; flex-direction: column; color: #d9e6ef; font-size: 14px; }
.contact-list strong { color: white; font-size: 12px; text-transform: uppercase; }
.contact-form { display: grid; gap: 17px; padding: 34px; color: var(--ink); background: white; border-radius: 5px; box-shadow: 0 20px 55px rgba(0,0,0,.22); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: grid; gap: 7px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.contact-form input, .contact-form textarea { width: 100%; border: 1px solid #cbd5dd; border-radius: 2px; padding: 12px 13px; color: var(--ink); background: #fbfcfd; outline: none; text-transform: none; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7,89,139,.1); }
.contact-form textarea { resize: vertical; }
.contact-form .btn { justify-self: start; border: 0; }
.honeypot { position: absolute; left: -10000px; }
.form-alert { padding: 12px 14px; border-radius: 3px; font-size: 13px; text-transform: none; }
.form-alert.success { color: #0a6337; background: #dff6e9; }
.form-alert.error { color: #8c2334; background: #fde8ec; }

.cta-strip { padding: 34px 0; color: white; background: linear-gradient(90deg, #07598b, #003b69); }
.cta-inner { display: flex; align-items: center; gap: 28px; }
.cta-icon { width: 70px; height: 70px; flex: 0 0 auto; fill: none; stroke: var(--orange); stroke-width: 1.8; }
.cta-inner h2 { margin: 0; font-size: 27px; }
.cta-inner p { margin: 2px 0 0; color: var(--orange); font-size: 20px; }
.cta-inner .btn { margin-left: auto; }

.site-footer { padding: 55px 0 0; color: #dce7ef; background: var(--navy-deep); }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr 1fr 1fr; gap: 70px; }
.footer-brand { width: 145px; height: 66px; margin-bottom: 17px; padding: 4px; background: white; border-radius: 6px; }
.footer-grid p { max-width: 270px; color: #b7c8d5; font-size: 12px; }
.footer-grid > div:not(:first-child) { display: flex; align-items: flex-start; flex-direction: column; gap: 7px; }
.footer-grid h3 { margin: 0 0 12px; color: white; font-size: 12px; text-transform: uppercase; }
.footer-grid a, .footer-grid span { color: #c5d3de; font-size: 12px; }
.footer-grid a:hover { color: var(--orange); }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 40px; padding: 18px 0; color: #8fa6b8; border-top: 1px solid rgba(255,255,255,.11); font-size: 11px; }

.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 34px 88px; background: rgba(0, 13, 28, .94); }
.lightbox.open { display: flex; }
body.lightbox-open { overflow: hidden; }
.lightbox-image { max-width: min(100%, 1500px); max-height: calc(100vh - 68px); object-fit: contain; border-radius: 4px; background: rgba(255,255,255,.06); box-shadow: 0 26px 80px rgba(0,0,0,.45); }
.lightbox-close, .lightbox-nav { position: absolute; display: flex; align-items: center; justify-content: center; color: white; border: 0; border-radius: 999px; background: rgba(7,89,139,.92); cursor: pointer; box-shadow: 0 12px 35px rgba(0,0,0,.32); transition: background .2s, transform .2s; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--orange); transform: translateY(-1px); }
.lightbox-close { top: 22px; right: 24px; width: 46px; height: 46px; font-size: 34px; line-height: 1; }
.lightbox-nav { top: 50%; width: 54px; height: 54px; transform: translateY(-50%); font: 700 42px/1 Arial, sans-serif; }
.lightbox-nav:hover { transform: translateY(calc(-50% - 1px)); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-nav span { height: 54px; line-height: 48px; }

@media (max-width: 1050px) {
    .main-nav { gap: 19px; }
    .header-cta { display: none; }
    .service-grid { grid-template-columns: repeat(3, 1fr); }
    .service-card:last-child { grid-column: 2; }
}

@media (max-width: 820px) {
    html { scroll-padding-top: 72px; }
    .container { width: min(100% - 32px, 680px); }
    .section { padding: 70px 0; }
    .site-header { height: 72px; }
    .brand { width: 124px; height: 57px; }
    .menu-toggle { display: block; margin-left: auto; }
    .main-nav { position: fixed; inset: 72px 0 auto; height: auto; display: grid; gap: 0; padding: 18px 24px 26px; background: white; border-top: 1px solid #e5ebef; box-shadow: 0 18px 30px rgba(0,30,55,.16); transform: translateY(-140%); opacity: 0; pointer-events: none; transition: .25s; }
    .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .main-nav a { padding: 13px 0; }
    .main-nav a::after { bottom: 8px; right: 100%; }
    .hero { min-height: 690px; background-position: 58% center; }
    .hero-overlay { background: linear-gradient(90deg, rgba(0,35,66,.98), rgba(0,42,74,.76)); }
    .sector-list { gap: 6px 0; }
    .sector-list span { padding-inline: 11px; font-size: 11px; }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .service-card:last-child { grid-column: auto; }
    .about { grid-template-columns: 1fr; }
    .about-copy { justify-content: center; }
    .about-inner { width: min(100% - 32px, 680px); padding: 70px 0; }
    .about-photo { min-height: 430px; order: -1; }
    .carousel-track { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .gallery-card img { height: 270px; }
    .carousel-btn { top: 112px; }
    .contact-grid { grid-template-columns: 1fr; gap: 46px; }
    .cta-inner { flex-wrap: wrap; }
    .cta-inner .btn { width: 100%; margin-left: 98px; }
    .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: 42px; }
    .footer-grid > div:last-child { grid-column: 2; }
    .lightbox { padding: 72px 20px 34px; }
    .lightbox-image { max-height: calc(100vh - 122px); }
    .lightbox-close { top: 14px; right: 14px; }
    .lightbox-prev { left: 12px; }
    .lightbox-next { right: 12px; }
}

@media (max-width: 540px) {
    .container { width: calc(100% - 28px); }
    .section { padding: 58px 0; }
    .hero { min-height: 700px; }
    .hero-content { padding-block: 62px; }
    .hero h1 { font-size: 43px; letter-spacing: -1.6px; }
    .hero-lead { font-size: 16px; }
    .sector-list span { width: 50%; justify-content: flex-start; border: 0; padding: 5px 0; }
    .hero-actions { align-items: stretch; flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .service-grid { gap: 11px; }
    .service-card { min-height: 205px; padding: 22px 10px; }
    .service-card svg { width: 54px; height: 54px; margin-bottom: 17px; }
    .service-card h3 { font-size: 12px; }
    .about-photo { min-height: 330px; }
    .project-carousel { padding-inline: 0; }
    .carousel-track { grid-template-columns: 1fr; }
    .gallery-card img { height: 285px; }
    .carousel-btn { top: 122px; width: 42px !important; height: 42px !important; min-width: 42px; min-height: 42px; max-width: 42px; max-height: 42px; font-size: 31px; }
    .carousel-prev { left: 8px; }
    .carousel-next { right: 8px; }
    .form-row { grid-template-columns: 1fr; }
    .contact-form { padding: 24px 18px; }
    .cta-inner { align-items: flex-start; gap: 15px; }
    .cta-icon { width: 50px; height: 50px; }
    .cta-inner > div { width: calc(100% - 65px); }
    .cta-inner h2 { font-size: 22px; }
    .cta-inner p { font-size: 15px; }
    .cta-inner .btn { margin-left: 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 38px 24px; }
    .footer-grid > div:first-child { grid-column: 1 / -1; }
    .footer-grid > div:last-child { grid-column: auto; }
    .footer-bottom { align-items: flex-start; flex-direction: column; gap: 4px; }
    .lightbox { padding-inline: 10px; }
    .lightbox-nav { width: 44px; height: 44px; font-size: 34px; background: rgba(7,89,139,.82); }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}
