/* ============================================================
   AL DÍA PANAMÁ - Estilos del Sitio Público
   Portal de noticias estilo periódico digital panameño
   ============================================================ */

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #e63946;
    --dark: #1a1a1a;
    --dark-light: #2d2d2d;
    --gray-dark: #495057;
    --gray: #6c757d;
    --gray-light: #adb5bd;
    --gray-lighter: #dee2e6;
    --gray-bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 6px;
    --transition: 0.2s ease;
    --font-title: 'Barlow Condensed', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    background: var(--gray-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* === TOP BAR === */
.top-bar {
    background: var(--dark);
    color: var(--gray-light);
    font-size: 0.8rem;
    padding: 6px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-date i {
    margin-right: 5px;
}

.top-bar-social a {
    color: var(--gray-light);
    margin-left: 12px;
    font-size: 0.85rem;
}

.top-bar-social a:hover {
    color: var(--white);
}

/* === HEADER === */
.main-header {
    background: var(--white);
    padding: 12px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo img {
    max-height: 50px;
    width: auto;
}

.logo-text {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.logo-text strong {
    color: var(--primary);
}

.logo-text-white {
    color: var(--white);
}

.header-search {
    flex: 1;
    max-width: 400px;
}

.search-form {
    display: flex;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius);
    overflow: hidden;
}

.search-form input {
    flex: 1;
    border: none;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    outline: none;
}

.search-form button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    transition: background var(--transition);
}

.search-form button:hover {
    background: #c62a36;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 5px;
}

/* === NAVIGATION === */
.main-nav {
    background: var(--dark);
    position: sticky;
    top: 74px;
    z-index: 999;
}

.nav-scroll {
    overflow: visible;
}

.nav-list {
    display: flex;
    list-style: none;
    overflow: visible;
}

.nav-list li a {
    display: block;
    color: var(--white);
    padding: 12px 18px;
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: background var(--transition);
    border-bottom: 3px solid transparent;
}

.nav-list li a:hover {
    background: var(--dark-light);
}

.nav-list li a i {
    margin-right: 4px;
}

/* === TICKER / BREAKING NEWS === */
.ticker-bar {
    background: var(--primary);
    color: var(--white);
    padding: 8px 0;
    overflow: hidden;
}

.ticker-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ticker-label {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    background: var(--dark);
    padding: 4px 12px;
    border-radius: 3px;
    white-space: nowrap;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ticker-content {
    flex: 1;
    overflow: hidden;
}

.ticker-track {
    display: flex;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    color: var(--white);
    padding: 0 30px;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.ticker-item::after {
    content: '•';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.ticker-item:last-child::after {
    content: '';
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* === CONTENT LAYOUT === */
.main-content {
    padding: 20px 0 40px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

.content-main {
    min-width: 0;
}

/* === FEATURED POST === */
.featured-post {
    margin-bottom: 30px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.featured-link {
    display: block;
}

.featured-image {
    position: relative;
    height: 450px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-link:hover .featured-image img {
    transform: scale(1.03);
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: var(--white);
}

.featured-title {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 10px 0;
}

.featured-excerpt {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-meta {
    font-size: 0.85rem;
    opacity: 0.8;
}

.featured-meta span {
    margin-right: 15px;
}

.featured-meta i {
    margin-right: 4px;
}

/* === CATEGORY BADGE === */
.category-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--white);
    border-radius: 3px;
    font-family: var(--font-title);
}

/* === SECTION BLOCKS === */
.section-block {
    margin-bottom: 35px;
}

.section-title {
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 0;
    margin-bottom: 18px;
    border-left: 4px solid var(--primary);
    padding-left: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title i {
    margin-right: 8px;
    color: var(--primary);
}

.section-more {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: none;
    color: var(--gray) !important;
}

.section-more:hover {
    color: var(--primary) !important;
}

/* === POSTS GRID === */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.posts-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* === POST CARD === */
.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition), transform var(--transition);
}

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

.post-card-link {
    display: block;
}

.post-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-image .category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.post-card-body {
    padding: 15px;
}

.post-card-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--dark);
}

.post-card:hover .post-card-title {
    color: var(--primary);
}

.post-card-excerpt {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    font-size: 0.75rem;
    color: var(--gray-light);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.post-card-meta i {
    margin-right: 3px;
}

.post-card-date {
    font-size: 0.75rem;
    color: var(--gray-light);
}

/* Small post card */
.post-card-sm .post-card-image {
    height: 140px;
}

.post-card-sm .post-card-title {
    font-size: 0.95rem;
    -webkit-line-clamp: 2;
}

/* === SIDEBAR === */
.sidebar {
    position: sticky;
    top: 130px;
    align-self: start;
}

.widget {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.widget-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 3px solid var(--primary);
}

.widget-title i {
    margin-right: 6px;
    color: var(--primary);
}

/* Widget posts */
.widget-posts {
    list-style: none;
}

.widget-post-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-lighter);
}

.widget-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget-post-item a {
    display: flex;
    gap: 10px;
}

.widget-post-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.widget-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget-post-number {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--primary);
    color: var(--white);
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 4px 0;
}

.widget-post-info {
    flex: 1;
    min-width: 0;
}

.widget-post-category {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-title);
}

.widget-post-info h4 {
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.widget-post-info time {
    font-size: 0.7rem;
    color: var(--gray-light);
}

/* Widget categories */
.widget-categories {
    list-style: none;
}

.widget-categories li a {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-lighter);
    font-size: 0.9rem;
}

.widget-categories li:last-child a {
    border-bottom: none;
}

.cat-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

.cat-name {
    flex: 1;
}

.cat-count {
    background: var(--gray-bg);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 500;
}

/* === ARTICLE SINGLE === */
.article-single {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.article-featured-image {
    height: 400px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-top-meta {
    padding: 20px 25px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--gray);
}

.article-top-meta i {
    margin-right: 4px;
}

.article-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    padding: 15px 25px;
    color: var(--dark);
}

.article-content {
    padding: 0 25px 25px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.article-content p {
    margin-bottom: 1.2em;
}

.article-content h2, .article-content h3 {
    font-family: var(--font-title);
    margin: 1.5em 0 0.8em;
}

.article-content img {
    border-radius: var(--radius);
    margin: 1em 0;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    margin: 1.5em 0;
    background: var(--gray-bg);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.article-content ul, .article-content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.article-content a {
    color: var(--primary);
    text-decoration: underline;
}

/* === SOCIAL SHARE === */
.social-share {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.share-label {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray);
}

.share-buttons {
    display: flex;
    gap: 6px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: transform var(--transition), opacity var(--transition);
}

.share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #000; }
.share-whatsapp { background: #25d366; }
.share-telegram { background: #0088cc; }
.share-linkedin { background: #0077b5; }
.share-copy { background: var(--gray); }
.share-copy.copied { background: #28a745; }

/* === ARTICLE GALLERY === */
.article-gallery {
    padding: 0 25px 25px;
}

.article-gallery h3 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.article-gallery h3 i {
    margin-right: 6px;
    color: var(--primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.gallery-grid a {
    border-radius: 4px;
    overflow: hidden;
    height: 120px;
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-grid a:hover img {
    transform: scale(1.1);
}

/* === ARTICLE TAGS === */
.article-tags {
    padding: 15px 25px;
    border-top: 1px solid var(--gray-lighter);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.article-tags i {
    color: var(--gray);
    margin-right: 4px;
}

.tag-link {
    background: var(--gray-bg);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--gray-dark);
    transition: background var(--transition);
}

.tag-link:hover {
    background: var(--primary);
    color: var(--white);
}

/* === RELATED POSTS === */
.related-posts {
    padding: 25px;
    border-top: 1px solid var(--gray-lighter);
}

/* === COMMENTS === */
.comments-section {
    padding: 25px;
    border-top: 1px solid var(--gray-lighter);
}

.comments-list {
    margin-top: 15px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-lighter);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    font-size: 2rem;
    color: var(--gray-light);
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-meta {
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.comment-meta strong {
    margin-right: 10px;
}

.comment-meta time {
    color: var(--gray-light);
    font-size: 0.8rem;
}

.comment-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-dark);
}

/* === CATEGORY HEADER === */
.category-header {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--primary);
}

.category-header h1 {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.category-header p {
    color: var(--gray);
    font-size: 0.95rem;
}

.category-count {
    font-size: 0.85rem;
    color: var(--gray-light);
}

/* === SEARCH PAGE === */
.search-page-header {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    text-align: center;
}

.search-page-header h1 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.search-page-header h1 i {
    color: var(--primary);
    margin-right: 8px;
}

.search-form-lg {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius);
    overflow: hidden;
}

.search-form-lg input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
}

.search-form-lg button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background var(--transition);
}

.search-form-lg button:hover {
    background: #c62a36;
}

.search-results-count {
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--gray);
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-link {
    padding: 8px 14px;
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--gray-dark);
    background: var(--white);
    transition: all var(--transition);
}

.page-link:hover, .page-link.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.page-dots {
    padding: 8px 5px;
    color: var(--gray-light);
}

/* === BANNER === */
.banner {
    margin: 15px 0;
    text-align: center;
}

.banner img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius);
}

/* === ERROR PAGE === */
.error-page {
    text-align: center;
    padding: 60px 20px;
}

.error-page h1 {
    font-family: var(--font-title);
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.error-page p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: #c62a36;
}

/* === NO RESULTS === */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

/* === FOOTER === */
.main-footer {
    background: var(--dark);
    color: var(--gray-light);
    padding: 40px 0 0;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 30px;
}

.footer-logo img {
    max-height: 40px;
    margin-bottom: 12px;
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    margin-right: 6px;
    transition: background var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
}

.footer-col h4 {
    color: var(--white);
    font-family: var(--font-title);
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.footer-contact i {
    margin-right: 6px;
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 15px 0;
    text-align: center;
    font-size: 0.85rem;
}

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

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr 280px;
        gap: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .posts-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: var(--dark);
        z-index: 2000;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding-top: 60px;
    }

    .main-nav.open {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
    }

    .nav-list li a {
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    /* Mobile submenu: static instead of absolute */
    .nav-sub {
        position: static;
        box-shadow: none;
        border-radius: 0;
        background: rgba(255,255,255,0.05);
        padding: 0;
    }
    .nav-sub li a {
        padding-left: 36px;
        font-size: 0.85rem;
        color: rgba(255,255,255,0.8) !important;
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .posts-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-image {
        height: 300px;
    }

    .featured-title {
        font-size: 1.5rem;
    }

    .article-title {
        font-size: 1.6rem;
        padding: 15px;
    }

    .article-content {
        padding: 0 15px 15px;
    }

    .article-top-meta {
        padding: 15px 15px 0;
    }

    .social-share {
        padding: 15px;
    }

    .article-tags, .related-posts, .comments-section {
        padding: 15px;
    }

    .article-featured-image {
        height: 250px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .top-bar {
        display: none;
    }

    .main-header {
        top: 0;
    }
}

@media (max-width: 480px) {
    .posts-grid, .posts-grid-4 {
        grid-template-columns: 1fr;
    }

    .featured-image {
        height: 220px;
    }

    .featured-title {
        font-size: 1.3rem;
    }

    .featured-overlay {
        padding: 15px;
    }

    .article-title {
        font-size: 1.4rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-card-image {
        height: 180px;
    }
}

/* === MOBILE NAV OVERLAY === */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
}

.nav-overlay.active {
    display: block;
}

/* === MOBILE NAV CLOSE BUTTON === */
.nav-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-close {
        display: block;
    }
}

/* ============================================================
   HERO SLIDER SECTION
   ============================================================ */

.hero-section {
    background: var(--dark);
    padding: 0;
    margin-bottom: 25px;
}

.hero-slider-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 340px;
    min-height: 420px;
}

/* Slider principal */
.hero-slider {
    width: 100%;
    height: 420px;
}

.hero-slide-link {
    display: block;
    position: relative;
    height: 100%;
}

.hero-slide-img {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-slide-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: var(--white);
}

.hero-slide-title {
    font-family: var(--font-title);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 10px 0;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
}

.hero-slide-excerpt {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.hero-slide-meta {
    font-size: 0.8rem;
    opacity: 0.75;
}

.hero-slide-meta span {
    margin-right: 15px;
}

.hero-slide-meta i {
    margin-right: 4px;
}

/* Swiper customization */
.hero-slider .swiper-pagination-bullet {
    background: var(--white);
    opacity: 0.5;
    width: 10px;
    height: 10px;
}

.hero-slider .swiper-pagination-bullet-active {
    background: var(--primary);
    opacity: 1;
}

.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
    color: var(--white);
    background: rgba(0,0,0,0.4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background var(--transition);
}

.hero-slider .swiper-button-next::after,
.hero-slider .swiper-button-prev::after {
    font-size: 16px;
}

.hero-slider .swiper-button-next:hover,
.hero-slider .swiper-button-prev:hover {
    background: var(--primary);
}

/* Side posts (junto al slider) */
.hero-side-posts {
    background: var(--dark-light);
    display: flex;
    flex-direction: column;
}

.hero-side-item {
    display: flex;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex: 1;
    transition: background var(--transition);
}

.hero-side-item:hover {
    background: rgba(255,255,255,0.05);
}

.hero-side-item:last-child {
    border-bottom: none;
}

.hero-side-thumb {
    width: 90px;
    height: 65px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.hero-side-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-side-info {
    flex: 1;
    min-width: 0;
    color: var(--white);
}

.hero-side-cat {
    font-family: var(--font-title);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-side-info h4 {
    font-family: var(--font-title);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.25;
    margin: 3px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-side-info time {
    font-size: 0.7rem;
    color: var(--gray-light);
}

/* ============================================================
   CATEGORY LAYOUTS
   ============================================================ */

/* --- Layout HIGHLIGHT: 1 grande + lista lateral --- */
.cat-layout-highlight {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}

.highlight-card {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
}

.highlight-img {
    position: relative;
    height: 340px;
    overflow: hidden;
}

.highlight-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.highlight-card:hover .highlight-img img {
    transform: scale(1.04);
}

.highlight-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: var(--white);
}

.highlight-overlay h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 8px 0;
}

.highlight-overlay p {
    font-size: 0.85rem;
    opacity: 0.85;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.highlight-overlay time {
    font-size: 0.75rem;
    opacity: 0.7;
}

.cat-highlight-side {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cat-side-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-lighter);
    transition: background var(--transition);
}

.cat-side-item:last-child {
    border-bottom: none;
}

.cat-side-item:hover {
    background: var(--gray-bg);
}

.cat-side-thumb {
    width: 100px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.cat-side-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-side-info {
    flex: 1;
    min-width: 0;
}

.cat-side-info h4 {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--dark);
}

.cat-side-item:hover h4 {
    color: var(--primary);
}

.cat-side-info time {
    font-size: 0.7rem;
    color: var(--gray-light);
}

/* --- Layout LIST: filas horizontales --- */
.cat-layout-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.list-card {
    display: flex;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-lighter);
    transition: background var(--transition);
}

.list-card:first-child {
    padding-top: 0;
}

.list-card:last-child {
    border-bottom: none;
}

.list-card:hover {
    background: var(--gray-bg);
}

.list-card-img {
    width: 220px;
    height: 140px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.list-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.list-card:hover .list-card-img img {
    transform: scale(1.05);
}

.list-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.list-card-cat {
    font-family: var(--font-title);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.list-card-body h3 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 6px;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-card:hover h3 {
    color: var(--primary);
}

.list-card-body p {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.list-card-meta {
    font-size: 0.75rem;
    color: var(--gray-light);
    display: flex;
    gap: 12px;
}

.list-card-meta i {
    margin-right: 3px;
}

/* ============================================================
   RESPONSIVE - HERO & CATEGORY LAYOUTS
   ============================================================ */

@media (max-width: 1024px) {
    .hero-slider-wrapper {
        grid-template-columns: 1fr 280px;
    }

    .hero-slider {
        height: 360px;
    }

    .hero-slide-title {
        font-size: 1.5rem;
    }

    .cat-layout-highlight {
        grid-template-columns: 1fr 300px;
    }
}

@media (max-width: 768px) {
    .hero-slider-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        height: 300px;
    }

    .hero-side-posts {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hero-side-item {
        border-bottom: none;
        border-right: 1px solid rgba(255,255,255,0.06);
    }

    .hero-slide-title {
        font-size: 1.3rem;
    }

    .hero-slide-excerpt {
        display: none;
    }

    .cat-layout-highlight {
        grid-template-columns: 1fr;
    }

    .highlight-img {
        height: 240px;
    }

    .list-card-img {
        width: 130px;
        height: 90px;
    }

    .list-card-body h3 {
        font-size: 1rem;
    }

    .list-card-body p {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 240px;
    }

    .hero-side-posts {
        grid-template-columns: 1fr;
    }

    .hero-side-item {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .hero-slide-title {
        font-size: 1.15rem;
    }

    .highlight-img {
        height: 200px;
    }

    .highlight-overlay h3 {
        font-size: 1.2rem;
    }

    .list-card {
        gap: 10px;
    }

    .list-card-img {
        width: 100px;
        height: 75px;
    }
}

/* === COMMENT FORM === */
.comment-form-wrapper {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--gray-lighter);
}

.comment-form-title {
    font-family: var(--font-title);
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.comment-form-title i {
    color: var(--primary);
    margin-right: 6px;
}

.comment-alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.comment-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.comment-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.comment-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-form-field {
    margin-bottom: 12px;
}

.comment-form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--gray-dark);
}

.comment-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--dark);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

textarea.comment-input {
    resize: vertical;
    min-height: 100px;
}

.comment-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.comment-submit-btn:hover {
    background: #c1121f;
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .comment-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ============================================================
   LAYOUT DUO
   2-4 tarjetas grandes con imagen de fondo, mismo peso visual
   ============================================================ */
.cat-layout-duo {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}
.duo-card {
    position: relative;
    display: block;
    height: 280px;
    overflow: hidden;
    border-radius: var(--radius);
    text-decoration: none;
}
.duo-img { position: absolute; inset: 0; }
.duo-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.duo-card:hover .duo-img img { transform: scale(1.05); }
.duo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    color: #fff;
    gap: 7px;
}
.duo-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-self: flex-start;
}
.duo-overlay h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}
.duo-overlay time { font-size: 0.75rem; opacity: 0.75; }
@media (max-width: 600px) {
    .cat-layout-duo { grid-template-columns: 1fr; }
    .duo-card { height: 200px; }
}

/* ============================================================
   SIDEBAR COMPACT
   Lista numerada solo texto, sin imágenes
   ============================================================ */
.swc-list { list-style: none; padding: 0; margin: 0; }
.swc-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-lighter);
}
.swc-item:last-child { border-bottom: none; }
.swc-num {
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700;
    color: #fff; margin-top: 1px;
}
.swc-link {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.35;
    transition: color 0.15s;
}
.swc-link time {
    display: block;
    font-size: 0.73rem;
    color: var(--gray);
    margin-top: 3px;
    font-weight: 400;
}
.swc-link:hover { color: var(--primary); }

/* ============================================================
   SIDEBAR FEATURED
   Primer post con imagen grande + resto como lista de texto
   ============================================================ */
.swf-main {
    display: block;
    text-decoration: none;
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}
.swf-img { position: relative; height: 160px; overflow: hidden; }
.swf-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.swf-main:hover .swf-img img { transform: scale(1.04); }
.swf-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, transparent 60%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 12px; color: #fff; gap: 4px;
}
.swf-overlay h4 { font-size: 0.9rem; font-weight: 700; line-height: 1.3; margin: 0; }
.swf-overlay time { font-size: 0.72rem; opacity: 0.8; }
.swf-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-lighter);
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.83rem;
    font-weight: 500;
    line-height: 1.35;
    transition: color 0.15s;
}
.swf-item:last-child { border-bottom: none; }
.swf-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; }
.swf-item:hover { color: var(--primary); }

/* ============================================================
   NAV DROPDOWN
   Submenú al hacer hover sobre una categoría en la navegación
   ============================================================ */
.main-nav .nav-list > li { position: relative; }
.nav-arr {
    font-size: 0.6rem !important;
    vertical-align: middle;
    margin-left: 3px;
    transition: transform 0.2s;
    opacity: 0.7;
}
.main-nav .nav-list > li.has-dropdown:hover .nav-arr { transform: rotate(180deg); }
.nav-sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
    border-radius: 0 0 6px 6px;
    border-top: 3px solid var(--primary);
    z-index: 300;
    list-style: none;
    padding: 5px 0;
    margin: 0;
}
.main-nav .nav-list > li.has-dropdown:hover .nav-sub,
.main-nav .nav-list > li.has-dropdown.sub-open .nav-sub { display: block; }
.main-nav .nav-list > li.has-dropdown.sub-open .nav-arr { transform: rotate(180deg); }
.nav-sub li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: 0.84rem;
    color: var(--text-dark) !important;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    border-bottom: none !important;
    white-space: nowrap;
}
.nav-sub li a:hover { background: #fef3f3; color: var(--primary) !important; }

/* ============================================================
   SIDEBAR HERO — imagen grande + título debajo
   ============================================================ */
.swh-card {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}
.swh-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.swh-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.swh-card:hover .swh-img { transform: scale(1.03); }
.swh-img-wrap {
    overflow: hidden;
    display: block;
}
.swh-title {
    padding: 12px 14px 14px;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.35;
    color: var(--dark);
}

/* ============================================================
   LAYOUT MOSAIC
   1 grande (ocupa 2 cols + 2 filas) + hasta 4 pequeños
   ============================================================ */
.cat-layout-mosaic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 240px 200px;
    gap: 4px;
    border-radius: var(--radius);
    overflow: hidden;
}

.mosaic-item {
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
}

.mosaic-item--main {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.mosaic-item--small {
    grid-column: auto;
    grid-row: auto;
}

.mosaic-img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.mosaic-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.mosaic-item:hover .mosaic-img img {
    transform: scale(1.05);
}

.mosaic-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.1) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    color: #fff;
    gap: 5px;
}

.mosaic-item--main .mosaic-overlay {
    padding: 22px;
    gap: 8px;
}

.mosaic-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-self: flex-start;
}

.mosaic-item--main .mosaic-overlay h3 {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    font-family: var(--font-heading);
}

.mosaic-item--main .mosaic-overlay p {
    font-size: 0.88rem;
    opacity: 0.88;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mosaic-item--small .mosaic-overlay h4 {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mosaic-overlay time {
    font-size: 0.75rem;
    opacity: 0.75;
}

@media (max-width: 768px) {
    .cat-layout-mosaic {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 200px 140px 140px;
    }
    .mosaic-item--main {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }
}

@media (max-width: 480px) {
    .cat-layout-mosaic {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .mosaic-item {
        height: 180px;
    }
    .mosaic-item--main {
        grid-column: 1;
        grid-row: auto;
        height: 240px;
    }
}

/* ============================================================
   LAYOUT MAGAZINE
   Columna izquierda (card grande con imagen+texto)
   Columna derecha (stack de artículos con acento de color)
   ============================================================ */
.cat-layout-magazine {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

/* Tarjeta principal izquierda */
.mag-main-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: box-shadow 0.2s;
}

.mag-main-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.13);
}

.mag-main-img {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.mag-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.mag-main-card:hover .mag-main-img img {
    transform: scale(1.04);
}

.mag-main-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
}

.mag-main-body {
    padding: 16px 18px 20px;
}

.mag-main-body h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
    color: var(--text-dark);
}

.mag-main-body p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mag-main-body time {
    font-size: 0.78rem;
    color: var(--gray);
}

/* Stack de artículos derecha */
.mag-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mag-stack-item {
    display: grid;
    grid-template-columns: 3px 80px 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-lighter);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.mag-stack-item:last-child {
    border-bottom: none;
}

.mag-stack-item:hover .mag-stack-body h4 {
    color: var(--primary);
}

.mag-stack-accent {
    width: 3px;
    align-self: stretch;
    border-radius: 2px;
    min-height: 50px;
}

.mag-stack-img {
    width: 80px;
    height: 64px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.mag-stack-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.mag-stack-item:hover .mag-stack-img img {
    transform: scale(1.06);
}

.mag-stack-body h4 {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 5px;
    color: var(--text-dark);
    transition: color 0.15s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mag-stack-meta {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--gray);
}

@media (max-width: 768px) {
    .cat-layout-magazine {
        grid-template-columns: 1fr;
    }
    .mag-main-img {
        height: 200px;
    }
}
