/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #4b0082;
  --secondary-color: #ff1493;
  --accent-color: #7b68ee;
  --dark-navy: #2c3e50;
  --light-grey: #f0f4f8;
  --white: #ffffff;
  --gradient-primary: linear-gradient(135deg, #4b0082, #7b68ee, #ff1493);
  --gradient-secondary: linear-gradient(45deg, #ff1493, #4b0082);
  --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 15px 50px rgba(0, 0, 0, 0.2);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border: #ccc;
  --muted-foreground: #666;
  --foreground: #333;
  --muted: #f0f4f8;
  --background: #fff;
  --primary: #4b0082;
  --destructive: #ff0000;
  --destructive-foreground: #fff;
}

body {
  font-family: "DM Sans", sans-serif;
  line-height: 1.6;
  color: var(--dark-navy);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-light);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-img {
  height: 40px;
  width: auto;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--dark-navy);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--gradient-primary);
  color: var(--white) !important;
  padding: 0.5rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
}

.nav-cta::after {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--dark-navy);
  margin: 3px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(75, 0, 130, 0.8), rgba(255, 20, 147, 0.6));
}

.hero-content {
  text-align: center;
  color: var(--white);
  z-index: 1;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(45deg, #ffd700, #ff1493, #00bfff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite;
  background-size: 200% 200%;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  text-align: justify;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--white);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Gallery Section */
.gallery {
  padding: 5rem 0;
  background: var(--light-grey);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-navy);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--dark-navy);
  opacity: 0.7;
}

.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: var(--white);
  color: var(--dark-navy);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--gradient-primary);
  color: var(--white);
  transform: translateY(-2px);
}

/* Envuélvelo en un contenedor para posicionar el spinner */
.videos-wrapper { position: relative; }

/* Spinner superpuesto (no cuenta como ítem del grid) */
.loading-spinner {
  position: absolute;
  inset: 0;
  display: none;              /* lo muestras solo mientras carga */
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(2px);
  z-index: 10;
}


.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.video-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-heavy);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition);
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.1);
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(75, 0, 130, 0.9);
  color: var(--white);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition);
}

.video-card:hover .play-overlay {
  background: var(--secondary-color);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
  padding: 1.5rem;
}

.video-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-navy);
}

.video-description {
  color: var(--dark-navy);
  opacity: 0.7;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.video-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--dark-navy);
  opacity: 0.6;
  font-size: 0.9rem;
}

.video-stat i {
  color: var(--secondary-color);
}

.load-more-container {
  text-align: center;
}

/* About Section */
.about {
  padding: 5rem 0;
  background: var(--white);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.8;
  text-align: justify;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: justify;
}

.feature-icon {
  background: var(--gradient-primary);
  color: var(--white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.feature-text h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-navy);
}

.feature-text p {
  opacity: 0.7;
}

.about-img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
}

/* Footer */
.footer {
  background: var(--dark-navy);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo {
  height: 40px;
  margin-bottom: 1rem;
}

.footer-description {
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.footer-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--secondary-color);
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.contact-info i {
  color: var(--secondary-color);
  width: 16px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.6;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: var(--white);
  margin: 2% auto;
  padding: 0;
  width: 90%;
  max-width: 900px;
  border-radius: var(--border-radius);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #000080;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 1;
}

.modal-close:hover {
  color: #ffffff;
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--light-grey);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(75, 0, 130, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(75, 0, 130, 0.6);
  }
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Enhanced comment system styles */
.comment-item {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.comment-actions {
  display: flex;
  gap: 0.5rem;
}

.comment-action-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.comment-action-btn:hover {
  background: var(--muted);
  color: var(--foreground);
}

.report-btn:hover {
  background: var(--destructive);
  color: var(--destructive-foreground);
  border-color: var(--destructive);
}

.replies-section {
  margin-top: 1rem;
  padding-left: 2rem;
  border-left: 2px solid var(--border);
}

.load-replies-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.load-replies-btn:hover {
  color: var(--secondary);
}

.replies-container {
  margin-top: 1rem;
}

.reply-item {
  background: var(--muted);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 0.5rem;
}

.reply-form {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--muted);
  border-radius: var(--border-radius);
}

.reply-name-input,
.reply-text-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  font-family: inherit;
  resize: vertical;
}

.reply-text-input {
  min-height: 80px;
}

.reply-form-actions {
  display: flex;
  gap: 1rem;
}

.no-replies {
  text-align: center;
  padding: 1rem;
  color: var(--muted-foreground);
  font-style: italic;
}

/* Report Modal Styles */
.report-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.report-modal-content {
  background: var(--background);
  border-radius: var(--border-radius);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.report-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.report-modal-header h3 {
  margin: 0;
  color: var(--foreground);
}

.report-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted-foreground);
}

.report-modal-close:hover {
  color: var(--foreground);
}

.report-modal-body {
  padding: 1.5rem;
}

.report-reason-select,
.report-description {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  margin: 1rem 0;
  font-family: inherit;
}

.report-description {
  min-height: 100px;
  resize: vertical;
}

.report-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: var(--white);
    width: 100%;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

 /* .videos-grid {
    grid-template-columns: 1fr;
  }*/
  


  .gallery-filters {
    flex-wrap: wrap;
  }

  .comment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .comment-actions {
    align-self: flex-end;
  }

  .replies-section {
    padding-left: 1rem;
  }

  .reply-form-actions {
    flex-direction: column;
  }

  .report-modal-content {
    width: 95%;
  }

  .report-modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .nav-container {
    padding: 1rem;
  }
}
/* Added CSS to handle missing images gracefully */
.hero-video-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}

.logo-img,
.about-img,
.footer-logo {
  transition: opacity 0.3s ease;
}

.logo-img[style*="display: none"],
.about-img[style*="display: none"],
.footer-logo[style*="display: none"] {
  opacity: 0;
}

/* Fallback styles for missing images */
.nav-logo {
  min-height: 50px;
  display: flex;
  align-items: center;
}

.nav-logo::before {
  content: "Conexi贸n Salud";
  font-weight: 700;
  color: var(--primary-color, #667eea);
  font-size: 1.2rem;
}

.footer-section .footer-logo[style*="display: none"] + .footer-description::before {
  content: "Conexi贸n Salud Fundaci贸n";
  display: block;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary-color, #667eea);
}

/* ===============================
   SECCIÓN DE COMENTARIOS - ESTILOS
   =============================== */

/* Contenedor principal */
.modal-body .comments-section {
  background: #ffffff !important;
  border-radius: 12px !important;
  padding: 16px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 10px;
  font-family: 'DM Sans', sans-serif;
  color: #333;
}

/* Título */
.modal-body .comments-section h3 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #222;
}

/* Formulario de comentarios */
.modal-body .comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Input y textarea */
.modal-body .comment-form input,
.modal-body .comment-form textarea {
  width: 100% !important;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  resize: none;
  transition: border-color 0.3s ease;
}

.modal-body .comment-form input:focus,
.modal-body .comment-form textarea:focus {
  outline: none;
  border-color: #6c63ff;
  box-shadow: 0 0 4px rgba(108, 99, 255, 0.4);
}

/* Botón */
.modal-body .comment-form button {
  background: #6c63ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.modal-body .comment-form button:hover {
  background: #5146d8;
}

/* Lista de comentarios */
.modal-body .comments-list {
  margin-top: 15px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

.modal-body .comments-list .comment-item {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.modal-body .comments-list .comment-item:last-child {
  border-bottom: none;
}

/* Mensaje cuando no hay comentarios */
.modal-body .comments-list .no-comments {
  font-size: 13px;
  color: #666;
  text-align: center;
  padding: 10px;
}

/* ===============================
   RESPONSIVO
   =============================== */
@media (max-width: 768px) {
  .modal-body .comments-section {
    padding: 12px !important;
    font-size: 14px;
  }

  .modal-body .comment-form input,
  .modal-body .comment-form textarea {
    font-size: 13px;
  }

  .modal-body .comment-form button {
    font-size: 13px;
    padding: 8px;
  }

  .modal-body .comments-list {
    max-height: 200px;
  }
}

@media (max-width: 480px) {
  .modal-body .comments-section {
    padding: 10px !important;
  }

  .modal-body .comment-form button {
    font-size: 12px;
    padding: 7px;
  }
}

.texto-concurso {
    text-align: justify
} 