/*
Theme Name: RenovaHN
Theme URI: https://juliancampos.es
Author: Julián Campos
Author URI: https://juliancampos.es
Description: Base theme for the RenovaHN project.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: renovahn
*/

:root {
  --forest: var(--wp--preset--color--forest);
  --forest-dk: var(--wp--preset--color--forest-dark);
  --forest-md: var(--wp--preset--color--forest-medium);
  --forest-deep: var(--wp--preset--color--forest-deep);
  --sage: var(--wp--preset--color--sage);
  --mint: var(--wp--preset--color--mint);
  --teal: var(--wp--preset--color--teal);
  --teal-bright: var(--wp--preset--color--teal-bright);
  --green: var(--wp--preset--color--green);
  --green-lt: var(--wp--preset--color--green-light);
  --earth: var(--wp--preset--color--earth);
  --sand: var(--wp--preset--color--sand);
  --cream: var(--wp--preset--color--cream);
  --white: var(--wp--preset--color--white);
  --ink: var(--wp--preset--color--ink);
  --ink-70: var(--wp--preset--color--ink-70);
  --ink-40: var(--wp--preset--color--ink-40);
  --ink-15: var(--wp--preset--color--ink-15);
  --border: var(--wp--preset--color--border);
  --gold: var(--wp--preset--color--gold);
  --blue-esg: var(--wp--preset--color--blue-esg);
  --rh-spacing-xs: 0.5rem;
  --rh-spacing-sm: 0.75rem;
  --rh-spacing-md: 1rem;
  --rh-spacing-lg: 1.75rem;
  --rh-spacing-xl: 2.5rem;
  --rh-radius: 0.75rem;
  --rh-max-width: 72rem;
  --rh-adminbar-offset: 0px;
  --rh-header-height: 80px;
  --rh-header-padding-inline: 5%;
  --rh-logo-height-desktop: 64px;
  --rh-logo-height-mobile: 56px;
  --rh-menu-font-size: 0.71rem;
  --rh-menu-letter-spacing: 1.8px;
  --rh-header-bg: var(--white);
  --rh-header-border-color: var(--border);
  --rh-header-link-color: var(--ink-70);
  --rh-header-link-hover-color: var(--forest);
  --rh-header-link-hover-bg: var(--sand);
  --rh-header-cta-bg: var(--green);
  --rh-header-cta-text: var(--white);
  --rh-header-cta-hover-bg: var(--forest);
  --rh-header-mobile-bg: var(--white);
  --rh-header-mobile-link: var(--ink);
  --rh-header-shadow: 0 4px 40px rgba(0, 0, 0, 0.07);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--forest);
  text-decoration: none;
}

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

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

.site-header {
  position: relative;
  z-index: 900;
}

#nav {
  position: fixed;
  top: var(--rh-adminbar-offset);
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--rh-header-height);
  padding: 0 var(--rh-header-padding-inline);
  background: var(--rh-header-bg);
  border-bottom: 1px solid var(--rh-header-border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rh-spacing-md);
  transition: box-shadow 0.3s;
}

#nav.scrolled {
  box-shadow: var(--rh-header-shadow);
}

.nav-logo {
  height: var(--rh-logo-height-desktop);
  width: auto;
}

.nav-logo-picture {
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 7px;
  font-size: var(--rh-menu-font-size);
  font-weight: 600;
  letter-spacing: var(--rh-menu-letter-spacing);
  text-transform: uppercase;
  color: var(--rh-header-link-color);
  white-space: nowrap;
  transition: all 0.25s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--rh-header-link-hover-color);
  background: var(--rh-header-link-hover-bg);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  border-radius: 8px;
  border: none;
  background: var(--rh-header-cta-bg);
  color: var(--rh-header-cta-text);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(39, 174, 96, 0.28);
  transition: all 0.3s;
}

.nav-cta:hover,
.nav-cta:focus {
  background: var(--rh-header-cta-hover-bg);
  color: var(--rh-header-cta-text);
  transform: translateY(-1px);
  box-shadow: 0 7px 24px rgba(26, 58, 40, 0.3);
}

.ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.ham span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  display: block;
}

.mob {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 950;
  background: var(--rh-header-mobile-bg);
  align-items: center;
  justify-content: center;
}

.mob.open {
  display: flex;
}

.mob-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin: 0;
  padding: 0;
}

.mob-links li {
  list-style: none;
}

.mob a {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2rem;
  color: var(--rh-header-mobile-link);
  transition: color 0.3s;
}

.mob a:hover,
.mob a:focus {
  color: var(--green);
}

.mob-x {
  position: absolute;
  top: calc((var(--rh-header-height) - 30px) / 2 + var(--rh-adminbar-offset));
  right: 5%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.25s ease;
}

.mob-x:hover,
.mob-x:focus {
  color: var(--forest);
}

.mob-x-icon {
  position: relative;
  width: 22px;
  height: 22px;
  display: block;
}

.mob-x-icon::before,
.mob-x-icon::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.mob-x-icon::before {
  transform: rotate(45deg);
}

.mob-x-icon::after {
  transform: rotate(-45deg);
}

.site-main {
  width: min(100% - 2rem, var(--rh-max-width));
  margin-inline: auto;
  padding: calc(var(--rh-spacing-xl) + var(--rh-header-height)) 0 var(--rh-spacing-xl);
}

.site-main.site-main--raw {
  width: 100%;
  max-width: none;
  margin: var(--rh-header-height) 0 0;
  padding: 0;
  --wp--style--block-gap: 0;
}

.site-main.site-main--raw > *:first-child {
  margin-block-start: 0 !important;
  margin-top: 0 !important;
}

.site-main.site-main--raw .wp-block-renovahn-hero.rh-hero-block,
.site-main.site-main--raw .rh-hero-block {
  margin-block-start: 0 !important;
  margin-top: 0 !important;
}

.entry {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--rh-radius);
  padding: clamp(1rem, 2vw, 1.75rem);
  margin-bottom: var(--rh-spacing-lg);
}

.entry-title {
  margin-top: 0;
  margin-bottom: var(--rh-spacing-sm);
  line-height: 1.2;
}

.entry-meta {
  margin-top: 0;
  margin-bottom: var(--rh-spacing-md);
  color: var(--ink-70);
  font-size: 0.95rem;
}

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

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

.pagination {
  display: flex;
  justify-content: space-between;
  gap: var(--rh-spacing-md);
  margin-top: var(--rh-spacing-lg);
}

.site-wrap {
  width: min(100% - 2rem, var(--rh-max-width));
  margin-inline: auto;
}

.site-footer {
  background: var(--forest-dk);
  margin-top: var(--rh-spacing-xl);
  padding: 62px 5% 26px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 46px;
  margin-bottom: 46px;
}

.footer-widget-area {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.54);
}

.footer-widget-area .widget-title {
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.74);
}

.footer-widget-area-2 .widget-title,
.footer-widget-area-3 .widget-title,
.footer-widget-area-4 .widget-title,
.footer-widget-area-2 .widgettitle,
.footer-widget-area-3 .widgettitle,
.footer-widget-area-4 .widgettitle,
.footer-widget-area-2 .wp-block-heading,
.footer-widget-area-3 .wp-block-heading,
.footer-widget-area-4 .wp-block-heading {
  margin-bottom: 17px;
  margin-top: 0;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.33);
}

.footer-widget-area p,
.footer-widget-area li,
.footer-widget-area span,
.footer-widget-area div {
  color: rgba(255, 255, 255, 0.54);
}

.foot-brand p,
.footer-widget-area-1 p {
  margin-top: 17px;
  max-width: 280px;
  font-size: 0.8rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.44);
}

.footer-widget-area-1 img,
.footer-widget-area-1 .wp-block-image img,
.footer-widget-area-1 .widget_media_image img {
  display: block;
  height: 58px !important;
  max-height: 58px;
  width: auto !important;
  max-width: 100%;
  object-fit: contain;
  filter: none;
}

.footer-widget-area-1 figure,
.footer-widget-area-1 .wp-block-image {
  margin: 0;
}

.footer-widget-area ul,
.footer-widget-area .menu,
.footer-widget-area .wp-block-navigation__container,
.footer-widget-area .wp-block-page-list,
.footer-widget-area .wp-block-categories-list,
.footer-widget-area .wp-block-latest-posts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.footer-widget-area li {
  margin: 0;
}

.footer-widget-area a {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.54);
  transition: color 0.3s;
}

.footer-widget-area a:hover,
.footer-widget-area a:focus {
  color: var(--mint);
}

.footer-widget-area .widget {
  margin-top: 1rem;
}

.footer-widget-area .widget:first-of-type {
  margin-top: 0;
}

.foot-bot {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.foot-bot p {
  margin: 0;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.27);
}

.eco-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border-radius: 100px;
  background: rgba(122, 184, 154, 0.08);
  border: 1px solid rgba(122, 184, 154, 0.17);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.54);
}

.eco-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mint);
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  display: block;
  height: auto;
  left: 0.5rem;
  top: 0.5rem;
  width: auto;
  z-index: 100000;
  background: var(--white);
  color: var(--ink);
  padding: 0.75rem;
}

.admin-bar {
  --rh-adminbar-offset: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar {
    --rh-adminbar-offset: 46px;
  }
}

@media screen and (max-width: 600px) {
  .admin-bar {
    --rh-adminbar-offset: 0px;
  }
}

@media (max-width: 68.75rem) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 48rem) {
  .site-wrap,
  .site-main {
    width: min(100% - 1.25rem, var(--rh-max-width));
  }

  .foot-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .foot-bot {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .ham {
    display: flex;
  }

  .nav-logo {
    height: var(--rh-logo-height-mobile);
  }
}
