/* ============================================================================
   Capa moderna compartida del sitio publico: barra superior, cabecera y menu
   (include/cabeceraModerna.php + include/menuModerno.php), pie
   (include/piePaginaModerno.php), botones y campos de formulario.
   Se carga DESPUES de las hojas clasicas y solo sobrescribe estilos.
   La portada anade moderno-index.css y las paginas internas moderno-paginas.css.
   ============================================================================ */
:root {
	--ol-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ol-text: #1f2937;
	--ol-muted: #64748b;
	--ol-border: #dbe3ec;
	--ol-bg: #f4f6f9;
	--ol-card: #ffffff;
	--ol-navy: #0f2a4a;
	--ol-navy-2: #183d66;
	--ol-brand: #386383;
	--ol-accent: #f58220;
	--ol-accent-dark: #dc6d0d;
	--ol-radius: 0;
	--ol-shadow: 0 10px 30px rgba(15, 42, 74, .12), 0 2px 6px rgba(15, 42, 74, .06);
	--ol-max: 1160px;
}

/* ---------- Base ---------- */
body.ol-site { margin: 0; background: var(--ol-bg); color: var(--ol-text); font-family: var(--ol-font); font-size: 13px; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.ol-site td, body.ol-site label, body.ol-site div, body.ol-site span, body.ol-site p, body.ol-site li,
body.ol-site select, body.ol-site input, body.ol-site button, body.ol-site textarea, body.ol-site h1, body.ol-site h2, body.ol-site h3 { font-family: var(--ol-font); }
.ol-container { max-width: var(--ol-max); margin: 0 auto; padding: 0 16px; box-sizing: border-box; }

/* ---------- Barra superior ---------- */
.ol-topbar { background: var(--ol-navy); color: rgba(255, 255, 255, .7); font-size: 12.5px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.ol-topbar-in { display: flex; align-items: center; justify-content: space-between; min-height: 40px; gap: 16px; }
.ol-topbar-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.ol-phone { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-weight: 600; letter-spacing: .3px; text-decoration: none; white-space: nowrap; }
.ol-phone svg { width: 14px; height: 14px; color: var(--ol-accent); }
.ol-phone:hover { color: var(--ol-accent); }
.ol-tagline { padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, .15); color: rgba(255, 255, 255, .55); white-space: nowrap; }
.ol-topbar-right { display: flex; align-items: center; gap: 14px; }
.ol-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .15); }

/* Selector de idioma */
.ol-lang { display: flex; gap: 2px; }
.ol-lang button, .ol-lang button:hover { width: auto; min-width: 0; background: none !important; text-transform: none; border-radius: 0; box-shadow: none; }
.ol-lang button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 1px solid transparent; background: none; color: rgba(255, 255, 255, .6); font-size: 12px; font-weight: 600; letter-spacing: .4px; cursor: pointer; transition: color .15s, border-color .15s; }
.ol-lang button:hover { color: #fff; }
.ol-lang button.ol-on { color: #fff; border-color: rgba(255, 255, 255, .25); }
.ol-lang .us-flag, .ol-lang .br-flag { display: inline-block; width: 16px; height: 11px; border: 0 !important; }

/* Sesion: entrar / registrarse, o nombre del cliente y vuelta a su cuenta */
.ol-auth > *:not([style*="none"]) { display: inline-flex !important; vertical-align: middle; }
.ol-auth > * + * { margin-left: 12px; }
.ol-signin, .ol-user { align-items: center; gap: 6px; color: #fff; font-weight: 500; text-decoration: none; white-space: nowrap; }
.ol-signin svg, .ol-user svg { width: 14px; height: 14px; opacity: .8; }
.ol-signin:hover { color: var(--ol-accent); }
.ol-register { align-items: center; height: 26px; padding: 0 12px; border: 1px solid var(--ol-accent); color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s; }
.ol-register:hover { background: var(--ol-accent); color: #fff; }
.ol-user span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Cabecera ---------- */
.ol-header { background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px); box-shadow: 0 1px 0 var(--ol-border), 0 4px 14px rgba(15, 42, 74, .05); position: sticky; top: 0; z-index: 1000; }
.ol-header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.ol-logo img { display: block; height: 60px; width: auto; border: 0; }
.ol-nav-toggle, .ol-burger { display: none; }
.ol-nav { display: flex; align-items: center; gap: 10px; }

/* ---------- Menu ---------- */
.ol-menu, .ol-menu ul { list-style: none; margin: 0; padding: 0; }
.ol-menu { display: flex; align-items: center; gap: 2px; }
.ol-menu > li { position: relative; }
.ol-menu > li > a { position: relative; display: flex; align-items: center; gap: 4px; padding: 10px 10px; color: var(--ol-navy); font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; border-radius: 0; transition: background .15s, color .15s; }
.ol-menu > li:hover > a, .ol-menu > li:focus-within > a { background: #eef3f8; color: var(--ol-brand); }
/* Seccion actual: subrayado naranja */
.ol-menu > li.ol-active > a { color: var(--ol-brand); }
.ol-menu > li.ol-active > a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; border-radius: 0; background: var(--ol-accent); }
.ol-chev { width: 12px; height: 12px; opacity: .6; transition: transform .2s; }
.ol-menu > li:hover .ol-chev, .ol-menu > li:focus-within .ol-chev { transform: rotate(180deg); }
.ol-sub-toggle { display: none; }

.ol-submenu { position: absolute; top: 100%; left: 0; z-index: 1001; min-width: 240px; padding: 8px !important; margin-top: 6px !important; background: #fff; border: 1px solid var(--ol-border); border-radius: 0; box-shadow: var(--ol-shadow); visibility: hidden; opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.ol-submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.ol-menu > li:hover > .ol-submenu, .ol-menu > li:focus-within > .ol-submenu { visibility: visible; opacity: 1; transform: none; }
.ol-menu > li:last-child > .ol-submenu, .ol-menu > li:nth-last-child(2) > .ol-submenu { left: auto; right: 0; }
.ol-submenu a { display: block; padding: 9px 12px; color: var(--ol-text); font-size: 13px; text-decoration: none; white-space: nowrap; border-radius: 0; transition: background .12s, color .12s; }
.ol-submenu a:hover, .ol-submenu a:focus { background: #f1f5f9; color: var(--ol-brand); outline: none; }
.ol-submenu li.ol-active > a { background: #fff4ea; color: var(--ol-accent-dark); font-weight: 600; }
.ol-book { padding: 10px 18px !important; font-size: 13.5px !important; text-transform: capitalize; white-space: nowrap; box-shadow: 0 4px 12px rgba(245, 130, 32, .28); }

/* ---------- Botones ---------- */
.ol-btn { display: inline-block; padding: 11px 20px; border-radius: 0; font-size: 14px; font-weight: 700; text-decoration: none; transition: background .15s, color .15s; }
.ol-btn-primary { background: var(--ol-accent); color: #fff !important; }
.ol-btn-primary:hover { background: var(--ol-accent-dark); }
.ol-btn-ghost { border: 1px solid rgba(255, 255, 255, .4); color: #fff; }
.ol-btn-ghost:hover { background: rgba(255, 255, 255, .1); }

/* Botones clasicos de la app (buttonM / buttonP / buttonG) dentro del contenido */
.ol-site #contenidos .buttonM,
.ol-site #contenidos .buttonP,
.ol-site #contenidos .buttonG { width: auto !important; height: auto !important; min-width: 110px; padding: 10px 22px; border: 0 !important; border-radius: 0; background: var(--ol-accent) !important; background-image: none !important; color: #fff !important; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(245, 130, 32, .28); transition: background .15s, transform .1s; }
.ol-site #contenidos .buttonM:hover,
.ol-site #contenidos .buttonP:hover,
.ol-site #contenidos .buttonG:hover { background: var(--ol-accent-dark) !important; color: #fff !important; }
.ol-site #contenidos .buttonM:active,
.ol-site #contenidos .buttonP:active,
.ol-site #contenidos .buttonG:active { transform: translateY(1px); }

/* ---------- Campos de formulario ---------- */
.ol-site #contenidos select,
.ol-site #contenidos input[type="text"],
.ol-site #contenidos input[type="password"],
.ol-site #contenidos input[type="email"],
.ol-site #contenidos input:not([type]),
.ol-site #contenidos textarea { box-sizing: border-box; min-height: 32px; padding: 4px 8px; border: 1px solid var(--ol-border); border-radius: 0; background-color: #fff; color: var(--ol-text); font-size: 13px; outline: none; transition: border-color .15s, box-shadow .15s; }
.ol-site #contenidos textarea { padding-top: 6px; }
.ol-site #contenidos select:focus,
.ol-site #contenidos input[type="text"]:focus,
.ol-site #contenidos input[type="password"]:focus,
.ol-site #contenidos input:not([type]):focus,
.ol-site #contenidos textarea:focus { border-color: var(--ol-brand); box-shadow: 0 0 0 3px rgba(56, 99, 131, .15); }
.ol-site #contenidos .inputFeha { height: 32px; padding-right: 26px; background-position: right 7px center; }
.ol-site #contenidos input[type="radio"], .ol-site #contenidos input[type="checkbox"] { accent-color: var(--ol-accent); vertical-align: -2px; }

/* ---------- Pie ---------- */
.ol-footer { background: #0b2038; color: rgba(255, 255, 255, .7); font-size: 13px; }
.ol-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.ol-footer a:hover { color: var(--ol-accent); }
.ol-footer-in { display: grid; grid-template-columns: 1.2fr 2fr auto; gap: 32px; align-items: start; padding-top: 40px; padding-bottom: 32px; }
.ol-footer-brand { display: flex; flex-direction: column; gap: 4px; }
.ol-footer-brand strong { color: #fff; font-size: 17px; }
.ol-footer-phone { margin-top: 8px; color: #fff !important; font-size: 15px; font-weight: 700; }
.ol-footer-links { display: grid; grid-template-columns: repeat(3, auto); gap: 10px 24px; justify-content: start; }
.ol-footer-grant img { display: block; width: 170px; padding: 8px 10px; background: #fff; border-radius: 0; }
.ol-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12px; }
.ol-footer-bottom-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.ol-footer-legal { display: flex; gap: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.ol-tagline { display: none; }
	.ol-burger { display: flex; flex-direction: column; gap: 5px; padding: 10px; margin-right: -10px; cursor: pointer; }
	.ol-burger span { display: block; width: 22px; height: 2px; background: var(--ol-navy); border-radius: 0; transition: transform .2s, opacity .2s; }
	.ol-nav-toggle:checked + .ol-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.ol-nav-toggle:checked + .ol-burger span:nth-child(2) { opacity: 0; }
	.ol-nav-toggle:checked + .ol-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
	.ol-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; max-height: calc(100vh - 120px); overflow-y: auto; background: #fff; box-shadow: var(--ol-shadow); padding: 8px 16px 16px; }
	.ol-nav-toggle:checked ~ .ol-nav { display: flex; }
	.ol-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.ol-menu > li { border-bottom: 1px solid #eef2f7; }
	.ol-menu > li > a { padding: 13px 4px; font-size: 15px; }
	.ol-menu > li:hover > a, .ol-menu > li:focus-within > a { background: none; }
	.ol-menu > li.ol-active > a::after { display: none; }
	.ol-chev { display: none; }
	/* En movil las secciones se abren con la flecha de la derecha */
	.ol-sub-toggle { display: block; position: absolute; right: 0; top: 4px; width: 40px; height: 40px; border: 0; background: none; color: var(--ol-navy); cursor: pointer; }
	.ol-sub-toggle svg { width: 16px; height: 16px; transition: transform .2s; }
	.ol-menu > li.ol-open .ol-sub-toggle svg { transform: rotate(180deg); }
	.ol-submenu { position: static; display: none; min-width: 0; margin: 0 0 8px !important; padding: 0 0 0 10px !important; border: 0; box-shadow: none; visibility: visible; opacity: 1; transform: none; }
	.ol-menu > li.ol-open > .ol-submenu { display: block; }
	.ol-submenu a { white-space: normal; }
	.ol-book { margin-top: 12px; text-align: center; }
	.ol-footer-in { grid-template-columns: 1fr 1fr; }
	.ol-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
	.ol-topbar-in { min-height: 44px; }
	.ol-tagline, .ol-sep { display: none; }
	.ol-topbar-right { gap: 8px; }
	.ol-lang button { padding: 0 5px; }
	.ol-lang .us-flag, .ol-lang .br-flag { display: none; }
	.ol-signin { font-size: 0; gap: 0; }
	.ol-auth > * + * { margin-left: 8px; }
	.ol-register { padding: 0 9px; }
	.ol-user span { max-width: 90px; }
	.ol-signin svg { width: 16px; height: 16px; }
	.ol-logo img { height: 48px; }
	.ol-header-in { min-height: 64px; }
	.ol-footer-in { grid-template-columns: 1fr; }
	.ol-footer-links { grid-template-columns: repeat(2, auto); }
}

/* ---------- Calendario de fechas (jscalendar, css/calendario.css) ----------
   Mismo HTML y JS; se quita la columna de semanas, el boton de ayuda y los bordes,
   y los dias pasan a celdas cuadradas centradas. El relleno es fijo en todos los
   estados para que no "salte" al pasar el raton (el original cambiaba el padding). */
body.ol-site div.calendar { z-index: 20000; }
body.ol-site .calendar, body.ol-site .calendar table { border: 0; background: #fff; color: var(--ol-text); font-family: var(--ol-font); font-size: 13px; box-shadow: none; }
body.ol-site div.calendar { padding: 10px 12px 8px; border: 1px solid var(--ol-border); box-shadow: 0 16px 40px rgba(15, 42, 74, .18), 0 2px 6px rgba(15, 42, 74, .08); }
body.ol-site .calendar table { border-collapse: separate; border-spacing: 2px; }
body.ol-site .calendar td { padding: 0 !important; border: 0 !important; }

/* Cabecera: mes y ano + cerrar; ayuda oculta */
body.ol-site .calendar thead .title { padding: 4px 0 6px 6px !important; background: none; color: var(--ol-navy); font-size: 15px; font-weight: 700; text-align: left; letter-spacing: -.2px; cursor: default !important; }
body.ol-site .calendar thead tr:first-child td.button:first-child { display: none; }
body.ol-site .calendar thead tr:first-child td.button:last-child div { width: 28px; height: 28px; margin-left: auto; color: var(--ol-muted); font-size: 18px; line-height: 28px; text-align: center; cursor: pointer; }
body.ol-site .calendar thead tr:first-child td.button:last-child.hilite div { background: var(--ol-bg); color: var(--ol-navy); }

/* Navegacion: anos, meses y "Today" */
body.ol-site .calendar thead .headrow { background: none; }
body.ol-site .calendar thead .headrow td { background: none; color: var(--ol-navy); }
body.ol-site .calendar thead .headrow td div { height: 30px; line-height: 30px; text-align: center; cursor: pointer; }
body.ol-site .calendar thead .headrow td.nav div { font-size: 16px; color: var(--ol-muted); }
body.ol-site .calendar thead .headrow td[colspan="4"] div { margin: 0 4px; border: 1px solid var(--ol-border); color: var(--ol-navy); font-size: 12.5px; font-weight: 600; }
body.ol-site .calendar thead .headrow td.hilite div, body.ol-site .calendar thead .headrow td.active div { background: var(--ol-bg); color: var(--ol-navy); }
body.ol-site .calendar thead .headrow td[colspan="4"].hilite div { border-color: var(--ol-navy); }

/* Nombres de los dias */
body.ol-site .calendar thead .daynames { background: none; }
body.ol-site .calendar thead .name { height: 30px; padding-top: 6px !important; background: none; color: var(--ol-muted); font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; text-align: center; }

/* Sin columna de numero de semana */
body.ol-site .calendar .wn { display: none; }

/* Dias */
body.ol-site .calendar tbody .day { width: 36px; height: 34px; color: var(--ol-text); font-size: 13.5px; font-weight: 500; text-align: center; cursor: pointer; transition: background .1s, color .1s; }
body.ol-site .calendar tbody td.weekend { color: var(--ol-muted); }
body.ol-site .calendar tbody .day.othermonth, body.ol-site .calendar tbody .day.othermonth.oweekend { color: #c3cbd6; font-size: 13px; }
body.ol-site .calendar tbody .disabled { color: #c3cbd6 !important; text-decoration: line-through; cursor: not-allowed; }
body.ol-site .calendar tbody .rowhilite td, body.ol-site .calendar tbody .rowhilite td.wn { background: none; }
body.ol-site .calendar tbody td.hilite { background: var(--ol-bg); color: var(--ol-navy); font-weight: 600; }
body.ol-site .calendar tbody td.active { background: #e2e8f0; }
/* Hoy: subrayado naranja; dia elegido: naranja relleno */
body.ol-site .calendar tbody td.today { color: var(--ol-navy); font-weight: 700; box-shadow: inset 0 -2px 0 var(--ol-accent); }
body.ol-site .calendar tbody td.selected { background: var(--ol-accent); color: #fff !important; font-size: 13.5px; font-weight: 700; box-shadow: none; }

/* Pie: texto de ayuda discreto */
body.ol-site .calendar tfoot .footrow { background: none; }
body.ol-site .calendar tfoot .ttip { padding: 8px 0 2px !important; border-top: 1px solid var(--ol-border) !important; background: none; color: var(--ol-muted); font-size: 12px; text-align: center; cursor: default !important; }
body.ol-site .calendar tfoot .hilite, body.ol-site .calendar tfoot .active { background: none; color: var(--ol-muted); }

/* Desplegables de mes / ano (al mantener pulsadas las flechas) */
body.ol-site .calendar .combo { width: 5em; padding: 4px; border: 1px solid var(--ol-border); background: #fff; box-shadow: 0 10px 24px rgba(15, 42, 74, .16); font-size: 13px; }
body.ol-site .calendar .combo .label { padding: 5px 4px; }
body.ol-site .calendar .combo .hilite { background: var(--ol-bg); color: var(--ol-navy); }
body.ol-site .calendar .combo .active { border: 0; background: var(--ol-accent); color: #fff; }

/* ---------- Movil (iPhone 16: 393x852) ---------- */
@media (max-width: 760px) {
	/* 16px en los campos: con menos, Safari de iPhone hace zoom al tocarlos */
	.ol-site #contenidos select,
	.ol-site #contenidos input[type="text"],
	.ol-site #contenidos input[type="password"],
	.ol-site #contenidos input[type="email"],
	.ol-site #contenidos input:not([type]),
	.ol-site #contenidos textarea { font-size: 16px !important; min-height: 44px; }
	.ol-site #contenidos .inputFeha { height: 44px; }
	.ol-site #contenidos .buttonM, .ol-site #contenidos .buttonP, .ol-site #contenidos .buttonG { min-height: 46px; font-size: 15px; }
	/* Etiquetas que js/moderno-movil.js mete encima de cada campo */
	.ol-lbl { display: block; margin: 0 0 5px; color: var(--ol-muted); font-size: 13px; font-weight: 600; line-height: 1.3; }
	.ol-lbl-fuerte, .ol-lbl strong, .ol-lbl b { color: var(--ol-navy); }
	.ol-lbl table { width: auto !important; }
	/* Tablas con filas unidas: una celda debajo de otra */
	.ol-site table.ol-con-unidas, .ol-site table.ol-con-unidas > tbody, .ol-site table.ol-con-unidas > tbody > tr { display: block; width: 100% !important; }
	.ol-site table.ol-con-unidas > tbody > tr > td { display: block; width: auto !important; height: auto !important; padding: 0 0 12px !important; }
	.ol-site tr.ol-unida select, .ol-site tr.ol-unida input[type="text"], .ol-site tr.ol-unida input[type="password"], .ol-site tr.ol-unida textarea { width: 100% !important; max-width: none !important; }
	/* Barra superior y pie un poco mas compactos */
	.ol-footer-in { padding-top: 36px; padding-bottom: 28px; gap: 28px 20px; }
}
