/* Variables y Reset */
:root {
    --bg-main: #121212;
    --bg-card: #1C1C1E;
    --accent: #FFCC00;
    --text-primary: #FFFFFF;
    --text-sec: #9E9E9E;
    --text-dark: #121212;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    padding-bottom: 70px;
}

/* Modals Reutilizables (Overlay) */
.hidden {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.location-modal {
    background-color: var(--bg-card);
    padding: 28px 24px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.location-modal h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.location-modal p {
    font-size: 14px;
    color: var(--text-sec);
    margin-bottom: 24px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--text-dark);
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid #444;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
}

/* Modales A Pantalla Completa (Full Modals) */
.full-modal {
    position: fixed;
    inset: 0;
    background-color: var(--bg-main);
    z-index: 2000; 
    display: flex;
    flex-direction: column;
}

.summary-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: var(--bg-main);
    border-bottom: 1px solid #222;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
}

.summary-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#summary-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
    background-color: var(--bg-card);
}

.summary-source {
    color: var(--accent);
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#summary-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 16px;
}

.summary-description {
    font-size: 15px;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 30px;
}

.btn-primary-large {
    background-color: var(--accent);
    color: var(--text-dark);
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 20px;
}

.btn-secondary-link {
    color: var(--text-sec);
    text-align: center;
    font-size: 13px;
    text-decoration: underline;
    display: block;
    margin-bottom: 20px;
}

/* Modificar la tarjeta original en el index.css pero mantenemos la estructura. */
/* (Añadí el cursor pointer) */
.hero-card {
    position: relative;
    width: 100%;
    padding: 20px;
    padding-bottom: 10px;
    cursor: pointer;
}

.news-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 16px;
    cursor: pointer;
}

/* Iframe In-App Viewer */
.iframe-container {
    flex: 1;
    width: 100%;
    height: 100%; /* calc doesn't naturally work right nested unless fixed height parent, this flex handles it */
    background: #ffffff; /* El medio probablemente es blanco */
}

#news-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ------------------------------------- */
/* VISTA BÚSQUEDA Y COMPONENTES          */
/* ------------------------------------- */

#vista-busqueda {
    display: flex;
    flex-direction: column;
    padding-top: 10px;
    width: 100%;
    /* Altura hasta el bottom nav que mide 70px */
    min-height: calc(100vh - 160px); 
}

.search-header {
    padding: 0 20px 10px 20px;
}

#input-busqueda {
    width: 100%;
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#input-busqueda::placeholder {
    color: var(--text-sec);
}

#input-busqueda:focus {
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.3);
}

.chips-container {
    display: flex;
    overflow-x: auto;
    padding: 0 20px 15px 20px;
    gap: 10px;
    scrollbar-width: none;
    border-bottom: 1px solid #333;
}
.chips-container::-webkit-scrollbar {
    display: none;
}

.chip {
    background-color: #2A2A2C;
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.chip:hover {
    background-color: #38383A;
}

.chip.active {
    background-color: var(--accent);
    color: var(--text-dark);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-sec);
    height: 100%;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #444;
}

.empty-state p {
    font-size: 15px;
    line-height: 1.5;
}

/* --- (Resto original inalterado para Top Bar y Navs) --- */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: var(--bg-main);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.top-bar-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-icons i {
    font-size: 24px;
    color: var(--text-primary);
}

.notification-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background-color: var(--accent);
    color: var(--text-dark);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 10px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-card);
}

.top-nav {
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.nav-list {
    display: flex;
    list-style: none;
    overflow-x: auto;
    padding: 0 20px;
    gap: 20px;
    scrollbar-width: none; 
}
.nav-list::-webkit-scrollbar { display: none; }

.nav-item {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sec);
    white-space: nowrap;
    padding-bottom: 8px;
    cursor: pointer;
    text-transform: uppercase;
}

.nav-item.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

.content-wrapper { display: flex; flex-direction: column; }

.hero-img-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
}

.hero-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(18, 18, 18, 1) 0%, rgba(18, 18, 18, 0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.hero-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
    color: #FFFFFF;
}

.hero-meta {
    font-size: 12px;
    color: var(--text-sec);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-meta .tag { color: var(--accent); font-weight: 600; }

.feed-list {
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-thumb {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.news-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

.news-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.news-meta {
    font-size: 11px;
    color: var(--text-sec);
    display: flex;
    gap: 8px;
}

.news-actions {
    display: flex;
    gap: 12px;
    color: var(--text-sec);
}
.news-actions i { font-size: 18px; }

.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: var(--bg-main);
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0 20px 0; 
    z-index: 100;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-sec);
    cursor: pointer;
}

.bottom-nav-item i { font-size: 24px; }
.bottom-nav-item span { font-size: 10px; font-weight: 600; }
.bottom-nav-item.active { color: var(--accent); }
