/*
Theme Name: La Copucha App Child Theme
Theme URI: https://lacopucha.cl
Description: Tema optimizado mobile-first para alto tráfico, hijo de Hello Elementor.
Author: Gemini & CVC Team
Author URI: https://lacopucha.cl
Template: hello-elementor
Version: 1.0.0
*/

/* VARIABLES (DARK/LIGHT MODE) */
:root {
    --bg-main: #060606;
    --bg-app: linear-gradient(180deg, #09090d 0%, #060606 100%);
    --bg-card: #12131a;
    --bg-card-gradient: linear-gradient(180deg, #12131a, #0d0d11);
    --bg-nav: rgba(10,10,12,.96);
    --bg-pill: #181820;
    --text-main: #fff;
    --text-muted: #d0d0d0;
    --text-small: #8d8d96;
    --border-color: rgba(255,255,255,.05);
    --brand-color: #ff2d7a;
    --brand-gradient: linear-gradient(45deg, #ff2d7a, #ff6b81, #ff2d7a);
}

body.light-mode {
    --bg-main: #f0f0f5;
    --bg-app: #f5f5f7;
    --bg-card: #ffffff;
    --bg-card-gradient: #ffffff;
    --bg-nav: rgba(255,255,255,.96);
    --bg-pill: #ffffff;
    --text-main: #111111;
    --text-muted: #444444;
    --text-small: #666666;
    --border-color: rgba(0,0,0,.08);
}

/* RESET GENERAL */
html, body {
    margin: 0 !important; padding: 0 !important; overflow-x: hidden !important;
    background: var(--bg-main) !important; color: var(--text-main) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased; transition: background 0.3s ease, color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
body * { box-sizing: border-box; }

/* APP SHELL CONTAINER */
.cvc-app {
    position: relative; width: 100%; max-width: 430px; min-height: 100vh; margin: 0 auto;
    background: var(--bg-app); overflow: hidden; padding-bottom: 110px;
}

/* MENÚ SUPERIOR */
.cvc-top-nav { padding: 16px 16px 4px; display: block !important; position: sticky; top: 0; z-index: 9999; background: var(--bg-main); }
.cvc-top-header-row { display: flex !important; align-items: center !important; justify-content: space-between !important; margin-bottom: 16px; width: 100%; }
.cvc-top-nav-title { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; letter-spacing: -0.3px; color: var(--text-main); }
.cvc-logo-mini { font-size: 16px; font-weight: 900; letter-spacing: -0.5px; }
.cvc-logo-mini span { color: var(--brand-color); }
.cvc-top-divider { color: var(--text-small); font-weight: 400; margin: 0 2px; }
.cvc-top-subtitle { color: #ffffff; transition: color 0.3s ease; }
body.light-mode .cvc-top-subtitle { color: var(--brand-color); }

/* BOTÓN TOGGLE */
.cvc-theme-toggle {
    background: var(--bg-pill) !important; border: 1px solid var(--border-color) !important; 
    width: 36px !important; height: 36px !important; border-radius: 50% !important; 
    display: flex !important; align-items: center !important; justify-content: center !important; 
    cursor: pointer !important; outline: none !important; flex-shrink: 0 !important;
}
.cvc-theme-toggle .sun-icon { display: block !important; }
.cvc-theme-toggle .moon-icon { display: none !important; }
body.light-mode .cvc-theme-toggle .sun-icon { display: none !important; }
body.light-mode .cvc-theme-toggle .moon-icon { display: block !important; }

.cvc-top-nav-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
.cvc-top-nav-scroll::-webkit-scrollbar { display: none; }
.cvc-top-nav-scroll a {
    white-space: nowrap; padding: 8px 16px; background: var(--bg-pill); border: 1px solid var(--border-color);
    border-radius: 999px; color: var(--text-muted); font-size: 13px; font-weight: 700; text-decoration: none;
}
.cvc-top-nav-scroll a.active { background: var(--brand-color); color: #fff; border-color: var(--brand-color); }

/* STORIES SCROLL */
.cvc-stories { display: flex; gap: 14px; overflow-x: auto; padding: 10px 16px 22px; scrollbar-width: none; background: transparent; }
.cvc-stories::-webkit-scrollbar { display: none; }
.cvc-story { flex: 0 0 72px; text-decoration: none; text-align: center; color: var(--text-main); }
.cvc-story-ring { width: 72px; height: 72px; border-radius: 50%; padding: 3px; background: var(--brand-gradient); margin-bottom: 8px; }
.cvc-story-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg-main); transition: border-color 0.3s; }
.cvc-story span { 
    display: block; 
    font-size: 11px; 
    font-weight: 700; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
    color: var(--text-main);
}

/* SECCIONES Y CONTENEDORES */
.cvc-section { padding: 0 16px 30px; }
.cvc-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cvc-section-head h3 { font-size: 16px; font-weight: 900; text-transform: uppercase; margin: 0; }
.cvc-news-box { background: var(--bg-card-gradient); border: 1px solid var(--border-color); border-radius: 24px; padding: 18px; box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
.cvc-news-list { display: flex; flex-direction: column; gap: 18px; }

/* TARJETA DE NOTICIA INDIVIDUAL */
.cvc-news-item { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--text-main); transition: opacity 0.2s ease; }
.cvc-news-item:active { opacity: 0.6; }
.cvc-news-thumb { width: 110px; height: 84px; border-radius: 16px; overflow: hidden; flex-shrink: 0; background: var(--bg-pill); }
.cvc-news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cvc-news-content { flex: 1; }
.cvc-news-content h4 { font-size: 14px; line-height: 1.28; font-weight: 700; margin: 0 0 6px 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cvc-news-content small { color: var(--text-small); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }

/* DESTACADOS SLIDER */
.cvc-featured-wrapper { display: flex; gap: 16px; overflow-x: auto; padding: 0 16px 16px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.cvc-featured-wrapper::-webkit-scrollbar { display: none; }
.cvc-featured { position: relative; flex: 0 0 100%; height: 370px; border-radius: 26px; overflow: hidden; background: #111; scroll-snap-align: center; }
.cvc-featured img { width: 100%; height: 100%; object-fit: cover; }
.cvc-featured-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.96), rgba(0,0,0,.1)); }
.cvc-featured-content { position: absolute; left: 20px; right: 20px; bottom: 20px; z-index: 2; }
.cvc-badge { display: inline-flex; padding: 8px 14px; border-radius: 999px; background: var(--brand-color); font-size: 11px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.cvc-featured-title { font-size: 18px; font-weight: 900; color: #fff !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* TENDENCIAS CARDS */
.cvc-trending-scroll { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.cvc-trending-scroll::-webkit-scrollbar { display: none; }
.cvc-trending-card { position: relative; flex: 0 0 180px; height: 220px; border-radius: 22px; overflow: hidden; text-decoration: none; }
.cvc-trending-card img { width: 100%; height: 100%; object-fit: cover; }
.cvc-trending-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.96), rgba(0,0,0,.15)); }
.cvc-trending-content { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 2; }
.cvc-trending-badge { background: var(--brand-color); padding: 4px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; color: #fff; display: inline-block; margin-bottom: 8px; }
.cvc-trending-number { display: block; font-size: 40px; font-weight: 900; color: var(--brand-color); line-height: 1; margin-bottom: 8px; }
.cvc-trending-title { font-size: 14px; font-weight: 800; color: #fff !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* EXPLORA POR TEMAS */
.cvc-explore-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 10px; }
.cvc-explore-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text-main); gap: 8px; transition: opacity 0.2s; }
.cvc-explore-item:active { opacity: 0.6; }
.cvc-explore-icon { width: 60px; height: 60px; background: var(--bg-pill); border-radius: 18px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-color); box-shadow: 0 4px 10px rgba(0,0,0,.02); }
.cvc-explore-icon svg { width: 22px; height: 22px; fill: var(--brand-color); }
.cvc-explore-item span { font-size: 11px; font-weight: 600; text-align: center; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 100%; }

/* PÁGINA SINGLE */
.cvc-single-article { padding: 0 0 30px; background: var(--bg-card); margin: auto; border-radius: 10px; }
.cvc-single-header { padding: 20px 16px; }
.cvc-single-category { color: var(--brand-color); font-size: 13px; font-weight: 800; text-transform: uppercase; margin-bottom: 8px; display: block; }
.cvc-single-title { font-size: 24px; font-weight: 900; line-height: 1.25; margin: 0 0 12px 0; color: var(--text-main); }
.cvc-single-meta { font-size: 12px; color: var(--text-small); display: flex; align-items: center; gap: 8px; font-weight: 600; }
.cvc-single-thumb { width: 100%; margin-bottom: 24px; background: var(--bg-pill); }
.cvc-single-thumb img { width: 96%; height: auto; display: block; margin: auto; border-radius: 10px; }
.cvc-single-content { padding: 0 16px; font-size: 16px; line-height: 1.7; color: var(--text-muted); }
.cvc-single-content p { margin-bottom: 20px; }
.cvc-single-content h2, .cvc-single-content h3 { color: var(--text-main); font-weight: 800; margin: 30px 0 15px; }
.cvc-single-content img { max-width: 100%; height: auto; border-radius: 16px; margin: 10px 0; }
.cvc-single-content a { color: var(--brand-color); text-decoration: none; font-weight: 600; }
.cvc-single-divider { height: 1px; background: var(--border-color); margin: 30px 16px; }

/* NAVIGATION INFERIOR */
.cvc-bottom-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px;
    height: 78px; background: var(--bg-nav); backdrop-filter: blur(20px); border-top: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-around; z-index: 999999; padding-bottom: env(safe-area-inset-bottom);
}
.cvc-bottom-nav a, .cvc-bottom-nav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    text-decoration: none; background: none; border: none; color: var(--text-small); cursor: pointer; padding: 0;
}
.cvc-bottom-nav a.active, .cvc-bottom-nav button.active { color: var(--brand-color); }
.cvc-bottom-nav svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }

/* MENÚ BUSCADOR FLOTANTE */
.cvc-search-bar-container {
    position: fixed; bottom: 85px; left: 50%; transform: translateX(-50%) translateY(20px); width: calc(100% - 32px); max-width: 400px;
    background: var(--bg-pill); border: 1px solid var(--border-color); border-radius: 20px; padding: 12px;
    display: flex; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 999998; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.cvc-search-bar-container.active { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.cvc-search-bar-container form { display: flex; width: 100%; gap: 8px; margin: 0; }
.cvc-search-bar-container input { flex: 1; background: var(--bg-main); border: 1px solid var(--border-color); color: var(--text-main); padding: 12px 16px; border-radius: 12px; font-size: 14px; outline: none; }
.cvc-search-bar-container button { background: var(--brand-color); color: #fff; border: none; padding: 0 20px; border-radius: 12px; font-weight: 800; }
body.light-mode .cvc-search-bar-container { box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

/* LIMPIEZA DE LA LECTURA DE LA NOTICIA (SINGLE) */
.cvc-post-body { font-family: inherit; font-size: 16px; line-height: 1.6; color: var(--text-muted); }
.cvc-post-body p, .cvc-post-body span, .cvc-post-body div, .cvc-post-body h1, .cvc-post-body h2, .cvc-post-body h3 { font-family: inherit !important; color: inherit !important; background-color: transparent !important; }
.cvc-post-body a { color: var(--brand-color); text-decoration: underline; }
.site-main { padding-inline-end: 0px !important; padding-inline-start: 0px !important; }

/* ==========================================================================
   ESTILOS DEL PERFIL DE USUARIO (ULTIMATE MEMBER) - AHORA DINÁMICOS
   ========================================================================== */

/* Fondo general del perfil para que se funda con el sitio */
.um-profile.um {
    background: transparent !important;
}

/* Ocultar el título gigante repetido arriba de la portada */
.um-profile .um-header h1 { 
    display: none !important; 
}

/* Bordes redondeados para la Foto de Portada (Cover) */
.um-profile .um-cover, 
.um-profile .um-cover-overlay {
    border-radius: 16px 16px 0 0 !important;
}

/* Foto de Perfil (Avatar) con brillo neón */
.um-profile .um-profile-photo a.um-profile-photo-img {
    border: 4px solid var(--bg-main) !important; /* Ahora reacciona al modo claro */
    box-shadow: 0 0 15px rgba(255, 42, 109, 0.4) !important;
}

/* La barra de navegación (pestañas de la foto) */
.um-profile .um-profile-nav {
    background: var(--bg-pill) !important; /* Ahora reacciona al modo claro */
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    margin-bottom: 20px !important;
}

/* Los íconos y texto de las pestañas inactivas */
.um-profile .um-profile-nav-item a {
    color: var(--text-muted) !important; /* Ahora reacciona al modo claro */
    font-weight: 600 !important;
}

/* Pestaña Activa con tu color Neón */
.um-profile .um-profile-nav-item.active a {
    color: #ffffff !important;
    background: var(--brand-color) !important; 
    border-radius: 8px !important;
}

.um-profile .um-profile-nav-item.active a i {
    color: #ffffff !important;
}

/* Fondo del contenido (donde sale la carita triste y los guardados) */
.um-profile .um-profile-body {
    background: var(--bg-card) !important; /* Ahora reacciona al modo claro */
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    padding: 20px !important;
    color: var(--text-main) !important; /* Ahora reacciona al modo claro */
}

/* Color de los textos dentro del perfil */
.um-profile .um-profile-body .um-empty,
.um-profile .um-profile-body p {
    color: var(--text-muted) !important; /* Ahora reacciona al modo claro */
}

/* ==========================================================================
   ESTILOS PARA RECUPERAR CONTRASEÑA (AHORA DINÁMICOS)
   ========================================================================== */

/* Contenedor principal limpio */
.um-password {
    background: transparent !important;
}

/* Texto descriptivo gris elegante ("Para restablecer tu contraseña...") */
.um-password p {
    color: var(--text-muted) !important; /* Ahora reacciona al modo claro */
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
}

/* Caja de texto (Input) */
.um-password input[type="text"],
.um-password input[type="email"] {
    background-color: var(--bg-pill) !important; /* Ahora reacciona al modo claro */
    border: 1px solid var(--border-color) !important; 
    color: var(--text-main) !important; /* Ahora reacciona al modo claro */
    border-radius: 8px !important;
    padding: 14px 15px !important;
    box-shadow: none !important;
    transition: all 0.3s ease !important;
    width: 100% !important; 
}

/* Efecto Neón al hacer clic en la caja de texto */
.um-password input[type="text"]:focus,
.um-password input[type="email"]:focus {
    border-color: var(--brand-color) !important;
    box-shadow: 0 0 10px rgba(255, 42, 109, 0.2) !important;
    outline: none !important;
}

/* Transformar el botón azul genérico en el Botón Principal Neón */
.um-password .um-button,
.um-password input[type="submit"] {
    background: var(--brand-color) !important; 
    color: #ffffff !important;
    border-radius: 25px !important; 
    padding: 14px 20px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    letter-spacing: 1px !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 42, 109, 0.4) !important;
    transition: all 0.3s ease !important;
    width: 100% !important; 
    margin-top: 15px !important;
}

/* Efecto hover del botón */
.um-password .um-button:hover,
.um-password input[type="submit"]:hover {
    background: #ff0055 !important;
    box-shadow: 0 6px 20px rgba(255, 42, 109, 0.6) !important;
    transform: translateY(-2px) !important;
}