/* === ESTILOS GENERALES === */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #f4f4f4;
  color: #000;
  transition: background-color 0.3s, color 0.3s;
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* === SIDEBAR IZQUIERDO (CON CORRECCIONES DE POSICIONAMIENTO) === */
.sidebar-left {
  width: 260px;
  background-color: #ffffff;
  border-right: 1px solid #ddd;
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  box-sizing: border-box;
}

/* --- ESTILOS DE CONTENEDORES PARA ORDENAR EL SIDEBAR --- */
.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.sidebar-profile {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0;
}

.sidebar-profile img {
  border-radius: 50%;
  width: 60px;
  height: 60px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- ESTILOS PARA EL MENÚ DINÁMICO --- */
.sidebar-menu .menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-menu .menu-list li {
  margin: 0;
}

.sidebar-menu .menu-list a {
  text-decoration: none;
  color: #222;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-radius: 10px;
  transition: background-color 0.3s, color 0.3s;
}

.sidebar-menu .menu-list a:hover,
.sidebar-menu .menu-list .current-menu-item a,
.sidebar-menu .menu-list .current_page_item a {
  background-color: #f0f0f0;
}

.mode-toggle,
.new-post-btn {
  background-color: #000;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
  width: 100%;
  box-sizing: border-box;
}

.mode-toggle:hover,
.new-post-btn:hover {
  background-color: #222;
}

/* === CONTENIDO PRINCIPAL === */
.main-content {
  flex-grow: 1;
  margin-left: 260px;
  margin-right: 300px;
  padding: 0 20px 30px 20px;
  background-color: #f4f4f4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, color 0.3s;
}

/* === FEED ESTILO TIMELINE === */
.feed-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 600px;
  width: 100%;
  margin: 30px auto 0 auto;
}

.post-card {
  background-color: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
  transform: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.creator-info {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 10px;
}

.creator-info img {
  border-radius: 50%;
  width: 44px;
  height: 44px;
}

.creator-info span {
  font-weight: 600;
  color: #333;
}

.post-image {
  width: 100%;
  height: auto;
  display: block;
}

.subscribe-btn {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  background-color: #000;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.subscribe-btn:hover {
  background-color: #222;
}

/* === SIDEBAR DERECHO === */
.sidebar-right {
  width: 300px;
  background-color: #ffffff;
  border-left: 1px solid #ddd;
  padding: 20px;
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  transition: background-color 0.3s;
}

/* === MODO OSCURO === */
body.dark-mode {
  background-color: #0a0a0a;
  color: #fff;
}

body.dark-mode .sidebar-left {
  background-color: #0a0a0a;
  border-right: 1px solid #333;
}

body.dark-mode .sidebar-menu .menu-list a {
  color: #fff;
}

body.dark-mode .sidebar-menu .menu-list a:hover,
body.dark-mode .sidebar-menu .menu-list .current-menu-item a {
  background-color: #1a1a1a;
}

body.dark-mode .main-content {
  background-color: #0a0a0a;
  color: #fff;
}

body.dark-mode .post-card {
  background-color: #1a1a1a;
}

body.dark-mode .subscribe-btn {
  background-color: #fff;
  color: #000;
}

body.dark-mode .mode-toggle,
body.dark-mode .new-post-btn {
  background-color: #fff;
  color: #000;
}

body.dark-mode .sidebar-right {
  background-color: #0a0a0a;
  border-left: 1px solid #333;
}

/* === ESTILOS DE AUTENTICACIÓN === */
.auth-menu-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
  width: 100%;
  box-sizing: border-box;
}

.auth-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 15px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
  box-sizing: border-box;
}

.login-btn {
  background-color: #fff;
  color: #000;
  border: 1px solid #000;
}

.login-btn:hover {
  background-color: #f0f0f0;
}

.register-btn {
  background-color: #000;
  color: #fff;
  border: 1px solid #000;
}

.register-btn:hover {
  background-color: #222;
}

.logout-btn {
  margin-top: 15px;
  background-color: transparent;
  color: #d9534f;
  border: 1px solid #d9534f;
}

.logout-btn:hover {
  background-color: rgba(217, 83, 79, 0.1);
}

/* === NUEVA PUBLICACIÓN === */
.new-post-area {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  width: 100%;
  box-sizing: border-box;
}

.new-post-area h2 {
  font-size: 1.2em;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  color: #222;
}

.post-form-container textarea {
  width: 100%;
  border: none;
  resize: vertical;
  padding: 10px 0;
  font-size: 1em;
  font-family: 'Poppins', sans-serif;
  outline: none;
}

.post-options {
  display: flex;
  gap: 15px;
  padding-top: 10px;
  color: #555;
}

.post-options i {
  cursor: pointer;
  font-size: 1.2em;
  transition: color 0.2s;
}

.post-options i:hover {
  color: #000;
}

/* === RESPONSIVE === */
@media screen and (max-width: 1100px) {
  .main-content {
    margin-left: 0;
    margin-right: 0;
    padding: 20px;
  }

  .feed-grid {
    max-width: 100%;
    gap: 20px;
  }

  .sidebar-left,
  .sidebar-right {
    display: none;
  }
}

/* === FOOTER GLOBAL (CENTRADO Y LIMPIO) === */
.site-footer {
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
  color: #fff;
  background: transparent !important;
  position: relative;
  width: 100%;
  z-index: 10;
  margin: 0;
}

/* Footer modo oscuro */
body.dark-mode .site-footer {
  color: #ccc;
  background: transparent !important;
}

/* Páginas login/registro */
body.page-template-page-register .site-footer,
body.page-template-page-login .site-footer {
  text-align: center;
  color: #fff;
  background: transparent !important;
}

/* Asegura que el body controle el fondo */
body.dark-mode {
  background-color: #000 !important;
}



/* === AJUSTE DE ALTURA VISUAL EN LOGIN / REGISTER === */
body.page-template-page-login,
body.page-template-page-register {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* lo mueve hacia arriba */
  min-height: 100vh;
}

.register-wrapper,
.login-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 40px; /* distancia controlada desde arriba */
  padding-bottom: 20px; /* deja algo de aire antes del footer */
}

/* === VISIBILIDAD DEL FOOTER EN MODO CLARO === */
body.page-template-page-login footer.site-footer,
body.page-template-page-register footer.site-footer {
  color: #555; /* texto visible sobre fondo claro */
}

body.dark-mode.page-template-page-login footer.site-footer,
body.dark-mode.page-template-page-register footer.site-footer {
  color: #ccc; /* mantiene el tono suave en modo oscuro */
}



/* === VISIBILIDAD DEL FOOTER EN TODAS LAS PÁGINAS === */
footer.site-footer {
  color: #555; /* visible en modo claro */
}

body.dark-mode footer.site-footer {
  color: #ccc; /* tono suave en modo oscuro */
}



/* Checkbox personalizado */
.login-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  user-select: none;
}

/* Ocultamos el checkbox original */
.login-form input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #ccc;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Al pasar el mouse */
.login-form input[type="checkbox"]:hover {
  border-color: #000;
}

/* Marcado */
.login-form input[type="checkbox"]:checked {
  background-color: #000;
  border-color: #000;
}

/* Check visual */
.login-form input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Modo oscuro */
body.dark-mode .login-form label {
  color: #ddd;
}
body.dark-mode .login-form input[type="checkbox"] {
  border-color: #333;
}
body.dark-mode .login-form input[type="checkbox"]:checked {
  background-color: #fff;
  border-color: #fff;
}
body.dark-mode .login-form input[type="checkbox"]:checked::after {
  border-color: #000;
}

.section-content {
    background-color: rgba(255, 255, 255, 0.9);
    color: #111;
    border-radius: 12px;
    padding: 30px;
    margin: 20px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

body.dark-mode .section-content {
    background-color: rgba(30, 30, 30, 0.8);
    color: #eee;
}

.feed-grid, .explorar-grid, .colecciones-grid, .suscripciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.post-card, .creator-card, .coleccion-card, .sub-card {
    background: rgba(255,255,255,0.85);
    border-radius: 14px;
    padding: 15px;
    transition: transform 0.2s;
}

body.dark-mode .post-card,
body.dark-mode .creator-card,
body.dark-mode .coleccion-card,
body.dark-mode .sub-card {
    background: rgba(30,30,30,0.8);
    color: #f1f1f1;
}

.post-card:hover, .creator-card:hover, .coleccion-card:hover, .sub-card:hover {
    transform: scale(1.02);
}

.creator-info, .sub-info, .coleccion-info {
    text-align: center;
    margin-top: 10px;
}

.creator-card img, .coleccion-card img, .sub-card img {
    width: 100%;
    border-radius: 10px;
}

.chat-container {
    display: flex;
    height: 400px;
    border: 1px solid #ccc;
    border-radius: 12px;
    overflow: hidden;
}

.chat-sidebar {
    width: 25%;
    background: rgba(240,240,240,0.8);
    overflow-y: auto;
}

.chat-user {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
}

.chat-user.active {
    background: #eee;
    font-weight: bold;
}

.chat-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.9);
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
    max-width: 80%;
}

.message.sent {
    background: #d1f7d1;
    align-self: flex-end;
}

.message.received {
    background: #f1f1f1;
}

.chat-input {
    display: flex;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: none;
}

.chat-input button {
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
}

body.dark-mode .chat-sidebar,
body.dark-mode .chat-box {
    background: rgba(20,20,20,0.9);
}








/* ==== CORRECCIONES DE DISEÑO GENERAL ==== */

.layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-color, #f9f9f9);
}

.main-content {
    flex: 1;
    padding: 40px 60px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-content {
    width: 100%;
    max-width: 800px;
    background: rgba(255,255,255,0.9);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

body.dark-mode .section-content {
    background: rgba(25,25,25,0.9);
    color: #f1f1f1;
}

/* Evita el fondo desalineado con el sidebar */
.sidebar-left {
    background: #fff;
}

body.dark-mode .sidebar-left {
    background: #111;
}


.feed-vertical {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}

.post-card {
    background: rgba(255,255,255,0.95);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

body.dark-mode .post-card {
    background: rgba(30,30,30,0.85);
}

.post-card:hover {
    transform: scale(1.01);
}

.creator-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.post-image {
    width: 100%;
    border-radius: 10px;
    margin-top: 10px;
}

/* === PERFIL DE USUARIO === */
.perfil-section {
    width: 100%;
    background: var(--fondo, #f8f8f8);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.perfil-banner {
    height: 220px;
    background-size: cover;
    background-position: center;
}

.perfil-info {
    display: flex;
    gap: 20px;
    padding: 20px;
    align-items: center;
    background: #fff;
}

.perfil-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    box-shadow: 0 0 6px rgba(0,0,0,0.2);
    margin-top: -80px;
}

.perfil-datos h2 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
}

.perfil-username {
    color: #777;
    font-size: 0.95em;
}

.perfil-bio {
    margin-top: 5px;
    font-size: 0.95em;
    color: #555;
}

.perfil-stats {
    margin-top: 10px;
    display: flex;
    gap: 20px;
    font-size: 0.95em;
}

.perfil-botones {
    margin-top: 15px;
}

.perfil-botones .btn {
    background: black;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    margin-right: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.perfil-botones .btn:hover {
    background: #ff007f;
}

.perfil-tabs {
    display: flex;
    background: #f3f3f3;
    border-bottom: 1px solid #ddd;
}

.perfil-tabs .tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    cursor: pointer;
    font-weight: 500;
    background: transparent;
    border: none;
    transition: 0.2s;
}

.perfil-tabs .tab.active {
    background: #fff;
    border-bottom: 3px solid #ff007f;
    color: #ff007f;
}

.perfil-contenido {
    padding: 20px;
    background: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.post-card.perfil {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #fafafa;
    border: 1px solid #eee;
}

.sin-posts {
    text-align: center;
    padding: 40px;
    color: #777;
}


.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: #fff;
  color: #000;
  padding: 2em;
  border-radius: 15px;
  max-width: 400px;
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px; right: 10px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.btn-suscribirse {
  margin-top: 1em;
  background: #e91e63;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
}


/* === PERFIL DE USUARIO === */
.perfil-contenedor {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  font-family: 'Inter', sans-serif;
}

.perfil-darkmode {
  text-align: right;
}
.perfil-darkmode button {
  background: #fff;
  border: none;
  border-radius: 50%;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  cursor: pointer;
}

/* Portada */
.perfil-portada {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.perfil-banner {
  height: 250px;
  background: linear-gradient(135deg, #fba0d0, #fbc7d4);
}

.perfil-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px;
}

.perfil-avatar {
  position: relative;
}
.perfil-avatar img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.editar-avatar {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #00000070;
  border: none;
  color: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s;
}
.perfil-avatar:hover .editar-avatar {
  opacity: 1;
}

.perfil-datos {
  margin-left: 20px;
  flex-grow: 1;
}
.perfil-datos h1 {
  font-size: 22px;
  margin: 0;
  display: flex;
  align-items: center;
}
.perfil-datos .verificado {
  color: #ff4f9a;
  margin-left: 6px;
}
.perfil-datos .usuario {
  color: #777;
}
.perfil-stats {
  margin-top: 10px;
  color: #555;
  font-size: 14px;
}
.perfil-stats span {
  margin-right: 15px;
}

.btn-editar {
  background: #f2f2f2;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px 18px;
  cursor: pointer;
}

/* Tarjetas */
.perfil-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.perfil-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.btn-rosa {
  background: #ff4f9a;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
}

/* Bio y redes */
.perfil-bio h3,
.perfil-redes h3 {
  margin-bottom: 8px;
  font-size: 15px;
}
.perfil-redes ul {
  list-style: none;
  padding: 0;
}
.perfil-redes li {
  margin-bottom: 8px;
}
.perfil-redes i {
  margin-right: 6px;
}
.insta { color: #e1306c; }
.tw { color: #1da1f2; }

/* Publicaciones */
.perfil-filtros button {
  border: none;
  background: none;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.perfil-filtros .activo {
  background: #ff4f9a;
  color: white;
}

.perfil-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.post-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}
.post-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.post-item:hover img {
  transform: scale(1.05);
}
.post-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  color: white;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: background .3s, opacity .3s;
  opacity: 0;
}
.post-item:hover .post-overlay {
  background: rgba(0,0,0,0.5);
  opacity: 1;
}

.perfil-vermas {
  text-align: center;
  margin-top: 20px;
}
.perfil-vermas button {
  background: #f2f2f2;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
}


.perfil-editar-form textarea,
.perfil-editar-form input[type="url"] {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
  font-family: inherit;
  font-size: 14px;
}

.perfil-guardado {
  background: #e8ffe8;
  border: 1px solid #5ec75e;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 6px;
  color: #276e27;
}


.perfil-imagenes input[type="file"] {
  display: block;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}

.perfil-imagenes button {
  cursor: pointer;
}

.perfil-guardado {
  margin-top: 10px;
  background: #e8ffe8;
  border: 1px solid #4caf50;
  color: #276e27;
  padding: 10px;
  border-radius: 6px;
}
