/*
Theme Name: Telecosat
Theme URI: https://telecosatleo.com
Author: FloSoft2006, S.L.U.
Author URI: https://telecosatleo.com
Description: Tema corporativo de FloSoft2006 Telecosat — Ingeniería de conectividad satelital LEO y GEO, redes e infraestructura. Incluye portada, páginas por sector, canal de colaboradores, proyectos, formulario de contacto propio y páginas legales.
Version: 1.0.5
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: telecosat
*/

/* ---------- Variables (colores y tipografía tomados de la web actual) ---------- */
:root {
  --ink: #102a43;
  --muted: #587083;
  --blue: #087eae;
  --blue-dark: #066690;
  --cyan: #39c2d7;
  --paper: #f5f8fa;
  --line: #dce6eb;
  --white: #fff;
  --navy: #071b2d;
  --navy-2: #0e4963;
  --deep: #041321;
  --lime: #c8e86a;
  --radius: 7px;
  --wrap: 1160px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.2vw + .6rem, 2.9rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.55rem, 2vw + 1rem, 1.9rem); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.12rem; font-weight: 650; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 3px; }
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--lime); color: var(--navy); padding: 10px 16px; border-radius: var(--radius); z-index: 100; font-weight: 600; }
.skip-link:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7,27,45,.96); color: var(--white); backdrop-filter: blur(6px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; min-height: 64px; padding-top: 0; padding-bottom: 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand { height: 100%; align-self: stretch; }
.brand img.brand-logo { height: 64px; width: auto; max-height: 100%; display: block; border-radius: 0; background: transparent; padding: 0; margin: 0; }
.brand img.logo-blend { mix-blend-mode: screen; }
.brand small { display: block; font-weight: 500; font-size: .72rem; color: #8fa8b8; letter-spacing: .04em; text-transform: uppercase; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.35); color: var(--white); border-radius: var(--radius); font-size: 1.3rem; line-height: 1; padding: 8px 12px; cursor: pointer; }
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a { display: block; color: #d6e4ec; text-decoration: none; padding: 10px 12px; border-radius: var(--radius); font-size: .93rem; font-weight: 500; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--white); background: rgba(255,255,255,.08); }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 260px; background: var(--navy); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 6px; flex-direction: column; align-items: stretch; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.header-cta { white-space: nowrap; }

/* ---------- Botones ---------- */
.btn { display: inline-block; background: var(--blue); color: var(--white); border: 2px solid var(--blue); padding: 12px 22px; border-radius: var(--radius); font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--white); }
.btn-lime { background: var(--lime); border-color: var(--lime); color: var(--navy); }
.btn-lime:hover { background: #d6ee8a; border-color: #d6ee8a; color: var(--navy); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.5); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: var(--white); color: var(--white); }
.btn-outline { background: transparent; color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }

/* ---------- Secciones ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-white { background: var(--white); }
.section-dark { background: var(--navy); color: #d6e4ec; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark a:not(.btn) { color: var(--cyan); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--blue); margin-bottom: .8em; }
.section-dark .eyebrow, .hero .eyebrow { color: var(--lime); }
.section-head { max-width: 720px; margin-bottom: 2.2em; }
.lead { font-size: 1.12rem; color: var(--muted); }
.section-dark .lead, .hero .lead { color: #b7cbd8; }

/* ---------- Hero ---------- */
.hero { color: #d6e4ec; background: radial-gradient(at 82% 22%, #155578 0, transparent 37%), linear-gradient(120deg, var(--navy), #0b2f47 70%, var(--navy-2)); padding: clamp(56px, 9vw, 112px) 0 clamp(48px, 7vw, 88px); }
.hero h1 { color: var(--white); max-width: 16em; }
.hero .lead { max-width: 40em; }
.hero-sub { background: rgba(255,255,255,.06); border-top: 1px solid rgba(255,255,255,.1); }
.page-hero { background: linear-gradient(120deg, var(--navy), var(--navy-2)); color: #d6e4ec; padding: clamp(40px, 6vw, 72px) 0; }
.page-hero h1 { color: var(--white); }
.page-hero .lead { max-width: 44em; margin: 0; color: #b7cbd8; }

/* ---------- Rejillas y tarjetas ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.section-white .card { background: var(--paper); }
.section-dark .card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
.section-dark .card-light { background: var(--white); border-color: var(--white); color: var(--ink); }
.section-dark .card-light a:not(.btn) { color: var(--blue); }
.section-dark .card-light h3 { color: var(--ink); }
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card-link { text-decoration: none; color: inherit; display: block; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--blue); transform: translateY(-2px); color: inherit; }
.card-link .more { color: var(--blue); font-weight: 600; font-size: .9rem; }
.tag { display: inline-block; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 6px 14px; font-size: .88rem; margin: 0 6px 8px 0; }
.section-dark .tag { background: transparent; border-color: rgba(255,255,255,.25); color: #d6e4ec; }
.stat { text-align: left; }
.stat strong { display: block; font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.1; color: var(--blue); font-weight: 700; }
.stat span { color: var(--muted); font-size: .92rem; }
.section-dark .stat strong { color: var(--lime); }
.section-dark .stat span { color: #b7cbd8; }
.steps { counter-reset: paso; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.steps li { counter-increment: paso; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 18px; font-size: .94rem; }
.steps li::before { content: counter(paso); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: var(--white); font-weight: 700; margin-bottom: 10px; }
.steps strong { display: block; margin-bottom: 4px; }
.two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { padding-left: 1.7em; position: relative; margin-bottom: .55em; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: .9em; height: .5em; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg) scaleX(.9); }
.section-dark .check-list li::before { border-color: var(--lime); }
.client-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.client-grid span { display: grid; place-items: center; text-align: center; min-height: 64px; padding: 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; color: var(--muted); font-size: .92rem; }
.client-grid img { max-height: 40px; width: auto; }
.client-grid img { max-height: 44px; max-width: 100%; width: auto; object-fit: contain; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: 240px; object-fit: cover; border-radius: 10px; display: block; }
.gallery figcaption { font-size: .86rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 980px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }
.note { font-size: .88rem; color: var(--muted); }

/* ---------- Formulario ---------- */
.form { display: grid; gap: 14px; }
.form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form select, .form textarea { width: 100%; padding: 12px 14px; font: inherit; color: var(--ink); background: var(--white); border: 1px solid #b9c9d3; border-radius: var(--radius); }
.form textarea { min-height: 130px; resize: vertical; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .88rem; }
.form .check input { margin-top: .3em; }
.captcha { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.captcha input[type=text] { max-width: 120px; margin-top: 6px; }
.form .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; font-weight: 500; }
.alert-ok { background: #e6f6e9; border: 1px solid #9fd4a8; color: #17502a; }
.alert-err { background: #fdeaea; border: 1px solid #e6a5a5; color: #7a1e1e; }
.contact-data { list-style: none; padding: 0; margin: 0; }
.contact-data li { margin-bottom: .8em; }
.contact-data strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--cyan); }
.contact-data a { color: var(--white); }

/* ---------- Contenido de páginas legales y genéricas ---------- */
.entry { max-width: 780px; }
.entry h2 { margin-top: 1.6em; font-size: 1.35rem; }
.entry h3 { margin-top: 1.3em; }
.entry .completar { background: #fff3c4; padding: 0 4px; border-radius: 3px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: #8fa8b8; padding: 48px 0 28px; font-size: .92rem; }
.site-footer a { color: #b7cbd8; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--white); margin-bottom: .9em; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .45em; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.whatsapp-float { position: fixed; right: 16px; bottom: 16px; z-index: 40; background: #1f9d55; color: var(--white); text-decoration: none; padding: 12px 16px; border-radius: 999px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.whatsapp-float:hover { background: #17824a; color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .client-grid { grid-template-columns: repeat(3, 1fr); }
  .two-col, .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); border-top: 1px solid rgba(255,255,255,.1); padding: 10px 20px 20px; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav .sub-menu { display: flex; position: static; border: 0; background: transparent; padding: 0 0 0 14px; min-width: 0; }
  .header-cta { display: none; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .btn-row .btn { width: 100%; text-align: center; }
  .whatsapp-float span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
