/*
Theme Name: IslaNoticias
Theme URI: https://tusitio.com
Author: Tu Nombre
Author URI: https://tusitio.com
Description: Tema personalizado para agencia de noticias con secciones: Ciencias, Cultura, Deportes, Economía, Educación, Historia, Locales, Nacionales, Internacionales y más.
Version: 1.0.0
License: GPL v2 or later
Text Domain: islanoticias
*/

/* ============================================ */
/* 1. VARIABLES Y RESET                         */
/* ============================================ */

:root {
    --color-primary: #0056b3;
    --color-primary-dark: #003d80;
    --color-secondary: #e31837;
    --color-dark: #1a1a2e;
    --color-gray: #6c757d;
    --color-gray-dark: #2d2d3a;
    --color-gray-light: #e9ecef;
    --color-white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --container-width: 1280px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-lg: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-dark);
    background-color: #f5f5f5;
    line-height: 1.5;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================ */
/* 2. HEADER Y NAVEGACIÓN                      */
/* ============================================ */

.site-header {
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.site-logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

.site-title-wrapper {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title a:hover {
    color: var(--color-primary);
}

.site-description {
    font-size: 0.75rem;
    color: var(--color-gray);
    margin: 0;
}

.header-utilities {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-gray-light);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.weather-widget i {
    color: #f39c12;
    font-size: 1rem;
}

.search-toggle,
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--color-dark);
    padding: 0.5rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover,
.hamburger-menu:hover {
    color: var(--color-primary);
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 30px;
    height: 30px;
    padding: 0;
}

.hamburger-menu span {
    width: 100%;
    height: 2px;
    background: var(--color-dark);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-primary {
    padding: 0.75rem 0;
    border-top: 1px solid var(--color-gray-light);
    margin-top: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    font-weight: 600;
    font-size: 0.9375rem;
    transition: color 0.3s ease;
    color: var(--color-dark);
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--color-primary);
}

/* ============================================ */
/* 3. MENÚ MÓVIL (Off-canvas)                  */
/* ============================================ */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    max-width: 320px;
    height: 100%;
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-overlay.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--color-gray-light);
}

.close-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-dark);
}

.mobile-nav-menu {
    list-style: none;
    padding: 1rem;
    margin: 0;
}

.mobile-nav-menu li {
    margin-bottom: 0.75rem;
}

.mobile-nav-menu li a {
    display: block;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: background 0.3s ease;
    color: var(--color-dark);
}

.mobile-nav-menu li a:hover {
    background: var(--color-gray-light);
    color: var(--color-primary);
}

/* ============================================ */
/* 4. MODAL DE BÚSQUEDA                        */
/* ============================================ */

.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    width: 90%;
    max-width: 600px;
    position: relative;
}

.search-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.5rem;
    cursor: pointer;
}

.search-form {
    display: flex;
    background: var(--color-white);
    border-radius: 2rem;
    overflow: hidden;
}

.search-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    font-family: var(--font-body);
}

.search-form input:focus {
    outline: none;
}

.search-form button {
    background: var(--color-primary);
    border: none;
    padding: 0 1.5rem;
    color: var(--color-white);
    cursor: pointer;
    font-size: 1.25rem;
}

/* ============================================ */
/* 5. SECCIONES Y COMPONENTES                   */
/* ============================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.section-header h2 i {
    margin-right: 0.5rem;
    color: var(--color-primary);
}

.view-all {
    color: var(--color-primary);
    font-size: 0.875rem;
}

.view-all-news {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-primary);
    transition: color 0.3s ease;
}

.view-all-news:hover {
    color: var(--color-primary-dark);
}

/* Badges */
.breaking-badge {
    background: var(--color-secondary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.secondary-badge {
    background: var(--color-primary);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.65rem;
    font-weight: 600;
}

/* ============================================ */
/* 6. HERO SECTION                             */
/* ============================================ */

.hero-section {
    margin: 2rem 0;
}

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.hero-section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-section-title i {
    color: var(--color-primary);
    font-size: 1.25rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 0.4fr;
    gap: 1.5rem;
}

.hero-main {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-main:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hero-main-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hero-tag {
    padding: 1rem 1rem 0;
}

.hero-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hero-main:hover .hero-image img {
    transform: scale(1.02);
}

.hero-content {
    padding: 1.25rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.hero-title a:hover {
    color: var(--color-primary);
}

.hero-excerpt {
    color: var(--color-gray);
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.hero-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--color-gray);
}

.hero-sidebar {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.sidebar-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.sidebar-news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-news-item {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-gray-light);
}

.sidebar-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-news-content {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.sidebar-news-rank {
    flex-shrink: 0;
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--color-gray-light);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-gray);
}

.sidebar-news-text {
    flex: 1;
}

.sidebar-news-text h4 {
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0 0 0.25rem;
}

.sidebar-news-text h4 a:hover {
    color: var(--color-primary);
}

.sidebar-news-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sidebar-news-meta .post-date {
    font-size: 0.7rem;
    color: var(--color-gray);
}

.news-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    background: var(--color-gray-light);
    color: var(--color-gray-dark);
}

/* ============================================ */
/* 7. NOTICIARIOS / VIDEOS                     */
/* ============================================ */

.noticiarios-section {
    margin: 2rem 0;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.video-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s;
}

.video-card:hover {
    transform: translateY(-4px);
}

.video-thumbnail {
    position: relative;
    cursor: pointer;
}

.video-thumbnail img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.play-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-video i {
    color: white;
    font-size: 1.5rem;
    margin-left: 4px;
}

.play-video:hover {
    background: var(--color-primary);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 1rem;
}

.video-info h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

/* ============================================ */
/* 8. GRID DE NOTICIAS                         */
/* ============================================ */

.news-grid {
    display: grid;
    gap: 1.5rem;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.news-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-4px);
}

.card-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.card-content {
    padding: 1rem;
}

.card-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.card-excerpt {
    font-size: 0.875rem;
    color: var(--color-gray);
    margin-bottom: 0.5rem;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--color-gray);
}

/* ============================================ */
/* 9. CARRUSEL                                 */
/* ============================================ */

.carousel-widget {
    position: relative;
    margin-bottom: 2rem;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    padding: 0 40px;
}

.carousel-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
    scrollbar-width: thin;
}

.carousel-track::-webkit-scrollbar {
    height: 6px;
}

.carousel-track::-webkit-scrollbar-track {
    background: var(--color-gray-light);
    border-radius: 10px;
}

.carousel-track::-webkit-scrollbar-thumb {
    background: var(--color-gray);
    border-radius: 10px;
}

.carousel-slide {
    flex: 0 0 280px;
    scroll-snap-align: start;
}

.carousel-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.carousel-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.carousel-card-content {
    padding: 1rem;
}

.carousel-card-content h4 {
    font-size: 0.875rem;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    color: var(--color-dark);
    font-size: 0.875rem;
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-50%) scale(1.05);
    border-color: var(--color-primary);
}

/* ============================================ */
/* 10. FOOTER                                  */
/* ============================================ */

.site-footer {
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.footer-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    max-width: 50px;
    max-height: 50px;
}

.footer-logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.footer-site-title h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin: 0;
}

.footer-site-title span {
    color: var(--color-primary);
}

.footer-tagline p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.footer-widgets-area {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.footer-widget-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-widget-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.footer-widget-col .widget {
    margin-bottom: 1.5rem;
}

.footer-widget-col .widget:last-child {
    margin-bottom: 0;
}

.footer-widget-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget-col ul li {
    margin-bottom: 0.5rem;
}

.footer-widget-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.875rem;
}

.footer-widget-col ul li a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--color-primary);
}

/* ============================================ */
/* 11. SINGLE.PHP                              */
/* ============================================ */

.single-modern-container {
    max-width: 100%;
    background: #f8f9fa;
}

.single-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 4rem 1rem;
    margin-bottom: 2rem;
}

.single-hero-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.single-breadcrumbs {
    font-size: 0.8125rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.single-breadcrumbs a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.single-breadcrumbs a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.single-breadcrumbs i {
    margin: 0 0.25rem;
    font-size: 0.7rem;
    opacity: 0.7;
}

.single-breadcrumbs .current {
    opacity: 0.9;
}

.single-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white;
}

.single-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.875rem;
    opacity: 0.85;
}

.single-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.single-meta-item i {
    font-size: 0.875rem;
}

.single-content-wrapper {
    max-width: 1280px;
    margin: -2rem auto 0;
    padding: 0 1rem 3rem;
}

.single-grid-modern {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.single-main-modern {
    flex: 1;
    min-width: 0;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.single-article {
    padding: 2rem;
}

.single-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #2d3748;
}

.single-body p {
    margin-bottom: 1.5rem;
}

.single-body h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.single-body h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
}

.single-body blockquote {
    border-left: 4px solid var(--color-primary);
    background: #f7fafc;
    padding: 1rem 2rem;
    margin: 1.5rem 0;
    font-style: italic;
    font-size: 1.125rem;
    color: #4a5568;
}

.single-body img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border: 1px solid #cbd5e0;
    padding: 4px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.single-body img.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
    max-width: 45%;
}

.single-body img.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
    max-width: 45%;
}

.single-body img.aligncenter {
    margin: 2rem auto;
    display: block;
}

.single-body .wp-caption {
    max-width: 100%;
    margin: 2rem 0;
    background: transparent;
    border: none;
    padding: 0;
}

.single-body .wp-caption img {
    margin: 0;
    border: 1px solid #cbd5e0;
    padding: 4px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.single-body .wp-caption-text,
.single-body .wp-caption-dd {
    font-size: 0.8125rem;
    color: #64748b;
    text-align: center;
    margin: 0.75rem 0 0;
    padding: 0.5rem 1rem;
    font-style: normal;
    line-height: 1.5;
    background: #f1f5f9;
}

.single-body .wp-caption-text::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--color-primary);
    margin: 0 auto 0.5rem;
}

.single-body figure {
    margin: 2rem 0;
    background: transparent;
    border: none;
    padding: 0;
}

.single-body figure img {
    margin: 0;
    border: 1px solid #cbd5e0;
    padding: 4px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.single-body figcaption {
    font-size: 0.8125rem;
    color: #64748b;
    text-align: center;
    margin: 0.75rem 0 0;
    padding: 0.5rem 1rem;
    font-style: normal;
    line-height: 1.5;
    background: #f1f5f9;
}

.single-body figcaption::before {
    content: '📷';
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.7rem;
    opacity: 0.7;
}

.single-body .gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.single-body .gallery-item {
    margin: 0;
    background: transparent;
    border: none;
    overflow: hidden;
}

.single-body .gallery-columns-1 .gallery-item { width: 100%; }
.single-body .gallery-columns-2 .gallery-item { width: calc(50% - 0.5rem); }
.single-body .gallery-columns-3 .gallery-item { width: calc(33.333% - 0.666rem); }
.single-body .gallery-columns-4 .gallery-item { width: calc(25% - 0.75rem); }
.single-body .gallery-columns-5 .gallery-item { width: calc(20% - 0.8rem); }
.single-body .gallery-columns-6 .gallery-item { width: calc(16.666% - 0.833rem); }
.single-body .gallery-columns-7 .gallery-item { width: calc(14.285% - 0.857rem); }
.single-body .gallery-columns-8 .gallery-item { width: calc(12.5% - 0.875rem); }
.single-body .gallery-columns-9 .gallery-item { width: calc(11.111% - 0.888rem); }

.single-body .gallery-icon {
    margin: 0;
    padding: 0;
    background: #ffffff;
    overflow: hidden;
}

.single-body .gallery-icon img {
    margin: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border: 1px solid #cbd5e0;
    padding: 4px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.single-body .gallery-caption {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    padding: 0.75rem;
    background: #f8fafc;
    margin-top: 0;
    line-height: 1.4;
}

/* Etiquetas */
.single-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 1rem;
}

.tags-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a2e;
}

.tag {
    background: #edf2f7;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--color-primary);
    color: white;
}

/* Acciones */
.single-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin: 1rem 0;
}

.single-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.share-label {
    font-size: 0.875rem;
    font-weight: 600;
}

.share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: white;
    transition: all 0.3s ease;
}

.share-icon.facebook { background: #1877f2; }
.share-icon.twitter { background: #1da1f2; }
.share-icon.whatsapp { background: #25d366; }
.share-icon.email { background: #6c757d; }

.share-icon:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.single-nav {
    display: flex;
    gap: 1rem;
}

.single-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #edf2f7;
    font-size: 0.875rem;
    color: #1a1a2e;
    text-decoration: none;
    transition: all 0.3s ease;
}

.single-nav a:hover {
    background: var(--color-primary);
    color: white;
}

/* Artículos relacionados */
.single-related {
    margin: 2rem 0;
}

.related-heading {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.related-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-card-modern {
    background: #f7fafc;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.related-card-modern:hover {
    transform: translateY(-4px);
}

.related-card-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.related-card-content {
    padding: 1rem;
}

.related-card-content h4 {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0 0 0.5rem;
}

.related-card-content h4 a {
    color: #1a1a2e;
    text-decoration: none;
}

.related-card-content h4 a:hover {
    color: var(--color-primary);
}

.related-card-date {
    font-size: 0.75rem;
    color: #718096;
}

/* ============================================ */
/* 12. COMENTARIOS                             */
/* ============================================ */

.comments-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.comments-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comments-title i {
    color: var(--color-primary);
    font-size: 1.125rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.comment-body-wrapper {
    flex: 1;
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
}

.comment-author {
    font-weight: 700;
    color: #1a1a2e;
}

.comment-author a {
    color: #1a1a2e;
    text-decoration: none;
}

.comment-author a:hover {
    color: var(--color-primary);
}

.comment-date {
    color: #718096;
    font-size: 0.7rem;
}

.comment-date i {
    margin-right: 0.25rem;
}

.comment-moderation {
    background: #fef2e8;
    color: #e65100;
    padding: 0.2rem 0.5rem;
    border-radius: 2rem;
    font-size: 0.65rem;
}

.comment-content {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.comment-reply {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
}

.comment-reply a {
    color: var(--color-primary);
    text-decoration: none;
}

.comment-reply a:hover {
    text-decoration: underline;
}

.comments-navigation {
    display: flex;
    justify-content: space-between;
    margin: 1.5rem 0;
    padding: 0.75rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.comments-navigation a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.comments-navigation a:hover {
    text-decoration: underline;
}

/* Formulario de comentarios */
.modern-comment-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.modern-comment-form .comment-field-textarea {
    grid-column: span 2;
}

.modern-comment-form .comment-notes,
.modern-comment-form .logged-in-as {
    grid-column: span 2;
}

.comment-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.25rem;
}

.comment-field .required {
    color: #e53e3e;
}

.comment-field input,
.comment-field textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    background: #ffffff;
    font-family: var(--font-body);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.comment-field input:focus,
.comment-field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.1);
}

.comment-field textarea {
    resize: vertical;
}

.submit-button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    width: auto;
    justify-self: start;
}

.submit-button:hover {
    background: var(--color-primary-dark);
}

/* ============================================ */
/* 13. CATEGORY Y SEARCH.PHP                   */
/* ============================================ */

.category-container,
.search-container {
    max-width: 100%;
    background: #f8f9fa;
}

.category-header,
.search-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 3rem 1rem;
    margin-bottom: 2rem;
}

.category-header-inner,
.search-header-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.category-breadcrumbs,
.search-breadcrumbs {
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.category-breadcrumbs a,
.search-breadcrumbs a {
    color: white;
    text-decoration: none;
}

.category-breadcrumbs a:hover,
.search-breadcrumbs a:hover {
    text-decoration: underline;
}

.category-breadcrumbs i,
.search-breadcrumbs i {
    margin: 0 0.5rem;
    font-size: 0.7rem;
}

.category-title,
.search-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-title i,
.search-title i {
    font-size: 2rem;
    opacity: 0.9;
}

.category-description {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.85;
    max-width: 800px;
    margin-bottom: 1rem;
}

.category-stats,
.search-stats {
    margin-top: 1rem;
}

.category-count,
.search-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.25rem 1rem;
    border-radius: 2rem;
    font-size: 0.8125rem;
}

.search-query {
    margin-bottom: 1rem;
}

.query-label {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-right: 0.5rem;
}

.query-term {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.search-form-inline {
    margin-top: 1rem;
}

.inline-search-form {
    display: flex;
    max-width: 500px;
}

.inline-search-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    font-size: 0.875rem;
}

.inline-search-form button {
    background: var(--color-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.inline-search-form button:hover {
    background: var(--color-primary-dark);
}

.category-content-wrapper,
.search-content-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.category-grid-modern,
.search-grid-modern {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.category-main,
.search-main {
    flex: 1;
    min-width: 0;
}

.category-archive-header,
.search-archive-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.archive-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-posts-grid,
.search-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.category-post-card,
.search-post-card {
    display: flex;
    background: white;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-post-card:hover,
.search-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.post-card-image {
    position: relative;
    width: 280px;
    flex-shrink: 0;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-post-card:hover .post-card-image img,
.search-post-card:hover .post-card-image img {
    transform: scale(1.03);
}

.post-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.post-card-category a {
    background: var(--color-primary);
    color: white;
    padding: 0.2rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.post-card-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-card-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-card-title a:hover {
    color: var(--color-primary);
}

.post-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    color: #718096;
}

.post-card-meta i {
    margin-right: 0.25rem;
}

.post-card-excerpt {
    color: #4a5568;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.readmore-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.readmore-link:hover {
    gap: 0.75rem;
}

.category-pagination,
.search-pagination {
    margin-top: 2rem;
    text-align: center;
}

.category-pagination .page-numbers,
.search-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    margin: 0 0.25rem;
    background: white;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-pagination .page-numbers.current,
.search-pagination .page-numbers.current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.category-pagination .page-numbers:hover:not(.current),
.search-pagination .page-numbers:hover:not(.current) {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.category-pagination .prev,
.category-pagination .next,
.search-pagination .prev,
.search-pagination .next {
    padding: 0 1rem;
}

/* Estados vacíos */
.category-empty,
.search-not-found {
    text-align: center;
    padding: 3rem;
    background: white;
    border: 1px solid #e2e8f0;
}

.category-empty i,
.search-not-found i {
    font-size: 3rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

.category-empty h3,
.search-not-found h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.category-empty p,
.search-not-found p {
    color: #718096;
    margin-bottom: 1.5rem;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
}

.back-home:hover {
    background: var(--color-primary-dark);
}

.search-form-notfound {
    max-width: 400px;
    margin: 1rem auto;
}

.notfound-search-form {
    display: flex;
}

.notfound-search-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    font-family: var(--font-body);
}

.notfound-search-form button {
    background: var(--color-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    color: white;
    cursor: pointer;
}

.search-suggestions {
    text-align: left;
    max-width: 400px;
    margin: 1.5rem auto;
    padding: 1rem;
    background: #f7fafc;
}

.search-suggestions h4 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.search-suggestions ul {
    margin: 0;
    padding-left: 1rem;
    font-size: 0.8125rem;
    color: #718096;
}

/* ============================================ */
/* 14. SIDEBARS                                */
/* ============================================ */

.category-sidebar,
.search-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

.single-sidebar-modern {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    margin-top: 3.5rem;
}

.category-sidebar .sidebar-widget,
.search-sidebar .sidebar-widget,
.single-sidebar-modern .widget {
    
    background: white;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-sidebar .widget-title,
.search-sidebar .widget-title,
.single-sidebar-modern .widget-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-sidebar .widget-title i,
.search-sidebar .widget-title i,
.single-sidebar-modern .widget-title i {
    color: var(--color-primary);
}

/* Placeholder sidebar */
.sidebar-placeholder {
    background: white;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px dashed #cbd5e0;
}

.sidebar-placeholder i {
    font-size: 2rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

.sidebar-placeholder h4 {
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.sidebar-placeholder p {
    font-size: 0.875rem;
    color: #718096;
}

/* Admin notice */
.admin-notice {
    background: #fef9e6;
    border-left: 3px solid #f39c12;
}

.admin-notice p {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
}

.admin-notice ul {
    margin: 0;
    padding-left: 1rem;
    font-size: 0.75rem;
}

.admin-notice a {
    color: var(--color-primary);
    text-decoration: none;
}

/* ============================================ */
/* 15. WIDGETS PERSONALIZADOS                   */
/* ============================================ */

/* Popular Posts Widget */
.widget-islanoticias-popular .widget-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-islanoticias-popular .widget-title i {
    color: var(--color-primary);
}

.popular-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-post-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.popular-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.popular-post-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #edf2f7;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4a5568;
    flex-shrink: 0;
}

.popular-post-thumb {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
}

.popular-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content {
    flex: 1;
    min-width: 0;
}

.popular-post-title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a2e;
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.popular-post-title:hover {
    color: var(--color-primary);
}

.popular-post-date,
.popular-post-comments {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    color: #718096;
    margin-right: 0.5rem;
}

.popular-post-date i,
.popular-post-comments i {
    font-size: 0.6rem;
}

/* Company Info Widget */
.widget-islanoticias-company .company-info-widget {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.company-logo .custom-logo-link {
    display: inline-block;
}

.company-logo img {
    max-height: 60px;
    width: auto;
    height: auto;
}

.company-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}

.company-name span {
    color: var(--color-primary);
}

.company-description p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #4a5568;
    margin: 0;
}

.company-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.company-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #edf2f7;
    color: #1a1a2e;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.company-social a:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-3px);
}

.site-footer .company-description p {
    color: rgba(255, 255, 255, 0.7);
}

.site-footer .company-social a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.site-footer .company-social a:hover {
    background: var(--color-primary);
    color: white;
}

/* External Sites Widget */
.widget-islanoticias-external .widget-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-islanoticias-external .widget-title i {
    color: var(--color-primary);
}

.external-sites-widget.layout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.external-sites-widget.layout-grid .external-site-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: #f7fafc;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #1a1a2e;
    font-size: 0.8125rem;
    font-weight: 500;
    gap: 0.5rem;
}

.external-sites-widget.layout-grid .external-site-item:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.external-sites-widget.layout-grid .site-name {
    flex: 1;
}

.external-sites-widget.layout-grid .site-arrow {
    font-size: 0.7rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.external-sites-widget.layout-grid .external-site-item:hover .site-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.external-sites-widget.layout-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.external-sites-widget.layout-list .external-site-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #1a1a2e;
    font-size: 0.8125rem;
    font-weight: 500;
    gap: 0.5rem;
}

.external-sites-widget.layout-list .external-site-item:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.external-sites-widget.layout-list .site-name {
    flex: 1;
}

.external-sites-widget.layout-list .site-arrow {
    font-size: 0.7rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.external-sites-widget.layout-list .external-site-item:hover .site-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.site-footer .external-site-item {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.site-footer .external-site-item:hover {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: white !important;
}

/* Banner Widget */
.widget-islanoticias-banner .banner-widget {
    position: relative;
    overflow: hidden;
}

.widget-islanoticias-banner .banner-link {
    display: block;
    text-decoration: none;
}

.widget-islanoticias-banner .banner-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.widget-islanoticias-banner .banner-link:hover .banner-image {
    transform: scale(1.02);
}

.widget-islanoticias-banner .banner-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
}

.site-footer .widget-islanoticias-banner .banner-caption {
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0));
}

/* Recent Posts Widget (sin miniaturas) */
.widget-islanoticias-recent .recent-posts-list-footer {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-islanoticias-recent .recent-post-item {
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.widget-islanoticias-recent .recent-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget-islanoticias-recent .recent-post-title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
    margin-bottom: 0.25rem;
}

.widget-islanoticias-recent .recent-post-title:hover {
    color: var(--color-primary);
}

.widget-islanoticias-recent .recent-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.widget-islanoticias-recent .recent-post-date,
.widget-islanoticias-recent .recent-post-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
}

.widget-islanoticias-recent .recent-post-date i,
.widget-islanoticias-recent .recent-post-category i {
    font-size: 0.6rem;
}

.widget-islanoticias-recent .recent-post-category a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.widget-islanoticias-recent .recent-post-category a:hover {
    color: var(--color-primary);
}

/* Versión para sidebars (fondo claro) */
.single-sidebar .widget-islanoticias-recent .recent-post-title,
.category-sidebar .widget-islanoticias-recent .recent-post-title,
.search-sidebar .widget-islanoticias-recent .recent-post-title {
    color: #1a1a2e;
}

.single-sidebar .widget-islanoticias-recent .recent-post-item,
.category-sidebar .widget-islanoticias-recent .recent-post-item,
.search-sidebar .widget-islanoticias-recent .recent-post-item {
    border-bottom-color: #e2e8f0;
}

.single-sidebar .widget-islanoticias-recent .recent-post-date,
.single-sidebar .widget-islanoticias-recent .recent-post-category,
.category-sidebar .widget-islanoticias-recent .recent-post-date,
.category-sidebar .widget-islanoticias-recent .recent-post-category,
.search-sidebar .widget-islanoticias-recent .recent-post-date,
.search-sidebar .widget-islanoticias-recent .recent-post-category {
    color: #718096;
}

.single-sidebar .widget-islanoticias-recent .recent-post-category a,
.category-sidebar .widget-islanoticias-recent .recent-post-category a,
.search-sidebar .widget-islanoticias-recent .recent-post-category a {
    color: #718096;
}

.single-sidebar .widget-islanoticias-recent .recent-post-category a:hover,
.category-sidebar .widget-islanoticias-recent .recent-post-category a:hover,
.search-sidebar .widget-islanoticias-recent .recent-post-category a:hover {
    color: var(--color-primary);
}

/* ============================================ */
/* 16. FRONT PAGE WIDGET AREAS                  */
/* ============================================ */

.widget-area {
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius-lg);
}

.frontpage-widget {
    margin-bottom: 1rem;
}

.frontpage-widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.widget-subtitle {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.frontpage-before-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.frontpage-before-content .widget-title {
    color: white;
    border-bottom-color: rgba(255,255,255,0.3);
}

.frontpage-after-hero {
    background: #1a1a2e;
    color: white;
}

.frontpage-after-categories {
    background: #e8f4f8;
    border-left: 4px solid var(--color-primary);
}

.frontpage-before-footer {
    background: #2d3748;
    color: white;
}

.frontpage-locales-top,
.frontpage-locales-bottom,
.frontpage-ciencias-top {
    background: #fef9e6;
    border-left: 3px solid #f39c12;
    margin: 1rem 0;
}

/* ============================================ */
/* 17. YOUTUBE VIDEOS WIDGET                    */
/* ============================================ */

.youtube-videos-grid {
    display: grid;
    gap: 1.5rem;
}

.youtube-layout-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.youtube-layout-list {
    grid-template-columns: 1fr;
}

.youtube-layout-carousel {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
}

.youtube-layout-carousel .youtube-video-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
}

.youtube-video-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.youtube-video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.youtube-video-thumbnail {
    position: relative;
    cursor: pointer;
    background: #000;
}

.youtube-video-thumbnail img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.youtube-video-card:hover .youtube-video-thumbnail img {
    opacity: 0.9;
}

.play-youtube-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.play-youtube-video .play-icon {
    font-size: 1.5rem;
    margin-left: 4px;
}

.play-youtube-video:hover {
    background: var(--color-primary);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.youtube-video-info {
    padding: 1rem;
}

.youtube-video-info h3 {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0 0 0.5rem;
}

.youtube-video-info h3 a {
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.youtube-video-info h3 a:hover {
    color: var(--color-primary);
}

.youtube-video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.7rem;
    color: var(--color-gray);
}

.youtube-video-meta i {
    margin-right: 0.25rem;
}

.youtube-widget-error {
    background: #fef2f2;
    border-left: 4px solid var(--color-secondary);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.youtube-widget-error p {
    margin: 0;
    color: #991b1b;
}

/* ============================================ */
/* 18. RESPONSIVE UNIFICADO                     */
/* ============================================ */

/* Tablet */
@media (max-width: 992px) {
    .nav-primary {
        display: none;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    .weather-widget .weather-location {
        display: none;
    }
    
    .weather-widget {
        padding: 0.5rem 0.75rem;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .single-grid-modern {
        flex-direction: column;
    }
    
    .single-sidebar-modern,
    .category-sidebar,
    .search-sidebar {
        width: 100%;
        position: static;
    }
    
    .category-grid-modern,
    .search-grid-modern {
        flex-direction: column;
    }
    
    .footer-widgets-area {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .related-grid-modern {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Móvil */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.1rem;
    }
    
    .site-description {
        display: none;
    }
    
    .logo-container {
        gap: 0.5rem;
    }
    
    .site-logo img {
        max-height: 40px;
    }
    
    .weather-widget .weather-temp {
        font-size: 0.75rem;
    }
    
    .hero-title {
        font-size: 1.25rem;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .single-hero {
        padding: 2rem 1rem;
    }
    
    .single-title {
        font-size: 2rem;
    }
    
    .single-article {
        padding: 1.5rem;
    }
    
    .single-body {
        font-size: 1rem;
    }
    
    .single-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .single-nav {
        justify-content: center;
    }
    
    .single-meta {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .related-grid-modern {
        grid-template-columns: 1fr;
    }
    
    .category-header,
    .search-header {
        padding: 2rem 1rem;
    }
    
    .category-title,
    .search-title {
        font-size: 1.75rem;
    }
    
    .category-post-card,
    .search-post-card {
        flex-direction: column;
    }
    
    .post-card-image {
        width: 100%;
        height: 200px;
    }
    
    .post-card-content {
        padding: 1rem;
    }
    
    .post-card-title {
        font-size: 1.125rem;
    }
    
    .inline-search-form {
        flex-direction: column;
    }
    
    .inline-search-form button {
        margin-top: 0.5rem;
    }
    
    .carousel-container {
        padding: 0 30px;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
    
    .footer-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .footer-widgets-area {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .sidebar-widget,
    .single-widget,
    .footer-widget-col .widget {
        margin-bottom: 1.5rem;
        border:2px solid green;
    }
    
    .frontpage-dynamic-area .widget {
        margin-bottom: 2rem;
    }
    
    .modern-comment-form {
        grid-template-columns: 1fr;
    }
    
    .modern-comment-form .comment-field-textarea {
        grid-column: span 1;
    }
    
    .comment-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .comment-avatar {
        display: flex;
        justify-content: center;
    }
    
    .comment-avatar-img {
        width: 50px;
        height: 50px;
    }
    
    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .submit-button {
        width: 100%;
    }
    
    .external-sites-widget.layout-grid {
        grid-template-columns: 1fr;
    }
}

/* Móvil pequeño */
@media (max-width: 480px) {
    .single-title {
        font-size: 1.5rem;
    }
    
    .single-article {
        padding: 1rem;
    }
    
    .category-pagination .prev,
    .category-pagination .next,
    .search-pagination .prev,
    .search-pagination .next {
        display: none;
    }
    
    .carousel-container {
        padding: 0 20px;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 26px;
        height: 26px;
        font-size: 0.65rem;
    }
    
    .notfound-search-form {
        flex-direction: column;
    }
    
    .notfound-search-form button {
        margin-top: 0.5rem;
    }
    
    .company-logo img {
        max-height: 45px;
    }
    
    .company-name {
        font-size: 1.25rem;
    }
    
    .company-social a {
        width: 36px;
        height: 36px;
    }
    
    .popular-post-thumb {
        width: 45px;
        height: 45px;
    }
    
    .popular-post-rank {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    .single-body img.alignleft,
    .single-body img.alignright,
    .single-body .wp-caption.alignleft,
    .single-body .wp-caption.alignright {
        float: none;
        max-width: 100%;
        margin: 1.5rem 0;
    }
    
    .single-body .gallery-columns-2 .gallery-item,
    .single-body .gallery-columns-3 .gallery-item,
    .single-body .gallery-columns-4 .gallery-item,
    .single-body .gallery-columns-5 .gallery-item,
    .single-body .gallery-columns-6 .gallery-item,
    .single-body .gallery-columns-7 .gallery-item,
    .single-body .gallery-columns-8 .gallery-item,
    .single-body .gallery-columns-9 .gallery-item {
        width: 100%;
    }
}

/* ----------------------- */
/* ============================================ */
/* WIDGETS: HISTORIAS, EVENTOS, INSPIRACIÓN     */
/* ============================================ */

/* Estilos generales para los tres widgets */
.widget-islanoticias-history .widget-title,
.widget-islanoticias-events .widget-title,
.widget-islanoticias-inspiration .widget-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-islanoticias-history .widget-title i,
.widget-islanoticias-events .widget-title i,
.widget-islanoticias-inspiration .widget-title i {
    color: var(--color-primary);
}

/* ============================================ */
/* WIDGET: HISTORIAS                            */
/* ============================================ */

.history-item {
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #e2e8f0;
}

.history-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.history-title {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 0.25rem;
}

.history-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.history-title a:hover {
    color: var(--color-primary);
}

.history-date {
    font-size: 0.65rem;
    color: #718096;
}

.history-date i {
    margin-right: 0.25rem;
}

/* Versión footer (fondo oscuro) */
.site-footer .history-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.site-footer .history-title a {
    color: rgba(255, 255, 255, 0.9);
}

.site-footer .history-title a:hover {
    color: var(--color-primary);
}

.site-footer .history-date {
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================ */
/* WIDGET: EVENTOS / DÍAS MUNDIALES             */
/* ============================================ */

.event-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #e2e8f0;
}

.event-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.event-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.event-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-icon-default {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #edf2f7;
    color: #718096;
    flex-shrink: 0;
}

.event-icon-default i {
    font-size: 1.25rem;
}

.event-content {
    flex: 1;
}

.event-title {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 0.25rem;
}

.event-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-title a:hover {
    color: var(--color-primary);
}

.event-date {
    font-size: 0.65rem;
    color: #718096;
}

.event-date i {
    margin-right: 0.25rem;
}

/* Versión footer (fondo oscuro) */
.site-footer .event-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.site-footer .event-title a {
    color: rgba(255, 255, 255, 0.9);
}

.site-footer .event-title a:hover {
    color: var(--color-primary);
}

.site-footer .event-date {
    color: rgba(255, 255, 255, 0.5);
}

.site-footer .event-icon-default {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================ */
/* WIDGET: INSPIRACIÓN PINERA                   */
/* ============================================ */

.inspiration-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #e2e8f0;
}

.inspiration-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.inspiration-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.inspiration-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inspiration-content {
    flex: 1;
}

.inspiration-title {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 0.25rem;
}

.inspiration-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.inspiration-title a:hover {
    color: var(--color-primary);
}

.inspiration-excerpt {
    display: block;
    font-size: 0.7rem;
    color: #718096;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.inspiration-date {
    font-size: 0.65rem;
    color: #a0aec0;
}

.inspiration-date i {
    margin-right: 0.25rem;
}

/* Versión footer (fondo oscuro) */
.site-footer .inspiration-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.site-footer .inspiration-title a {
    color: rgba(255, 255, 255, 0.9);
}

.site-footer .inspiration-title a:hover {
    color: var(--color-primary);
}

.site-footer .inspiration-excerpt {
    color: rgba(255, 255, 255, 0.6);
}

.site-footer .inspiration-date {
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================ */
/* WIDGETS EN GRID PARA FOOTER                  */
/* ============================================ */

/* Si quieres los tres widgets en una fila en el footer */
.footer-widgets-area .widget-islanoticias-history,
.footer-widgets-area .widget-islanoticias-events,
.footer-widgets-area .widget-islanoticias-inspiration {
    height: 100%;
}

/* Asegurar que los widgets ocupen toda la columna */
.footer-widget-col .widget-islanoticias-history,
.footer-widget-col .widget-islanoticias-events,
.footer-widget-col .widget-islanoticias-inspiration {
    height: 100%;
}
/* ------------------ */

/* ============================================ */
/* FRONT PAGE - SECCIONES ESPECIALES            */
/* ============================================ */

.frontpage-special-sections {
    margin: 2.5rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.special-sections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.special-section-widget {
    background: var(--color-white);
    padding: 1.25rem;
    border-radius: 0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.special-section-widget:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.special-section-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.special-section-title i {
    color: var(--color-primary);
}

/* ============================================ */
/* FRONT PAGE - BEFORE FOOTER                   */
/* ============================================ */

.frontpage-before-footer-area {
    margin: 2.5rem 0 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: var(--radius-lg);
    color: rgba(255, 255, 255, 0.9);
}

.frontpage-before-footer-area .before-footer-title {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.frontpage-before-footer-area .before-footer-title i {
    color: var(--color-primary);
}

.frontpage-before-footer-area .before-footer-widget {
    margin-bottom: 1rem;
}

.frontpage-before-footer-area .before-footer-widget:last-child {
    margin-bottom: 0;
}

.frontpage-before-footer-area a {
    color: var(--color-primary);
}

.frontpage-before-footer-area a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* ============================================ */
/* RESPONSIVE PARA FRONT PAGE                   */
/* ============================================ */

@media (max-width: 992px) {
    .special-sections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .special-sections-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .frontpage-before-footer-area {
        padding: 1.5rem;
    }
    
    .frontpage-dynamic-area .frontpage-widget {
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .frontpage-before-footer-area {
        padding: 1rem;
    }
}
/* ------------------- */
/* Ajustar el widget de clima al estilo de tu header */
.weather-widget .fyp-weather-widget {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-size: 0.875rem;
}

.weather-widget .fyp-weather-widget .weather-temp {
    font-weight: 500;
}

.weather-widget .fyp-weather-widget .weather-description {
    display: none; /* Oculta la descripción larga si quieres solo temperatura y ciudad */
}

/* Si usas el shortcode con clase personalizada */
.weather-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.weather-header .weather-temp {
    font-size: 0.875rem;
    font-weight: 500;
}

.weather-header .weather-city {
    font-size: 0.75rem;
    color: var(--color-gray);
}
/* --------------------- */
.single-sidebar-modern .single-widget{
  margin-bottom: 1rem;
  background: var(--color-white);
  padding: 0.5rem;
}