/* ===========================================
   NEWSPAPER GLOBAL STYLES - Periódico Tradicional
   =========================================== */

/* ===========================================
   CSS RESET Y BASE
   =========================================== */

.newspaper-elementor-widgets *,
.newspaper-elementor-widgets *::before,
.newspaper-elementor-widgets *::after {
    box-sizing: border-box;
}

/* ===========================================
   PALETA DE COLORES UNIFICADA
   =========================================== */

:root {
    /* Colores primarios - Periódico tradicional */
    --newspaper-primary: #1a365d;      /* Azul naval */
    --newspaper-secondary: #c53030;    /* Rojo editorial */
    --newspaper-accent: #2c5282;       /* Azul hover */

    /* Colores neutros */
    --newspaper-white: #ffffff;
    --newspaper-gray-50: #fafafa;
    --newspaper-gray-100: #f7fafc;
    --newspaper-gray-200: #edf2f7;
    --newspaper-gray-300: #e2e8f0;
    --newspaper-gray-400: #cbd5e0;
    --newspaper-gray-500: #a0aec0;
    --newspaper-gray-600: #718096;
    --newspaper-gray-700: #4a5568;
    --newspaper-gray-800: #2d3748;
    --newspaper-gray-900: #1a202c;

    /* Espaciado consistente */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 20px;
    --spacing-xl: 24px;
    --spacing-2xl: 32px;
    --spacing-3xl: 48px;

    /* Bordes y sombras */
    --border-radius: 4px;
    --border-color: var(--newspaper-gray-300);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===========================================
   TIPOGRAFÍA UNIFICADA
   =========================================== */

.newspaper-elementor-widgets {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--newspaper-gray-900);
}

/* Jerarquía tipográfica clara */
.newspaper-elementor-widgets h1,
.newspaper-elementor-widgets h2,
.newspaper-elementor-widgets h3,
.newspaper-elementor-widgets h4,
.newspaper-elementor-widgets h5,
.newspaper-elementor-widgets h6 {
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 var(--spacing-md) 0;
    color: var(--newspaper-gray-900);
}

.newspaper-elementor-widgets h1 { font-size: 28px; font-weight: 700; line-height: 1.2; }
.newspaper-elementor-widgets h2 { font-size: 24px; font-weight: 600; line-height: 1.3; }
.newspaper-elementor-widgets h3 { font-size: 20px; font-weight: 600; line-height: 1.4; }
.newspaper-elementor-widgets h4 { font-size: 18px; font-weight: 500; line-height: 1.4; }

.newspaper-elementor-widgets p {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--newspaper-gray-700);
}

/* ===========================================
   CONTENEDORES Y CARDS UNIFICADOS
   =========================================== */

.newspaper-elementor-widgets .elementor-widget-container,
.newspaper-elementor-widgets .widget,
.newspaper-elementor-widgets .news-card,
.newspaper-elementor-widgets .card,
.newspaper-elementor-widgets .post-item,
.newspaper-elementor-widgets .article-card {
    background: var(--newspaper-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    transition: box-shadow 0.2s ease;
}

.newspaper-elementor-widgets .elementor-widget-container:hover,
.newspaper-elementor-widgets .widget:hover,
.newspaper-elementor-widgets .news-card:hover,
.newspaper-elementor-widgets .card:hover,
.newspaper-elementor-widgets .post-item:hover,
.newspaper-elementor-widgets .article-card:hover {
    box-shadow: var(--shadow-md);
}

/* ===========================================
   BOTONES UNIFICADOS
   =========================================== */

.newspaper-elementor-widgets .btn,
.newspaper-elementor-widgets .button,
.newspaper-elementor-widgets .wp-element-button,
.newspaper-elementor-widgets .elementor-button,
.newspaper-elementor-widgets .portal-btn,
.newspaper-elementor-widgets .more-opinions-btn,
.newspaper-elementor-widgets button[type="submit"],
.newspaper-elementor-widgets input[type="submit"] {
    background: var(--newspaper-primary);
    color: var(--newspaper-white);
    border: none;
    padding: var(--spacing-sm) var(--spacing-xl);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--border-radius);
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: normal;
}

.newspaper-elementor-widgets .btn:hover,
.newspaper-elementor-widgets .button:hover,
.newspaper-elementor-widgets .wp-element-button:hover,
.newspaper-elementor-widgets .elementor-button:hover,
.newspaper-elementor-widgets .portal-btn:hover,
.newspaper-elementor-widgets .more-opinions-btn:hover,
.newspaper-elementor-widgets button[type="submit"]:hover,
.newspaper-elementor-widgets input[type="submit"]:hover {
    background: var(--newspaper-accent);
    color: var(--newspaper-white);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Botones secundarios */
.newspaper-elementor-widgets .btn-secondary,
.newspaper-elementor-widgets .portal-btn-secondary {
    background: transparent;
    color: var(--newspaper-primary);
    border: 1px solid var(--newspaper-primary);
}

.newspaper-elementor-widgets .btn-secondary:hover,
.newspaper-elementor-widgets .portal-btn-secondary:hover {
    background: var(--newspaper-primary);
    color: var(--newspaper-white);
}

/* ===========================================
   ENLACES UNIFICADOS
   =========================================== */

.newspaper-elementor-widgets a {
    color: var(--newspaper-primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.newspaper-elementor-widgets a:hover,
.newspaper-elementor-widgets a:focus {
    color: var(--newspaper-secondary);
    text-decoration: underline;
}

/* Enlaces en títulos */
.newspaper-elementor-widgets .post-title a,
.newspaper-elementor-widgets .article-title a,
.newspaper-elementor-widgets .entry-title a {
    color: inherit;
    text-decoration: none;
}

.newspaper-elementor-widgets .post-title a:hover,
.newspaper-elementor-widgets .article-title a:hover,
.newspaper-elementor-widgets .entry-title a:hover {
    color: var(--newspaper-secondary);
    text-decoration: underline;
}

/* ===========================================
   IMÁGENES Y MEDIA UNIFICADOS
   =========================================== */

.newspaper-elementor-widgets .news-image,
.newspaper-elementor-widgets .post-thumbnail img,
.newspaper-elementor-widgets .wp-post-image,
.newspaper-elementor-widgets .card-image img,
.newspaper-elementor-widgets .portal-card-image,
.newspaper-elementor-widgets .columnist-photo img,
.newspaper-elementor-widgets img {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    width: 100%;
    height: auto;
    transition: transform 0.2s ease;
    display: block;
}

.newspaper-elementor-widgets .news-image:hover,
.newspaper-elementor-widgets .post-thumbnail:hover img,
.newspaper-elementor-widgets .card-image:hover img {
    transform: scale(1.02);
}

/* Avatares e imágenes pequeñas */
.newspaper-elementor-widgets .avatar,
.newspaper-elementor-widgets .author-avatar,
.newspaper-elementor-widgets .columnist-photo:not(.has-image) {
    border-radius: 50%;
    border: 2px solid var(--newspaper-gray-300);
}

/* ===========================================
   FORMULARIOS UNIFICADOS
   =========================================== */

.newspaper-elementor-widgets input,
.newspaper-elementor-widgets textarea,
.newspaper-elementor-widgets select,
.newspaper-elementor-widgets .search-input {
    border: 1px solid var(--newspaper-gray-400);
    border-radius: var(--border-radius);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 14px;
    background: var(--newspaper-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.newspaper-elementor-widgets input:focus,
.newspaper-elementor-widgets textarea:focus,
.newspaper-elementor-widgets select:focus,
.newspaper-elementor-widgets .search-input:focus {
    border-color: var(--newspaper-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/* ===========================================
   LISTAS Y NAVEGACIÓN
   =========================================== */

.newspaper-elementor-widgets .menu,
.newspaper-elementor-widgets .nav,
.newspaper-elementor-widgets ul.news-list,
.newspaper-elementor-widgets .latest-list,
.newspaper-elementor-widgets .opinion-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.newspaper-elementor-widgets .menu li,
.newspaper-elementor-widgets .nav-item,
.newspaper-elementor-widgets .news-list li {
    border-bottom: 1px solid var(--newspaper-gray-200);
    padding: var(--spacing-sm) 0;
}

.newspaper-elementor-widgets .menu li:last-child,
.newspaper-elementor-widgets .nav-item:last-child,
.newspaper-elementor-widgets .news-list li:last-child {
    border-bottom: none;
}

/* ===========================================
   BADGES Y ETIQUETAS
   =========================================== */

.newspaper-elementor-widgets .badge,
.newspaper-elementor-widgets .tag,
.newspaper-elementor-widgets .category-badge,
.newspaper-elementor-widgets .portal-badge,
.newspaper-elementor-widgets .opinion-category {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--border-radius);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--newspaper-gray-200);
    color: var(--newspaper-gray-700);
}

.newspaper-elementor-widgets .badge-primary,
.newspaper-elementor-widgets .category-badge {
    background: rgba(26, 54, 93, 0.1);
    color: var(--newspaper-primary);
}

.newspaper-elementor-widgets .badge-secondary {
    background: rgba(197, 48, 48, 0.1);
    color: var(--newspaper-secondary);
}

/* ===========================================
   ESPACIADO CONSISTENTE
   =========================================== */

.newspaper-elementor-widgets .section,
.newspaper-elementor-widgets .widget-section,
.newspaper-elementor-widgets .content-section {
    margin-bottom: var(--spacing-2xl);
}

.newspaper-elementor-widgets .card-content,
.newspaper-elementor-widgets .post-content,
.newspaper-elementor-widgets .article-content {
    padding: var(--spacing-lg);
}

.newspaper-elementor-widgets .meta-info,
.newspaper-elementor-widgets .post-meta,
.newspaper-elementor-widgets .article-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    font-size: 14px;
    color: var(--newspaper-gray-600);
}

/* ===========================================
   ANIMACIONES Y EFECTOS
   =========================================== */

.newspaper-elementor-widgets .interactive-element,
.newspaper-elementor-widgets .hover-effect {
    transition: all 0.2s ease-in-out;
}

.newspaper-elementor-widgets .interactive-element:hover,
.newspaper-elementor-widgets .hover-effect:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Loading states */
.newspaper-elementor-widgets .loading {
    background: linear-gradient(90deg, var(--newspaper-gray-200) 25%, var(--newspaper-gray-300) 50%, var(--newspaper-gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===========================================
   RESPONSIVE DESIGN CONSISTENTE
   =========================================== */

/* Tablet */
@media (max-width: 1024px) {
    .newspaper-elementor-widgets .elementor-widget-container,
    .newspaper-elementor-widgets .widget,
    .newspaper-elementor-widgets .news-card {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }

    .newspaper-elementor-widgets h1 { font-size: 26px; }
    .newspaper-elementor-widgets h2 { font-size: 22px; }
    .newspaper-elementor-widgets h3 { font-size: 18px; }
}

/* Mobile */
@media (max-width: 768px) {
    .newspaper-elementor-widgets {
        font-size: 15px;
    }

    .newspaper-elementor-widgets .elementor-widget-container,
    .newspaper-elementor-widgets .widget,
    .newspaper-elementor-widgets .news-card {
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-md);
        border-radius: 3px;
    }

    .newspaper-elementor-widgets h1 { font-size: 24px; }
    .newspaper-elementor-widgets h2 { font-size: 20px; }
    .newspaper-elementor-widgets h3 { font-size: 18px; }
    .newspaper-elementor-widgets h4 { font-size: 16px; }

    .newspaper-elementor-widgets .btn,
    .newspaper-elementor-widgets .button {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 13px;
    }

    .newspaper-elementor-widgets input,
    .newspaper-elementor-widgets textarea,
    .newspaper-elementor-widgets .search-input {
        padding: var(--spacing-sm);
        font-size: 15px;
    }

    .newspaper-elementor-widgets .app-downloads {
        flex-direction: column;
        gap: 8px;
        margin-left: 0;
        margin-top: 10px;
    }

    .newspaper-elementor-widgets .app-download-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .newspaper-elementor-widgets .elementor-widget-container,
    .newspaper-elementor-widgets .widget,
    .newspaper-elementor-widgets .news-card {
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-md);
    }

    .newspaper-elementor-widgets h1 { font-size: 22px; }
    .newspaper-elementor-widgets h2 { font-size: 18px; }
    .newspaper-elementor-widgets h3 { font-size: 16px; }
}

/* ===========================================
   ACCESIBILIDAD
   =========================================== */

.newspaper-elementor-widgets a:focus,
.newspaper-elementor-widgets button:focus,
.newspaper-elementor-widgets input:focus,
.newspaper-elementor-widgets textarea:focus,
.newspaper-elementor-widgets select:focus {
    outline: 2px solid var(--newspaper-primary);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .newspaper-elementor-widgets .elementor-widget-container,
    .newspaper-elementor-widgets .widget,
    .newspaper-elementor-widgets .news-card {
        border: 2px solid #000;
    }

    .newspaper-elementor-widgets .badge,
    .newspaper-elementor-widgets .tag {
        border: 1px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .newspaper-elementor-widgets *,
    .newspaper-elementor-widgets *::before,
    .newspaper-elementor-widgets *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .newspaper-elementor-widgets .loading {
        animation: none;
    }
}

/* ===========================================
   OVERRIDES PARA WIDGETS ESPECÍFICOS
   =========================================== */

/* Portal Widget */
.newspaper-elementor-widgets .portal-container {
    background: var(--newspaper-white) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-sm) !important;
}

.newspaper-elementor-widgets .portal-card {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-sm) !important;
}

/* Columnists Grid styles removed */

/* Search inputs */
.newspaper-elementor-widgets .search-container {
    background: var(--newspaper-white) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
}

/* Section headers */
.newspaper-elementor-widgets .section-header {
    border-bottom: 1px solid var(--border-color) !important;
}

/* App Downloads */
.newspaper-elementor-widgets .app-downloads {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
}

.newspaper-elementor-widgets .app-download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #000;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #000;
}

.newspaper-elementor-widgets .app-download-btn:hover {
    background: #333;
    border-color: #333;
    transform: translateY(-1px);
}

.newspaper-elementor-widgets .app-icon {
    font-size: 16px;
}

.newspaper-elementor-widgets .app-text {
    line-height: 1.2;
}

.newspaper-elementor-widgets .app-text small {
    font-size: 10px;
    opacity: 0.8;
}

.newspaper-elementor-widgets .app-text strong {
    font-size: 11px;
}

/* ===========================================
   DEBUGGING UTILITIES (remover en producción)
   =========================================== */

/*
.newspaper-elementor-widgets .debug-border {
    border: 2px solid red !important;
}

.newspaper-elementor-widgets .debug-bg {
    background: rgba(255, 0, 0, 0.1) !important;
}
*/