/* ======================================
   RESET + BASE
====================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f4f4f4;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}

.welcome-box {
  width: 100%;
  overflow: hidden;
}

/* ======================================
   HEADER Y NAVBAR
====================================== */
.site-header {
  background-color: #222;
  color: white;
  padding: 15px 20px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

.menu-toggle {
  display: none;
  font-size: 1.6rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}}

.nav-link {
  color: white;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.nav-links.collapse {
  display: none;
  flex-direction: column;
  width: 100%;
  margin-top: 10px;
  animation: slideDown 0.3s ease forwards;
}

.nav-links.collapse.show {
  display: flex;
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 601px) {
  .nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .navbar {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

.nav-links {
  display: none;
  flex-direction: column;
  width: 100%;
  margin-top: 10px;
}

.nav-links.show {
  display: flex;
}

  .nav-right {
    margin-left: 0;
	display: flex;
    flex-direction: column;
    align-items: center;
  }

  .nav-right .nav-link {
    padding-left: 0;
  }
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.nav-link:visited {
  color: white; /* evita el morado del visitado */
  text-decoration: none;
}

.nav-link:hover {
  text-decoration: underline;
  color: #ccc; /* o blanco más claro si prefieres */
}

.nav-link:active {
  color: #aaa;
}

/* ======================================
   FORMULARIOS DE AUTENTICACIÓN
====================================== */
.auth-form,
.welcome-box {
  background-color: white;
  padding: 40px;
  border-radius: 12px;
  margin-top: 25px;
  margin-bottom: 25px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.auth-form h1,
.welcome-box h1 {
  margin-bottom: 25px;
}

.auth-form input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  display: block;
  background-color: white;
}

textarea.input {
  resize: vertical;
  min-height: 100px;
}

/* ======================================
   TIMELINE / PUBLICACIONES
====================================== */
.timeline-feed {
  background: white;
  border-radius: 10px;
  padding: 30px;
  margin-top: 30px;
  margin-bottom: 85px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.post-list a {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
}

.post-list a:hover {
  color: #333;
}

.post-item {
  width: 100%;
  margin: 0 auto;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.post-item img,
.post-item video {
  display: block;
  margin: 0 auto 10px auto;
  max-width: 100%;
  max-height: 250px;
  border-radius: 6px;
}

.post-item p {
  text-align: center;
  margin-bottom: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-item hr {
  margin-top: 10px;
  border: none;
  border-top: 1px solid #ddd;
}

.post-item.highlight {
  animation: pulseHighlight 2.5s ease-in-out forwards;
  background-color: #e6f7ff;
  border-color: #91d5ff;
}

.post-item.pop {
  animation: popIn 0.4s ease-out;
}

.post-date {
  text-align: center;
  display: block;
  font-size: 0.85rem;
  color: #777;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;  /* ✨ Esto lo centra horizontalmente */
  margin-bottom: 10px;
}

.post-author .profile-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.no-posts-message {
  text-align: center;
  color: #888;
  margin: 25px 0;
  font-style: italic;
}

.user-link strong {
  display: inline;
}

.user-link img {
  display: inline-block;
  vertical-align: middle;
}

.post-feedback {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
  font-size: 1.2em;
  user-select: none;
}

.feedback-btn {
  cursor: pointer !important;
  opacity: 0.7;
  transition: transform 0.2s ease, color 0.3s ease;
}

.feedback-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.active-like {
  color: #4CAF50 !important; /* verde */
  font-weight: bold;
}

.active-dislike {
  color: #F44336 !important; /* rojo */
  font-weight: bold;
}

.btn-mini {
  padding: 4px 8px;
  font-size: 0.85em;
  background-color: #eee;
  border: 1px solid #bbb;
  border-radius: 4px;
  cursor: pointer;
}

.btn-mini:hover {
  background-color: #ddd;
}

.color-row {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* ⬅️ Esto alinea todo a la izquierda */
  gap: 10px;
  margin-bottom: 12px;
}

.color-row input[type="color"] {
  width: 48px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.color-row .btn-mini {
  padding: 4px 8px;
  font-size: 0.85em;
}

.danger-btn {
  background-color: #f8f8f8;
  border: 1px solid #bbb;
  color: #333;
}

.danger-btn:hover {
  background-color: #eee;
  border-color: #999;
}

/* ======================================
   PERFIL DE USUARIO
====================================== */
.profile-header {
  display: flex;
  align-items: center;
  padding: 20px;
  border-radius: 10px;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
}

.profile-avatar img {
  display: block;
  max-width: 100px;
  height: 100px;
  object-fit: cover;
  border: 3px solid #fff;
  border-radius: 50%;
}

.profile-info h2 {
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 1.4rem;
  color: #333;
}

.profile-info .bio {
  font-style: italic;
  margin: 5px 0;
  color: #555;
}

.profile-info .details {
  font-size: 0.9rem;
  color: #888;
}

@media (max-width: 600px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-avatar {
    margin: 0 auto;
  }

  .profile-info {
    width: 100%;
  }
}

.section-divider {
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  color: #555;
  margin: 25px 0 15px 0;
  position: relative;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #ccc;
  margin: 0 10px;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ======================================
   FORMULARIO STICKY (POSTEO)
====================================== */
.post-box {
  position: fixed;
  bottom: 30px;
  background: #fafafa;
  border-top: 1px solid #ccc;
  z-index: 998;
  padding: 10px 0;
  width: 100%;
}

.post-box .container {
  display: flex;
  justify-content: center;
}

.post-form-row {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 800px;
}

.input-inline {
  flex: 1;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 0;
  height: 40px;
}

.file-label {
  font-size: 1.4rem;
  cursor: pointer;
}

.file-inline {
  display: none;
}

.btn-inline {
  padding: 10px 16px;
  background-color: #0078d4;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
}

@media (max-width: 600px) {
  .post-box {
    box-shadow: 0 -3px 6px rgba(0, 0, 0, 0.06);
    border-top: none;
  }
}

/* ======================================
   BOTONES GENERALES
====================================== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: #0078d4;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: #005fa3;
}

.btn-small {
  font-size: 0.8em;
  padding: 4px 8px;
  margin: 2px;
  cursor: pointer;
}

/* ======================================
   ANIMACIONES Y NOTIFICACIONES
====================================== */
.fade-in {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseHighlight {
  0% {
    background-color: #e6f7ff;
    border-color: #91d5ff;
  }
  100% {
    background-color: transparent;
    border-color: #e0e0e0;
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  60% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

#new-alert {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  background: #0078d4;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: 500;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

@keyframes shake {
  0% { transform: translateX(0); }
  15% { transform: translateX(-4px); }
  30% { transform: translateX(4px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
  90% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.4s ease;
}

/* ======================================
   INDEX / PÁGINA DE BIENVENIDA
====================================== */
.logo-img {
  display: block;
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 20px auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.full-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.welcome-box ul {
  padding-left: 20px;
  list-style-type: disc;
  color: #333;
  line-height: 1.6;
}

.welcome-box h1 {
  margin-bottom: 15px;
  font-size: 1.8rem;
}

/* ======================================
   PIE DE PÁGINA / FOOTER
====================================== */
.footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: #f4f4f4;
  color: #777;
  font-size: 0.75rem;
  text-align: center;
  padding: 5.5px;
}

/* ======================================
   OTROS COMPONENTES
====================================== */
.cover-preview {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 20px;
}

.cover-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.presentation-card {
  background-color: rgba(255, 255, 255, 0.4);
  color: #000;
  padding: 5px 5px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ======================================
   LOTO
====================================== */

.loto-pulse {
  animation: lotoPulse 0.6s ease-out;
}

@keyframes lotoPulse {
  0% {
    transform: scale(1);
    color: inherit;
  }
  30% {
    transform: scale(1.25);
    color: #0078d4;
  }
  100% {
    transform: scale(1);
    color: inherit;
  }
}

/* ======================================
   GENERAL
====================================== */

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
  padding: 0 10px;
}

.section-card {
  display: block;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px 15px;
  text-align: center;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.section-card:hover {
  background-color: #0078d4;
  color: white;
  transform: scale(1.04);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.section-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.section-desc {
  display: block;
  font-size: 0.9rem;
  color: inherit;
  opacity: 0.85;
  line-height: 1.3;
}

/* ======================================
   AI
====================================== */

.chat-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 960px;
  height: calc(100vh - 85px); /* ajustar si tu header/footer difiere */
  margin: auto;
  padding: 20px;
  box-sizing: border-box;
}

.chat-box {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  scroll-behavior: smooth;
}

.chat-box img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.chat-box.image-view {
  justify-content: center;
  align-items: center;
  flex-direction: column; /* si querés que el contenido quede en stack */
  overflow: hidden;
}

.chat-form {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.input-chat {
  flex-grow: 1;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: 0.2s ease;
}

.input-chat:focus {
  border-color: #0078d4;
  box-shadow: 0 0 0 2px rgba(0,120,212,0.2);
  outline: none;
}

.btn-send {
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background-color: #0078d4;
  color: white;
  font-weight: 500;
  font-size: 1rem;
  transition: 0.2s ease;
}

.btn-send:hover {
  background-color: #005ea0;
  cursor: pointer;
}

.btn-reset {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #ccc;
  background-color: #f8f8f8;
  color: #555;
  border-radius: 8px;
  font-size: 1rem;
  transition: background 0.2s ease;
}

.btn-reset:hover {
  background-color: #e2e2e2;
  cursor: pointer;
}

@media screen and (max-width: 600px) {
  .chat-form {
    flex-wrap: wrap;
    flex-direction: row;
    gap: 8px;
  }

  .chat-form select,
  .chat-form button[type="button"] {
    width: calc(30% - 5px);
    font-size: 0.95rem;
    padding: 10px;
  }

  .chat-form input[type="text"] {
    width: calc(70% - 5px);
    font-size: 0.95rem;
    padding: 10px;
  }

  .chat-form button[type="submit"] {
    width: calc(30% - 5px);
    font-size: 0.95rem;
    padding: 10px;
  }
}

.message {
  display: flex;
  flex-direction: column;
}

.ai-message .msg-bubble {
  align-self: flex-start;
  background-color: #f1f1f1;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  padding: 12px 16px;
  max-width: 70%;
  text-align: left;
}

.user-message .msg-bubble {
  align-self: flex-end;
  background-color: #0078d4;
  color: white;
  border-radius: 14px;
  border-bottom-right-radius: 4px;
  padding: 12px 16px;
  max-width: 70%;
  text-align: right;
}

.msg-meta {
  display: block;
  font-size: 0.75rem;
  opacity: 0.6;
  margin-bottom: 4px;
}

.msg-content {
  white-space: pre-wrap;
}

.msg-content-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.copy-btn {
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: #888;
  transition: color 0.2s ease;
}

.copy-btn:hover {
  color: #333;
}

.ai-status {
  display: flex;
  justify-content: center; /* centrado horizontal */
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;       /* texto un poco más pequeño */
  margin: 10px auto;
  color: #555;
  max-width: 200px;
}

.ai-status .indicator {
  font-size: 1rem;           /* ícono más discreto */
  line-height: 1;
}

.ai-status.success .indicator {
  color: #28a745;
}

.ai-status.error .indicator {
  color: #dc3545;
}

.typing-indicator {
	padding: 15px;
}

.typing-indicator .msg-content {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 4px;
}

.typing-indicator .dot {
  height: 8px;
  width: 8px;
  background-color: #aaa;
  border-radius: 50%;
  animation: blink 1.4s infinite both;
}

.typing-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out forwards;
}

.fade-out {
  animation: fadeOut 0.2s ease-in-out forwards;
}

.fade-out-soft {
  opacity: 0;
  transition: opacity 0.6s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; height: 0; margin: 0; padding: 0; overflow: hidden; }
}

.coming-soon-card {
  opacity: 0.75;
  pointer-events: none;
  margin-bottom: 50px !important;
}