/*
Theme Name: Alerta Rosa
Author: Fiscalia
Description: Tema base para WordPress con estructura ligera, accesible y lista para extender.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
Text Domain: alerta-rosa
*/

:root {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-soft: #f1edf3;
  --color-surface-muted: #ece6ef;
  --color-text: #4b4253;
  --color-text-soft: #766d7e;
  --color-primary: #d63c68;
  --color-primary-dark: #b82d56;
  --color-accent: #45305f;
  --color-accent-soft: #5a3f7b;
  --color-border: #e7dfe9;
  --color-shadow: rgba(90, 63, 123, 0.08);
  --font-base: "Poppins", Arial, Helvetica, sans-serif;
  --font-heading: "Bebas Neue", Impact, sans-serif;
  --container: 72rem;
  --radius-sm: 0.75rem;
  --radius-md: 1.2rem;
  --radius-lg: 1.5rem;
  --radius-xl: 1.75rem;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.6;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

a:hover,
a:focus {
  color: var(--color-primary-dark);
}

button,
input,
textarea,
select {
  font: inherit;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  padding: 0.75rem 1rem;
  background: var(--color-accent);
  color: #fff;
  z-index: 1000;
}

.site-main {
  flex: 1;
  padding-bottom: var(--space-6);
}

.container {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.site-header {
  position: relative;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(231, 223, 233, 0.9);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

body.has-scroll-fixed-header .site-header {
  position: relative;
  transform: none;
}

body.has-scroll-fixed-header.is-header-fixed .site-shell {
  padding-top: var(--header-height, 0px);
}

body.has-scroll-fixed-header.is-header-fixed .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  box-shadow: 0 0.75rem 2rem rgba(32, 18, 45, 0.08);
}

body.admin-bar.has-scroll-fixed-header.is-header-fixed .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar.has-scroll-fixed-header.is-header-fixed .site-header {
    top: 46px;
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.75rem 0;
}

.site-header__editable-content,
.site-footer__editable-content {
  padding: 1rem 0;
}

.site-header__editable-content>*,
.site-footer__editable-content>* {
  margin-top: 0;
  margin-bottom: 0;
}

.site-header__editable-content>*+*,
.site-footer__editable-content>*+* {
  margin-top: 1rem;
}

.site-header__editable-content>:not(.alignwide):not(.alignfull),
.site-footer__editable-content>:not(.alignwide):not(.alignfull) {
  width: min(100% - 2rem, var(--container));
  margin-left: auto;
  margin-right: auto;
}

.site-header__editable-content>.alignwide,
.site-footer__editable-content>.alignwide {
  width: min(100% - 2rem, calc(var(--container) + 8rem));
  margin-left: auto;
  margin-right: auto;
}

.site-header__editable-content>.alignfull,
.site-footer__editable-content>.alignfull {
  width: 100%;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.custom-logo {
  max-height: 3rem;
  width: auto;
}

.site-branding__text {
  min-width: 0;
}

.site-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 400;
}

.site-title a {
  color: var(--color-primary);
  text-decoration: none;
}

.site-description {
  margin: 0.25rem 0 0;
  color: var(--color-text-soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.primary-navigation {
  display: none;
}

.primary-navigation.is-open {
  display: block;
}

.primary-navigation ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  gap: var(--space-2);
  padding: var(--space-3) 0 0;
  margin: 0;
}

.primary-navigation a {
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-navigation .current-menu-item>a,
.primary-navigation .current_page_item>a {
  color: var(--color-accent);
}

.home-page .site-main {
  padding-top: 0;
}

.home-page-builder {
  padding: 1.75rem 0 0;
}

.home-page-builder__entry>* {
  margin-top: 0;
  margin-bottom: 0;
}

.home-page-builder__entry>*+* {
  margin-top: clamp(1.25rem, 3vw, 2rem);
}

.home-page-builder__entry>:not(.alignwide):not(.alignfull) {
  width: min(100% - 2rem, 720px);
  margin-left: auto;
  margin-right: auto;
}

.home-page-builder__entry>.alignwide {
  width: min(100% - 2rem, calc(var(--container) + 8rem));
  margin-left: auto;
  margin-right: auto;
}

.home-page-builder__entry>.alignfull {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

.home-page-builder .wp-block-post-template {
  padding-left: 0;
}

.home-page-builder .wp-block-query-pagination,
.home-page-builder .wp-block-query-no-results {
  width: min(100% - 2rem, 720px);
  margin-left: auto;
  margin-right: auto;
}

.hero {
  position: relative;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  margin-bottom: 1.75rem;
  color: #fff;
  overflow: clip;
}

.hero__track {
  display: grid;
  min-height: clamp(25rem, 62vw, 38rem);
}

.hero__slide {
  --hero-image: none;
  grid-area: 1 / 1;
  display: grid;
  align-items: center;
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(4.5rem, 8vw, 6rem);
  background-color: #912546;
  background-image: linear-gradient(125deg, rgba(214, 60, 104, 0.92) 0%, rgba(145, 37, 70, 0.86) 45%, rgba(69, 48, 95, 0.82) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  text-align: center;
  position: relative;
  isolation: isolate;
}

.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hero__slide::before,
.hero__slide::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  z-index: -1;
}

.hero__slide::before {
  width: 16rem;
  height: 16rem;
  left: 6%;
  top: 14%;
}

.hero__slide::after {
  width: 22rem;
  height: 22rem;
  right: -6rem;
  bottom: -8rem;
}

.hero__container {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0 auto;
}

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__title {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 400;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero__title span {
  display: block;
}

.hero__text {
  max-width: 34rem;
  margin: 1rem auto 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.45;
}

.hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  margin-top: 1.5rem;
  padding: 0.85rem 1.4rem;
  background: #fff;
  border-radius: 999px;
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.hero__button:hover,
.hero__button:focus {
  color: var(--color-primary-dark);
}

.hero__dots {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  transform: translateX(-50%);
}

.hero__dot {
  width: 0.8rem;
  height: 0.8rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.hero__dot.is-active {
  background: #fff;
}

.hero__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(17, 12, 24, 0.18);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

.hero__nav--prev {
  left: 1.5rem;
}

.hero__nav--next {
  right: 1.5rem;
}

.quick-actions {
  padding-bottom: 1.75rem;
}

.quick-actions__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.25rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, #efeff2 0%, #e6e4e9 100%);
  border: 1px solid #ded9e1;
  border-radius: 999px;
  color: var(--color-accent);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.section {
  padding: 0 0 2rem;
}

.section-title {
  margin: 0 0 1.3rem;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.action-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-card,
.content-card,
.post-card,
.comments-area,
.about-card {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 1rem 2rem var(--color-shadow);
}

.action-card {
  padding: 1.5rem;
}

.action-card h3 {
  margin: 0 0 0.85rem;
  color: var(--color-accent);
  font-size: 1.5rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.action-card p,
.about-card p,
.entry-summary,
.entry-content>p,
.entry-content li {
  color: var(--color-text-soft);
}

.text-link {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.12em;
}

.alert-strip {
  background: linear-gradient(90deg, #d8dde4 0%, #efeff3 55%, #d7d9df 100%);
  border-radius: 0;
  min-height: 8rem;
  padding: 1.5rem 2rem;
  display: grid;
  align-items: center;
}

.alert-strip__content {
  max-width: 28rem;
}

.alert-strip__eyebrow {
  display: block;
  color: #69707a;
  font-size: 0.9rem;
  font-weight: 700;
}

.alert-strip__phone {
  display: block;
  margin-top: 0.15rem;
  color: var(--color-accent);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.about-card {
  padding: 1.5rem 2rem;
}

.about-card h3 {
  margin: 0 0 0.85rem;
  color: var(--color-accent);
  font-size: 1.5rem;
  text-transform: uppercase;
}

.news-grid,
.grid--posts {
  display: grid;
  gap: 1.05rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.news-card,
.post-card {
  min-height: 24.5rem;
  padding: 2rem 1.85rem 1.75rem;
  background: #4a2b60;
  border: 0;
  border-radius: 2rem;
  color: #fff;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.news-card__date,
.post-card__meta {
  display: block;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.2;
}

.news-card h3,
.post-card__title {
  margin: 0 0 1.6rem;
  color: #fff;
  font-size: clamp(1.85rem, 2.2vw, 2.3rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 14ch;
}

.news-card p,
.post-card .entry-summary,
.post-card .entry-summary p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: clamp(0.98rem, 1.3vw, 1.1rem);
  font-weight: 500;
  line-height: 1.08;
  max-width: 16ch;
  text-wrap: balance;
}

.post-card a,
.news-card a,
.entry-title a {
  color: inherit;
  text-decoration: none;
}

.post-card__body {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.post-card .entry-summary {
  margin-top: auto;
}

.institutions {
  padding-bottom: 2.5rem;
}

.institutions__grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.institution-badge {
  min-height: 4.5rem;
  padding: 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.content-stack {
  display: grid;
  gap: 1.25rem;
  padding: 2.5rem 0 0;
}

.archive-header,
.not-found {
  padding: 2.5rem 0 1.25rem;
}

.archive-header h1,
.entry-title,
.not-found h1 {
  margin: 0 0 0.85rem;
  color: var(--color-accent);
  line-height: 1.05;
}

.content-card,
.comments-area {
  padding: 1.5rem;
}

.entry-meta {
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

.entry-content>*:first-child,
.comment-content>*:first-child {
  margin-top: 0;
}

.entry-content>*:last-child,
.comment-content>*:last-child {
  margin-bottom: 0;
}

.entry-footer,
.post-navigation,
.posts-navigation,
.pagination,
.wp-block-query-pagination {
  margin-top: 1.5rem;
}

.post-navigation,
.posts-navigation,
.pagination {
  padding: 1rem 1.25rem;
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.nav-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.comment-list,
.children {
  list-style: none;
  padding-left: 0;
}

.comment-list li {
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
}

.comment-meta {
  margin-bottom: 0.5rem;
}

.comment-respond {
  margin-top: 1.5rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.search-form {
  display: flex;
  gap: 0.75rem;
}

.search-form label {
  flex: 1;
  margin-bottom: 0;
}

.search-form .search-submit,
.button-link,
.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.button-link:hover,
.button-link:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus,
button[type="submit"]:hover,
button[type="submit"]:focus,
input[type="submit"]:hover,
input[type="submit"]:focus {
  background: var(--color-primary-dark);
  color: #fff;
}

.site-footer {
  background: linear-gradient(180deg, #d63c68 0%, #cf365f 100%);
  color: rgba(255, 255, 255, 0.92);
}

.site-footer__inner {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  padding: 2rem 0;
}

.site-footer__column h2 {
  margin: 0 0 0.85rem;
  color: #fff;
  font-size: 1rem;
}

.site-footer__column p,
.site-footer__column li,
.site-footer__column a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-footer__column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.footer-note {
  margin: 0;
}

.alignwide,
.alignfull {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.alignwide {
  width: min(100%, calc(var(--container) + 8rem));
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

@media (min-width: 992px) {
  .primary-navigation {
    display: block;
  }

  .primary-navigation ul {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    padding-top: 0;
  }

  .menu-toggle {
    display: none;
  }
}

@media (max-width: 991px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .site-branding {
    grid-column: 1 / 2;
  }

  .menu-toggle {
    grid-column: 2 / 3;
  }

  .primary-navigation {
    grid-column: 1 / -1;
  }

  .quick-actions__grid,
  .action-grid,
  .news-grid,
  .grid--posts,
  .institutions__grid,
  .site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .site-header__editable-content>:not(.alignwide):not(.alignfull),
  .site-footer__editable-content>:not(.alignwide):not(.alignfull),
  .site-header__editable-content>.alignwide,
  .site-footer__editable-content>.alignwide {
    width: min(100% - 1rem, var(--container));
  }

  .home-page-builder__entry>:not(.alignwide):not(.alignfull),
  .home-page-builder__entry>.alignwide,
  .home-page-builder .wp-block-query-pagination,
  .home-page-builder .wp-block-query-no-results {
    width: min(100% - 1rem, 720px);
  }

  .container {
    width: min(100% - 1rem, var(--container));
  }

  body:not(.has-scroll-fixed-header) .site-header {
    position: static;
  }

  .site-branding {
    gap: 0.6rem;
  }

  .site-title {
    font-size: 1rem;
  }

  .site-description {
    display: none;
  }

  .hero {
    margin-bottom: 1.25rem;
  }

  .hero__track {
    min-height: 23rem;
  }

  .hero__slide {
    padding: 2.5rem 0 4.5rem;
  }

  .hero__container {
    width: min(100% - 1rem, var(--container));
  }

  .hero__title {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .hero__text {
    font-size: 1rem;
  }

  .hero__nav {
    display: none;
  }

  .quick-actions__grid,
  .action-grid,
  .news-grid,
  .grid--posts,
  .institutions__grid,
  .site-footer__inner,
  .search-form,
  .nav-links {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .quick-action {
    min-height: 3.6rem;
    font-size: 0.85rem;
  }

  .news-card,
  .post-card {
    min-height: 18rem;
    padding: 1.5rem 1.25rem;
    border-radius: 1.5rem;
  }

  .news-card__date,
  .post-card__meta {
    margin-bottom: 1.25rem;
    font-size: 0.86rem;
  }

  .news-card h3,
  .post-card__title {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    max-width: none;
  }

  .news-card p,
  .post-card .entry-summary,
  .post-card .entry-summary p {
    max-width: none;
    font-size: 1rem;
    line-height: 1.18;
  }

  .alert-strip {
    padding: 1.25rem;
  }

  .alert-strip__phone {
    font-size: 2.3rem;
  }
}
