/*
Theme Name: tandem
Text Domain: tandem
Version: 1.0
Description: Custom theme for tandem
Author: Clara Harguindey
*/

:root {
  /* Tipografías */
  --font-primary: "Diatype Variable", sans-serif;
  --font-secondary: "Agdasima", sans-serif;
  --font-fallback: sans-serif;

  /* Pesos de fuente */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Tamaños de fuente (sistema proporcional - escala 1.2) */
  --font-size-xs: 0.75rem; /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem; /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem; /* 20px */
  --font-size-2xl: 1.5rem; /* 28px */
  --font-size-3xl: 2rem; /* 32px */
  --font-size-4xl: 2.25rem; /* 36px */

  /* Espaciado (sistema proporcional - múltiplos de 4px) */
  --space-xs: 0.25rem; /* 4px */
  --space-sm: 0.5rem; /* 8px */
  --space-md: 0.75rem; /* 12px */
  --space-lg: 1rem; /* 16px */
  --space-xl: 1.125rem; /* 18px */
  --space-2xl: 1.875rem; /* 30px */

  /* Colores */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-light: #fafafa;
  --color-gray-medium: #616161;
  --color-orange: #ffb347;
  --color-dark-bg: #29281f;
  --color-error: #dc2626;

  /* Gradientes */
  --gradient-orange: linear-gradient(
    to bottom,
    var(--color-white),
    var(--color-orange)
  );
  --gradient-gray: linear-gradient(
    to bottom,
    var(--color-gray-light),
    var(--color-gray-medium)
  );
  --gradient-overlay: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3),
    rgba(0, 0, 0, 0.6)
  );

  /* Bordes */
  --border-width: 1px;
  --border-style: solid var(--color-black);
  --border-radius: 0.5rem;

  /* Opacidad */
  --opacity-video: 0.7;
  --opacity-modal: 0.6;

  /* Z-index */
  --z-behind: -1;
  --z-base: 0;
  --z-elevated: 1;
  --z-modal: 9999;

  /* Dimensiones */
  --header-height: 4.5rem; /* 72px */
  --footer-height: 3.125rem; /* 50px */
  --icon-size: 1.875rem; /* 30px */
  --image-size: 12.5rem; /* 200px */
}

/* ===== FONT FACES ===== */
@font-face {
  font-family: "Diatype Variable";
  src: url("./assets/fonts/diatypeVariable.woff2") format("woff2");
  font-weight: 1 999;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Agdasima";
  src: url("./assets/fonts/Agdasima-Regular.ttf") format("truetype");
  font-weight: var(--font-weight-regular);
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Agdasima";
  src: url("./assets/fonts/Agdasima-Bold.ttf") format("truetype");
  font-weight: var(--font-weight-bold);
  font-style: normal;
  font-display: swap;
}

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

html,
body {
  font-family: var(--font-fallback);
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  height: 100%;
  width: 100%;
  position: relative;
  background-color: var(--color-white);
  color: var(--color-black);
  font-family: var(--font-primary);
  padding: 0;
  min-height: 100vh;
  width: 100vw;
  margin: 0;
}

body:not(.home) .hide-except-home {
  display: none !important;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
  font-weight: normal;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ===== LAYOUT BASE ===== */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

/* ===== TEMAS DE PÁGINA ===== */
body {
  background: var(--gradient-orange);
}

body.template-comunidad {
  background: var(--gradient-orange);
}

body.template-sessions {
  background: var(--gradient-gray);
}

body.home {
  color: var(--color-white);
  background: var(--color-white);
}

.error {
  height: 85%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: var(--font-size-3xl);
}

.error div {
  text-align: center;
}
/* ===== COMPONENTES ===== */

/* Header */
.header-wrapper {
  font-family: var(--font-secondary);
  font-weight: var(--font-weight-semibold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 12px;
  padding: 0 var(--space-sm);
  font-size: var(--font-size-3xl);
  border-bottom: var(--border-width) var(--border-style);
}

.home .header-wrapper {
  border-bottom: 0;
  align-items: flex-start;
  font-size: var(--font-size-4xl);
}

.main-navigation {
  display: flex;
}

body:not(.home) #menu-desktop-menu {
  display: flex;
  gap: var(--space-md);
}

body.home #menu-desktop-menu {
  display: flex;
  flex-direction: column;
  text-align: right;
}

/* Footer */
footer {
  font-family: var(--font-secondary);
  width: 100%;
  text-align: right;
  padding: var(--space-md);
  font-size: var(--font-size-3xl);
  border-top: var(--border-width) var(--border-style);
  margin-top: auto;
}

.home footer {
  position: absolute;
  bottom: var(--space-md);
  border-top: 0;
  font-size: var(--font-size-4xl);
  padding-bottom: var(--space-xl);
}

/* Títulos */
nav,
h1,
h2 {
  font-family: var(--font-secondary);
  font-weight: normal;
}

/* ===== SECCIONES ESPECÍFICAS ===== */

/* Hero Section */
.hero-container {
  position: relative;
  width: 100%;
  height: 100vh;
}

.section-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.hero-image {
  border-right: var(--border-width) var(--border-style);
  height: 100%;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: var(--z-elevated);
}

.hero-content p {
  padding: var(--space-md);
}

.hero-content .hero-title {
  padding: var(--space-md);
  text-transform: uppercase;
  border-bottom: var(--border-width) var(--border-style);
}

.hero-description {
  font-size: var(--font-size-xl);
  display: flex;
  height: 100%;
  flex-direction: column;
}

.hero-text {
  font-size: var(--font-size-3xl);
}

.hero-button {
  display: block;
  width: 100%;
  border-top: var(--border-width) var(--border-style);
  padding: var(--space-md);
  font-family: var(--font-secondary);
  text-transform: uppercase;
  font-size: var(--font-size-2xl);
}

.hero-button:hover {
  background: black;
  color: white;
}
/* Front Page */
.front-page-container {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
  pointer-events: none;
}

.front-page-text {
  position: absolute;
  font-size: var(--font-size-3xl);
  color: var(--color-white);
  max-width: 50%;
  left: var(--space-md);
  bottom: var(--space-2xl);
}

/* Video Background */
.video-background {
  background-color: var(--color-dark-bg);
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: var(--z-behind);
}

.video-background iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.77vh; /* 16:9 ratio */
  height: 100vh;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: var(--opacity-video);
}

.background-video-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-behind);
  background-color: var(--color-dark-bg);
  overflow: hidden;
}

.background-video-wrapper iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120vw;
  height: 67.5vw; /* relación 16:9 */
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: var(--opacity-video);
}

.video-overlay {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--gradient-overlay);
  z-index: var(--z-base);
  pointer-events: none;
}

/* Video Embed */
.video-embed {
  background: var(--color-black);
}

.video-embed iframe {
  width: 100%;
  height: calc(100vh - var(--header-height) - var(--footer-height));
}

.static-image img {
  height: calc(100vh - var(--header-height) - var(--footer-height));
  object-fit: cover;
  border-right: 1px solid var(--color-black);
}

.image-map img {
  height: calc(100vh - var(--header-height) - var(--footer-height));
}
/* Filtros y Botones */
.filter-buttons {
  width: 100%;
  border-top: var(--border-width) var(--border-style);
  display: flex;
  flex-direction: row;
}

.filter-buttons button {
  font-family: var(--font-secondary);
  text-transform: uppercase;
  font-size: var(--font-size-2xl);
  height: 100%;
  border-right: var(--border-width) var(--border-style);
  display: block;
  padding: var(--space-xs) var(--space-xl);
  cursor: pointer;
}

.filter-buttons button.active {
  background-color: var(--color-black);
  color: var(--color-white);
}

.filter-buttons button:hover {
  background: black;
  color: white;
}

.hero-button-wrapper {
  width: 100%;
  border-top: var(--border-width) var(--border-style);
  font-family: var(--font-secondary);
  margin-top: auto;
}

.hero-button-wrapper button {
  text-transform: uppercase;
  font-size: var(--font-size-3xl);
  padding: var(--space-md);
  align-items: center;
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: space-between;
}

/* Listas */
.about-list {
  height: 100%;
}

.about-list p a {
  text-decoration: underline;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-item {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  font-size: var(--font-size-xl);
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-xl);
  border-top: var(--border-width) var(--border-style);
}

.info-item li {
  list-style-type: disc;
  list-style-position: inside;
}

.about-description p {
  margin-bottom: 1em;
  line-height: 1.6;
}

/* Elementos de contenido */
.community-image {
  width: var(--image-size);
  aspect-ratio: 1;
  object-fit: cover;
}

.community-name {
  margin-bottom: var(--space-lg);
}

.session-title {
  text-transform: uppercase;
}

.image-map {
  border-right: 1px solid black;
}

.info-text {
  font-size: var(--font-size-sm);
}

.icon {
  width: var(--icon-size);
  height: var(--icon-size);
}

.icon-column {
  display: flex;
  justify-content: center;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: var(--z-modal);
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, var(--opacity-modal));
}

.modal-content {
  background-color: var(--color-black);
  color: white;
  font-family: var(--font-primary);
  margin: 10% auto;
  padding: var(--space-2xl);
  max-width: 25rem;
  height: fit-content;
  position: relative;
}

.modal-content input {
  width: 80%;
  padding: var(--space-sm);
  margin-top: var(--space-lg);
  font-size: var(--font-size-lg);
  border-bottom: 1px solid white;
}

.modal-content button {
  margin-top: var(--space-lg);
  border: 1px solid white;
  text-transform: uppercase;
  font-family: var(--font-secondary);
  font-size: var(--font-size-lg);
  padding: var(--space-sm);
}

.close {
  position: absolute;
  right: var(--space-lg);
  top: var(--space-md);
  font-size: var(--font-size-xl);
  cursor: pointer;
}

.error-message {
  color: var(--color-error);
  margin-top: var(--space-md);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  body:not(.home) #menu-desktop-menu {
    display: flex;
    gap: var(--space-sm);
  }

  .background-video-wrapper iframe {
    width: 1537px;
    height: 100vh;
  }

  .front-page-text {
    top: 50%;
    left: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    max-width: 90%;
    text-align: center;
    font-size: var(--font-size-2xl);
  }

  .header-wrapper {
    font-size: var(--font-size-2xl);
  }

  .about-items .info-item {
    grid-template-columns: 1fr 2fr;
  }

  .video-embed iframe {
    height: 50vh !important;
  }

  .section-hero {
    grid-template-columns: 1fr;
  }

  .info-item {
    display: flex;
    flex-direction: column;
  }

  .session-link {
    display: flex;
    justify-content: flex-end;
  }

  .info-link {
    margin-top: var(--space-sm);
  }
}
