/*
Theme Name: Kit Digital Andalucía
Theme URI: https://kitdigitalandalucia.com/
Author: Win Innovación
Description: Réplica plana y gestionable de Kit Digital Andalucía, compatible con Flat Theme Manager.
Version: 1.0.4
Requires at least: 6.2
Requires PHP: 8.0
Text Domain: kitdigital-andalucia
*/

:root {
  --kda-accent: #43b8c0;
  --kda-accent-dark: #269ba5;
  --kda-ink: #262226;
  --kda-muted: #706d70;
  --kda-white: #fffefe;
  --kda-max: 1100px;
  --kda-radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--kda-ink);
  background: var(--kda-white);
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
.kda-container { width: min(calc(100% - 48px), var(--kda-max)); margin-left: max(24px, calc((100vw - 15px - var(--kda-max)) / 2)); margin-right: auto; }
.kda-eyebrow { margin: 0 0 30px; font-size: 14px; line-height: 1; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.kda-heading { margin: 0; font-size: clamp(42px, 5vw, 68px); line-height: 1.04; letter-spacing: -.045em; }
.kda-lead { max-width: 1060px; font-size: 17px; line-height: 1.62; }

.site-header {
  position: relative;
  z-index: 50;
  min-height: 154px;
  background: #fff;
  box-shadow: 0 5px 13px rgba(0,0,0,.22);
}
.site-header { position: sticky; top: 0; transition: min-height .3s ease-out, box-shadow .3s ease-out; }
.site-header.is-sticky { min-height: 110px; box-shadow: 0 5px 16px rgba(0,0,0,.18); }
.site-header__inner { width: min(calc(100% - 48px), 1208px); margin-left: max(24px, calc((100vw - 15px - 1208px) / 2)); min-height: inherit; display: grid; grid-template-columns: 320px 1fr auto; gap: 34px; align-items: center; }
.site-logo img { width: 100px; height: 100px; object-fit: contain; }
.main-nav { display: flex; justify-content: center; align-items: center; gap: 40px; }
.main-nav > a, .nav-dropdown__toggle { border: 0; background: none; padding: 18px 0; color: #302d30; cursor: pointer; font-weight: 500; }
.nav-dropdown { position: relative; }
.nav-dropdown__toggle::after { content: "⌄"; margin-left: 7px; font-size: 14px; }
.nav-dropdown__menu {
  position: absolute;
  top: calc(100% - 2px);
  left: 50%;
  width: 330px;
  max-height: 68vh;
  overflow: auto;
  padding: 14px;
  transform: translate(-50%, 10px);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 15px 42px rgba(0,0,0,.16);
  visibility: hidden;
  opacity: 0;
  transition: .22s ease;
}
.nav-dropdown:hover .nav-dropdown__menu, .nav-dropdown:focus-within .nav-dropdown__menu, .nav-dropdown.open .nav-dropdown__menu { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
.nav-dropdown__menu a { display: block; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.nav-dropdown__menu a:hover { color: var(--kda-accent-dark); background: #effafb; }
.header-actions { display: flex; gap: 23px; align-items: center; }
.header-phone { font-weight: 800; white-space: nowrap; }
.kda-button { display: inline-flex; min-height: 49px; padding: 12px 30px; align-items: center; justify-content: center; border-radius: 15px; color: #fff; background: var(--kda-accent); font-weight: 700; transition: transform .2s ease, background .2s ease; }
.kda-button:hover { color: #fff; background: var(--kda-accent); }
.mobile-toggle { display: none; width: 46px; height: 42px; border: 0; border-radius: 10px; background: var(--kda-accent); color: #fff; font-size: 25px; cursor: pointer; }

.hero {
  min-height: 889px;
  display: flex;
  align-items: stretch;
  color: #fff;
  background-position: center;
  background-size: cover;
  position: relative;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.18); }
.hero__inner { width: 100%; max-width: none; margin: 0; position: relative; z-index: 1; padding: 414px 70px 70px; }
.hero__brand { margin: 0 0 25px; color: var(--kda-accent); font-size: 14px; line-height: 1; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { max-width: 1035px; margin: 0; color: #fff; font-size: 77px; line-height: .92; letter-spacing: -.045em; text-shadow: 0 2px 25px rgba(0,0,0,.13); }

.request { position: relative; height: 944px; padding: 150px 0 100px; overflow: hidden; }
.request__mark { position: absolute; top: 53px; left: calc(50% - 218px); width: 50px; height: 42px; fill: none; stroke: var(--kda-accent); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.request .kda-heading { font-size: 57px; line-height: 1.1052; }
.request .kda-lead { width: 100%; max-width: none; margin: 30px 0; font-size: 16px; line-height: 26px; }
.steps { height: 386px; display: grid; grid-template-columns: repeat(3, 287px); gap: 90px; padding-left: 30px; }
.step { position: relative; padding: 40px 0 0; }
.step__icon { width: 120px; height: 120px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--kda-accent); }
.step__icon svg { width: 80px; height: 80px; fill: currentColor; }
.step__num { display: block; margin: 50px 0 12px; color: var(--kda-ink); font-size: 23px; line-height: 28px; font-weight: 700; text-transform: none; }
.step p { margin: 0; font-size: 16px; line-height: 26px; }
.partners-strip { width: 768px; height: 89px; margin: 0 auto; object-fit: contain; }

.agent { padding: 0; }
.agent__primary { height: 1040px; display: grid; grid-template-columns: repeat(2, 538px); gap: 55px; align-items: start; }
.agent__primary figure { margin: 0; }
.agent__primary-left h2 { margin: 0 0 51px; font-size: 57px; line-height: 1.1052; letter-spacing: -.045em; text-transform: uppercase; }
.agent__description p { margin: 0 0 26px; font-size: 16px; line-height: 26px; }
.agent__business { margin-top: 17px !important; }
.agent__business img { width: 538px; height: 448px; object-fit: cover; }
.agent__visual img { width: 538px; height: 700px; margin-left: auto; object-fit: contain; }
.agent__business, .agent__visual { overflow: hidden; }
.agent__business img, .agent__visual img { transition: transform .3s ease; }
.agent__business:hover img, .agent__visual:hover img { transform: scale(1.1); }
.agent__text { padding: 4px 0 0; font-size: 16px; line-height: 26px; }
.agent__text p { margin: 0 0 26px; }
.agent__text ul { padding-left: 20px; }
.agent__why { height: 766px; display: grid; grid-template-columns: 439px 552px; gap: 109px; align-items: start; margin-top: 80px; }
.agent__why img { width: 439px; height: 658px; object-fit: cover; }
.agent__why h3 { margin: 0 0 25px; font-size: 28px; line-height: 34px; }
.agent__why p { margin: 0 0 26px; line-height: 26px; }
.agent__why ul { padding-left: 20px; font-weight: 700; }
.stats { display: grid; grid-template-columns: 261px 281px; gap: 30px 10px; margin-top: 45px; }
.stat { padding-bottom: 10px; border-bottom: 1px solid var(--kda-accent); }
.stat strong { display: block; font-size: 64px; line-height: 78px; }
.stat span { font-size: 19px; line-height: 24px; font-weight: 700; }

.faq { height: 727px; padding: 0; background: #fff; }
.faq > .kda-container { position: relative; height: 100%; }
.faq__head { position: absolute; z-index: 2; top: 100px; left: 505px; width: 595px; text-align: center; margin: 0; }
.faq__head .kda-eyebrow { margin-bottom: 33px; }
.faq__head .kda-heading { font-size: 47px; line-height: 53px; }
.faq__grid { display: grid; grid-template-columns: 475px 595px; gap: 30px; align-items: start; padding-top: 137px; }
.faq__image { margin: 0; padding-top: 93px; }
.faq__image img { width: 595px; height: 397px; margin: 0; object-fit: contain; }
.faq-item { border-top: 1px solid var(--kda-accent); }
.faq-item:last-child { border-bottom: 1px solid var(--kda-accent); }
.faq-item button { width: 100%; min-height: 89px; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; border: 0; background: none; text-align: left; color: var(--kda-ink); font-size: 19px; line-height: 24px; font-weight: 800; cursor: pointer; }
.faq-item button::after { content: "+"; color: var(--kda-accent-dark); font-size: 22px; }
.faq-item.open button::after { content: "−"; }
.faq-item button { transition: color .3s ease-in-out; }
.faq-item__answer { display: grid; grid-template-rows: 0fr; padding: 0; overflow: hidden; color: var(--kda-muted); opacity: 0; transition: grid-template-rows .3s ease-in-out, opacity .3s ease-in-out, padding .3s ease-in-out; }
.faq-item__answer > div { min-height: 0; }
.faq-item.open button { color: var(--kda-accent); }
.faq-item.open .faq-item__answer { grid-template-rows: 1fr; padding: 0 0 22px; opacity: 1; }

.about-hero { padding: 50px 0 0; }
.about-grid { min-height: 744px; display: grid; grid-template-columns: 539px 436px; gap: 98px; align-items: start; }
.about-grid__image { margin: 0; }
.about-grid__image img { width: 539px; height: 595px; border-radius: 30px; object-fit: cover; }
.about-copy { padding: 0; }
.about-copy h1 { margin: 0 0 60px; font-size: 57px; line-height: 1.1052; letter-spacing: -.045em; }
.about-copy > h3 { margin: 0 0 15px; font-size: 35px; line-height: 1.1142; letter-spacing: -.025em; }
.about-copy > p, .about-history p { margin: 0; font-size: 16px; line-height: 26px; }
.about-history { margin-top: 99px; }
.mission { height: 1006px; margin-top: 60px; padding: 20px 0; }
.mission > .kda-container { height: 966px; display: grid; grid-template-columns: 536px 534px; gap: 30px; }
.mission__intro { width: 536px; max-width: none; margin: 0; padding-right: 54px; display: flex; flex-direction: column; justify-content: center; }
.mission__intro .kda-eyebrow { margin: 0; font-size: 14px; line-height: 37px; }
.mission__intro h2 { margin: 0 0 28px; font-size: 35px; line-height: 1.1142; letter-spacing: -.025em; }
.mission__intro p { margin: 0 0 28px; font-size: 16px; line-height: 26px; }
.mission__intro .kda-button { align-self: flex-start; min-height: 55px; padding: 18px 40px; font-size: 16px; line-height: 19px; }
.mission-cards { height: 966px; display: grid; grid-template-columns: repeat(2, 252px); grid-template-rows: 481px 455px; gap: 30px; }
.mission-card { min-height: 0; padding: 40px 30px; border-radius: 30px; color: #fff; background: #262226; }
.mission-card:nth-child(2n) { margin-top: 0; }
.mission-card svg { width: 50px; height: 50px; display: block; margin: 0 0 54px; fill: var(--kda-accent); transition: color .3s, fill .3s; }
.mission-card h3 { margin: 0 0 12px; font-size: 23px; line-height: 28px; }
.mission-card p { margin: 0; font-size: 16px; line-height: 26px; }

.legal-page { min-height: 650px; padding: 105px 0 120px; }
.legal-page h1 { margin: 0 0 55px; font-size: clamp(42px, 5vw, 64px); line-height: 1.05; }
.legal-page__content { max-width: 920px; }
.legal-page h2, .legal-page h3, .legal-page h4, .legal-page h5 { margin: 36px 0 12px; }
.legal-page a { color: var(--kda-accent-dark); text-decoration: underline; }
.legal-page li { margin-bottom: 8px; }

.site-footer { padding: 145px 0 28px; color: #fff; background: #262226; }
.footer-grid { display: grid; grid-template-columns: 44% 18% 38%; gap: 0; }
.footer-brand img { width: 150px; height: 90px; object-fit: contain; filter: brightness(0) invert(1); }
.footer-brand p { max-width: 460px; margin: 30px 0; font-size: 16px; }
.socials { display: flex; gap: 8px; }
/* Center the cookie banner close icon inside its circular button. */
#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-close {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
}
#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-close svg {
  display: block !important;
  flex: 0 0 20px;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
}

.socials svg { display: block; flex-shrink: 0; }
.socials a, .socials-pending { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--kda-accent); border-radius: 50%; font-weight: 700; }
.socials a { transition: color .3s ease, background-color .3s ease, transform .3s ease; }
.socials a:hover { color: var(--kda-ink); background: var(--kda-accent); transform: translateY(-3px); }
.footer-links { padding: 35px 0 0 28px; }
.footer-links__icon { display: block; margin-bottom: 24px; color: var(--kda-accent); font-size: 44px; line-height: 1; }
.footer-links a { display: block; margin-bottom: 25px; }
.footer-links a, .footer-contact a { transition: color .3s ease; }
.footer-links a:hover, .footer-contact a:hover { color: var(--kda-accent); }
.footer-contact { position: relative; padding: 30px 145px 0 22px; }
.footer-contact h3 { font-size: 20px; }
.footer-contact a, .footer-contact address { display: block; margin: 16px 0; font-style: normal; }
.footer-contact address { color: var(--kda-accent); }
.footer-certificate { position: absolute; width: 130px; right: 0; top: 30px; margin: 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; margin-top: 105px; padding-top: 28px; border-top: 1px solid var(--kda-accent); font-size: 14px; }

.a11y-float { position: fixed; z-index: 45; left: 24px; bottom: 24px; width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #172224; background: var(--kda-accent); box-shadow: 0 4px 15px rgba(0,0,0,.18); font-size: 22px; }

@keyframes kda-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kda-up { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: translateY(0); } }
@keyframes kda-left { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes kda-right { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes kda-right-full { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes kda-popup { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
.fx-reveal { opacity: 0; }
.fx-reveal.is-visible { animation-duration: 1s; animation-timing-function: ease; animation-delay: var(--fx-delay, 0ms); animation-fill-mode: both; }
.fx-fade.is-visible { animation-name: kda-fade; }
.fx-up.is-visible { animation-name: kda-up; }
.fx-left.is-visible { animation-name: kda-left; }
.fx-right.is-visible { animation-name: kda-right; }
.fx-right-full.is-visible { animation-name: kda-right-full; }
.fx-popup.is-visible { animation-name: kda-popup; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fx-reveal, .fx-reveal.is-visible { opacity: 1; animation: none !important; transform: none !important; }
  .agent__business img, .agent__visual img, .site-header, .faq-item__answer { transition: none !important; }
}

@media (max-width: 1024px) {
  .kda-container { width: min(calc(100% - 48px), var(--kda-max)); margin-inline: auto; }
  .site-header { min-height: 112px; }
  .site-header__inner { width: min(calc(100% - 48px), 1208px); margin-inline: auto; grid-template-columns: 130px 1fr auto; }
  .main-nav { gap: 24px; }
  .header-phone { display: none; }
  .hero { min-height: 700px; }
  .hero__inner { padding-top: 80px; }
  .request { height: auto; min-height: 820px; }
  .steps { width: 100%; grid-template-columns: repeat(3, 1fr); gap: 35px; padding-left: 0; }
  .partners-strip { max-width: 75%; }
  .agent__primary { height: auto; grid-template-columns: repeat(2, 1fr); gap: 45px; }
  .agent__primary-left h2 { font-size: 48px; }
  .agent__business img, .agent__visual img { width: 100%; height: auto; max-height: 560px; }
  .agent__why { height: auto; grid-template-columns: .9fr 1.1fr; gap: 50px; }
  .agent__why img { width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid { min-height: 0; grid-template-columns: repeat(2, 1fr); gap: 45px; }
  .about-grid__image img { width: 100%; height: auto; }
  .mission { height: auto; }
  .mission > .kda-container { height: auto; grid-template-columns: 1fr 1fr; gap: 30px; }
  .mission__intro { width: auto; padding-right: 20px; }
  .mission-cards { width: 100%; height: auto; grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; }
  .mission-card:nth-child(2n) { margin-top: 0; }
}

@media (max-width: 767px) {
  .kda-container { width: min(calc(100% - 34px), var(--kda-max)); }
  .site-header { min-height: 88px; }
  .site-header__inner { grid-template-columns: 1fr auto; gap: 18px; }
  .site-logo img { width: 76px; height: 62px; }
  .mobile-toggle { display: block; }
  .header-actions .kda-button, .main-nav { display: none; }
  .main-nav.open { position: fixed; inset: 88px 0 0; display: block; padding: 28px 22px 60px; overflow-y: auto; background: #fff; }
  .main-nav > a, .nav-dropdown__toggle { display: block; width: 100%; padding: 14px; text-align: left; border-bottom: 1px solid #e5e5e5; }
  .nav-dropdown__menu { position: static; width: auto; max-height: none; display: none; padding: 5px 0 10px 18px; transform: none; box-shadow: none; visibility: visible; opacity: 1; }
  .nav-dropdown.open .nav-dropdown__menu { display: block; transform: none; }
  .hero { min-height: 620px; background-position: 59% center; }
  .hero::before { background: rgba(25,25,25,.2); }
  .hero__inner { padding: 95px 0 65px; }
  .hero h1 { font-size: 47px; }
  .request { min-height: auto; padding: 88px 0 65px; }
  .request .kda-lead { margin: 25px 0 60px; }
  .kda-heading { font-size: 42px; }
  .steps { height: auto; grid-template-columns: 1fr; gap: 38px; }
  .step { padding-top: 0; }
  .step__icon { width: 88px; height: 88px; }
  .step__icon svg { width: 56px; height: 56px; }
  .step__num { margin-top: 25px; }
  .partners-strip { max-width: 100%; height: auto; margin-top: 45px; }
  .agent { padding-bottom: 50px; }
  .agent__primary { grid-template-columns: 1fr; gap: 34px; padding-top: 80px; }
  .agent__primary-left h2 { font-size: 48px; }
  .agent__visual img { max-height: 500px; margin-inline: auto; }
  .agent__business img { max-height: 360px; }
  .agent__why { height: auto; grid-template-columns: 1fr; gap: 40px; margin-top: 45px; }
  .agent__why img { height: 470px; }
  .stats { gap: 25px 20px; }
  .stat strong { font-size: 43px; }
  .stat span { font-size: 13px; }
  .faq { height: auto; padding: 85px 0 70px; }
  .faq__head { position: static; width: auto; margin-bottom: 35px; }
  .faq__head .kda-heading { font-size: 46px; }
  .faq__grid { grid-template-columns: 1fr; gap: 35px; padding-top: 0; }
  .faq__image { display: none; }
  .about-hero { padding: 75px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-grid__image img { height: 450px; }
  .about-copy { padding: 0; }
  .about-copy h1 { margin-bottom: 40px; }
  .about-copy > h3 { font-size: 30px; }
  .about-history { margin-top: 55px; }
  .mission { height: auto; margin-top: 0; padding: 75px 0; }
  .mission > .kda-container { height: auto; display: block; }
  .mission__intro { width: auto; margin-bottom: 60px; padding-right: 0; display: block; }
  .mission__intro h2 { font-size: 40px; }
  .mission-cards { height: auto; grid-template-columns: 1fr; grid-template-rows: auto; }
  .mission-card { min-height: auto; }
  .legal-page { padding: 70px 0 90px; }
  .site-footer { padding-top: 85px; }
  .footer-grid { grid-template-columns: 1fr; gap: 25px; }
  .footer-links, .footer-contact { padding-top: 12px; }
  .footer-contact { position: static; padding-right: 0; }
  .footer-certificate { position: static; width: 150px; margin: 25px 0 0; }
  .footer-bottom { display: block; margin-top: 60px; }
  .footer-bottom span { display: block; margin-bottom: 10px; }
}
