/*
Theme Name: Infornautic
Theme URI: https://www.infornautic.es/
Author: Infornautic
Description: Tema de una sola página para Infornautic: electrónica de navegación, instalaciones eléctricas y limpieza de depósitos de gasoil para embarcaciones de recreo en Castellón y la Comunidad Valenciana.
Version: 1.0.0
Requires at least: 6.0
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: infornautic
*/

:root {
  --accent: #2EA3F2;
  --bg: #FFFFFF;
  --band: #F2F4F5;
  --text: #24313A;
  --muted: #55636D;
  --btn: #126A9C;
  --btn-text: #FFFFFF;
  --navy: #0B2438;
  --border: #DDE3E7;
  --error: #B42318;
  --success: #1E7A46;
  --radius: 6px;
  --max: 1152px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; scroll-padding-top: var(--header-h); }
body { margin: 0; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--btn); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--bg); padding: 8px 12px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.section { padding: 56px 0; }
.band { background: var(--band); }
.section h2 { font-size: 1.9rem; }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: var(--radius); font-weight: bold; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit; }
.btn-primary { background: var(--btn); color: var(--btn-text); }
.btn-primary:hover { opacity: .9; }
.btn-outline { border-color: var(--btn); color: var(--btn); background: transparent; }
.btn-outline:hover { background: var(--btn); color: var(--btn-text); }
.btn-light { border-color: #fff; color: #fff; background: transparent; }
.btn-light:hover { background: #fff; color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.site-logo img { height: 48px; width: auto; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--text); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 24px; }
.main-nav a { color: var(--text); text-decoration: none; }
.main-nav a:hover { color: var(--btn); }
.main-nav .btn-primary { color: var(--btn-text); }
.has-sub { position: relative; }
.has-sub > button { background: none; border: 0; font: inherit; color: var(--text); cursor: pointer; padding: 0; }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; flex-direction: column; align-items: stretch; gap: 0; min-width: 280px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.sub-menu a { display: block; padding: 8px; }
.main-nav .has-sub.open .sub-menu { display: flex; }
@media (hover: hover) and (min-width: 768px) { .main-nav .has-sub:hover .sub-menu { display: flex; } }

@media (max-width: 767px) {
  .menu-toggle { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 16px 16px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
  .main-nav li { width: 100%; }
  .main-nav a, .has-sub > button { display: block; padding: 8px 0; }
  .main-nav .sub-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 16px; min-width: 0; }
}

/* Portada */
.hero { position: relative; background: var(--navy); color: #fff; }
.hero img { width: 100%; height: 78vh; max-height: 720px; min-height: 420px; object-fit: cover; object-position: center; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,36,56,.88) 0%, rgba(11,36,56,.6) 38%, rgba(11,36,56,0) 62%); pointer-events: none; }
.hero-content { position: absolute; inset: 0; display: flex; align-items: center; z-index: 1; }
.hero-content .container { width: 100%; }
.hero-text { max-width: 460px; }
.hero h1 { font-size: 3.6rem; margin-bottom: .2em; }
.hero p { font-size: 1.25rem; }
@media (max-width: 767px) {
  .hero img { height: 240px; min-height: 0; object-position: 80% center; }
  .hero::after { display: none; }
  .hero-content { position: static; padding: 24px 0; }
  .hero h1 { font-size: 2.4rem; }
  .hero p { font-size: 1.1rem; }
}

/* Servicios */
.services-grid { display: grid; gap: 40px; grid-template-columns: repeat(3, 1fr); margin-top: 32px; }
.service-item { border-left: 4px solid var(--accent); padding-left: 20px; }
.service-item h3 { font-size: 1.25rem; }
.service-detail { max-width: 760px; }
.service-detail ul { padding-left: 22px; }
@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr; } }

/* Contacto */
.contact-grid { display: grid; gap: 40px; grid-template-columns: 1fr 2fr; }
.contact-phone { font-size: 1.3rem; font-weight: bold; }
.form-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } .form-card { padding: 20px; } }
.form-grid { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label { font-weight: bold; display: block; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea { width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid #A9B4BC; border-radius: var(--radius); font: inherit; color: var(--text); background: #fff; }
.field [aria-invalid=true] { border-color: var(--error); }
.field-error { color: var(--error); font-size: .9rem; margin: 4px 0 0; }
.field-error:empty { display: none; }
.help { color: var(--muted); font-size: .9rem; margin: 0; }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; }
.file-list li { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; margin-bottom: 8px; }
.file-list img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.file-list span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.file-list button { background: none; border: 0; cursor: pointer; padding: 6px 10px; font-size: 1.1rem; }
.privacy-box { background: var(--band); border-radius: var(--radius); padding: 16px; font-size: .92rem; margin-top: 20px; }
.privacy-box label { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; }
.notice { border: 2px solid; border-radius: var(--radius); padding: 16px; margin: 0 0 20px; }
.notice-success { border-color: var(--success); background: var(--band); }
.notice-success strong { color: var(--success); font-size: 1.3rem; }
.notice-error { border-color: var(--error); }
.hp { position: absolute; left: -9999px; }

/* Textos legales */
.legal { max-width: 760px; }
.legal h3 { margin-top: 1.5em; }
.draft-note { border: 2px solid var(--accent); background: var(--band); padding: 12px 16px; border-radius: var(--radius); font-size: .9rem; }

/* Pie */
.site-footer { background: var(--navy); color: #fff; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 40px 16px; }
.footer-grid nav a { display: block; margin-bottom: 8px; font-size: .92rem; }
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr; } }
