/* =====================================================
   VARIABLES & RESET
===================================================== */
:root {
  --primary:    #0a0f1e;
  --secondary:  #ffffff;
  --accent:     #c9a84c;      /* dorado cálido */
  --card-radius: 14px;
  --gap:        2vw;
  --header-h:   clamp(2.5rem, 8vh, 5rem);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Lato', sans-serif;
  color: var(--secondary);
}

@font-face {
  font-family: 'fonty';
  src: url('fonts/ClashDisplay-Medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'MiFuenteBold';
  src: url('fonts/Satoshi-Variable.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

/* =====================================================
   BACKGROUND
===================================================== */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-image: url("img/main_mich.JPG");   /* */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 2vh 2vw;
  gap: 2vh;
}

/* =====================================================
   HEADER / TYPEWRITER
===================================================== */
.header {
  font-family: 'fonty', sans-serif;
  font-size: clamp(0.9rem, 2.8vh, 2rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  min-width: 20ch;
  text-align: center;
  color: var(--secondary);
  padding: 1.2vh 2.5vw;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 8px;
  border-right: 2px solid var(--secondary);
  width: fit-content;
  max-width: 95%;
  flex-shrink: 0;
  animation: blink-caret 0.75s step-end infinite;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50%       { border-color: var(--secondary); }
}


/* =====================================================
   GRID DE 3 COLUMNAS
===================================================== */
.cards-grid {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1400px;
  gap: var(--gap);
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.column {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
}

/* =====================================================
   TARJETAS
===================================================== */
.box {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: var(--card-radius);
  border: 2px solid rgba(255,255,255,0.55);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  display: block;
  text-decoration: none;
  width: 100%;
  max-height: 74vh;
}

.box:hover {
  transform: scale(1.03);
  border-color: var(--accent);
  box-shadow: 0 12px 36px rgba(0,0,0,0.6), 0 0 0 1px var(--accent);
}

/* Imagen de fondo de la tarjeta */
.box > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.box:hover > img {
  transform: scale(1.06);
  filter: brightness(1.15) saturate(1.1);
}

/* =====================================================
   LOGO DENTRO DE LA TARJETA
===================================================== */
.logo-wrap {
  position: absolute;
  top: 12px; right: 12px;
  width: auto; height: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  z-index: 2;
  pointer-events: none;
}

.logo-wrap img {
  max-width: 38%;
  max-height: 22%;
  object-fit: contain;
  filter:
    drop-shadow(0 0 18px rgba(0,0,0,0.8))
    drop-shadow(0 0 10px rgba(0,0,0,0.6));
}

/* =====================================================
   OVERLAY DE TEXTO
===================================================== */
.overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.96) 0%,
    rgba(0,0,0,0.72) 60%,
    transparent 100%
  );
  padding: 3.5vh 2vw 2.8vh;
  text-align: center;
  z-index: 3;
  transition: padding 0.3s ease;
}

.box:hover .overlay { padding-bottom: 3.5vh; }

.title {
  font-family: 'fonty', sans-serif;
  font-size: clamp(1.1rem, 3.2vh, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--secondary);
  text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
  margin-bottom: 1vh;
  /* línea dorada decorativa debajo del título */
  padding-bottom: 0.9vh;
  border-bottom: 1px solid rgba(201,168,76,0.5);
  display: inline-block;
  width: 80%;
  transition: border-color 0.3s ease;
}

.box:hover .title { border-color: var(--accent); }

.description {
  color: rgba(255,255,255,0.88);
  font-size: clamp(0.72rem, 1.6vh, 0.95rem);
  font-weight: 300;
  line-height: 1.55;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
  max-width: 100%;
  padding: 0 0.8vw;
  margin-top: 0.8vh;
}

/* =====================================================
   RESPONSIVE — Móvil vertical
===================================================== */
@media (max-width: 767px) and (orientation: portrait) {
  body { padding: 1.5vh 3vw; gap: 1.5vh; }

  .header { font-size: clamp(0.8rem, 2.4vh, 1.4rem); padding: 1vh 3vw; }

  .cards-grid {
    flex-direction: column;
    gap: 1.8vh;
  }
  .footer {
    font-size: clamp(0.55rem, 1vh, 0.7rem);
    padding: 0.5vh 3vw;
    margin-top: 0.5vh;
  }

  .box { max-height: 24vh; }

  .logo-wrap { padding-top: 6%; }
  .logo-wrap img { max-width: 22%;
    max-height: 12%; }
  .logo-wrap {
    top: -12px;
    right: 8px;
  }

  .title { font-size: clamp(1rem, 2.8vh, 1.6rem); }
  .description { font-size: clamp(0.65rem, 1.3vh, 0.82rem); }
  .overlay { padding: 1.8vh 3vw; }
}

/* Móvil horizontal */
@media (max-width: 767px) and (orientation: landscape) {
  body { padding: 1.5vh 2vw; }

  .header { font-size: clamp(0.75rem, 2vh, 1.2rem); margin-bottom: 1vh; }

  .cards-grid { flex-direction: row; gap: 1.5vw; }

  .box { max-height: 70vh; }
  .logo-wrap img {
    max-width: 20%;
    max-height: 14%;
  }
  .title { font-size: clamp(0.95rem, 2.6vh, 1.6rem); }
  .description { font-size: clamp(0.6rem, 1.3vh, 0.8rem); }
}

/* Tablet vertical */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .cards-grid { flex-direction: column; gap: 2vh; }
  .box { max-height: 28vh; }
}

/* Tablet horizontal */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .box { max-height: 72vh; }
}

/* Desktop grande */
@media (min-width: 1400px) {
  :root { --gap: 2.5vw; }
  .box { max-height: 76vh; }
}

/* =====================================================
   DESCRIPCIÓN BILINGÜE — línea en itálica para inglés
===================================================== */
.description {
  font-size: clamp(0.68rem, 1.45vh, 0.88rem);
  line-height: 1.6;
}

.description em {
  display: block;
  color: rgba(255,255,255,0.55);
  font-style: italic;
  font-size: 0.91em;
  margin-top: 0.35em;
  font-weight: 300;
}

/* =====================================================
   FOOTER
===================================================== */
.footer {
  font-family: 'fonty', sans-serif;
  font-size: clamp(0.6rem, 1.2vh, 0.78rem);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  padding: 0.8vh 2vw;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 6px;
  width: fit-content;
  flex-shrink: 0;
}