/* ============================================
   RUGIR FINAL - PRODUCTION CSS
   Clean & Professional
   ============================================ */

/* ============================================
   01. VARIABLES
   ============================================ */
:root {
    /* Colores por categoría - SÓLIDOS */
    --color-politica: #E30613;
    --color-economia: #0047AB;
    --color-tecnologia: #7C3AED;
    --color-cultura: #F59E0B;
    --color-deportes: #10B981;

    /* Base colors */
    --color-black: #1A1A1A;
    --color-gray-dark: #4A4A4A;
    --color-gray-medium: #6B6B6B;
    --color-gray-light: #E5E5E5;
    --color-gray-lightest: #F8F8F8;
    --color-white: #FFFFFF;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing & Effects */
    --transition: 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);

    --color-red: #E30613;
    --color-blue: #0047AB;
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/* ============================================
   02. RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400;
    color: var(--color-black);
    line-height: 1.6;
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   03. HEADER
   ============================================ */
.header-clean {
    padding: 2rem 0;
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-gray-light);
}

.logo-img {
    width: 300px;
    height: auto;
    display: block;
}

.header-datetime {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
}

.datetime-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-gray-medium);
    letter-spacing: 0.3px;
}

/* ============================================
   04. NEWS SECTION
   ============================================ */
.news-section {
    padding: 4rem 0 6rem;
    background-color: var(--color-white);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-gray-dark);
    margin-bottom: 3rem;
    letter-spacing: -0.3px;
}

/* ============================================
   05. NEWS CARDS
   ============================================ */
.news-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-light);
    border-radius: 8px;
    padding: 1.75rem;
    height: 100%;
    min-height: 280px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-gray-medium);
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.news-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    color: var(--color-white);
}

.news-badge.politica {
    background-color: var(--color-politica);
}

.news-badge.economia {
    background-color: var(--color-economia);
}

.news-badge.tecnologia {
    background-color: var(--color-tecnologia);
}

.news-badge.cultura {
    background-color: var(--color-cultura);
}

.news-badge.deportes {
    background-color: var(--color-deportes);
}

.news-date {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-gray-medium);
}

.news-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-black);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-gray-dark);
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* ============================================
   06. FOOTER
   ============================================ */
.footer-simple {
    padding: 3rem 0;
    background-color: var(--color-gray-lightest);
    border-top: 1px solid var(--color-gray-light);
}

.footer-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-gray-dark);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-link:hover {
    color: var(--color-black);
    text-decoration: underline;
}

/* ============================================
   07. MODALS
   ============================================ */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid var(--color-gray-light);
    padding: 1.5rem 2rem;
    background-color: var(--color-white);
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-black);
    line-height: 1.3;
}

.modal-header .btn-close {
    opacity: 0.5;
    transition: opacity var(--transition);
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 2rem;
}

.modal-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    color: var(--color-white);
    display: inline-block;
    margin-bottom: 0.75rem;
}

.modal-badge.politica {
    background-color: var(--color-politica);
}

.modal-badge.economia {
    background-color: var(--color-economia);
}

.modal-badge.tecnologia {
    background-color: var(--color-tecnologia);
}

.modal-badge.cultura {
    background-color: var(--color-cultura);
}

.modal-badge.deportes {
    background-color: var(--color-deportes);
}

.modal-date {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-gray-medium);
    display: block;
    margin-bottom: 1.5rem;
}

.modal-body .modal-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-black);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.modal-content-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-gray-dark);
    margin-bottom: 1.5rem;
}

.modal-content-text p:last-child {
    margin-bottom: 0;
}

.about-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-gray-dark);
    margin-bottom: 1.5rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
}

/* ============================================
   08. RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 767px) {
    .header-clean {
        padding: 1.5rem 0;
    }

    .logo-img {
        /* max-width: 140px; */
        margin: 0 auto;
        display: block;
    }

    .header-datetime {
        justify-content: center;
        margin-top: 0.75rem;
    }

    .datetime-text {
        font-size: 0.85rem;
    }

    .news-section {
        padding: 3rem 0 4rem;
    }

    .section-title {
        font-size: 1.25rem;
        margin-bottom: 2rem;
    }

    .news-card {
        min-height: 260px;
        padding: 1.5rem;
    }

    .news-title {
        font-size: 1.05rem;
    }

    .news-description {
        font-size: 0.9rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-body .modal-title {
        font-size: 1.5rem;
    }

    .modal-content-text p,
    .about-content p {
        font-size: 1rem;
    }
}

/* ============================================
   09. RESPONSIVE - TABLET
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    .news-card {
        min-height: 300px;
    }
}

/* ============================================
   10. RESPONSIVE - DESKTOP
   ============================================ */
@media (min-width: 992px) {
    .header-clean {
        padding: 2.5rem 0;
    }

    /* .logo-img {
        max-width: 200px;
    } */

    .news-card {
        min-height: 320px;
    }

    .modal-body {
        padding: 2.5rem;
    }
}

/* ============================================
   11. UTILITIES
   ============================================ */
::selection {
    background-color: var(--color-politica);
    color: var(--color-white);
}

::-moz-selection {
    background-color: var(--color-politica);
    color: var(--color-white);
}

html {
    scroll-behavior: smooth;
}

.btn:focus,
.btn:active {
    outline: none;
    box-shadow: none;
}

/* Accesibilidad */
.news-card:focus-visible {
    outline: 2px solid var(--color-politica);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   RUGIR FINAL - RESPONSIVE MOBILE COMPLETO
   Breakpoints: 320px, 375px, 425px, 576px, 768px
   ============================================ */

/* ============================================
   MOBILE ULTRA SMALL (320px - 374px)
   iPhone SE, Galaxy Fold, dispositivos antiguos
   ============================================ */
@media (max-width: 374px) {
    /* Header */
    .header-clean {
        padding: 1.25rem 0;
    }

    .header-clean .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }

    .header-clean .row > [class*="col-"]:first-child {
        margin-bottom: 0.75rem;
    }

    .logo-img {
        max-width: 220px;
        margin: 0 auto;
        display: block;
    }

    .header-datetime {
        justify-content: center;
        margin-top: 0;
    }

    .datetime-text {
        font-size: 0.75rem;
    }

    /* News Section */
    .news-section {
        padding: 2rem 0 3rem;
    }

    .section-title {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .news-card {
        min-height: 240px;
        padding: 1.25rem;
    }

    .news-card-header {
        margin-bottom: 1rem;
        gap: 0.5rem;
    }

    .news-badge {
        font-size: 0.65rem;
        padding: 0.35rem 0.75rem;
        letter-spacing: 0.5px;
    }

    .news-date {
        font-size: 0.75rem;
    }

    .news-title {
        font-size: 0.95rem;
        margin-bottom: 0.65rem;
    }

    .news-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    /* Footer */
    .footer-simple {
        padding: 2rem 0;
    }

    .footer-link {
        font-size: 0.85rem;
    }

    /* Modals */
    .modal-body {
        padding: 1.25rem;
    }

    .modal-badge {
        font-size: 0.65rem;
        padding: 0.35rem 0.75rem;
    }

    .modal-date {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .modal-body .modal-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .modal-content-text p,
    .about-content p {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 1.25rem;
    }
}

/* ============================================
   MOBILE SMALL (375px - 424px)
   iPhone 12/13 Mini, iPhone SE 2/3, Galaxy S8
   ============================================ */
@media (min-width: 375px) and (max-width: 424px) {
    /* Header */
    .header-clean {
        padding: 1.5rem 0;
    }

    .header-clean .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }

    .header-clean .row > [class*="col-"]:first-child {
        margin-bottom: 0.75rem;
    }

    .logo-img {
        max-width: 250px;
        margin: 0 auto;
        display: block;
    }

    .header-datetime {
        justify-content: center;
        margin-top: 0;
    }

    .datetime-text {
        font-size: 0.8rem;
    }

    /* News Section */
    .news-section {
        padding: 2.5rem 0 3.5rem;
    }

    .section-title {
        font-size: 1.15rem;
        margin-bottom: 1.75rem;
    }

    .news-card {
        min-height: 250px;
        padding: 1.35rem;
    }

    .news-badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.8rem;
    }

    .news-date {
        font-size: 0.8rem;
    }

    .news-title {
        font-size: 1rem;
    }

    .news-description {
        font-size: 0.88rem;
    }

    /* Footer */
    .footer-simple {
        padding: 2.25rem 0;
    }

    .footer-link {
        font-size: 0.9rem;
    }

    /* Modals */
    .modal-body {
        padding: 1.35rem;
    }

    .modal-body .modal-title {
        font-size: 1.35rem;
    }

    .modal-content-text p,
    .about-content p {
        font-size: 0.95rem;
    }
}

/* ============================================
   MOBILE MEDIUM (425px - 575px)
   iPhone 12/13/14, Pixel 5, Galaxy S20
   ============================================ */
@media (min-width: 425px) and (max-width: 575px) {
    /* Header */
    .header-clean {
        padding: 1.5rem 0;
    }

    .header-clean .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }

    .header-clean .row > [class*="col-"]:first-child {
        margin-bottom: 0.75rem;
    }

    .logo-img {
        max-width: 250px;
        margin: 0 auto;
        display: block;
    }

    .header-datetime {
        justify-content: center;
        margin-top: 0;
    }

    .datetime-text {
        font-size: 0.85rem;
    }

    /* News Section */
    .news-section {
        padding: 3rem 0 4rem;
    }

    .section-title {
        font-size: 1.25rem;
        margin-bottom: 2rem;
    }

    .news-card {
        min-height: 260px;
        padding: 1.5rem;
    }

    .news-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.9rem;
    }

    .news-date {
        font-size: 0.85rem;
    }

    .news-title {
        font-size: 1.05rem;
    }

    .news-description {
        font-size: 0.9rem;
    }

    /* Footer */
    .footer-simple {
        padding: 2.5rem 0;
    }

    .footer-link {
        font-size: 0.95rem;
    }

    /* Modals */
    .modal-body {
        padding: 1.5rem;
    }

    .modal-body .modal-title {
        font-size: 1.5rem;
    }

    .modal-content-text p,
    .about-content p {
        font-size: 1rem;
    }
}

/* ============================================
   MOBILE LARGE / PHABLET (576px - 767px)
   iPhone Plus/Pro Max, Pixel XL, Galaxy Note
   ============================================ */
@media (min-width: 576px) and (max-width: 767px) {
    /* Header */
    .header-clean {
        padding: 1.75rem 0;
    }

    .header-clean .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }

    .header-clean .row > [class*="col-"]:first-child {
        margin-bottom: 0.75rem;
    }

    .logo-img {
        max-width: 270px;
        margin: 0 auto;
        display: block;
    }

    .header-datetime {
        justify-content: center;
        margin-top: 0;
    }

    .datetime-text {
        font-size: 0.9rem;
    }

    /* News Section */
    .news-section {
        padding: 3.5rem 0 4.5rem;
    }

    .section-title {
        font-size: 1.35rem;
        margin-bottom: 2.25rem;
    }

    .news-card {
        min-height: 270px;
        padding: 1.65rem;
    }

    .news-badge {
        font-size: 0.75rem;
    }

    .news-date {
        font-size: 0.85rem;
    }

    .news-title {
        font-size: 1.1rem;
    }

    .news-description {
        font-size: 0.95rem;
    }

    /* Footer */
    .footer-simple {
        padding: 2.75rem 0;
    }

    /* Modals */
    .modal-body {
        padding: 1.75rem;
    }

    .modal-body .modal-title {
        font-size: 1.65rem;
    }

    .modal-content-text p,
    .about-content p {
        font-size: 1.05rem;
    }
}

/* ============================================
   TABLET PORTRAIT (768px - 991px)
   iPad, Galaxy Tab, Surface
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    /* Header vuelve a layout horizontal */
    .header-clean .row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .header-clean .row > [class*="col-"]:first-child {
        text-align: left;
        margin-bottom: 0;
    }

    .header-clean .row > [class*="col-"]:last-child {
        text-align: right;
    }

    .logo-img {
        max-width: 290px;
        margin: 0;
        display: block;
    }

    .header-datetime {
        justify-content: flex-end;
    }

    .datetime-text {
        font-size: 0.9rem;
    }

    /* News Section */
    .news-section {
        padding: 4rem 0 5rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .news-card {
        min-height: 300px;
        padding: 1.75rem;
    }

    .news-title {
        font-size: 1.15rem;
    }

    .news-description {
        font-size: 0.95rem;
    }

    /* Modals */
    .modal-body {
        padding: 2rem;
    }

    .modal-body .modal-title {
        font-size: 1.85rem;
    }

    .modal-content-text p,
    .about-content p {
        font-size: 1.05rem;
    }
}

/* ============================================
   DESKTOP (992px+)
   Mantiene estilos originales del CSS base
   ============================================ */
@media (min-width: 992px) {
    /* El CSS base ya tiene los estilos correctos */
    /* No necesitamos sobrescribir nada aquí */
}

/* ============================================
   LANDSCAPE MODE (orientación horizontal)
   Para cuando smartphones están en horizontal
   ============================================ */
@media (max-width: 767px) and (orientation: landscape) {
    .header-clean {
        padding: 1rem 0;
    }

    .header-clean .row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
        text-align: left;
    }

    .header-clean .row > [class*="col-"]:first-child {
        margin-bottom: 0;
    }

    .header-clean .row > [class*="col-"]:last-child {
        text-align: right;
    }

    .logo-img {
        margin: 0;
    }

    .header-datetime {
        justify-content: flex-end;
    }

    .news-section {
        padding: 2.5rem 0 3.5rem;
    }

    .section-title {
        font-size: 1.15rem;
        margin-bottom: 1.75rem;
    }

    .news-card {
        min-height: 220px;
        padding: 1.25rem;
    }

    .news-title {
        font-size: 0.95rem;
    }

    .news-description {
        font-size: 0.85rem;
    }
}

/* ============================================
   AJUSTES PARA PANTALLAS MUY ALTAS
   Evita que cards se vean perdidas
   ============================================ */
@media (min-height: 900px) and (max-width: 767px) {
    .news-section {
        padding: 4rem 0 5rem;
    }

    .news-card {
        min-height: 280px;
    }
}

/* ============================================
   AJUSTES PARA NOTCH / SAFE AREA
   iPhone X y superiores
   ============================================ */
@supports (padding: max(0px)) {
    .header-clean {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .footer-simple {
        padding-bottom: max(3rem, env(safe-area-inset-bottom));
    }
}

/* ============================================
   TOUCH TARGETS (Accesibilidad Mobile)
   Mínimo 44x44px según WCAG
   ============================================ */
@media (max-width: 767px) {
    .news-card {
        min-height: 280px; /* Asegura área táctil suficiente */
    }

    .footer-link {
        display: inline-block;
        padding: 0.75rem 1rem;
        min-height: 44px;
        line-height: 1.5;
    }

    .btn-close {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ============================================
   SCROLL BEHAVIOR MOBILE
   ============================================ */
@media (max-width: 767px) {
    html {
        -webkit-overflow-scrolling: touch;
    }

    body {
        overflow-x: hidden;
    }
}


/* ============================================
   03. ABOUT MAGAZINE
   ============================================ */
/* Sección principal */
.about-magazine {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
    background-color: var(--color-gray-light);
}

/* Fondo decorativo diagonal */
.about-magazine-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-red) 0%, var(--color-blue) 100%);
    opacity: 0.1;
    clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
}

/* Card flotante con contenido */
.about-floating-card {
    background-color: var(--color-white);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border-radius: 16px;
    border-left: 5px solid var(--color-red);
    position: relative;
}

/* Etiqueta superior "QUIÉNES SOMOS" */
.about-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-red);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

/* Título principal */
.about-headline {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-black);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

/* Texto con gradiente ("Ruge") */
.text-highlight {
    background: linear-gradient(135deg, var(--color-red) 0%, var(--color-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Línea y texto "Desde 2025" */
.about-byline {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.about-line {
    width: 40px;
    height: 3px;
    background-color: var(--color-red);
}

.about-byline span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-gray-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contenido de texto */
.about-body p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-gray-dark);
    margin-bottom: 1.25rem;
}

.about-body strong {
    font-weight: 700;
    color: var(--color-black);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (min-width: 768px) {
    .about-magazine {
        padding: 8rem 0;
    }

    .about-headline {
        font-size: 3rem;
    }

    .about-floating-card {
        padding: 3.5rem;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .about-magazine {
        padding: 10rem 0;
    }

    .about-floating-card {
        padding: 4rem;
    }
}

/* Mobile (opcional, si necesitas ajustes) */
@media (max-width: 767px) {
    .about-magazine {
        padding: 4rem 0;
    }

    .about-headline {
        font-size: 2rem;
    }

    .about-floating-card {
        padding: 2rem;
    }

    .about-magazine-bg {
        width: 70%;
    }
}
