/*
Theme Name: Mara Portfolio
Author: Mara Tena García
Description: Tema personalizado para el portfolio de Mara Tena García
Version: 1.0
Template: astra
This is the child theme for Astra theme, generated with Generate Child Theme plugin by catchthemes.
(optional values you can add: Theme URI, Author URI, License, License URI, Tags, Text Domain)
*/
/* ========================================
   1. VARIABLES Y TIPOGRAFÍA
   ======================================== */
:root {
  --color-background: #fff;
  --color-text: #111;
  --color-secondary: #777;
  --color-button: #efeded;
  --color-button-hover: #dedcdc;
  --color-placeholder: #d9d9d9;
  --page-padding: clamp(35px, 5.5vw, 100px);
}
html,
body,
button,
input,
select,
textarea,
h1,
h2,
h3,
h4,
h5,
h6,
.site-title,
.main-header-menu .menu-link {
  font-family: "Inter", Arial, sans-serif !important;
}
body {
  color: var(--color-text);
  background: var(--color-background);
}
/* ========================================
   2. CABECERA Y NAVEGACIÓN
   ======================================== */
.ast-primary-header-bar {
  border: 0 !important;
  box-shadow: none !important;
  background: var(--color-background);
}
.site-title {
  margin: 0 !important;
}
/* El título de la web funciona como enlace Home. */
.site-title a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 11px 18px !important;
  border-radius: 999px;
  background: var(--color-button);
  color: var(--color-text) !important;
  font-size: 0 !important;
  font-weight: 400;
  line-height: 1 !important;
}
.site-title a::after {
  content: "Home";
  font-family: "Inter", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
}
.site-title a:hover {
  background: var(--color-button-hover);
}
/* Evita duplicar Home dentro del menú principal. */
.main-header-menu > .menu-item:first-child {
  display: none !important;
}
@media (min-width: 922px) {
  .ast-primary-header-bar .site-primary-header-wrap {
    width: 100%;
    max-width: none !important;
    min-height: 100px;
    padding-inline: var(--page-padding) !important;
  }
  /*
   * Tres columnas: Home | navegación centrada | espacio vacío.
   * Las dos columnas laterales iguales mantienen el menú en el
   * centro real de la pantalla.
   */
  .ast-primary-header-bar .ast-builder-grid-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    align-items: center;
    width: 100%;
  }
  .site-header-primary-section-left {
    display: flex !important;
    grid-column: 1;
    justify-self: start;
  }
  .site-header-primary-section-right {
    display: flex !important;
    grid-column: 2;
    justify-self: center;
    width: auto !important;
  }
  .ast-site-identity {
    padding: 0 !important;
  }
  .ast-builder-menu-1,
  .ast-builder-menu-1 .main-navigation,
  .ast-builder-menu-1 .main-header-menu,
  .main-header-bar-navigation {
    position: static !important;
    width: auto !important;
    transform: none !important;
  }
  .main-header-menu {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 0;
  }
  .main-header-menu > .menu-item {
    margin: 0 !important;
  }
  .main-header-menu > .menu-item > .menu-link {
    height: auto !important;
    padding: 11px 18px !important;
    border-radius: 999px;
    background: var(--color-button) !important;
    color: var(--color-text) !important;
    font-size: 14px !important;
    font-weight: 400;
    line-height: 1 !important;
  }
  .main-header-menu > .menu-item > .menu-link:hover {
    background: var(--color-button-hover) !important;
  }
  .main-header-menu > .current-menu-item > .menu-link {
    background: var(--color-button) !important;
  }
}
/* ========================================
   3. LIMPIEZA DE ASTRA EN STILL HERE
   ======================================== */
.page-id-74 .site-content > .ast-container,
.page-id-74 #primary,
.page-id-74 .content-area,
.page-id-74 .site-main,
.page-id-74 .entry-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
/* ========================================
   4. ESTRUCTURA DEL PROYECTO
   ======================================== */
.project-layout {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  align-items: start;
  gap: clamp(55px, 6vw, 110px);
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 40px var(--page-padding) 150px;
}
.project-details {
  position: sticky;
  top: 32px;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  align-self: start;
}
.admin-bar .project-details {
  top: 64px;
}
/* ========================================
   5. INFORMACIÓN DEL PROYECTO
   ======================================== */
.project-header {
  margin: 0;
}
.entry-content .project-collection {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 !important;
  padding: 0;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}
.project-collection span {
  font-size: 9px;
  font-weight: 400;
}
.entry-content .project-header h1 {
  margin: 0 !important;
  padding: 0;
  color: #000;
  font-size: clamp(48px, 3.7vw, 64px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.project-meta {
  display: grid;
  grid-template-columns: 65px 115px minmax(200px, 1fr);
  gap: 22px;
  margin: 40px 0 0;
}
.project-meta__item {
  margin: 0;
}
.project-meta dt {
  margin: 0 0 7px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}
.project-meta dd {
  margin: 0;
  color: var(--color-secondary);
  font-size: 14px;
  line-height: 1.25;
}
.project-meta ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.software-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}
.software-icons img {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: cover;
}
.project-description {
  max-width: 650px;
  margin-top: 50px;
  color: var(--color-text);
  font-size: clamp(15px, 1vw, 10px);
  line-height: 1.3;
}
.project-description p {
  margin: 0 0 20px;
}
.project-description strong {
  font-weight: 600;
}
/* ========================================
   6. GALERÍA
   ======================================== */
.gallery {
  display: flex;
  flex-direction: column;
  grid-column: 2;
  grid-row: 1;
  gap: 24px;
  width: 100%;
  min-width: 0;
}
.gallery_item {
  display: block;
  width: 100%;
  margin: 0 !important;
  overflow: hidden;
  background: var(--color-placeholder);
}
.gallery_landscape {
  aspect-ratio: 2.85 / 1;
}
.gallery_large {
  aspect-ratio: 1.72 / 1;
}
.gallery_portrait {
  aspect-ratio: 4 / 5;
}
.gallery_square {
  aspect-ratio: 1;
}
.gallery_placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-placeholder);
  color: transparent;
  font-size: 0;
}
.gallery_item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* ========================================
   7. TABLET Y MÓVIL
   ======================================== */
@media (max-width: 1050px) {
  .project-layout {
    gap: 50px;
    padding-inline: 40px;
  }
  .project-meta {
    grid-template-columns: 60px 105px 1fr;
  }
}
@media (max-width: 800px) {
  .project-layout {
    grid-template-columns: 1fr;
    gap: 60px;
    padding: 50px 24px 90px;
  }
  .project-details,
  .admin-bar .project-details,
  .gallery {
    position: static;
    grid-column: auto;
    grid-row: auto;
  }
  .project-description {
    max-width: none;
  }
  .gallery {
    gap: 16px;
  }
}
@media (max-width: 520px) {
  .project-meta {
    grid-template-columns: 1fr 1fr;
    row-gap: 28px;
  }
  .project-meta__areas {
    grid-column: 1 / -1;
  }
  .project-header h1 {
    font-size: 50px;
  }
}
/* ========================================
   PÁGINA PRINCIPAL DE WORK
   ======================================== */
/* Elimina las limitaciones de ancho de Astra */
body:has(.work-page) .site-content > .ast-container,
body:has(.work-page) #primary,
body:has(.work-page) .content-area,
body:has(.work-page) .site-main,
body:has(.work-page) .entry-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.work-page,
.work-page * {
  box-sizing: border-box;
}
.work-page {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 50px var(--page-padding) 150px;
}
/* Introducción */
.work-intro {
  max-width: 670px;
  margin-bottom: 48px;
}
.entry-content .work-intro h1 {
  margin: 0 0 8px !important;
  padding: 0;
  color: var(--color-text);
  font-size: clamp(42px, 4vw, 64px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.entry-content .work-intro p {
  margin: 0 !important;
  color: var(--color-secondary);
  font-size: clamp(18px, 1.55vw, 25px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.025em;
}
/* Cuadrícula de proyectos */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 48px;
}
/* Tarjetas */
.work-card,
.entry-content .work-card {
  display: block;
  min-width: 0;
  color: var(--color-text);
  text-decoration: none !important;
}
.work-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 1.16 / 1;
  margin-bottom: 10px;
  overflow: hidden;
  background-color: var(--color-placeholder);
}
/* Para cuando sustituyas los rectángulos por imágenes */
.work-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}
.work-card__category {
  display: block;
  margin-bottom: 3px;
  color: var(--color-text);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.15;
  text-transform: uppercase;
}
.entry-content .work-card__title {
  margin: 0 !important;
  padding: 0;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
/* Interacciones */
.work-card:hover .work-card__title {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.work-card:hover .work-card__image img {
  transform: scale(1.025);
}
.work-card:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--color-text);
  outline-offset: 6px;
}
/* Tablet */
@media (max-width: 900px) {
  .work-page {
    padding: 45px 40px 110px;
  }
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Móvil */
@media (max-width: 600px) {
  .work-page {
    padding: 35px 24px 80px;
  }
  .work-intro {
    margin-bottom: 36px;
  }
  .entry-content .work-intro h1 {
    font-size: 44px;
  }
  .entry-content .work-intro p {
    font-size: 18px;
    line-height: 1.2;
  }
  .work-grid {
    grid-template-columns: 1fr;
    row-gap: 38px;
  }
  .work-card__image {
    aspect-ratio: 1.2 / 1;
  }
}