@import url('https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap');

:root {
  --header-h: 84px;   /* antes 70px */
  --color-text: #111;
  --color-muted: #555;
}

/* ===== BASE ===== */

html,
body {
  height: 100%;
  margin: 0;
  background: #fff;
  font-family: 'Zalando Sans', Helvetica;
  color: var(--color-text);
}

/* ===== LAYOUT BASE ===== */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HEADER ===== */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  min-height: var(--header-h);  /* fuerza que no baje de esa altura */
  display: grid;
  grid-template-columns: auto 1fr auto; /* logo | nav centrado | idiomas */
  align-items: center;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #eee;
  z-index: 200;
}

/* Logo header */

.site-logo {
  display: inline-flex;
  margin-left:4em;
  align-items: center;
  text-decoration: none;
}

.site-logo img {
  height: 48px;
  width: auto;
  display: block;
}

/* Desktop nav centrado */

nav.desktop {
  display: flex;
  gap: 2.8rem;
  justify-self: center; /* centro del header */
}

nav.desktop a,
.mobile-nav a {
  text-decoration: none;
  color: #111;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

nav.desktop a {
  font-size: 1.4rem;
}

nav.desktop a:hover {
  color: #888;
}

/* ===================================================== */
/* NAVIGATION ACTIVE STATE                               */
/* ===================================================== */

nav.desktop a.active,
.mobile-nav a.active {
  position: relative;
  color: #000;
  font-weight: 700;
}

nav.desktop a.active::after,
.mobile-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background-color: #000;
  border-radius: 2px;
}

/* ===== MOBILE MENU ===== */

.menu-toggle {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  color: #111;
  display: none;
  z-index: 250;
}

.menu-toggle.hidden {
  display: none !important;
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: #fff;
  border-right: 1px solid #ddd;
  padding-top: 4.5rem;
  padding-left: 1.8rem;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.08);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav a {
  font-size: 1.5rem;
}

.close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #111;
}

/* Overlay behind mobile menu */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 250;
}

.overlay.active {
  display: block;
}

/* ===== MAIN (default pages) ===== */

main {
  flex: 1 0 auto;
  display: grid;
  place-items: center;
  padding-top: calc(var(--header-h) + 30px);
  box-sizing: border-box;
  text-align: center;
}

.logo {
  display: block;
  max-width: min(90vw, 640px);
  max-height: min(70dvh, 480px);
  width: auto;
  height: auto;
  object-fit: contain;
  margin-bottom: 0rem;
}

h1 {
  font-size: 2.2rem;
  margin: 0.2rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111;
}

p.note {
  font-size: 1.3rem;
  color: #444;
  line-height: 1.4;
  margin: 0.4rem 0;
}

a.email {
  color: #000;
  text-decoration: none;
  border-bottom: 1px solid #0002;
}

a.email:hover {
  border-bottom: 1px solid #000;
}

/* ===== ABOUT / HOME PAGE LAYOUT ===== */

main.about-page {
  flex: 1 0 auto;
  display: block;
  max-width: 820px;
  margin: 0 auto;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 3rem;
  box-sizing: border-box;
  text-align: center;

  /* misma fuente que Consulting */
  font-family: 'Zalando Sans', Helvetica, Arial, sans-serif;
  font-size: 16px;
}

.about-page .logo {
  max-width: min(90vw, 480px);
  margin: 0 auto 2rem;
}

.about-page h1 {
  margin-bottom: 1.5rem;
}

.about-page section {
  margin: 2.5rem 0;
}

.about-page p {
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

.about-page .about-intro .note {
  font-size: 1.2rem;
}

/* ===== ABOUT PAGE BOX SECTIONS ===== */

.about-page section {
  background: #fafafa;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  padding: 2.5rem 2rem;
  margin: 2.5rem auto;
  max-width: 760px;
  text-align: center;
  transition: all 0.2s ease;
}

.about-page section:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.about-page h2 {
  margin-bottom: 1.2rem;
  font-weight: 700;
  font-size: 1.3rem;
}

.about-page p {
  margin: 0 auto;
  line-height: 1.6;
  max-width: 680px;
}

.about-page .email {
  color: #000;
  text-decoration: none;
  border-bottom: 1px solid #0002;
}

.about-page .email:hover {
  border-bottom: 1px solid #000;
}

/* ===== FOOTER ===== */

footer {
  flex-shrink: 0;
  text-align: center;
  padding: 1rem 0 1.5rem;
  font-size: 0.95rem;
  color: #222;
}

footer a {
  color: inherit;
  text-decoration: none;
  margin: 0 0.3rem;
}

footer a:hover {
  text-decoration: underline;
}

footer .sep {
  opacity: 0.5;
}

/* ===== RESPONSIVE (general) ===== */

@media (max-width: 768px) {
  nav.desktop {
    display: none;
  }

  .lang-switcher {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  main {
    padding-top: 70px;
  }

  footer {
    font-size: 0.9rem;
    padding-bottom: 1.5rem;
  }

  .mobile-nav a {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  /* espacio reservado para ajustes específicos para móviles pequeños */
}

/* Dark mode preference – keep white background */
@media (prefers-color-scheme: dark) {
  body {
    background: #fff;
  }
}

/* Fix spacing above section titles inside about boxes */
.about-page section h2 {
  margin-top: 0;
  padding-top: 0;
  margin-bottom: 1.2rem;
}

/* ===== LANGUAGE SWITCHER (desktop) ===== */

.lang-switcher {
  display: inline-flex;
  gap: 0.35rem;
  font-family: 'Zalando Sans', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  justify-self: flex-end;
}

.lang-option {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #555;
  cursor: pointer;
}

.lang-option:hover {
  border-color: #ccc;
  background: #f4f4f4;
  color: #111;
}

.lang-option.active {
  border-color: #111;
  background: #111;
  color: #fff;
  cursor: default;
}

.lang-option.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: transparent;
  background: transparent;
}

/* ===== MOBILE LANGUAGE SWITCHER ===== */

.mobile-lang-switcher {
  margin-top: 2rem;
  margin-right: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.mobile-lang-label {
  display: block;
  font-family: 'Zalando Sans', Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  margin-bottom: 0.4rem;
}

.mobile-lang-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Ajuste óptico del selector de idioma en menú móvil */
.lang-option,
.mobile-lang-options .lang-option {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
}

.lang-option.active,
.mobile-lang-options .lang-option.active {
  font-size: 0.8rem;
  font-weight: 500;
  background: #111;
  border-color: #111;
  color: #fff;
}

/* Logo grande en la página Home */
.about-page .logo {
  display: block;
  width: 180px;
  max-width: 40vw;
  margin: 40px auto 20px auto;
}