/* ==============================
   ESTILOS GENERALES
   ============================== */

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

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #111;
  color: white;
  line-height: 1.6;
}

/* ==============================
   ENCABEZADO
   ============================== */

header {
  background: linear-gradient(135deg, #111 0%, #2b0000 50%, #111 100%);
  text-align: center;
  padding: 35px 20px 20px;
  border-bottom: 3px solid #e10600;
}

header h1 {
  font-size: 3rem;
  color: #ff3b00;
  text-shadow:
    0 0 10px rgba(255, 59, 0, 0.8),
    3px 3px 0 #000;
  margin-bottom: 10px;
}

header > p {
  max-width: 750px;
  margin: 0 auto 25px;
  font-size: 1.1rem;
  color: #f5f5f5;
  font-style: italic;
}

/* ==============================
   NAVEGACIÓN
   ============================== */

nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: white;
  background: #e10600;
  padding: 10px 22px;
  border-radius: 25px;
  font-weight: bold;
  transition: 0.3s;
}

nav a:hover {
  background: #ff3b00;
  transform: scale(1.05);
}

/* ==============================
   CONTENIDO
   ============================== */

main {
  width: 90%;
  max-width: 1100px;
  margin: 50px auto;
}

/* ==============================
   CARTAS
   ============================== */

main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

article {
  background: linear-gradient(145deg, #1c1c1c, #100000);
  border: 2px solid #e10600;
  border-radius: 20px;
  padding: 30px 25px;
  text-align: center;
  box-shadow: 0 0 20px rgba(225, 6, 0, 0.25);
  transition: 0.3s;
}

article:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 30px rgba(255, 59, 0, 0.5);
}

article h2 {
  color: #ff3b00;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

article h3 {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 15px;
}

article p {
  color: #ddd;
  text-align: left;
  margin-bottom: 20px;
}

/* ==============================
   BOTONES
   ============================== */

button {
  border: none;
  background: linear-gradient(135deg, #e10600, #ff3b00);
  color: white;
  padding: 12px 22px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  margin: 8px;
  box-shadow: 0 5px 15px rgba(225, 6, 0, 0.3);
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 7px 20px rgba(255, 59, 0, 0.6);
}

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

footer {
  text-align: center;
  background: #080808;
  border-top: 2px solid #e10600;
  padding: 25px 15px;
  margin-top: 50px;
  color: #aaa;
}

footer p:first-child {
  color: #fff;
  margin-bottom: 5px;
}

/* ==============================
   RESPONSIVE - TABLET
   ============================== */

@media (max-width: 900px) {

  main {
    grid-template-columns: 1fr 1fr;
  }

}

/* ==============================
   RESPONSIVE - CELULAR
   ============================== */

@media (max-width: 600px) {

  header h1 {
    font-size: 2.2rem;
  }

  header > p {
    font-size: 1rem;
  }

  main {
    width: 92%;
    grid-template-columns: 1fr;
  }

  article {
    padding: 25px 20px;
  }

  nav a {
    padding: 9px 17px;
  }

}

/* =========================================
   CARTAS CERRADAS
========================================= */

.contenido-carta {
  display: none;
}


/* =========================================
   CARTA ABIERTA
========================================= */

.contenido-carta.abierta {
  display: block;
}


/* =========================================
   BOTÓN ABRIR SOBRE
========================================= */

.abrir-carta {
  background: linear-gradient(135deg, #ff1e00, #ff4b00);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;

  box-shadow:
    0 0 15px rgba(255, 30, 0, 0.5);

  transition: 0.3s ease;
}

.abrir-carta:hover {
  transform: scale(1.05);

  box-shadow:
    0 0 25px rgba(255, 30, 0, 0.8);
}


/* =========================================
   BOTÓN CERRAR CARTA
========================================= */

.cerrar-carta {
  background: linear-gradient(135deg, #ff1e00, #ff4b00);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;

  margin-top: 20px;

  transition: 0.3s ease;
}

.cerrar-carta:hover {
  transform: scale(1.05);
}
/* =========================================
   CARTAS UNA DEBAJO DE LA OTRA
========================================= */

.pagina-cartitas main section {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 40px !important;
}


/* Cada carta */

.pagina-cartitas .carta {
  width: min(600px, 90%) !important;
  height: auto !important;
  box-sizing: border-box;
}


/* =========================================
   CONTENIDO DE LA CARTA
========================================= */

.pagina-cartitas .contenido-carta {
  display: none;
}

.pagina-cartitas .contenido-carta.abierta {
  display: block;
}


/* =========================================
   BOTÓN ABRIR
========================================= */

.pagina-cartitas .abrir-carta {
  background: linear-gradient(135deg, #ff1e00, #ff4b00);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;

  box-shadow: 0 0 15px rgba(255, 30, 0, 0.5);

  transition: 0.3s ease;
}

.pagina-cartitas .abrir-carta:hover {
  transform: scale(1.05);
}


/* =========================================
   BOTÓN CERRAR
========================================= */

.pagina-cartitas .cerrar-carta {
  background: linear-gradient(135deg, #ff1e00, #ff4b00);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;

  margin-top: 20px;
}

/* =========================================
   CARTITAS - UNA DEBAJO DE LA OTRA
========================================= */

.pagina-cartitas main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}


/* Cada carta */

.pagina-cartitas .carta {
  width: min(600px, 90%);
  height: auto;
  box-sizing: border-box;
}


/* =========================================
   CONTENIDO OCULTO
========================================= */

.pagina-cartitas .contenido-carta {
  display: none;
}


/* Cuando se abre la carta */

.pagina-cartitas .contenido-carta.abierta {
  display: block;
}


/* =========================================
   BOTÓN ABRIR SOBRE
========================================= */

.pagina-cartitas .abrir-carta {
  background: linear-gradient(135deg, #ff1e00, #ff4b00);
  color: white;

  border: none;
  border-radius: 30px;

  padding: 15px 30px;

  font-size: 18px;
  font-weight: bold;

  cursor: pointer;

  box-shadow: 0 0 15px rgba(255, 30, 0, 0.5);

  transition: 0.3s ease;
}

.pagina-cartitas .abrir-carta:hover {
  transform: scale(1.05);

  box-shadow: 0 0 25px rgba(255, 30, 0, 0.8);
}


/* =========================================
   BOTÓN CERRAR
========================================= */

.pagina-cartitas .cerrar-carta {
  background: linear-gradient(135deg, #ff1e00, #ff4b00);

  color: white;

  border: none;
  border-radius: 30px;

  padding: 12px 25px;

  font-size: 16px;
  font-weight: bold;

  cursor: pointer;

  margin-top: 20px;

  transition: 0.3s ease;
}

.pagina-cartitas .cerrar-carta:hover {
  transform: scale(1.05);

  box-shadow: 0 0 20px rgba(255, 30, 0, 0.7);
}