@charset "UTF-8";
/* estilos.css */

/* ============================================================
   1. RESET Y BODY
   ============================================================ */

/* Reset y box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Body con fondo y centrado */
body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background-image: url('https://eazygravel.com/images/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #f6ebdc;
/*  display: flex;*/
/*  flex-direction: column;*/
/*  align-items: center;*/
  min-height: 100vh;
}

/* ============================================================
   2. CABECERA / IMAGEN TOP
   ============================================================ */

/* Imagen superior */
.imagen-top {
  width: 100%;
  max-width: 350px;   
  height: auto;       
  object-fit: contain;
  display: block;     
  margin: 100px auto 20px auto; 
}

/* ==== LANGUAGE SWITCH (alineado con iconos sociales) ==== */
.language-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  align-items: flex-end; /* alinea los cÃ­rculos verticalmente con el borde derecho */
}

/* CÃ­rculos idÃ©nticos a los iconos sociales */
.language-switch .btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #4D179A;  /* morado base */
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease, transform 0.2s ease, opacity 0.3s ease;
  opacity: 0.9;
  cursor: pointer;
}

/* Hover y efecto */
.language-switch .btn:hover {
  background-color: #36BBA7;   /* verde agua solo mientras se pasa el ratÃ³n */
  transform: scale(1.1);
  opacity: 1;
  box-shadow: 0 6px 8px rgba(0,0,0,0.25);
}

/* Estado activo o seleccionado: vuelve al morado corporativo */
.language-switch .btn.active {
  background-color: #4D179A !important;
  transform: none;
  opacity: 1;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* Responsive: se colocan en fila abajo en mÃ³vil */
@media (max-width: 600px) {
  .language-switch {
    position: static;
    top: auto;
    bottom: auto;
    right: auto;
    left: auto;
    flex-direction: row;
    align-items: center;
  }
}



/* ============================================================
   4. CONTENEDORES
   ============================================================ */

/* Contenedor general */
.contenedor {
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff9f0;
  border-radius: 8px;
  box-shadow: 0 10px 5px rgba(0,0,0,0.1);
/*  text-align: center;*/}

/* Contenedor exclusivo para posts */
.contenedor-post {
  width: 100%;
  max-width: 800px;       
  margin: 20px auto;
  padding: 20px;
  background-color: #fff9f0; 
  border-radius: 8px;
  box-shadow: 0 10px 5px rgba(0,0,0,0.1);
  text-align: left;           
  box-sizing: border-box;
}

.contenedor-post-admin {
  width: 100%;
  max-width: 1200px;       
  margin: 20px auto;
  padding: 20px;
  background-color: #fff9f0; 
  border-radius: 8px;
  box-shadow: 0 10px 5px rgba(0,0,0,0.1);
  text-align: left;           
  box-sizing: border-box;
}

/* Contenedor de posts filtrados */
/*.contenedor-posts-filtro {
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px 20px;
  background-color: #fff9f0;
  border-radius: 8px;
  box-shadow: 0 10px 5px rgba(0,0,0,0.1);
  text-align: left;
}*/

.contenedor-posts-filtro {
  width: 100%;           /* ðŸ‘ˆ fuerza a cada post a ocupar toda la fila */
  max-width: 1200px;
  margin: 20px auto;     /* ðŸ‘ˆ esto centra cada post individual */
  padding: 20px;
  background-color: #fff9f0;
  border-radius: 8px;
  box-shadow: 0 10px 5px rgba(0,0,0,0.1);
  text-align: left;
}

/*#posts-wrapper .contenedor-posts-filtro {
  max-width: 1200px;
}*/


/* ============================================================
   5. TIPOGRAFÃƒÂA Y TEXTOS
   ============================================================ */

/* Titulos y pÃƒÂ¡rrafos */
h1, h2 {
  text-align: center;
}

.h2-left {
  text-align: left;           
  font-size: 22px;             
  font-weight: 700;           
  margin: 15px 0 10px 0;      
  color: #333;                
  line-height: 1.2;           
}

.h2-left-index {
  text-align: left;           
  font-size: 22px;             
  font-weight: 700;           
  margin: 15px 0 10px 0;      
  color: #fff;                
  line-height: 1.2;           
}

h3, h4, h5 {
  text-align: left;
}

h5 {
  text-transform: uppercase;
  color: #4D179A;
  letter-spacing: 1px;
  font-weight: 700;
  margin-top: 15px;
  margin-bottom: 10px;
  text-align: left;
}

p {
  font-size: 16px;
  text-align: left;
}

/* ============================================================
   CONTENEDOR DESTACADO PARA TÃƒÂTULOS DEL INDEX
   ============================================================ */

.contenedor-index-titulo {
  width: 100%;
  max-width: 1200px;
  margin: 20px auto 20px auto;
  padding: 18px 25px;
  background-color: #4D179A;          /* fondo corporativo */
  border-radius: 12px;                /* bordes redondeados */
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  box-sizing: border-box;
}

.contenedor-index-titulo h2 {
  margin: 0;
  color: #ffffff;                     /* texto blanco */
  font-size: 20px;
  font-weight: 700;
  text-align: left;                   /* alineado a la izquierda */
  line-height: 1.3;
}

/* ============================================================
   6. BOTONES
   ============================================================ */

/* Botones de etiquetas */
.tag-btn {
  padding: 10px 20px;
  margin: 5px;
  background-color: #4D179A;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
  box-shadow: 0 10px 5px rgba(0,0,0,0.1);
  cursor: pointer;
  border: none;
}

.tag-btn:hover {
  background-color: #36BBA7;
}

.tag-btn:disabled {
  background-color: #36BBA7;
  cursor: default;
}

/* ============================================================
   7. FORMULARIOS Y TABLAS
   ============================================================ */

/* Formulario */
form {
  text-align: left;      
  max-width: 100%;       
  margin: 0 auto;        
}

form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

form input,
form select,
form textarea,
table {
  width: 100%;
  box-sizing: border-box;
}

textarea {
  height: 100px;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  padding: 8px;
}

/* Tabla de posts */
table {
  border-collapse: collapse;
  margin-bottom: 20px;
}

table th,
table td {
  border: 1px solid #ccc;
  padding: 10px;
  word-break: break-word;
}

/* ============================================================
   8. POSTS E IMÃƒÂGENES
   ============================================================ */

/* Imagen del post */
.contenedor-img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 15px;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0 10px 5px rgba(0,0,0,0.1);
}

/* --- POSTS FLOTANTES 2 COLUMNAS --- */
#posts-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* mÃƒÂ³vil */
@media (max-width: 500px){
  #posts-wrapper { 
    gap: 0px;
  }
}

.post-thumb {
  flex: 1 1 calc((100% - 40px) / 3); /* ðŸ‘ˆ calcula 3 columnas con 20px gap entre ellas */
  max-width: calc((100% - 40px) / 3);
  display: flex;
  flex-direction: column;
  gap: 20px;
  cursor: pointer;
  box-sizing: border-box;
  margin: 0;                /* ðŸ‘ˆ evita centrado inesperado */
  align-items: flex-start;  /* ðŸ‘ˆ fuerza contenido a la izquierda */
  text-align: left;         /* ðŸ‘ˆ texto tambiÃ©n */
}

.post-thumb:hover {
  transform: scale(1.02);
}

.post-thumb img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 5px;
}

.post-thumb div { flex: 1; }

.post-thumb h3 {
  margin: 5px 0;
}

.post-thumb h5 {
  margin: 2px 0 5px 0;
  font-size: 0.85em;
  color: #4D179A;
}

.post-thumb p {
  margin: 0;
  font-size: 12px;
  color: #555;
}

.post-thumb .post-content {
  font-size: 14px;
  line-height: 1.2;
  margin: 0;
  color: #555;
  text-align: left;
}

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px auto;
  border-radius: 6px;
}

.post-content img.align-left { 
  float: left; 
  margin: 0 15px 15px 0; 
}

.post-content img.align-right { 
  float: right; 
  margin: 0 0 15px 15px; 
}

.post-content { 
  line-height: 1.0; 
}

.post-content br { 
  line-height: normal; 
  margin: 0; 
}

/* ============================================================
   9. MODAL
   ============================================================ */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  max-width: 1200px;
  max-height: 90%;
  overflow-y: auto;
  position: relative;
  animation: slideIn 0.3s ease;
}

.modal-post-content img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 10px auto;
  border-radius: 6px;
}

.modal-post-content p {
  word-wrap: break-word;
}

.modal-post-content {
  max-width: calc(100% - 100px);
  margin: 0 auto;
}

@media (max-width: 600px) {
  .modal-post-content {
    max-width: 100%;
  }
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 25px;
  cursor: pointer;
}

.modal img {
  max-width: 100%;
  margin-bottom: 15px;
  border-radius: 5px;
}

@keyframes fadeIn { 
  from {opacity:0;} 
  to {opacity:1;} 
}

@keyframes slideIn { 
  from {transform: translateY(-20px);} 
  to {transform: translateY(0);} 
}

@media(max-width: 1200px){
  .post-thumb { 
    flex-direction: column;
    align-items: stretch;   /* 👈 estira el contenido */
    text-align: left;       /* 👈 mantiene alineación de texto */
    flex: 1 1 100%;
  }

  .post-thumb img { 
    width: 100%;           /* 👈 ocupa todo el ancho */
    height: auto;
    border-radius: 5px;
    display: block;
    margin: 0;             /* 👈 sin márgenes laterales */
    object-fit: cover;     /* 👈 recorta sin deformar */
  }

  .modal-content { 
    width: 90%; 
    padding: 15px; 
  }
}

/* ============================================================
   10. ADMIN (posts_admin.php)
   ============================================================ */

/* ============================================================
   ? MEJORAS VISUALES posts_admin.php
   ============================================================ */

/* .contenedor-post-admin {
  max-width: 1000px;
  margin: 40px auto;
  padding: 30px;
  background-color: #fff9f0;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
} */

.contenedor-post-admin h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #4D179A;
  border-bottom: 2px solid #e2d4c6;
  padding-bottom: 8px;
  margin-bottom: 15px;
}

.contenedor-post-admin .admin-form-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.contenedor-post-admin .admin-form-header h3 {
  margin: 0;
  flex: 1;
}

.generated-id-label {
  margin: 0;
  font-size: 0.95rem;
  color: #4D179A;
  min-height: 1.2rem;
  display: none;
}

.admin-create-blank-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0;
  box-shadow: 0 6px 12px rgba(77, 23, 154, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-create-blank-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(77, 23, 154, 0.45);
}

.contenedor-post-admin fieldset {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  margin-top: 25px;
  background: #fffdf9;
}

.contenedor-post-admin legend {
  font-weight: 700;
  color: #4D179A;
  padding: 0 10px;
}

.contenedor-post-admin input[type="text"],
.contenedor-post-admin input[type="number"],
.contenedor-post-admin input[type="file"],
.contenedor-post-admin input[type="datetime-local"],
.contenedor-post-admin select,
.contenedor-post-admin textarea {
  border: 1px solid #ccc;
  border-radius: 8px;
  height: 40px;
  padding: 10px;
  font-family: inherit;
  background-color: #fff;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contenedor-post-admin input:focus,
.contenedor-post-admin select:focus,
.contenedor-post-admin textarea:focus {
  border-color: #4D179A;
  box-shadow: 0 0 0 2px rgba(77,23,154,0.2);
  outline: none;
}

.preview img {
  max-width: 250px;
  border-radius: 10px;
  margin-top: 10px;
  margin-bottom: 25px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* ============================================================
   7. ADMIN: FILTROS, RELACIONES Y IA
   ============================================================ */

.admin-filters-form {
  margin-bottom: 25px;
}

.admin-filters-fieldset {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  margin-top: 25px;
  background: #fffdf9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.admin-filters-legend {
  font-weight: 700;
  color: #4D179A;
  padding: 0 10px;
}

.admin-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.admin-filter-group {
  display: flex;
  flex-direction: column;
  min-width: 150px
}

.admin-filter-label {
  font-weight: 500;
  margin-bottom: 5px;
}

.admin-filter-select {
  padding: 5px;
  border-radius: 5px;
  border: 1px solid #ccc;
  height: 40px;
  width: 200px
}

.contenedor-post-admin .datos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: flex-start;
  margin-top: 12px;
}

.contenedor-post-admin .datos-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contenedor-post-admin .datos-control-full {
  grid-column: 1 / -1;
}

.contenedor-post-admin .datos-title-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.btn-clear-filters {
  background: #555;
  color: #fff;
  padding: 7px 12px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.btn-clear-filters:hover {
  background: #444;
}

.related-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.related-input {
  width: 100px;
  max-width: 100%;
  padding: 0.4rem 0.75rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  height: 40px;
  font-family: inherit;
  font-size: 1rem;
  flex: 0 0 auto;
} 

.ai-tools-legend {
  color: #36BBA7;
}

.ai-tools-description {
  font-size: 14px;
  color: #555;
}

.ai-prompt {
  min-height: 120px
}

.ai-reference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.ai-reference-input {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ai-source-controls {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-top: 8px;
}

.ai-source-input {
  flex: 1;
  height: 40px;
  padding: 0 0.85rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-family: inherit;
  font-size: 1rem;
}

.ai-source-controls .btn {
  margin-top: 0;
  min-width: 160px;
}

.ai-reference-button .btn {
  width: 100%;
  height: 46px;
}

.ai-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 25px;
}

.ai-status {
  font-size: 13px;
  color: #777;
}

.btn-ai-generate {
  background: #36BBA7;
  margin-top: 10px;
}

.btn-ai-generate:hover {
  background: #2ba590;
}

.ai-response {
  margin-top: 20px;
  padding: 10px;
  background-color: #f0f0f0;
  border-radius: 5px;
  display: none;
}

.ai-response-title {
  margin: 0 0 10px 0;
  color: #4D179A;
}

.ai-response-feedback {
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 13px;
}

/* Botones */
.btn {
  display: inline-block;
  height: 40px;
  margin-top: 20px;
  padding: 10px 18px;
  border-radius: 8px;
  background: #4D179A;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  box-shadow: 0 5px 8px rgba(0,0,0,0.1);
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background: #36BBA7;
  transform: translateY(-2px);
}

.btn-edit { background: #3498db; }
.btn-edit:hover { background: #217dbb; }
.btn-delete { background: #e74c3c; }
.btn-delete:hover { background: #c0392b; }
.btn-view { background: #1abc9c; }
.btn-view:hover { background: #16a085; }
.btn-secondary {
  background: #fff;
  color: #4D179A;
  border: 2px solid #4D179A;
}
.btn-secondary:hover {
  background: #4D179A;
  color: #fff;
}

.related-row .btn {
  align-self: center;
  margin-top: 0;
  border-width: 1px;
}

/* Tabla */
.contenedor-admin-posts-list {
  max-width: 1200px;
  margin: 40px auto;
  padding: 30px; /* igual que el formulario */
  background-color: #fff9f0;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.contenedor-admin-posts-list table {
  display: table;
  font-size: 12px;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* fija proporciones para que llene todo */
}

.contenedor-admin-posts-list th,
.contenedor-admin-posts-list td {
  word-wrap: break-word;
  text-align: left;
  padding: 8px 10px;
}

.contenedor-admin-posts-list th {
  background-color: #f4efe7;
  font-weight: 700;
}

.contenedor-admin-posts-list tr:nth-child(even) {
  background: #fdfaf7;
}

.contenedor-admin-posts-list h3 {
  font-size: 1.4rem;
  color: #4D179A;
  margin-bottom: 15px;
}

/* ============================================================
   2FA posts_admin
   ============================================================ */
.twofa-wrapper {
  width: 100%;
  max-width: 800px; /* o 800px si prefieres */
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}


.twofa-card {
  max-width: 420px;
  width: 100%;
  text-align: left;
}

.twofa-card h1 {
  text-align: left;
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #4D179A;
}

.twofa-description {
  margin-bottom: 16px;
  color: #4a4a4a;
}

.twofa-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.twofa-input {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 12px;
  font-size: 1.1rem;
  letter-spacing: 4px;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.twofa-input:focus {
  border-color: #4D179A;
  box-shadow: 0 0 0 2px rgba(77, 23, 154, 0.2);
  outline: none;
}

.twofa-note {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

.twofa-message {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 500;
}

.twofa-message.info {
  background: #e6f7f3;
  color: #1f6f60;
  border: 1px solid #b7e5d9;
}

.twofa-message.error {
  background: #fdecea;
  color: #a33a2f;
  border: 1px solid #f5c6c1;
}

.twofa-resend {
  margin-top: 10px;
  align-items: flex-start;
}

.contenedor-admin-posts-list table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contenedor-admin-posts-list th,
.contenedor-admin-posts-list td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.contenedor-admin-posts-list th {
  background: #f4efe7;
  font-weight: 700;
}

.contenedor-admin-posts-list tr:nth-child(even) {
  background: #fdfaf7;
}

.borrador-row { background: #fff3cd !important; }

td[data-status="publicado"] {
  color: #2e7;
}

/* ============================================================
   11. FOOTER
   ============================================================ */

/* Footer */
.footer {
  margin-top: 10px;
  padding: 10px;
  text-align: center;
  font-size: 14px;
}

.footer .btn {
  padding: 10px 20px;
  margin: 5px;
  background-color: #4D179A;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
  box-shadow: 0 10px 5px rgba(0,0,0,0.1);
}

.footer .btn:hover {
  background-color: #36BBA7;
}

.footer p {
  color: #000;
  font-weight: normal;
  margin: 5px 0;
  background-color: #f6ebdc;
  padding: 5px 10px;
  border-radius: 5px;
  display: inline-block;
  font-size: 12px;
}

.footer-botones {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap; 
  margin-bottom: 10px;
}

/* ============================================================
   12. REDES SOCIALES
   ============================================================ */

.redes {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.redes img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.2s;
}

.redes img:hover {
  transform: scale(1.1);
}

/* ============================================================
   13. PAGINACIÃƒâ€œN
   ============================================================ */

/* paginaciÃƒÂ³n */
.pagination {
  margin-top: 15px;
  text-align: center;
}

.pagination a {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 4px;
  background: #ddd;
  border-radius: 6px;
  text-decoration: none;
  color: #000;
  transition: background-color 0.2s;
}

.pagination a:hover {
 	background: #bbb;
}

.pagination a.active {
 	background: #4D179A;
 	color: #fff;
}

.pagination-info {
  margin-top: 10px;
  color: #777;
}

/* ============================================================
   14. RESPONSIVE / ANIMACIONES / TOAST
   ============================================================ */

/* Responsive */
@media (max-width: 500px) {
  .imagen-top {
    max-width: 80%;
    margin: 120px auto 15px auto;
  }
  .footer-botones .btn,
  .tag-btn {
    flex: 1 1 100%;
    max-width: 100%;
    text-align: center;
    margin-bottom: 5px;
  }
  .contenedor {
    padding: 10px;
    margin-top: 5px;
  }
  .contenedor-post {
    padding: 20px;
    margin-top: 5px;
  }
}

/* Toast de notificaciÃƒÂ³n */
#toast {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background-color: #4D179A;
  color: white;
  text-align: center;
  border-radius: 10px;
  padding: 14px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 30px;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.5s ease, bottom 0.5s ease;
}

#toast.show {
  visibility: visible;
  opacity: 1;
  bottom: 50px;
}

/* Sin posts */
#no-posts-message {
  display: block !important;
  visibility: visible !important;
  text-align: center;
  color: #888;
  margin-top: 20px;
}


/* ==== ICONOS SOCIALES HEADER (color corporativo Ãºnico) ==== */
#social-icons {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

#social-icons .icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #4D179A;       /* ðŸ’œ color corporativo para todos */
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  overflow: hidden;
  transition: background-color 0.3s ease, transform 0.2s ease, opacity 0.3s ease;
  opacity: 0.9;
  cursor: pointer;
}

#social-icons .icon:hover {
  background-color: #36BBA7;       /* ðŸ’š color hover igual que los idiomas */
  transform: scale(1.1);
  opacity: 1;
  box-shadow: 0 6px 8px rgba(0,0,0,0.25);
}

#social-icons img {
  width: 60%;
  height: auto;
  filter: brightness(0) invert(1); /* iconos blancos sobre fondo morado */
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background-color: #4D179A;
  color: #fff;
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  z-index: 10000;
}

.mobile-menu-toggle:hover {
  background-color: #36BBA7;
}

.menu-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.menu-icon span {
  display: block;
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.menu-text {
  line-height: 1;
}



/* Responsive: menu toggle and icons on mobile */
@media (max-width: 600px) {
  .mobile-menu-toggle {
    display: inline-flex;
  }

  #mobile-menu-panel {
    position: fixed;
    top: 70px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
  }

  body.mobile-menu-open #mobile-menu-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  #social-icons {
    position: static;
    top: auto;
    left: auto;
    flex-direction: row;
  }

  .language-switch {
    position: static;
    top: auto;
    right: auto;
    align-items: center;
    flex-direction: row;
  }
}

/* ============================================================
   15. OVERRIDES AÃ‘ADIDOS (NO DESTRUCTIVOS)
   ============================================================ */

/* Forzar 1 columna en â‰¤768px sin tocar reglas existentes */
@media (max-width: 768px) {
  #posts-wrapper .post-thumb {
    flex: 1 1 100%;
    max-width: 100%;
  }
  #posts-wrapper {
    gap: 15px;
    justify-content: flex-start;
  }
}

/* Evitar centrado de contenido en â‰¤1200px respetando tus reglas previas */
@media (max-width: 1200px) {
  #posts-wrapper .post-thumb {
    align-items: flex-start;
    text-align: left;
  }
}


/* ============================================================
   16. AJUSTE VISUAL FINAL Y CENTRADO CORRECTO
   ============================================================ */

/* Mantiene el wrapper centrado y ajusta solo el contenido interno */
#posts-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
  align-items: stretch;
  max-width: 1200px;  /* 1200 + 2Ã—20px padding de los posts */
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* Mantiene el estilo de los posts con su fondo beige y padding */
#posts-wrapper .contenedor-posts-filtro {
  background-color: #fff9f0;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 10px 5px rgba(0,0,0,0.1);
}
