/* =====================================
   VARIABLES Y CONFIGURACIÓN GLOBAL (FadCam)
===================================== */
:root {
  --primary-color: #e53935;      /* Rojo Principal */
  --secondary-color: #0a0a0a;    /* Fondo Oscuro */
  --accent-color: #b71c1c;       /* Rojo Oscuro */
  --text-color: #f3f4f6;         /* Texto Claro */
  --light-text: #aaaaaa;         /* Texto Secundario */
  --card-bg: rgba(10, 10, 10, 0.85); /* Fondo Tarjetas */
  --border-subtle: rgba(229, 57, 53, 0.3); /* Borde Rojo */
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* =====================================
   LAYOUT PRINCIPAL
===================================== */
body {
  font-family: var(--font-family);
  background-color: var(--secondary-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 4rem;
  z-index: 10;
  position: relative;
}

/* =====================================
   ENCABEZADOS DE SECCIÓN
===================================== */
.section-header {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1 !important;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--text-color);
  margin: 0;
  font-weight: 700;
  text-shadow: 0 0 15px rgba(229, 57, 53, 0.4);
}

.header-line {
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  margin-bottom: 1rem;
  border-radius: 2px;
  box-shadow: 0 0 10px var(--primary-color);
}

/* =====================================
   SECCIÓN RECOMENDACIONES (Ajuste Exacto 250px)
===================================== */
.recomendaciones-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.recomendaciones-section p {
  font-size: 1.1rem;
  color: var(--light-text);
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Tarjeta contenedora principal */
.badge-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid rgba(229, 57, 53, 0.3);
  border-radius: 20px;
  padding: 2rem; /* Espacio cómodo alrededor de la imagen */
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  transition: transform 0.3s ease, border-color 0.3s ease;
  margin: 0 auto 2rem;
  width: auto;
  max-width: 95%;
}

/* Fondo overlay (gradiente sutil) */
.badge-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(10, 10, 10, 0.4) 0%, 
    rgba(10, 10, 10, 0.8) 100%
  );
  border-radius: 20px;
  z-index: 0;
  pointer-events: none;
}

.badge-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 15px 40px rgba(229, 57, 53, 0.2);
}

/* Wrapper del enlace para la imagen */
.badge-link-wrapper {
  z-index: 2;
  display: block;
  border-radius: 12px;
  overflow: hidden; /* Para que el zoom de la imagen no se salga */
  transition: box-shadow 0.3s ease;
}

.badge-link-wrapper:hover {
  box-shadow: 0 0 20px rgba(229, 57, 53, 0.4); /* Resplandor rojo al tocar la imagen */
}

/* Contenedor de la Imagen */
.badge-container {
  position: relative;
  /* Ancho máximo que quieras que tenga la imagen (ajustable) */
  width: 280px; 
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  overflow: hidden;
}

/* La Imagen en sí (La captura) */
.badge-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* Un filtro sutil para que no brille tanto el blanco si la captura es clara */
  filter: brightness(0.9); 
}

/* Efecto Zoom al pasar el mouse */
.badge-link-wrapper:hover .badge-img {
  transform: scale(1.05); /* Zoom suave */
  filter: brightness(1);  /* Se ilumina */
}

/* Botón debajo */
.btn-linkedin {
  position: relative;
  z-index: 2;
  display: inline-block;
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 0.8rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 1rem;
  margin-top: 1.5rem;
}

.btn-linkedin:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(229, 57, 53, 0.5);
}

/* =====================================
   SECCIÓN CONTACTO DIRECTO
===================================== */
.contact-section {
  width: 90%;
  max-width: 800px;
  margin: 2rem auto;
  text-align: center;
  animation: slideIn 1s ease-out forwards;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid rgba(229, 57, 53, 0.4);
  border-radius: 16px;
  padding: 3rem 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  transition: all 0.5s ease;
  animation: neon-pulse-soft 2s ease-in-out infinite alternate;
}

.contact-card:hover {
  border-color: #fff;
  transform: scale(1.01);
  box-shadow: 0 0 30px var(--primary-color),
              0 15px 40px rgba(0, 0, 0, 0.7);
}

/* Animación de neón pulsante */
@keyframes neon-pulse-soft {
  0% {
    box-shadow: 0 0 10px rgba(229, 57, 53, 0.4);
    border-color: rgba(229, 57, 53, 0.4);
  }
  100% {
    box-shadow: 0 0 18px rgba(229, 57, 53, 0.8),
                0 0 30px rgba(229, 57, 53, 0.2);
    border-color: rgba(229, 57, 53, 0.8);
  }
}

.contact-intro {
  font-size: 1.2rem;
  color: var(--text-color);
  margin-bottom: 2rem;
}

/* Botón Copiar Correo */
.email-copy-container {
  margin-bottom: 3rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-copy .icon {
  font-size: 1.4rem;
}

.btn-copy:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(229, 57, 53, 0.4);
}

.btn-copy:active {
  transform: scale(0.98);
}

.copy-msg {
  margin-top: 1rem;
  font-size: 0.9rem;
  display: none;
  color: #4caf50;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Redes Sociales */
.social-media h3 {
  font-size: 1.1rem;
  color: var(--light-text);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.social-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.social-links li a {
  display: inline-block;
  transition: transform 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  padding: 10px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

.social-links li a img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: none;
}

.social-links li a:hover {
  transform: translateY(-5px);
  background: rgba(229, 57, 53, 0.1);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(229, 57, 53, 0.3);
}

/* =====================================
   ANIMACIONES
===================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* =====================================
   ESTILOS SISTEMA DE COMENTARIOS
===================================== */
.comments-section {
  width: 90%;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.comments-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Formulario */
.comment-form {
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid rgba(229, 57, 53, 0.3);
  padding: 2rem;
  border-radius: 15px;
  backdrop-filter: blur(5px);
}

.comment-form h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.form-group {
  margin-bottom: 1rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  color: #fff;
  border-radius: 8px;
  font-family: inherit;
}

.comment-form textarea {
  resize: vertical;
  min-height: 80px;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Captcha */
.captcha-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.captcha-group input {
  width: 60px;
  text-align: center;
}

/* Botón */
.btn-submit {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s;
}
.btn-submit:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(229, 57, 53, 0.4);
}

/* Feedback */
.form-feedback {
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: bold;
}
.success-msg { color: #4caf50; }
.error-msg { color: #ff5252; }

/* Lista de Comentarios */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Scrollbar personalizado para la lista */
.comments-list::-webkit-scrollbar { width: 6px; }
.comments-list::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 3px; }

.comment-card {
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 10px;
  border-left: 3px solid var(--primary-color);
  animation: fadeIn 0.5s ease;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 0.85rem;
  color: #aaa;
}

.comment-author {
  color: #fff;
  font-weight: bold;
}

.comment-body {
  color: #ddd;
  line-height: 1.4;
  word-wrap: break-word;
}

/* =====================================
   RESPONSIVIDAD
===================================== */
@media (max-width: 768px) {
  .section-header h2 {
    font-size: 2rem;
  }

  .contact-card {
    padding: 2rem 1rem;
  }

  .btn-copy {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  /* Fix iconos móviles */
  .social-links li a img,
  .btn-copy .icon {
    filter: none !important;
    opacity: 1 !important;
    -webkit-filter: none !important;
  }

  .badge-card {
    padding: 1.5rem 1rem;
    border-radius: 15px;
  }

  .badge-container iframe {
    transform: scale(0.95);
  }

  .btn-linkedin {
    width: 90%;
  }
}
