/* =========================================
   ICLM - Hoja de Estilos Principal
   Archivo: styles.css
   ========================================= */

:root {
  --primary: #1e3a5f;
  --primary-light: #3b82f6;
  --secondary: #475569;
  --accent: #d97706;
  --accent-light: #f59e0b;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-section: #ffffff;
  --bg-alt: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 10px 40px rgba(0,0,0,0.08);
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-hover: 0 20px 50px rgba(0,0,0,0.12);
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { 
  font-family: 'Outfit', sans-serif; 
  line-height: 1.7; 
  color: var(--text-primary); 
  background: var(--bg-body);
}

h1, h2, h3, h4 { 
  font-family: 'Playfair Display', serif; 
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; border-radius: var(--radius); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }

/* Buttons */
.btn { 
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 32px; 
  background: var(--accent); color: white; border-radius: 50px; font-weight: 600; 
  font-size: 1rem; border: none; cursor: pointer; transition: var(--transition);
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.25);
}
.btn:hover { 
  background: var(--accent-light); transform: translateY(-3px); 
  box-shadow: 0 8px 25px rgba(217, 119, 6, 0.35);
}
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); box-shadow: none; }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 15px rgba(30, 58, 95, 0.2); }
.btn-primary:hover { background: var(--primary-light); box-shadow: 0 8px 25px rgba(30, 58, 95, 0.3); }

/* Header */
header { 
  background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); position: fixed; 
  width: 100%; top: 0; z-index: 1000; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
nav { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; }
.logo { font-size: 1.8rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.logo i { color: var(--accent); }
.nav-links { display: flex; gap: 35px; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; position: relative; color: var(--text-secondary); }
.nav-links a:hover { color: var(--primary); }
.nav-links a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--accent); transition: var(--transition); }
.nav-links a:hover::after { width: 100%; }
.menu-toggle { display: none; font-size: 1.8rem; cursor: pointer; color: var(--primary); }

/* Hero Section */
    /* Hero Section - Con Imagen de Fondo */
    #inicio { 
      /* Fondo: Imagen + Degradado blanco (para mantener estilo claro y legible) */
      background: linear-gradient(to right, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.6) 50%, rgba(248, 250, 252, 0.1) 100%), 
                  url('../img/bg.png') no-repeat center center/cover;
      
      min-height: 100vh;
      display: flex;
      align-items: center;
      position: relative;
      overflow: hidden;
      padding-top: 80px;
    }

    /* Ocultar las formas decorativas anteriores para un look más limpio con la foto */
    #inicio::before, #inicio::after { display: none; }

}
.hero-content { position: relative; z-index: 1; max-width: 800px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px;
  background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: 50px; font-size: 0.85rem; font-weight: 600; color: var(--accent); margin-bottom: 24px; animation: fadeInUp 0.8s ease;
}
#inicio h1 { font-size: 4rem; margin-bottom: 20px; animation: fadeInUp 0.8s ease 0.2s both; }
#inicio h1 span { color: var(--accent); font-style: italic; }
#inicio p { font-size: 1.3rem; max-width: 650px; margin-bottom: 40px; color: var(--text-secondary); animation: fadeInUp 0.8s ease 0.4s both; }
.hero-buttons { display: flex; gap: 16px; animation: fadeInUp 0.8s ease 0.6s both; }
.stats { display: flex; gap: 40px; margin-top: 60px; animation: fadeInUp 0.8s ease 0.8s both; }
.stat-item { text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 700; color: var(--primary); display: block; }
.stat-label { font-size: 0.9rem; color: var(--text-muted); }

/* Section Headers */
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.8rem; margin-bottom: 16px; position: relative; display: inline-block; }
.section-header h2::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background: var(--accent); border-radius: 2px; opacity: 0.8; }
.section-header p { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 20px auto 0; }

/* Horarios */
.horarios-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.horario-card { 
  background: var(--bg-card); padding: 40px 30px; border-radius: var(--radius); text-align: center;
  border: 1px solid var(--border); transition: var(--transition); position: relative; overflow: hidden;
}
.horario-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-light)); transform: scaleX(0); transition: var(--transition); }
.horario-card:hover { transform: translateY(-10px); border-color: var(--accent); box-shadow: var(--shadow-hover); }
.horario-card:hover::before { transform: scaleX(1); }
.horario-card i { font-size: 3rem; color: var(--accent); margin-bottom: 20px; }
.horario-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.horario-card .time { font-size: 1.2rem; color: var(--primary); font-weight: 600; margin-top: 10px; }

/* Doctrina */
.doctrina-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.doctrina-content h3 { font-size: 2rem; margin-bottom: 20px; color: var(--primary); }
.doctrina-content p { color: var(--text-secondary); margin-bottom: 20px; }
.doctrina-list { list-style: none; margin: 30px 0; }
.doctrina-list li { padding: 12px 0 12px 35px; position: relative; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.doctrina-list li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; color: var(--accent); background: rgba(217, 119, 6, 0.1); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; }
.doctrina-image { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.doctrina-image img { width: 100%; height: 400px; object-fit: cover; transition: var(--transition); }
.doctrina-image:hover img { transform: scale(1.03); }

/* Equipo */
#equipo { background: var(--bg-alt); }
.equipo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.miembro { 
  background: var(--bg-card); padding: 30px; border-radius: var(--radius); text-align: center;
  border: 1px solid var(--border); transition: var(--transition);
}
.miembro:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.miembro-img { width: 140px; height: 140px; border-radius: 50%; margin: 0 auto 20px; overflow: hidden; border: 4px solid var(--accent); background: var(--bg-alt); }
.miembro-img img { width: 100%; height: 100%; object-fit: cover; }
.miembro h3 { font-size: 1.3rem; margin-bottom: 5px; }
.miembro p { color: var(--accent); font-weight: 500; font-size: 0.9rem; }
.miembro-social { margin-top: 15px; display: flex; justify-content: center; gap: 12px; }
.miembro-social a { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; color: var(--primary); transition: var(--transition); }
.miembro-social a:hover { background: var(--accent); color: white; transform: translateY(-3px); }

/* =========================================
   SECCIÓN YOUTUBE - LAYOUT ESTILO YOUTUBE
   ========================================= */
.playlist-section { margin-bottom: 80px; padding: 40px; background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.playlist-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 2px solid var(--border); }
.playlist-title { display: flex; align-items: center; gap: 15px; }
.playlist-title i { font-size: 2rem; color: var(--accent); }
.playlist-title h3 { font-size: 1.8rem; }
.playlist-count { background: var(--accent); color: white; padding: 4px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.view-all { text-align: center; margin-top: 40px; }

/* YouTube Layout 100% Corregido */
.youtube-player-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; width: 100%; margin-top: 30px; align-items: start; }
.player-container { width: 100%; max-width: 100%; margin: 0; padding: 0; box-sizing: border-box; }
.video-wrapper { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; overflow: hidden; background-color: #000; border-radius: var(--radius); box-shadow: var(--shadow); }
.player-container iframe { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; border: none; object-fit: cover; }
.main-video-title { margin-top: 16px; font-size: 1.3rem; color: var(--primary); font-family: 'Playfair Display', serif; font-weight: 600; line-height: 1.3; }

/* Sidebar Lista de Videos */
.playlist-sidebar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; max-height: 520px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.sidebar-title { margin-bottom: 12px; font-size: 1rem; color: var(--primary); font-family: 'Outfit', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.video-scroll-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: var(--accent) var(--bg-alt); }
.video-scroll-list::-webkit-scrollbar { width: 6px; }
.video-scroll-list::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
.video-scroll-list li { display: flex; gap: 12px; padding: 10px; margin-bottom: 8px; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; border: 1px solid transparent; }
.video-scroll-list li:hover, .video-scroll-list li.active { background: var(--bg-alt); border-color: var(--accent); }
.video-scroll-list li img { width: 110px; height: 62px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: #000; }
.video-scroll-list .video-info-small { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.video-scroll-list .video-info-small h5 { font-size: 0.88rem; margin: 0 0 4px 0; color: var(--text-primary); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: 'Outfit', sans-serif; font-weight: 500; }
.video-scroll-list .video-info-small span { font-size: 0.75rem; color: var(--text-muted); }

/* Eventos */
.evento-lista { list-style: none; display: grid; gap: 20px; }
.evento-item { background: var(--bg-card); padding: 25px 30px; border-radius: var(--radius); display: flex; align-items: center; gap: 25px; border: 1px solid var(--border); transition: var(--transition); }
.evento-item:hover { border-color: var(--accent); transform: translateX(10px); box-shadow: var(--shadow); }
.evento-fecha { background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: white; padding: 15px 20px; border-radius: 12px; text-align: center; min-width: 80px; }
.evento-fecha .dia { font-size: 2rem; font-weight: 700; display: block; line-height: 1; }
.evento-fecha .mes { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; }
.evento-info h4 { font-size: 1.2rem; margin-bottom: 5px; color: var(--primary); }
.evento-info p { color: var(--text-muted); font-size: 0.95rem; }
.evento-info .hora { color: var(--accent); font-weight: 600; margin-top: 5px; }

/* Contacto */
#contacto { background: var(--bg-alt); }
.contacto-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contacto-info h3 { font-size: 2rem; margin-bottom: 20px; }
.contacto-info > p { color: var(--text-secondary); margin-bottom: 30px; }
.contact-item { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 25px; }
.contact-item i { font-size: 1.3rem; color: var(--accent); margin-top: 3px; width: 24px; }
.contact-item div strong { display: block; margin-bottom: 3px; color: var(--primary); }
.contact-item div p { color: var(--text-muted); }
.social-links { display: flex; gap: 15px; margin-top: 30px; }
.social-links a { width: 45px; height: 45px; border-radius: 50%; background: var(--bg-card); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.2rem; transition: var(--transition); border: 1px solid var(--border); }
.social-links a:hover { background: var(--accent); color: white; border-color: var(--accent); transform: translateY(-5px); }
form input, form textarea, form select { 
  width: 100%; padding: 16px 20px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 12px; 
  font-family: inherit; font-size: 1rem; background: var(--bg-card); color: var(--text-primary); transition: var(--transition);
}
form input:focus, form textarea:focus, form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1); }
form input::placeholder, form textarea::placeholder { color: var(--text-muted); }
form textarea { height: 140px; resize: vertical; }

/* WhatsApp Float */
.whatsapp-btn { 
  position: fixed; bottom: 30px; right: 30px; background: #25d366; color: white; width: 65px; height: 65px; 
  border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; 
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3); transition: var(--transition); z-index: 999; animation: pulse 2s infinite;
}
.whatsapp-btn:hover { transform: scale(1.1) rotate(10deg); box-shadow: 0 12px 35px rgba(37, 211, 102, 0.4); }

/* Footer */
footer { background: var(--primary); color: white; padding: 50px 0 30px; text-align: center; }
footer .logo { justify-content: center; margin-bottom: 20px; font-size: 2rem; color: white; }
footer .logo i { color: var(--accent-light); }
footer p { color: rgba(255,255,255,0.85); margin: 8px 0; }
footer .heart { color: #f87171; display: inline-block; animation: heartbeat 1.5s ease-in-out infinite; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 968px) {
  .nav-links { 
    position: fixed; top: 76px; left: 0; right: 0; background: white; flex-direction: column; 
    padding: 30px; gap: 20px; transform: translateY(-150%); transition: var(--transition);
    border-bottom: 2px solid var(--accent); box-shadow: var(--shadow);
  }
  .nav-links.active { transform: translateY(0); }
  .menu-toggle { display: block; }
  #inicio h1 { font-size: 2.5rem; }
  #inicio p { font-size: 1.1rem; }
  .hero-buttons { flex-direction: column; }
  .stats { flex-direction: column; gap: 20px; }
  .section-header h2 { font-size: 2rem; }
  .doctrina-wrapper, .contacto-wrapper { grid-template-columns: 1fr; }
  .evento-item { flex-direction: column; text-align: center; }
  .playlist-header { flex-direction: column; align-items: flex-start; gap: 15px; }
  
  /* YouTube Layout Responsive */
  .youtube-player-layout { grid-template-columns: 1fr; gap: 20px; }
  .playlist-sidebar { max-height: 250px; order: 2; }
  .player-container { order: 1; }
  .video-scroll-list li img { width: 90px; height: 50px; }
}

@media (max-width: 640px) {
  section { padding: 60px 0; }
  .horarios-grid, .equipo-grid { grid-template-columns: 1fr; }
  .playlist-section { padding: 25px; }
  .video-scroll-list li img { width: 80px; height: 45px; }
}
/* =========================================
   SECCIÓN REDES SOCIALES
   ========================================= */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.social-column {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.social-column:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.social-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 25px;
  text-align: center;
  position: relative;
}

.social-header.facebook {
  background: linear-gradient(135deg, #1877f2 0%, #0d5cb6 100%);
}

.social-header.instagram {
  background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-header i {
  font-size: 2.5rem;
  margin-bottom: 10px;
  display: block;
}

.social-header h3 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.25);
  color: white;
  padding: 10px 24px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.btn-social:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.social-feed {
  padding: 20px;
  min-height: 500px;
}

.feed-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: var(--text-muted);
  text-align: center;
}

.feed-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: #ef4444;
  text-align: center;
  padding: 20px;
}

.feed-error i {
  font-size: 3rem;
  margin-bottom: 15px;
}

/* Post Card */
.fb-post-card, .ig-post-card {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.fb-post-card:hover, .ig-post-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.post-media {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #000;
}

.post-media img, .post-media video {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: cover;
}

.post-caption {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.post-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
}

.post-link:hover {
  color: var(--accent);
}

.no-posts {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
}

/* Responsive */
@media (max-width: 968px) {
  .social-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .social-feed {
    min-height: 400px;
  }
  .post-media img {
    max-height: 300px;
  }
}