/*
Theme Name: VillaSEO 2026
Theme URI: https://example.com/villaseo-2026
Author: VillaSEO 2026
Description: Tema adaptable para la web de VillaSEO 2026. Incluye portada y plantilla de Contacto.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: villaseo-2026
*/

:root {
  color-scheme: light;
  --republic-red: #921923;
  --republic-red-dark: #76141c;
  --republic-yellow: #edc336;
  --republic-purple: #69366f;
  --ink: #211d1b;
  --paper: #f5f1e8;
  --gold: #f1d17b;
  --sans: "DM Sans", Arial, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
a { color: inherit; }
.site-header { min-height: 88px; padding: 10px clamp(22px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; gap: 36px; background: #faf8f2; position: relative; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 60px; height: 60px; object-fit: contain; }
.brand-name { display: grid; gap: 1px; text-transform: uppercase; letter-spacing: .12em; font-size: 9px; color: #62564a; }
.brand-name strong { color: var(--ink); font-family: var(--serif); font-size: 15px; letter-spacing: .09em; }
.main-navigation { display: flex; align-items: center; gap: clamp(22px, 3.5vw, 52px); }
.main-navigation .menu-list { display: flex; align-items: center; gap: clamp(22px, 3.5vw, 52px); margin: 0; padding: 0; list-style: none; }
.nav-link { position: relative; padding: 12px 0; text-decoration: none; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 5px; height: 2px; background: var(--republic-red); transition: right .2s ease; }
.nav-link:hover::after, .nav-link.is-current::after { right: 0; }
.nav-seal { padding: 9px 11px; border: 1px solid #c6a963; color: #8b6c28; border-radius: 50%; font-size: 9px; font-weight: 800; letter-spacing: .05em; }
.menu-toggle { display: none; }

.hero { min-height: min(760px, calc(100svh - 88px)); min-height: clamp(580px, 76vw, 790px); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; color: white; text-align: center; background: #343a35 url("assets/valdelavilla.jpg") center 54% / cover no-repeat; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17, 22, 20, .07) 5%, rgba(17, 22, 20, .08) 38%, rgba(17, 20, 18, .74) 100%), linear-gradient(90deg, rgba(20, 25, 21, .12), transparent 60%); }
.hero-copy { position: relative; z-index: 1; padding: 70px 24px 48px; margin-top: 35px; }
.eyebrow { margin: 0 0 18px; font-size: 10px; font-weight: 800; letter-spacing: .27em; text-transform: uppercase; }
.hero-eyebrow { color: #f4d98d; }
.hero h1 { display: grid; gap: .07em; margin: 0; font-family: var(--serif); font-size: clamp(34px, 4.6vw, 66px); line-height: .98; font-weight: 700; letter-spacing: .015em; text-shadow: 0 3px 28px rgba(0,0,0,.28); }
.hero h1 span:first-child { font-size: 1em; font-family: var(--sans); font-weight: 800; letter-spacing: .11em; white-space: nowrap; }
.hero h1 .hero-year { margin-top: .25em; color: #f4d98d; font-family: var(--sans); font-size: 1.08em; font-weight: 800; letter-spacing: .11em; white-space: nowrap; }
.hero-scroll { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 43px; color: rgba(255,255,255,.86); text-decoration: none; text-transform: uppercase; font-size: 9px; letter-spacing: .22em; }
.hero-scroll span { width: 1px; height: 28px; background: var(--gold); }
.hero-caption { position: absolute; z-index: 1; right: clamp(22px, 4vw, 58px); bottom: 25px; left: clamp(22px, 4vw, 58px); display: flex; justify-content: space-between; gap: 20px; color: rgba(255,255,255,.79); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }

.office-block { overflow: hidden; }
.mayor-block { color: white; background: var(--republic-red); }
.deputy-block { color: #261f17; background: var(--republic-yellow); }
.office-inner { width: min(1380px, 100% - 48px); min-height: 600px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.1fr; align-items: end; gap: clamp(30px, 7vw, 100px); position: relative; }
.portrait { align-self: stretch; display: flex; align-items: flex-end; justify-content: center; height: auto; min-height: 0; max-height: none; overflow: visible; }
.portrait img { display: block; width: auto; max-width: 100%; height: auto; max-height: 560px; object-fit: contain; object-position: center bottom; }
.portrait-mayor { align-self: end; height: 520px; overflow: hidden; padding-inline: clamp(8px, 1vw, 14px); align-items: flex-start; }
.portrait-mayor img { width: min(580px, 100%); height: 560px; max-width: 100%; max-height: none; object-fit: cover; object-position: center top; }
.office-copy { align-self: center; padding: 68px 0; position: relative; z-index: 1; }
.office-copy .eyebrow { opacity: .9; margin-bottom: 20px; font-size: 16px; }
.office-copy h2 { margin: 0; font-family: var(--serif); font-size: clamp(46px, 5.2vw, 76px); line-height: .98; font-weight: 600; letter-spacing: -.03em; text-transform: uppercase; }
.mayor-block .office-copy h2 { font-size: clamp(30px, 4.5vw, 64px); white-space: nowrap; }
.mayor-aka { display: inline-block; margin-left: .1em; font-family: var(--sans); font-size: .52em; font-weight: 800; letter-spacing: .02em; vertical-align: .12em; text-transform: none; }
.office-role { margin: 20px 0 0; font-size: clamp(18px, 1.9vw, 24px); font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.gold-rule { display: block; width: 56px; height: 2px; margin-top: 27px; background: var(--gold); }
.deputy-block .gold-rule { background: #7c5e16; }
.office-joke { margin: 24px 0 0; font-family: var(--serif); font-size: clamp(20px, 2.35vw, 29px); font-style: italic; }
.deputy-inner { grid-template-columns: 1.1fr 1fr; }
.portrait-deputy img { width: auto; height: 520px; max-width: 100%; max-height: none; object-fit: contain; object-position: center bottom; }
.block-index { position: absolute; right: 0; top: 34px; font-family: var(--serif); font-size: 11px; letter-spacing: .16em; opacity: .5; }

.council-block { padding: clamp(88px, 10vw, 140px) clamp(22px, 5vw, 76px) clamp(78px, 9vw, 120px); color: #fff; background: var(--republic-purple); text-align: center; }
.council-heading { margin: 0 auto 56px; }
.council-heading .eyebrow { color: #e8d59a; font-size: 16px; }
.council-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(42px, 6vw, 72px); font-weight: 600; letter-spacing: -.025em; }
.council-heading .gold-rule { margin: 24px auto 0; }
.council-grid { width: min(1380px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 60px 34px; }
.councillor { min-width: 0; }
.councillor-photo { width: clamp(138px, 12.5vw, 182px); aspect-ratio: 1; margin: 0 auto 20px; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 6px rgba(255,255,255,.13), 0 14px 30px rgba(29, 8, 38, .22); }
.councillor-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.councillor h3 { margin: 0; font-family: var(--serif); font-size: clamp(18px, 1.7vw, 22px); font-weight: 600; }
.councillor p { margin: 8px 0 0; color: #e7d7e9; font-size: clamp(18px, 1.7vw, 22px); letter-spacing: .08em; text-transform: uppercase; }
.council-note { max-width: 900px; margin: 55px auto 0; color: rgba(255,255,255,.78); font-size: 20px; line-height: 1.5; letter-spacing: .04em; }

.president-block { min-height: clamp(240px, 32vw, 650px); position: relative; display: grid; place-items: center; overflow: hidden; color: #fff; text-align: center; background: #483528; }
.president-image { position: absolute; z-index: 0; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.president-shade { position: absolute; z-index: 0; inset: 0; background: linear-gradient(90deg, rgba(27,19,15,.22), rgba(27,19,15,.08) 27%, rgba(20,14,11,.32) 49%, rgba(20,14,11,.08) 74%, rgba(20,14,11,.28)), linear-gradient(0deg, rgba(18,13,11,.36), transparent 40%); }
.president-copy { position: relative; z-index: 1; max-width: min(760px, 85vw); padding: 35px clamp(24px, 5vw, 66px); border: 1px solid rgba(244,217,141,.7); background: rgba(28,22,20,.5); box-shadow: 0 15px 60px rgba(0,0,0,.17); backdrop-filter: blur(3px); }
.president-copy .eyebrow { color: #f3d98c; font-size: 16px; }
.president-copy h2 { margin: 0 0 12px; font-family: var(--serif); font-size: clamp(42px, 6.8vw, 84px); line-height: 1; text-transform: uppercase; }
.president-copy p:last-child { margin: 0; font-size: clamp(18px, 1.9vw, 24px); font-weight: 800; line-height: 1.6; letter-spacing: .17em; text-transform: uppercase; }
.president-seal { position: absolute; z-index: 1; right: clamp(18px, 4vw, 56px); bottom: 25px; color: rgba(246,222,163,.84); font-family: var(--serif); font-size: 20px; line-height: 1.05; text-align: center; }
.president-seal small { font-family: var(--sans); font-size: 8px; letter-spacing: .2em; }
.site-footer { min-height: 100px; padding: 25px clamp(22px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #fff; background: var(--republic-red); }
.footer-wordmark { font-family: var(--serif); font-size: 24px; font-weight: 700; text-decoration: none; }
.footer-wordmark sup { padding-left: 2px; font-family: var(--sans); font-size: 9px; vertical-align: super; }
.site-footer > span { font-size: 9px; font-weight: 600; letter-spacing: .17em; text-align: right; text-transform: uppercase; opacity: .78; }

.contact-page { min-height: 100svh; display: flex; flex-direction: column; }
.contact-page main { flex: 1; }
.contact-hero { padding: clamp(72px, 10vw, 130px) 24px clamp(55px, 7vw, 90px); color: white; background: var(--republic-red); text-align: center; }
.contact-hero .eyebrow { color: #f3d98c; }
.contact-hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(54px, 9vw, 108px); line-height: 1; text-transform: uppercase; }
.contact-hero > p:last-child { margin: 22px 0 0; font-size: 14px; letter-spacing: .12em; }
.contact-content { width: min(1180px, 100% - 48px); margin: 0 auto; padding: clamp(58px, 8vw, 100px) 0; display: grid; grid-template-columns: .72fr 1.28fr; align-items: center; gap: clamp(35px, 7vw, 100px); }
.location-copy .eyebrow { color: #8f1720; }
.location-copy h2 { margin: 0; font-family: var(--serif); font-size: clamp(38px, 5vw, 60px); line-height: 1.05; }
.location-copy > p:not(.eyebrow):not(.coordinates) { max-width: 390px; color: #625b53; font-size: 15px; line-height: 1.75; }
.coordinates { margin: 25px 0; color: #8b6c28; font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.map-link { display: inline-flex; align-items: center; gap: 12px; padding: 14px 18px; color: white; background: var(--republic-red); text-decoration: none; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; transition: background .2s ease; }
.map-link:hover { background: var(--republic-red-dark); }
.map-link span { font-size: 16px; }
.map-frame { min-height: 420px; overflow: hidden; border: 8px solid #fff; box-shadow: 0 18px 60px rgba(58,46,33,.12); }
.map-frame iframe { display: block; width: 100%; height: 420px; border: 0; }

@media (max-width: 760px) {
  .site-header { min-height: 76px; padding: 8px 20px; }
  .brand-mark { width: 51px; height: 51px; }
  .menu-toggle { width: 44px; height: 44px; border: 0; padding: 12px 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: transparent; cursor: pointer; }
  .menu-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }
  .main-navigation { position: absolute; top: 100%; right: 0; left: 0; padding: 10px 22px 22px; display: none; flex-direction: column; align-items: stretch; gap: 0; background: #faf8f2; box-shadow: 0 12px 20px rgba(30,22,15,.1); }
  .main-navigation.is-open { display: flex; }
  .main-navigation .menu-list { width: 100%; flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { padding: 16px 0; }
  .nav-link::after { bottom: 9px; right: auto; width: 0; transition: width .2s ease; }
  .nav-link:hover::after, .nav-link.is-current::after { right: auto; width: 36px; }
  .nav-seal { align-self: flex-start; margin-top: 10px; }
  .hero { min-height: min(760px, calc(100svh - 76px)); min-height: clamp(540px, 132vw, 690px); background-position: 52% center; }
  .hero-copy { margin-top: 20px; }
  .hero h1 { font-size: clamp(14px, 4.2vw, 32px); }
  .hero h1 span:first-child { font-size: 1em; letter-spacing: .045em; }
  .hero h1 .hero-year { font-size: 1.08em; letter-spacing: .045em; }
  .hero-caption { bottom: 18px; flex-direction: column; gap: 6px; font-size: 8px; }
  .office-inner, .deputy-inner { width: 100%; min-height: 0; grid-template-columns: 1fr; gap: 0; text-align: center; }
  .office-copy { grid-row: 1; padding: 62px 24px 24px; }
  .office-copy h2 { font-size: clamp(36px, 10vw, 58px); }
  .mayor-block .office-copy h2 { font-size: clamp(21px, 6.5vw, 40px); }
  .office-copy .eyebrow { margin-bottom: 14px; font-size: 14px; }
  .office-role { margin-top: 14px; font-size: 16px; letter-spacing: .12em; }
  .office-joke { margin-top: 18px; font-size: 22px; }
  .office-copy .gold-rule { margin: 22px auto 0; }
  .portrait { grid-row: 2; min-height: 0; max-height: none; }
  .portrait img { max-height: none; }
  .portrait-mayor { align-self: end; height: min(450px, 92vw); overflow: hidden; padding-inline: 14px; align-items: flex-start; }
  .portrait-mayor img { width: auto; height: calc(min(450px, 92vw) + 8px); max-width: 100%; }
  .portrait-deputy img { width: auto; height: min(420px, 90vw); max-width: 100%; }
  .block-index { top: 20px; right: 22px; }
  .council-block { padding: 82px 20px; }
  .council-heading { margin-bottom: 40px; }
  .council-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px 14px; }
  .councillor-photo { width: clamp(118px, 36vw, 146px); margin-bottom: 16px; }
  .councillor h3 { font-size: 16px; }
  .councillor p { font-size: 16px; letter-spacing: .04em; }
  .council-note { margin-top: 40px; line-height: 1.6; }
  .president-block { min-height: max(200px, calc(33.35vw + 50px)); }
  .president-image { object-fit: contain; object-position: center center; }
  .president-shade { background: linear-gradient(0deg, rgba(20,14,11,.55), rgba(20,14,11,.1) 70%), linear-gradient(90deg, rgba(20,14,11,.16), rgba(20,14,11,.2)); }
  .president-copy { max-width: calc(100% - 36px); padding: 25px 20px; }
  .president-copy h2 { font-size: clamp(38px, 11vw, 58px); }
  .president-copy p:last-child { font-size: 16px; letter-spacing: .12em; }
  .desktop-break { display: initial; }
  .president-seal { right: 17px; bottom: 18px; }
  .site-footer { min-height: 88px; padding: 20px; align-items: flex-start; flex-direction: column; gap: 9px; }
  .site-footer > span { text-align: left; font-size: 8px; }
  .contact-hero { padding: 74px 20px 58px; }
  .contact-content { width: calc(100% - 40px); grid-template-columns: 1fr; gap: 34px; padding: 52px 0; }
  .location-copy > p:not(.eyebrow):not(.coordinates) { font-size: 14px; }
  .map-frame { min-height: 340px; border-width: 5px; }
  .map-frame iframe { height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
