/*
Theme Name: ITI Datahub
Description: Tema de bloques para datahub.iti.upv.es (sustituye a Avada). Iconos: Font Awesome Free 5 (fuente SIL OFL 1.1, iconos CC BY 4.0).
Author: ITI
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.3
Text Domain: datahub
*/

/* ---------- Tipografías (Karla y Poppins, SIL OFL; ficheros en assets/fonts) ---------- */
@font-face{font-family:Karla;font-style:normal;font-weight:400 700;font-display:swap;src:url("assets/fonts/karla.woff2") format("woff2")}
@font-face{font-family:Poppins;font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/poppins-600.woff2") format("woff2")}

/* ---------- Iconos de las tarjetas (Font Awesome Free solid) ---------- */
@font-face{font-family:"FA5 Solid";font-style:normal;font-weight:900;font-display:swap;src:url("assets/fonts/fa-solid-900.woff2") format("woff2")}
.dh-icon{width:46px;height:46px;border-radius:50%;flex:0 0 46px;display:flex;align-items:center;justify-content:center;color:#fff;font-family:"FA5 Solid";font-weight:900;font-size:19px;line-height:1}
.dh-icon::before{content:var(--dh-glyph)}
.dh-icon-flask{--dh-glyph:"\f0c3";background:#49bfbf}
.dh-icon-server{--dh-glyph:"\f233";background:#f24765}
.dh-icon-braille{--dh-glyph:"\f2a1";background:#5c82f2}
.dh-icon-table{--dh-glyph:"\f0ce";background:#6a4ea6}
.dh-icon-life-ring{--dh-glyph:"\f1cd";background:#6365d3}
.dh-icon-briefcase{--dh-glyph:"\f0b1";background:#f2b705}
.dh-icon-graduation-cap{--dh-glyph:"\f19d";background:#ef0437}
.dh-icon-dollar-sign{--dh-glyph:"\f155";background:#04e845}
.dh-icon-network-wired{--dh-glyph:"\f6ff";background:#03ada7}
.dh-icon-database{--dh-glyph:"\f1c0";background:#838e02}
.dh-icon-vials{--dh-glyph:"\f493";background:#e7f704;color:#1b2032}

/* ---------- Cabecera y navegación ---------- */
header.wp-block-template-part{position:fixed;top:0;left:0;right:0;z-index:20}
.dh-header{background:transparent}
.dh-header .wp-block-navigation a{text-decoration:none}
.dh-header .wp-block-navigation .wp-block-navigation-item__content{color:rgba(255,255,255,.65)!important}
.dh-header .wp-block-navigation .wp-block-navigation-item__content:hover,.dh-header .wp-block-navigation .wp-block-navigation-item__content:focus,.dh-header .wp-block-navigation .current-menu-item>a{color:#fff!important}
.dh-header .dh-header-inner{display:flex;flex-wrap:wrap}
.dh-header .dh-header-inner .wp-block-image{margin:0;flex:0 0 100%}
.dh-header .dh-header-inner .wp-block-image img{width:520px;max-width:100%;height:auto}
.dh-header nav.wp-block-navigation{margin:17px 0 0 41.5%;width:58.5%;box-sizing:border-box}
.dh-header .wp-block-navigation__container{width:100%;justify-content:space-between}
.dh-hero{padding-top:100px!important;min-height:720px!important}
.wp-block-cover.dh-hero .dh-lead{text-shadow:0 1px 8px rgba(0,0,0,.45)}

/* ---------- Tarjetas de servicios ---------- */
.dh-card{display:flex;flex-direction:column;gap:.5rem;padding:0 1.5rem}
.dh-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.dh-card-head h3{margin:0}
.dh-card p{margin:.4rem 0 0}

/* ---------- Formulario Contact Form 7 (mismo marcado que usaba Avada) ---------- */
.form-send .fusion-columns{display:grid;grid-template-columns:1fr 1fr;gap:0 30px;margin-bottom:11px!important}
.form-send .fusion-columns>div{min-width:0}
.form-send .fusion-columns>div:only-child{grid-column:1/-1}
.form-send input[type=text],.form-send input[type=email],.form-send input[type=tel],.form-send select,.form-send textarea{width:100%;box-sizing:border-box;height:43px;padding:0 .9em;border:1px solid #ecefef;border-radius:3px;font:inherit;font-size:15px;color:#272d3a;background:#fff}
.form-send textarea{height:auto;padding:.7em .9em}
.form-send textarea{height:150px;min-height:0;resize:vertical}
.form-send .wpcf7-submit{background:#ff6200;color:#fff;border:0;border-radius:2px;height:43px;padding:0 28px;font:600 14px Poppins,Arial,sans-serif;cursor:pointer}
.form-send .wpcf7-submit:hover{background:#d85300}
.form-send p{margin:0}
.form-send .wpcf7-form-control-wrap{display:block;margin-top:8px}
.form-send select{font-size:15px;font-family:Arial,Helvetica,sans-serif}
.form-send .wpcf7-acceptance{display:block;margin:14px 0 0}
.form-send em{font-size:16px}
.form-send>br{display:none}
.form-send .wpcf7-submit{margin-top:14px}
.wpcf7 .wpcf7-not-valid-tip{color:#c0392b;font-size:.85em}
.wpcf7 form .wpcf7-response-output{margin:1.5em 0 0;padding:.8em 1em}
@media (max-width:781px){.form-send .fusion-columns{grid-template-columns:1fr}}

/* ---------- Vídeos ---------- */
.wp-block-embed.is-type-video .wp-block-embed__wrapper{position:relative}

/* ---------- Ajustes de maquetación ---------- */
.wp-site-blocks>*+*{margin-block-start:0}
.dh-hero .wp-block-cover__inner-container{width:100%!important}
.dh-header .dh-header-inner{width:100%;max-width:1160px;margin-left:auto;margin-right:auto}
.dh-hero .wp-block-cover__inner-container>.wp-block-group{max-width:1160px;margin-left:auto;margin-right:auto}
.dh-card-head>*{margin:0}
.dh-card-head>.dh-icon{margin-top:2px}
@media (max-width:781px){.dh-hero{padding-top:190px!important}.dh-header nav.wp-block-navigation{margin:8px 0 0;width:auto}.dh-hero{min-height:480px!important}.dh-hero h1{font-size:2.2rem!important}}
.dh-card-head h3{letter-spacing:0}
@media (min-width:782px){.dh-header .wp-block-navigation__responsive-container,.dh-header .wp-block-navigation__responsive-container-content{width:100%;flex:1 1 100%}}
.dh-header .wp-block-navigation-item:first-child .wp-block-navigation-item__content{color:#fff!important}

/* Cabecera al hacer scroll (y siempre en las páginas que no son la portada): barra fija, logo y menú en una fila */
header.wp-block-template-part.dh-stuck{background:rgba(59,82,89,.85);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
body:not(.home) header.wp-block-template-part{background:#3b5259}
@media (min-width:782px){
:is(header.wp-block-template-part.dh-stuck,body:not(.home) header.wp-block-template-part) .dh-header{padding-top:16px!important;padding-bottom:16px!important}
:is(header.wp-block-template-part.dh-stuck,body:not(.home) header.wp-block-template-part) .dh-header-inner{flex-wrap:nowrap;align-items:center}
:is(header.wp-block-template-part.dh-stuck,body:not(.home) header.wp-block-template-part) .dh-header-inner .wp-block-image{flex:0 0 auto}
:is(header.wp-block-template-part.dh-stuck,body:not(.home) header.wp-block-template-part) .dh-header-inner .wp-block-image img{width:260px!important}
:is(header.wp-block-template-part.dh-stuck,body:not(.home) header.wp-block-template-part) .dh-header nav.wp-block-navigation{margin:0 0 0 auto;width:auto}
:is(header.wp-block-template-part.dh-stuck,body:not(.home) header.wp-block-template-part) .wp-block-navigation__responsive-container,
:is(header.wp-block-template-part.dh-stuck,body:not(.home) header.wp-block-template-part) .wp-block-navigation__responsive-container-content{width:auto;flex:0 0 auto}
:is(header.wp-block-template-part.dh-stuck,body:not(.home) header.wp-block-template-part) .wp-block-navigation__container{width:auto;justify-content:flex-end;gap:32px}
}

/* ---------- Título de página (páginas interiores) ---------- */
.dh-pagetitle{background-color:#1b2032;background-image:radial-gradient(rgba(255,255,255,.07) 1px,transparent 1px);background-size:30px 30px;padding:84px 24px 0!important;min-height:244px;display:flex;align-items:center;box-sizing:border-box}
.dh-pagetitle .wp-block-post-title{width:100%;max-width:1160px;margin:0 auto;color:#fff;font-size:clamp(2.2rem,6vw,60px);letter-spacing:-2px}
@media (max-width:781px){body:not(.home) header.wp-block-template-part{position:static}.dh-pagetitle{padding-top:30px!important;min-height:160px}}

/* ---------- Pie ---------- */
.dh-footer .dh-footer-cols{display:grid;grid-template-columns:repeat(3,1fr);gap:40px;max-width:1160px;margin:0 auto 50px}
.dh-footer h6{color:#fff;font:700 14px/1.25 Karla,Arial,sans-serif;margin:0 0 18px}
.dh-where h6{letter-spacing:2px;text-transform:uppercase;margin-bottom:34px}
.dh-fcol img{display:block;max-width:100%;height:auto}
.dh-fcol h6:not(:first-child){margin-top:34px}
.dh-fcol .dh-iti-logo{background:#fff;padding:10px 14px;border-radius:3px;box-sizing:border-box;max-width:252px;width:100%}
.dh-where p{margin:0 0 16px;color:rgba(255,255,255,.6);font-weight:400}
.dh-where ul{list-style:none;margin:0;padding:0}
.dh-where li{display:flex;align-items:center;gap:14px;margin:0 0 14px;font-size:18px}
.dh-where a,.dh-copy a{color:rgba(255,255,255,.85);text-decoration:none}
.dh-where a:hover,.dh-copy a:hover{color:#fff}
.dh-fi{font-family:"FA5 Solid";font-weight:900;font-size:18px;width:22px;text-align:center}
.dh-fi-pin::before{content:"\f3c5";color:#ff6186}
.dh-fi-phone::before{content:"\f095";color:#08ce86}
.dh-copy{font-size:13px;margin:0;color:#fff}
@media (max-width:781px){.dh-footer .dh-footer-cols{grid-template-columns:1fr}}
.dh-pagetitle+main{padding-top:60px;padding-bottom:20px}
.dh-mail{text-align:center;margin:26px 0 0}.dh-mail a{color:#969fac}.dh-mail a:hover{color:#fff}.dh-fi-mail::before{content:"\f0e0"}

/* Anclas del menú: las secciones llevan 60px de relleno arriba: el título queda ~28px por debajo de la cabecera fija (84px) */
html{scroll-padding-top:52px}
/* Desplazamiento suave al pulsar el menú (se respeta "reducir movimiento") */
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}

/* ---------- Móvil (como la web original: margen de 30px, títulos de ~32px, barra de cabecera sólida) ---------- */
@media (max-width:1220px){.entry-content>.wp-block-group.alignfull{padding-left:30px!important;padding-right:30px!important;box-sizing:border-box}}
@media (max-width:781px){
.entry-content h2[style*="46px"]{font-size:32px!important}
.dh-hero h1{font-size:2rem!important}
.wp-block-group.is-layout-grid.alignwide{row-gap:7.5rem}
.dh-card{padding:0 40px}
/* páginas interiores: título de 41,5px alineado a 30px y margen lateral también cuando el contenido no va en una sección (Legal Note) */
.dh-pagetitle{padding-left:30px!important;padding-right:30px!important}
.dh-pagetitle .wp-block-post-title{font-size:41.5px}
.dh-pagetitle+main .entry-content:not(:has(>.alignfull)){padding-left:30px;padding-right:30px}
.dh-pagetitle+main .entry-content>h2{font-size:32px}
.wp-block-navigation__responsive-container.is-menu-open{padding:18px 30px!important}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content{padding-top:40px}
/* cabecera: barra sólida con logo a la izquierda y hamburguesa a la derecha */
header.wp-block-template-part{background:#3b5259}
header.wp-block-template-part .dh-header{padding:12px 18px!important}
header.wp-block-template-part .dh-header-inner{flex-wrap:nowrap;align-items:center;justify-content:space-between}
header.wp-block-template-part .dh-header-inner .wp-block-image{flex:0 0 auto}
header.wp-block-template-part .dh-header-inner .wp-block-image img{width:180px!important}
.dh-header nav.wp-block-navigation{margin:0;width:auto}
.dh-hero{padding-top:100px!important;min-height:480px!important}
}
