/* ======== ESTILOS PLANTILLAS_CATEGORIA ======== */

/* Fondo general */
body {
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  color: #375e65;
  margin: 0;
  padding: 0;
  background-color: #e7e3da;
  background-image: url("/static/img/p_login_pqia_1920_x_1080.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

body.plantillas_categoria .categorias-container {
  position: relative;
  margin: 80px auto 60px auto;      /* ✅ centrado horizontal */
  padding: 30px;
  max-width: 600px;                 /* ✅ ancho más amplio */
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}


/* Contenedor principal */
.contenedor-principal {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  padding: 40px;
  max-width: 500px !important;
  margin: 80px 0 40px 500px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  text-align: left;
}

/* Título categoría */
.titulo {
  font-size: 20px;
  color: #375e65;
  margin-bottom: 20px;
  text-align: center;
  font-family: 'Raleway', sans-serif;
}


/* Checkbox favoritos */
#filtro-favoritos + label {
  font-size: 14px;
  color: #375e65;
  font-weight: bold;
}

/* Plantillas */
.lista-plantillas {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 20px;
}

.card-plantilla {
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  text-align: left;
  backdrop-filter: blur(2px);
  margin-bottom: 30px;
}

.card-plantilla p {
  font-size: 12px;
  font-family: 'Raleway', sans-serif;
  color: #375e65;
  line-height: 1.6;
  margin-bottom: 12px;
  font-weight: normal;

  /* ✅ Recorte visual de texto largo */
  display: -webkit-box;
  -webkit-line-clamp: 8;
  line-clamp: 8; 
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 12.8em; /* 1.6em x 8 líneas */
}



.card-plantilla .acciones {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  text-align: center;
  flex-wrap: wrap;
}

.card-plantilla button {
  width: 90px;             /* ✅ Mismo ancho */
  height: 24px;            /* ✅ Mismo alto (más compacto) */
  padding: 0 10px;         /* ✅ Evita que el texto desborde */
  font-size: 10px;
  border: none !important;
  border-radius: 20px;
  font-weight: bold;
  font-family: 'Raleway', sans-serif;
  color: white !important; /* ✅ Texto blanco en todos los botones */
  cursor: pointer;
  text-align: center;
  display: flex;           /* ✅ Para centrar contenido vertical y horizontal */
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-right: 0;
}


.card-plantilla button.btn-favorito {
  background-color: #375e65;
}
.card-plantilla button.btn-favorito:hover {
  background-color: #29283a;
}

.card-plantilla.marcado-favorito {
  border: 2px solid #6c8e94;
  box-shadow: 0 0 10px rgba(55, 94, 101, 0.2);
}

.card-plantilla.marcado-favorito .btn-favorito {
  background-color: #2b484d;
  color: #fff;
}

.card-plantilla button.btn-accion {
  background-color: #c57d2b;
}
.card-plantilla button.btn-accion:hover {
  background-color: #9c9664;
  transform: scale(1.05);
}

.card-plantilla .btn-comprar {
  width: auto !important;         /* ✅ Anula el ancho fijo */
  min-width: 150px !important;    /* ✅ Aumenta el ancho mínimo */
  padding: 0 30px !important;     /* ✅ Aporta aire interno */
  background-color: #92180b;
  color: white !important;
  border: none;
  border-radius: 20px;
  height: 25px !important;
  font-size: 10px;
  font-weight: bold;
  font-family: 'Raleway', sans-serif;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}


.card-plantilla .btn-comprar:hover {
  background-color: #9c9664;
  transform: scale(1.05);
}

.card-plantilla .btn-ver-plantilla {
  background-color: #7a941f;
  color: white;
  border: none;
  padding: 5x 8px !important;
  border-radius: 20px;
  font-size: 10px;
  font-weight: bold;
  font-family: 'Raleway', sans-serif;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;

  /* ✅ AÑADIR ESTOS */
  min-width: 90px;
  text-align: center;
  display: inline-block; /* O block si prefieres ocupar más */
}


.card-plantilla .btn-ver-plantilla:hover {
  background-color: #527368;
  transform: scale(1.05);
}

.card-plantilla h3 {
  font-size: 15px;
  color: #c57d2b;
  font-weight: bold;
  font-family: 'Raleway', sans-serif;
  text-align: left;
  margin: 0 0 10px 0;
  text-shadow: none; /* ✅ Eliminar sombra si quieres igualarlo del todo */
}

.card-plantilla.premium-capada {
  position: relative;
  overflow: hidden;
  opacity: 0.85;
  filter: none;
  pointer-events: auto;
  transition: all 0.3s ease;
}

.card-plantilla.premium-capada .contenido-plantilla {
  position: relative;
  max-height: 100px;
  overflow: hidden;
  user-select: none;
  pointer-events: none;
  cursor: not-allowed;
}

.card-plantilla.premium-capada .btn-favorito {
  pointer-events: auto !important;
}

.card-plantilla.premium-capada .contenido-plantilla::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(231, 227, 218, 0.85));
  pointer-events: none;
  z-index: 1;
}

.card-plantilla.premium-capada::after {
  content: "\1F512 Plantilla Premium";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: bold;
  font-family: 'Raleway', sans-serif;
  border-radius: 20px;
  z-index: 2;
  white-space: nowrap;
  text-align: center;
  text-shadow: 1px 1px 2px black;
}

.icono-candado {
  font-size: 14px;
  margin-left: 6px;
  vertical-align: middle;
  color: #92180b;
}

/* ✅ FOOTER FINAL – Centrado y funcional */
.footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 24px;
  min-height: 130px;
  position: relative;
  text-align: center;
}

.redes-sociales {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 100px;
  width: 100%;
  margin-bottom: -20px;
  position: relative;
}

.redes-sociales a {
  display: inline-block;
}

.redes-sociales img {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}

.redes-sociales img:hover {
  transform: scale(1.2);
}

.marca-registrada {
  font-family: 'Urbanist', sans-serif;
  font-size: 10px;
  color: #807e78;
  opacity: 0.8;
  text-align: center;
  white-space: nowrap;
  margin: 0 auto;
}

/* ? */
.boton-ayuda {
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 48px;
  height: 48px;
  z-index: 999;
  transition: transform 0.3s ease;
}

.boton-ayuda:hover {
  transform: scale(1.1);
}

.icono-ayuda {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Ajuste visual específico solo para el icono de Shorts */
.redes-sociales img[src*="youtube_shorts"] {
  width: 24px;
  height: auto;
  transform: translateY(1px); /* Ajuste fino de alineación si lo necesitas */
}


/* Colorea el ítem de HISTORIAL como activo desde la vista /plantillas_categoria */
body.plantillas_categoria .side-menu li a[href="/historial"] {
  color: #e0a74f !important;
  font-weight: bold !important;
  background-color: transparent !important;
}

