/* ================================
   PRENSACERO - Estilo Mundo Curioso
   ================================ */

:root {
    --teal: #00B4B4;
    --teal-dark: #009090;
    --navy: #1A1A2E;
    --orange: #FF6B35;
    --orange-light: #FF8C5A;
    --yellow: #FFD23F;
    --green: #4CAF50;
    --purple: #9C27B0;
    --red: #E53935;
    --white: #FFFFFF;
    --off-white: #F5F5F5;
    --grey: #666;
    --grey-light: #E0E0E0;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-hover: 0 6px 20px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--off-white);
    color: var(--navy);
    line-height: 1.6;
    padding-bottom: 80px;
}

/* ================================
   HEADER
   ================================ */
.header {
    background: var(--teal);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.logo-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}

/* ================================
   HERO - ARTÍCULO PRINCIPAL
   ================================ */
.hero {
    margin: 16px;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.hero img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 16px 16px;
    background: linear-gradient(transparent, rgba(26,26,46,0.95));
}

.hero-tag {
    display: inline-block;
    background: var(--yellow);
    color: var(--navy);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.hero-tag.mexico { background: var(--orange); color: var(--white); }
.hero-tag.peru { background: var(--green); color: var(--white); }
.hero-tag.science { background: var(--teal); color: var(--white); }
.hero-tag.mystery { background: var(--purple); color: var(--white); }
.hero-tag.world { background: #2196F3; color: var(--white); }
.hero-tag.animals { background: #8BC34A; color: var(--white); }

.hero-title {
    color: var(--white);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 8px;
}

.hero-excerpt {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    display: none;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.hero-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    text-decoration: none;
}

.hero-action.like {
    background: var(--orange);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
}

.hero-action:hover { color: var(--white); }

/* ================================
   SECTIONS
   ================================ */
.section {
    padding: 20px 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--navy);
}

.section-link {
    color: var(--orange);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

/* ================================
   CARRUSEL HORIZONTAL
   ================================ */
.carrusel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    margin: 0 -16px;
    padding: 0 16px 10px;
}

.carrusel::-webkit-scrollbar { display: none; }
.carrusel { scrollbar-width: none; }

/* ================================
   CARDS
   ================================ */
.card {
    flex: 0 0 200px;
    scroll-snap-align: start;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.card-body {
    padding: 12px;
}

.card-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.card-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--navy);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-excerpt {
    font-size: 11px;
    color: var(--grey);
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================================
   LIST CARDS
   ================================ */
.list-card {
    display: flex;
    gap: 12px;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.list-card:hover {
    transform: translateX(4px);
}

.list-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    flex-shrink: 0;
}

.list-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.list-card-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--navy);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-card-meta {
    font-size: 10px;
    color: var(--grey);
    margin-top: 4px;
}

/* ================================
   DATO CURIOSO (YELLOW CARD)
   ================================ */
.dato-curioso {
    background: var(--yellow);
    border-radius: var(--radius);
    padding: 16px;
    margin: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.dato-icon {
    width: 40px;
    height: 40px;
    background: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.dato-content h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 4px;
}

.dato-content p {
    font-size: 12px;
    color: var(--navy);
    line-height: 1.5;
}

/* ================================
   MAPA INTERACTIVO
   ================================ */
.mapa-card {
    background: #E3F2FD;
    border-radius: var(--radius);
    padding: 16px;
    margin: 0 16px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.mapa-icon {
    width: 40px;
    height: 40px;
    background: var(--teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    flex-shrink: 0;
}

.mapa-content h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}

.mapa-content p {
    font-size: 11px;
    color: var(--grey);
}

/* ================================
   FOOTER
   ================================ */
.footer {
    background: var(--navy);
    padding: 30px 16px;
    margin-top: 30px;
}

.footer-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-cat {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.2s;
}

.footer-cat:hover {
    background: var(--teal);
}

.footer-logo {
    text-align: center;
    margin-bottom: 16px;
}

.footer-logo h2 {
    color: var(--white);
    font-size: 20px;
    letter-spacing: 2px;
}

.footer-logo p {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

.footer-copy {
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ================================
   ARTÍCULO INDIVIDUAL
   ================================ */
.article-header {
    position: relative;
}

.article-header img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.article-header-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 16px 20px;
    background: linear-gradient(transparent, rgba(26,26,46,0.95));
}

.article-header-overlay h1 {
    color: var(--white);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.article-date {
    color: rgba(255,255,255,0.7);
    font-size: 11px;
}

.article-body {
    padding: 20px 16px;
    background: var(--white);
}

.article-body p {
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
}

.article-body h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
    margin: 24px 0 12px;
}

.article-body ul, .article-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.6;
}

.article-share {
    display: flex;
    gap: 10px;
    padding: 16px;
    background: var(--off-white);
    margin: 16px;
    border-radius: var(--radius);
}

.share-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-btn.facebook {
    background: #1877F2;
    color: var(--white);
}

.share-btn.whatsapp {
    background: #25D366;
    color: var(--white);
}

.share-btn.twitter {
    background: #1DA1F2;
    color: var(--white);
}

/* ================================
   RESPONSIVE - TABLET & DESKTOP
   ================================ */
@media (min-width: 600px) {
    .hero img { height: 350px; }
    .hero-title { font-size: 26px; }
    .hero-excerpt { display: block; font-size: 14px; }
    
    .card { flex: 0 0 240px; }
    .card img { height: 160px; }
    .card-title { font-size: 14px; }
    
    .article-header img { height: 400px; }
    .article-header-overlay h1 { font-size: 28px; }
    .article-body { max-width: 700px; margin: 0 auto; }
    .article-body p { font-size: 16px; }
}

@media (min-width: 900px) {
    .container { max-width: 1000px; margin: 0 auto; }
    .hero img { height: 400px; }
    .hero-title { font-size: 28px; }
    .card { flex: 0 0 260px; }
    
    .section-header {
        max-width: 1000px;
        margin: 0 auto 14px;
    }
    
    .carrusel {
        max-width: 1000px;
        margin: 0 auto;
        padding: 0 0 10px;
    }
    
    .article-body { max-width: 700px; }
}

/* ================================
   NAVEGACIÓN MÓVIL
   ================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--grey);
    font-size: 10px;
    gap: 4px;
    transition: color 0.2s;
}

.bottom-nav a.active {
    color: var(--orange);
}

.bottom-nav a span {
    font-size: 20px;
}

/* ================================
   MENU LATERAL
   ================================ */
.sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    z-index: 200;
    transition: right 0.3s;
    box-shadow: -4px 0 20px rgba(0,0,0,0.2);
    overflow-y: auto;
}

.sidebar.open {
    right: 0;
}

.sidebar-header {
    background: var(--teal);
    padding: 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    color: var(--white);
    font-size: 16px;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}

.sidebar-menu {
    padding: 16px;
}

.sidebar-menu a {
    display: block;
    padding: 14px 0;
    color: var(--navy);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 1px solid var(--grey-light);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}
