/* ===========================
   ESTILOS PARA DETALLE DE NOTICIA
   =========================== */

/* Variables */
:root {
    --primary: #f2d34c;
    --primary-dark: #d4b83a;
    --dark: #0d0d0f;
    --dark-light: #151517;
    --text: #eaeaea;
    --text-muted: #b9b9bd;
    --border: #2a2a2e;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --header-height: 70px;
}

/* Reset y estilos base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    background-color: var(--dark);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===========================
   HEADER RESPONSIVO
   =========================== */
header {
    background: linear-gradient(to right, #000000, #000000);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

header .logo {
    height: 45px;
    transition: transform 0.3s ease;
}

header .logo:hover {
    transform: scale(1.05);
}

/* Botón de menú hamburguesa (mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Navegación principal */
.main-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin: 0 10px;
    position: relative;
}

.main-nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 0.95rem;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: #ffcc00;
    background-color: rgba(255, 204, 0, 0.1);
}

/* ===========================
   CONTENIDO PRINCIPAL
   =========================== */
.detail-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - var(--header-height) - 200px);
}

/* Navegación superior */
.top-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 15px;
}

.regresar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.regresar-link:hover {
    color: var(--text);
    transform: translateX(-5px);
}

/* Encabezado del artículo */
.article-header {
    margin-bottom: 40px;
}

.detail-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: var(--text);
}

.meta-data {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.meta-item i {
    color: var(--primary);
}

/* Contenedor de medios */
.media-container {
    margin: 40px 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.media-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Cuerpo del contenido */
.content-body {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 50px;
}

.content-body p {
    margin-bottom: 1.5rem;
}

/* ===========================
   BOTONES DE COMPARTIR
   =========================== */

.botones-compartir {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 50px 0;
    padding: 30px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.botones-compartir .section-subtitle {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text);
    font-weight: 700;
    width: 100%;
    text-align: center;
}

.btn-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-share::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-share:hover::before {
    left: 100%;
}

.btn-share:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Facebook */
.btn-share.facebook {
    background: linear-gradient(135deg, #3b5998, #4c70ba);
    color: white;
}

.btn-share.facebook:hover {
    background: linear-gradient(135deg, #4c70ba, #3b5998);
}

/* WhatsApp */
.btn-share.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.btn-share.whatsapp:hover {
    background: linear-gradient(135deg, #128C7E, #25D366);
}

/* Telegram */
.btn-share.telegram {
    background: linear-gradient(135deg, #0088cc, #34AADF);
    color: white;
}

.btn-share.telegram:hover {
    background: linear-gradient(135deg, #34AADF, #0088cc);
}

/* Instagram */
.btn-share.instagram {
    background: linear-gradient(135deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: white;
    background-size: 300% 300%;
    animation: gradientShift 3s ease infinite;
}

.btn-share.instagram:hover {
    animation: gradientShift 1.5s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Sección de recomendadas */
.recomendadas-section {
    margin: 60px 0 40px;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--text);
    font-weight: 800;
    text-align: center;
}

.recomendadas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.recomendada-item {
    background: var(--dark-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.recomendada-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(242, 211, 76, 0.15);
    border-color: var(--primary);
}

.recomendada-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.recomendada-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.recomendada-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.recomendada-item:hover .recomendada-image img {
    transform: scale(1.05);
}

.recomendada-content {
    padding: 20px;
}

.recomendada-content h4 {
    color: var(--text);
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.recomendada-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Botón volver */
#btn-volver {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
}

#btn-volver:hover {
    background-color: var(--primary);
    color: var(--dark);
    box-shadow: 0 0 15px rgba(242, 211, 76, 0.4);
    transform: translateX(5px);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    position: relative;
    color: #ddd;
    background: #000;
    padding: 36px 0 24px;
    margin-top: 40px;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f7e755, #ecdb48);
    opacity: .7;
}

.footer-inner {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.footer-columns {
    display: flex;
    gap: 80px;
    align-items: flex-start;
}

.footer-col h3 {
    color: #fff;
    font-size: 22px;
    margin: 8px 0 12px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin: 8px 0;
}

.footer-col a {
    color: #cfd2d6;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .2s ease, border-color .2s ease;
    font-size: 14px;
}

.footer-col a:hover {
    color: #ffcc00;
    border-color: rgba(255,204,0,.4);
}

.footer-col.social {
    margin-left: auto;
}

.social-list {
    list-style: none;
    display: flex;
    gap: 14px;
    padding: 6px 0 0;
    margin: 0;
    justify-content: flex-end;
}

.social-list a {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.9);
    text-decoration: none;
    transition: transform .15s ease, border-color .2s ease, background-color .2s ease;
}

.social-list a:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,.08);
    border-color: #ffcc00;
}

.social-list svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.footer-legal {
    text-align: center;
    font-size: 13px;
    color: #b9bdc2;
    margin-top: 20px;
}

.footer-legal a {
    color: #cfd2d6;
    text-decoration: underline;
}

.footer-legal a:hover {
    color: #ffcc00;
}

.footer-legal .sep {
    margin: 0 10px;
    opacity: .6;
}

/* ===========================
   RESPONSIVE
   =========================== */

/* Tablets y pantallas medianas */
@media (max-width: 992px) {
    .footer-columns {
        gap: 40px;
    }
    
    .recomendadas-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    /* Menú hamburguesa para tablets y móviles */
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #1a1a1a;
        transition: right 0.3s ease;
        z-index: 1001;
        padding-top: 80px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 0 20px;
    }
    
    .main-nav li {
        margin: 10px 0;
    }
    
    .main-nav ul li a {
        display: block;
        padding: 15px;
        font-size: 1.1rem;
        border-radius: 8px;
    }
    
    /* Overlay para el menú móvil */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.7);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .detail-wrap {
        padding: 15px;
    }
    
    .top-navigation {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .detail-title {
        font-size: 1.8rem;
    }
    
    .meta-data {
        gap: 15px;
    }
    
    .botones-compartir {
            gap: 10px;
        margin: 30px 0;
        padding: 20px 0;
    }
    
    .botones-compartir .section-subtitle {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .btn-share {
        flex: 1 1 calc(50% - 10px);
        min-width: auto;
        padding: 14px 16px;
        font-size: 0.85rem;
    }
    
    .recomendadas-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-columns {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-col.social {
        margin-left: 0;
    }
    
    .social-list {
        justify-content: flex-start;
    }
    
    #btn-volver {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .regresar-link {
        width: 100%;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .btn-share {
        flex: 1 1 100%;
        padding: 16px 20px;
        font-size: 0.9rem;
    }
    @media (max-width: 768px) {
  header {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 9999;
      background: #000;
  }

  .detail-wrap {
      padding-top: 90px;
  }
}

}