/* ============================================================
   Informate Paraguay - Estilos principales v1.0
   ============================================================ */

:root {
    --ip-dark: #1a1a2e;
    --ip-navy: #16213e;
    --ip-blue: #0f3460;
    --ip-accent: #e94560;
    --ip-gold: #f5a623;
    --ip-light: #f8f9fa;
    --ip-border: #e2e8f0;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

/* ====== RESET / BASE ====== */
* { box-sizing: border-box; }
body {
    font-family: var(--font-body);
    background: var(--ip-light);
    color: #2d3748;
    font-size: 15px;
    line-height: 1.6;
}
a { color: var(--ip-blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ip-accent); }
img { max-width: 100%; height: auto; }

/* ====== TICKER FLASH ====== */
.flash-ticker {
    background: var(--ip-accent);
    padding: 6px 0;
    overflow: hidden;
    white-space: nowrap;
}
.flash-badge {
    background: #fff;
    color: var(--ip-accent);
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: .8rem;
    margin-right: 12px;
    flex-shrink: 0;
    animation: pulse 1.5s infinite;
}
@keyframes pulse { 50% { opacity: .7; } }
.ticker-wrap {
    overflow: hidden;
    flex: 1;
}
.ticker-content {
    display: inline-flex;
    animation: ticker 40s linear infinite;
    gap: 40px;
}
.ticker-content:hover { animation-play-state: paused; }
.ticker-item {
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
}
.ticker-item:hover { color: #ffd; }
@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ====== HEADER ====== */
.header-top { background: var(--ip-dark); font-size: .82rem; }
.site-header { z-index: 1050; }
.main-nav { background: var(--ip-navy); padding: 0; }
.navbar-brand {
    display: flex;
    flex-direction: column;
    line-height: 1;
    padding: 8px 0;
}
.brand-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.6rem;
    color: #fff;
    letter-spacing: 2px;
}
.brand-sub {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: .7rem;
    color: var(--ip-gold);
    letter-spacing: 4px;
    text-transform: uppercase;
}
.main-nav .nav-link {
    font-family: var(--font-heading);
    font-size: .85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 14px 10px !important;
    color: rgba(255,255,255,.8);
    transition: color .2s, border-bottom .2s;
    border-bottom: 3px solid transparent;
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: #fff;
    border-bottom-color: var(--ip-gold);
}
.main-nav .input-group { max-width: 220px; }
.mobile-user-bar { background: var(--ip-blue); }

/* ====== MAIN CONTENT ====== */
.site-main { min-height: 60vh; padding: 20px 0; }

/* ====== NEWS CARDS ====== */
.news-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.news-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}
.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-cat {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--ip-accent);
    color: #fff;
    font-family: var(--font-heading);
    font-size: .7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.news-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.news-card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--ip-dark);
}
.news-card-title a { color: inherit; }
.news-card-title a:hover { color: var(--ip-accent); }
.news-card-summary {
    font-size: .88rem;
    color: #555;
    flex: 1;
    margin-bottom: 12px;
}
.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .78rem;
    color: #999;
    border-top: 1px solid var(--ip-border);
    padding-top: 10px;
    margin-top: auto;
}
.news-card-source {
    font-weight: 600;
    color: var(--ip-blue);
}
.news-card-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}
.btn-like, .btn-share {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: .85rem;
    padding: 0;
    transition: color .2s;
}
.btn-like:hover, .btn-like.liked { color: var(--ip-accent); }
.btn-share:hover { color: var(--ip-blue); }

/* Destacada grande */
.news-featured {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
}
.news-featured img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.news-featured-overlay {
    position: relative;
    z-index: 2;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
    padding: 30px 24px 24px;
    width: 100%;
}
.news-featured .news-card-cat { top: auto; left: auto; position: relative; display: inline-block; margin-bottom: 8px; }
.news-featured-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 6px;
}
.news-featured-title a { color: #fff; }
.news-featured-summary { color: rgba(255,255,255,.8); font-size: .9rem; }
.news-featured-meta { color: rgba(255,255,255,.5); font-size: .8rem; }

/* Publinota badge */
.publinota-badge {
    background: var(--ip-gold);
    color: var(--ip-dark);
    font-family: var(--font-heading);
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}

/* ====== SIDEBAR ====== */
.sidebar-section {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.sidebar-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ip-dark);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--ip-accent);
}

/* ====== RANKING ====== */
.ranking-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--ip-border);
}
.ranking-item:last-child { border-bottom: 0; }
.ranking-pos {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    width: 30px;
    color: var(--ip-blue);
    flex-shrink: 0;
}
.ranking-item:nth-child(1) .ranking-pos { color: #ffd700; }
.ranking-item:nth-child(2) .ranking-pos { color: #c0c0c0; }
.ranking-item:nth-child(3) .ranking-pos { color: #cd7f32; }
.ranking-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    flex-shrink: 0;
}
.ranking-name {
    font-size: .88rem;
    font-weight: 600;
    flex: 1;
}
.ranking-points {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--ip-accent);
    font-size: .9rem;
}

/* ====== WINNER SECTION ====== */
.winner-card {
    background: linear-gradient(135deg, var(--ip-navy), var(--ip-blue));
    border-radius: 12px;
    padding: 30px;
    color: #fff;
    text-align: center;
}
.winner-card h3 {
    font-family: var(--font-heading);
    color: var(--ip-gold);
}
.winner-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--ip-gold);
    margin: 15px auto;
}

/* ====== CTA REGISTER ====== */
.cta-register {
    background: linear-gradient(135deg, var(--ip-accent), #d63384);
    border-radius: 12px;
    padding: 30px;
    color: #fff;
    text-align: center;
}
.cta-register h4 { font-family: var(--font-heading); }

/* ====== SECTION TITLES ====== */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ip-dark);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--ip-accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-title a {
    font-size: .75rem;
    font-weight: 400;
    color: var(--ip-blue);
    text-transform: none;
}

/* ====== BANNER SPACES ====== */
.banner-space {
    text-align: center;
    margin: 15px 0;
    overflow: hidden;
}
.banner-space img {
    border-radius: 10px;
    max-width: 100%;
    height: auto;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* ====== FOOTER ====== */
.site-footer {
    background: var(--ip-dark);
    color: #fff;
    margin-top: 40px;
}
.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
}
.footer-brand span { color: var(--ip-gold); }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: rgba(255,255,255,.6); font-size: .85rem; }
.footer-links a:hover { color: var(--ip-gold); }
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #fff;
    margin-right: 8px;
    transition: background .2s;
}
.social-links a:hover { background: var(--ip-accent); color: #fff; }

/* ====== PROFILE PAGE ====== */
.profile-header {
    background: linear-gradient(135deg, var(--ip-navy), var(--ip-blue));
    border-radius: 12px;
    padding: 30px;
    color: #fff;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--ip-gold);
}
.stat-box {
    background: rgba(255,255,255,.1);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ip-gold);
}

/* ====== DETAIL PAGE ====== */
.news-detail-header {
    margin-bottom: 20px;
}
.news-detail-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ip-dark);
}
.news-detail-img {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}
.news-detail-summary {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
}
.btn-read-original {
    background: var(--ip-accent);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .5px;
    transition: background .2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-read-original:hover { background: #d63451; color: #fff; }

/* ====== UTILITIES ====== */
.btn-ip {
    background: var(--ip-accent);
    color: #fff;
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: .5px;
}
.btn-ip:hover { background: #d63451; color: #fff; }
.text-accent { color: var(--ip-accent) !important; }
.text-gold { color: var(--ip-gold) !important; }
.bg-navy { background: var(--ip-navy) !important; }

/* ====== RESPONSIVE ====== */
@media (max-width: 767px) {
    .news-featured { min-height: 260px; }
    .news-featured-title { font-size: 1.2rem; }
    .main-nav .nav-link { padding: 10px 8px !important; font-size: .8rem; }
    .section-title { font-size: 1.1rem; }
    .news-card-title { font-size: 1rem; }
}

/* ====== ADMIN STYLES ====== */
.admin-sidebar {
    background: var(--ip-dark);
    min-height: 100vh;
    width: 250px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1040;
    transition: transform .3s;
    overflow-y: auto;
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,.7);
    padding: 10px 20px;
    font-size: .88rem;
    border-left: 3px solid transparent;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.05);
    border-left-color: var(--ip-accent);
}
.admin-sidebar .nav-link i { width: 24px; }
.admin-content { margin-left: 250px; padding: 20px; min-height: 100vh; }
.admin-topbar {
    background: #fff;
    padding: 12px 20px;
    margin: -20px -20px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    border-left: 4px solid var(--ip-accent);
}
.stat-card-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ip-dark);
}
.stat-card-label { color: #999; font-size: .85rem; }

@media (max-width: 991px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-content { margin-left: 0; }
}
