/*
Theme Name: Alcañiz Agrícola
Theme URI: https://alcanizagricola.es
Author: Alcañiz – Ingeniería y Consultoría Agrícola
Description: Tema a medida para alcanizagricola.es. Técnico agrícola, estación ITEAF y formación online.
Version: 1.0.2
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: alcaniz
License: GPLv2 or later
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
a:hover { color: #005A8A; }
.al-wrap { box-sizing: border-box; max-width: 1200px; margin-left: auto !important; margin-right: auto !important; padding-left: 24px; padding-right: 24px; width: 100%; }
.al-pad { padding-top: 56px; padding-bottom: 72px; }
.al-texto { max-width: 820px; }
.al-texto p, .al-texto li { font-size: 17px; line-height: 1.65; margin: 0 0 14px; }
.al-texto h1 { font-size: 40px; margin: 0 0 24px; }
.al-texto h2 { font-size: 26px; margin: 32px 0 12px; }
[id] { scroll-margin-top: 110px; }
.al-main p { margin: 0; }
.al-main h1, .al-main h2, .al-main h3 { margin: 0; }
.al-main ul { margin: 0; }

/* ---------- Cabecera ---------- */
.al-header { background: #fff; border-bottom: 1px solid #E4E7EB; position: sticky; top: 0; z-index: 50; }
body.admin-bar .al-header { top: 32px; }
.al-header__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.al-logo { margin: 0 !important; }
.al-logo img { width: 212px !important; max-width: 52vw; height: auto; display: block; }
.al-nav { font-size: 15px; font-weight: 500; }
.al-nav .wp-block-navigation__container { gap: 24px; }
.al-nav a { color: #15191E; text-decoration: none; }
.al-nav a:hover { color: #0077B6; }
.al-header__cta .wp-block-button__link { padding: 12px 20px; }
@media (max-width: 781px) {
  .al-header__in { flex-wrap: nowrap; }
  .al-header__cta { display: none; }
  .al-logo img { width: 160px !important; }
}

/* ---------- Botones ---------- */
.al-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-button__link { text-decoration: none; }
.al-btn-sec .wp-block-button__link { background: #fff !important; color: #15191E !important; border: 1px solid #C9CFD6 !important; }
.al-btn-wa .wp-block-button__link { background: #128C4A !important; color: #fff !important; }
.al-btn-marino .wp-block-button__link { background: #15233A !important; color: #fff !important; }
.al-btn-gris .wp-block-button__link { background: #F4F6F8 !important; color: #15191E !important; }
.al-btn-borde .wp-block-button__link { background: transparent !important; color: #0077B6 !important; border: 1px solid #C9CFD6 !important; }
.al-btns-grandes .wp-block-button__link { font-size: 16px; padding: 15px 24px; border-radius: 10px; }
.al-btns-peq .wp-block-button__link { font-size: 15px; padding: 11px 16px; border-radius: 10px; }

/* ---------- Secciones ---------- */
.al-sec { width: 100%; }
.al-sec__in { display: flex; flex-direction: column; gap: 28px; padding-top: 64px; padding-bottom: 72px; }
.al-sec--blanco { background: #fff; }
.al-sec--iteaf { background: #CFE6F3; }
.al-sec--trigo { background: #F6EEDB; }
.al-sec--verde { background: #EAF2EC; }
.al-cabecera { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.al-h2 { font-size: 40px !important; letter-spacing: -1px; }
.al-lead { font-size: 17px; line-height: 1.55; color: #3A424C; }
.al-eyebrow { font-size: 14px !important; font-weight: 600; color: #0077B6; letter-spacing: 1px; text-transform: uppercase; }
.al-migas { font-size: 14px; color: #33414F; }
.al-migas a { color: #0C447C; }

/* ---------- Hero ---------- */
.al-hero { position: relative; overflow: hidden; background: #EEF6FB; }
.al-hero::before { content: ""; position: absolute; right: 0; top: 0; width: 70%; height: 100%; opacity: .55; pointer-events: none;
  background: url("assets/img/curvas.svg") right center / cover no-repeat; }
.al-hero__in { position: relative; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 96px; padding-bottom: 96px; }
.al-hero__txt { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.al-hero h1 { font-size: 56px; line-height: 1.05; letter-spacing: -1.5px; }
.al-hero__lead { font-size: 19px; line-height: 1.55; color: #3A424C; max-width: 600px; }
.al-acred { flex: 1 1 340px; min-width: 0; background: #fff; border: 1px solid #E4E7EB; border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; }
.al-acred__t { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 18px; }
.al-acred__fila { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #EEF0F2; padding-bottom: 12px; font-size: 15px; color: #3A424C; }
.al-acred__fila:last-child { border-bottom: 0; padding-bottom: 0; }
.al-acred__fila strong { color: #15191E; }
@media (max-width: 781px) {
  .al-hero__in { padding-top: 56px; padding-bottom: 56px; }
  .al-hero h1 { font-size: 38px; }
  .al-h2 { font-size: 32px !important; }
}

/* ---------- Tarjetas de servicios ---------- */
.al-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.al-grid--cursos { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.al-grid--4 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
@media (max-width: 400px) { .al-grid { grid-template-columns: 1fr; } }
.al-serv { border: 1px solid #E4E7EB; border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; background: #F7F9FB; }
.al-serv h3 { font-size: 21px; line-height: 1.2; display: flex; align-items: center; gap: 12px; }
.al-num { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: #E3F3FB; color: #0077B6; display: inline-flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px; }
.al-serv ul { padding-left: 20px !important; display: flex; flex-direction: column; gap: 5px; font-size: 15px; line-height: 1.45; color: #3A424C; flex-grow: 1; }
.al-serv .wp-block-buttons { gap: 10px; }
.al-serv .wp-block-button__link { font-size: 15px; padding: 12px 18px; }

/* ---------- ITEAF ---------- */
.al-iteaf__in { flex-direction: row; flex-wrap: wrap; gap: 48px; align-items: center; }
.al-iteaf__txt { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.al-iteaf__txt h2 { font-size: 38px; letter-spacing: -1px; line-height: 1.1; }
.al-iteaf__txt h1 { font-size: 48px; letter-spacing: -1.2px; line-height: 1.08; }
@media (max-width: 781px) { .al-iteaf__txt h1 { font-size: 36px; } .al-iteaf__txt h2 { font-size: 30px; } }
.al-junta { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 12px; padding: 12px 16px; align-self: flex-start; font-size: 14px; line-height: 1.4; }
.al-junta img { height: 48px; width: auto; display: block; }
.al-junta span { color: #3A424C; }
.al-pegatina { position: relative; height: 190px; max-width: 360px; }
.al-pegatina--grande { height: 280px; max-width: 460px; }
.al-pegatina__fondo { position: absolute; left: 0; top: 0; right: 60px; bottom: 34px; background: #BFD7E4; border-radius: 16px; }
.al-pegatina img { position: absolute; right: 0; bottom: 0; width: 210px; max-width: 70%; height: auto; display: block; transform: rotate(-6deg); border-radius: 14px; border: 2px solid #15191E; box-shadow: 0 8px 18px rgba(21,25,30,.22); }
.al-pegatina--grande img { width: 300px; max-width: 75%; }
.al-dudas { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.al-dudas__t { font-weight: 600; }
.al-form { flex: 1 1 460px; min-width: 0; background: #fff; border-radius: 16px; padding: 24px 28px; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; }
.al-form--borde { border: 1px solid #E4E7EB; background: #fff; }
.al-form h3 { font-size: 24px; }
.al-nota { font-size: 13px; color: #4A535E; }

/* ITEAF página */
.al-check { background: #F3F7FA; border-radius: 14px; padding: 20px 22px; font-size: 16px; line-height: 1.5; }
.al-check::before { content: "✓"; color: #2E7D4F; font-weight: 700; margin-right: 10px; }
.al-paso { border: 1px solid #E4E7EB; border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.al-paso h3 { font-family: Inter, sans-serif; font-size: 18px; font-weight: 600; display: flex; flex-direction: column; gap: 10px; }
.al-paso p { color: #4A535E; font-size: 15px; line-height: 1.5; }
.al-bloque { display: flex; flex-direction: column; gap: 20px; }
.al-bloque h2 { font-size: 34px; letter-spacing: -.8px; }
.al-faq { max-width: 860px; border-top: 1px solid #E4E7EB; }
.al-faq details { border-bottom: 1px solid #E4E7EB; padding: 18px 0; }
.al-faq summary { cursor: pointer; font-size: 17px; font-weight: 600; }
.al-faq details p { margin-top: 10px !important; font-size: 16px; line-height: 1.6; color: #3A424C; }
.al-zona { background: #EEF6FB; border-radius: 14px; padding: 22px 24px; font-size: 16px; line-height: 1.6; }

/* ---------- Cursos ---------- */
.al-cab-cursos { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.al-curso { background: #fff; border: 1px solid #E4E7EB; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.al-curso .wp-block-image { margin: 0; }
.al-curso .wp-block-image img { display: block; width: 100%; aspect-ratio: 5 / 3; object-fit: cover; }
.al-curso__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 14px; flex-grow: 1; }
.al-curso__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: #4A535E; }
.al-curso__tipo { font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: #0077B6; }
.al-curso h3 { font-size: 20px; line-height: 1.25; }
.al-curso__desc { font-size: 15px; line-height: 1.55; color: #4A535E; flex-grow: 1; }
.al-curso__pie { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #EEF0F2; padding-top: 14px; }
.al-curso__precio { font-weight: 600; font-size: 17px; }
.al-curso__pie a { font-weight: 600; font-size: 15px; text-decoration: none; }
.al-ventajas { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 15px; color: #3A424C; }

/* ---------- Contacto ---------- */
.al-contacto__in { flex-direction: row; flex-wrap: wrap; gap: 48px; }
.al-contacto__txt { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.al-datos { display: flex; flex-direction: column; gap: 14px; font-size: 16px; padding-top: 6px; }
.al-datos small { display: block; font-size: 13px; color: #4A535E; }
.al-datos a { text-decoration: none; font-weight: 600; }

/* ---------- Formularios (Contact Form 7) ---------- */
.al-form .wpcf7 form { display: flex; flex-direction: column; gap: 14px; }
.al-form .wpcf7 p { margin: 0; }
.al-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.al-form input[type=text], .al-form input[type=tel], .al-form input[type=email], .al-form select, .al-form textarea {
  font: inherit; font-weight: 400; font-size: 16px; padding: 11px 12px; border: 1px solid #C9CFD6; border-radius: 8px; background: #fff; width: 100%; box-sizing: border-box; color: #15191E; }
.al-form textarea { min-height: 110px; resize: vertical; }
.al-form .al-f2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.al-form .wpcf7-radio { display: flex; flex-wrap: wrap; gap: 6px 20px; font-weight: 400; font-size: 15px; }
.al-form .wpcf7-list-item { margin: 0; }
.al-form .wpcf7-acceptance { font-weight: 400; font-size: 13px; color: #3A424C; }
.al-form .wpcf7-acceptance label { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.al-form input[type=submit] { font: inherit; font-weight: 600; font-size: 16px; background: #0077B6; color: #fff; border: 0; border-radius: 8px; padding: 14px; min-height: 48px; cursor: pointer; width: 100%; }
.al-form input[type=submit]:hover { background: #005A8A; }
.al-form .al-legal { font-size: 12px; line-height: 1.5; color: #4A535E; font-weight: 400; }
.al-form .wpcf7-spinner { display: none; }

/* ---------- Pie ---------- */
.al-footer { background: #15233A; color: #C9D1DB; font-size: 14px; }
.al-footer__in { display: flex; flex-direction: column; gap: 14px; padding-top: 28px; padding-bottom: 96px; }
.al-footer a { color: #C9D1DB; }
.al-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.al-pagos { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid #2C3B55; }
.al-pagos__marcas { display: flex; flex-wrap: wrap; gap: 6px; }
.al-pagos__seguro { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #E3EAF2; }
.al-pm { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 6px 9px; line-height: 1; border: 1px solid #D5DAE0; }
.al-pm--visa { color: #1A1F71; background: #fff; font-style: italic; letter-spacing: .5px; }
.al-pm--mc { color: #fff; background: #EB001B; border-color: #EB001B; box-shadow: inset -14px 0 0 #F79E1B; }
.al-pm--apple { color: #fff; background: #000; border-color: #000; }
.al-pm--gpay { color: #3C4043; background: #fff; }
.al-wa-flotante { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: center; gap: 10px; background: #128C4A; color: #fff !important; text-decoration: none; font-weight: 600; font-size: 15px; padding: 14px 18px; border-radius: 999px; box-shadow: 0 8px 24px rgba(21,25,30,.2); }
.al-wa-flotante:hover { background: #0E7A40; }

/* ---------- Ajustes 1.0.1 ---------- */
.al-iteaf__img { flex: 1 1 380px; min-width: 0; }
.al-iteaf__in > .al-iteaf__txt:has(h1) { flex: 999 1 560px; }
.al-form .wpcf7-radio label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; font-size: 15px; min-height: 32px; }
.al-form fieldset { border: 0; margin: 0; padding: 0; }
.al-form .wpcf7-not-valid-tip { font-size: 13px; font-weight: 400; }
.al-form .wpcf7-response-output { margin: 4px 0 0 !important; border-radius: 8px; font-size: 14px; }

/* ---------- Páginas normales y aula (1.0.2) ---------- */
.al-main .wp-block-post-content > :not(.wp-block-group):not(.alignfull) { box-sizing: border-box; max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.al-main .wp-block-post-content > :not(.wp-block-group):first-child { margin-top: 40px; }
.al-main .wp-block-post-content > :not(.wp-block-group):last-child { margin-bottom: 72px; }
.al-header__cta { gap: 10px; }
@media (max-width: 781px) { .al-header__cta .al-btn-sec { display: none; } }
