* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --bg-light: #f8f9fa;
    --bg-dark: #1f2937;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
    font-size: 16px;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 1000;
    padding: 0.75rem 1rem;
    background: var(--text-dark);
    color: #fff;
    border-radius: 0 0 6px 6px;
}

.skip-link:focus { top: 0; }

:focus-visible {
    outline: 3px solid #4338ca;
    outline-offset: 3px;
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
        padding: 0 20px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 20px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 900px;
        padding: 0 20px;
    }
}

/* NAVBAR */
.navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
}

.navbar-brand {
    flex-grow: 1;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
    color: var(--text-dark);
}

.logo span {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    width: 24px;
    height: 24px;
    stroke: var(--primary-color);
    stroke-width: 2.5px;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover .logo-icon {
    transform: scale(1.1) rotate(10deg);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 9999px;
    transition: all 0.2s ease;
    display: inline-block;
}

.nav-menu a:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.nav-menu a.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.08);
}

/* HAMBURGER MENU */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 5px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* MAIN CONTENT */
main.container {
    padding: 40px 20px 40px 20px;
    min-height: calc(100vh - 200px);
    width: 100%;
}

h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
    margin-top: 0;
    word-wrap: break-word;
}

.page-title-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    word-wrap: break-word;
}

.section-title-icon {
    width: 24px;
    height: 24px;
    stroke: var(--text-dark);
    flex-shrink: 0;
}

/* HOME HEADER */
.home-header {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.header-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.08);
    padding: 4px 12px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.home-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-subtitle {
    font-size: 16px;
    color: var(--text-light);
    max-width: 600px;
    line-height: 1.6;
    margin: 0;
}

/* CATEGORY QUICK FILTERS (PILLS) */
.category-pills {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE */
}

.category-pills::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.pill-btn .lucide {
    width: 14px;
    height: 14px;
    stroke-width: 2px;
}

.pill-btn:hover {
    background: #f9fafb;
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--text-dark);
}

.pill-btn.active {
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}

/* Inactive category specific hovers */
.pill-btn[data-category=""]:hover:not(.active) {
    color: var(--primary-color);
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.04);
}
.pill-btn[data-category="noticias"]:hover:not(.active) {
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(37, 99, 235, 0.04);
}
.pill-btn[data-category="herramientas"]:hover:not(.active) {
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.3);
    background: rgba(217, 119, 6, 0.04);
}
.pill-btn[data-category="guias"]:hover:not(.active) {
    color: #7c3aed;
    border-color: rgba(124, 58, 237, 0.3);
    background: rgba(124, 58, 237, 0.04);
}
.pill-btn[data-category="cursos"]:hover:not(.active) {
    color: #059669;
    border-color: rgba(5, 150, 105, 0.3);
    background: rgba(5, 150, 105, 0.04);
}
.pill-btn[data-category="multimedia"]:hover:not(.active) {
    color: #db2777;
    border-color: rgba(219, 39, 119, 0.3);
    background: rgba(219, 39, 119, 0.04);
}

/* Active category styles and hover state protection */
.pill-btn[data-category=""].active {
    background: var(--primary-color);
}
.pill-btn[data-category=""].active:hover {
    background: #4f46e5;
    color: white;
}

.pill-btn[data-category="noticias"].active {
    background: #3b82f6;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}
.pill-btn[data-category="noticias"].active:hover {
    background: #2563eb;
    color: white;
}

.pill-btn[data-category="herramientas"].active {
    background: #f59e0b;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25);
}
.pill-btn[data-category="herramientas"].active:hover {
    background: #d97706;
    color: white;
}

.pill-btn[data-category="guias"].active {
    background: #8b5cf6;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.25);
}
.pill-btn[data-category="guias"].active:hover {
    background: #7c3aed;
    color: white;
}

.pill-btn[data-category="cursos"].active {
    background: #10b981;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}
.pill-btn[data-category="cursos"].active:hover {
    background: #059669;
    color: white;
}

.pill-btn[data-category="multimedia"].active {
    background: #ec4899;
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.25);
}
.pill-btn[data-category="multimedia"].active:hover {
    background: #db2777;
    color: white;
}

/* SEARCH SECTION */
.search-container {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 40px;
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--text-light);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.filter-select,
.filter-input {
    height: 44px;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 14px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background-color: white;
    transition: border-color 0.3s;
    color: var(--text-dark);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-stats {
    display: flex;
    align-items: center;
    height: 44px;
    box-sizing: border-box;
    padding: 10px 12px;
    background-color: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.filter-stats strong {
    color: var(--primary-color);
    font-size: 16px;
    margin: 0 4px;
}

/* VIEW TABS STYLING (Todos vs Destacados) */
.resources-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 12px;
}

/* VIEW LAYOUT ACTIONS & TOGGLES */
.resources-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.category-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 16px;
    width: 100%;
}

.category-header-row .category-description {
    margin: 0;
}

.layout-toggle {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.04);
    padding: 3px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.layout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--text-light);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.layout-btn .lucide {
    width: 16px;
    height: 16px;
    stroke-width: 2.2px;
}

.layout-btn:hover {
    color: var(--text-dark);
}

.layout-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

/* LIST VIEW MODE (.view-mode-list) */
.resources-list.view-mode-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.resources-header-row h2 {
    margin: 0;
}

.view-tabs {
    display: inline-flex;
    background: var(--bg-light);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-dark);
}

.tab-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tab-btn#tabFeatured.active {
    color: #d97706;
}

.tab-btn .lucide {
    width: 14px;
    height: 14px;
    transition: fill 0.2s ease;
}

.tab-btn#tabFeatured.active .lucide {
    fill: #f59e0b;
    stroke: #d97706;
}

.empty-state {
    grid-column: 1 / -1; /* Ocupa todo el ancho en el grid */
    text-align: center;
    padding: 60px 40px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 500px;
    margin: 40px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.empty-state-icon .lucide {
    width: 28px;
    height: 28px;
    stroke-width: 2.2px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
    margin: 0;
    max-width: 380px;
}

.empty-state-reset-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
    margin-top: 8px;
}

.empty-state-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.3);
    background: var(--secondary-color);
}

.resource-tags {
    font-size: 12px;
    color: var(--secondary-color);
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* CATEGORIES GRID */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.category-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.category-card .emoji {
    font-size: 40px;
    margin-bottom: 15px;
}

.category-card h2 {
    margin-bottom: 10px;
}

.category-card p {
    color: var(--text-light);
    font-size: 14px;
}

/* RESOURCES LIST */
.resources-container {
    margin-bottom: 50px;
    width: 100%;
}

.category-description {
    margin-bottom: 30px;
    color: var(--text-light);
    font-size: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.resources-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
    width: 100%;
}

.resource-item {
    position: relative; /* Contexto de posicionamiento para stretched link */
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

/* Línea superior acentuada de color según categoría */
.resource-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--category-color, var(--primary-color));
    transition: height 0.2s ease;
}

/* Category-specific variables for cleaner CSS */
.resource-item.category-noticias {
    --category-color: #3b82f6;
    --category-bg-hover: rgba(59, 130, 246, 0.03);
}
.resource-item.category-herramientas {
    --category-color: #f59e0b;
    --category-bg-hover: rgba(245, 158, 11, 0.03);
}
.resource-item.category-guias {
    --category-color: #8b5cf6;
    --category-bg-hover: rgba(139, 92, 246, 0.03);
}
.resource-item.category-cursos {
    --category-color: #10b981;
    --category-bg-hover: rgba(16, 185, 129, 0.03);
}
.resource-item.category-multimedia {
    --category-color: #ec4899;
    --category-bg-hover: rgba(236, 72, 153, 0.03);
}

.resource-item:hover {
    transform: translateY(-5px);
    background: var(--category-bg-hover, white);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 20px -8px var(--category-shadow, rgba(0, 0, 0, 0.12));
}

.resource-item.category-noticias:hover {
    --category-shadow: rgba(59, 130, 246, 0.2);
}
.resource-item.category-herramientas:hover {
    --category-shadow: rgba(245, 158, 11, 0.2);
}
.resource-item.category-guias:hover {
    --category-shadow: rgba(139, 92, 246, 0.2);
}
.resource-item.category-cursos:hover {
    --category-shadow: rgba(16, 185, 129, 0.2);
}
.resource-item.category-multimedia:hover {
    --category-shadow: rgba(236, 72, 153, 0.2);
}

/* Category-specific premium gradients for featured items */
.resource-item.category-noticias.featured-item {
    border-color: rgba(59, 130, 246, 0.2);
    background: linear-gradient(to bottom, #f3f8ff, white);
}
.resource-item.category-herramientas.featured-item {
    border-color: rgba(245, 158, 11, 0.2);
    background: linear-gradient(to bottom, #fffdf2, white);
}
.resource-item.category-guias.featured-item {
    border-color: rgba(139, 92, 246, 0.2);
    background: linear-gradient(to bottom, #fcf9ff, white);
}
.resource-item.category-cursos.featured-item {
    border-color: rgba(16, 185, 129, 0.2);
    background: linear-gradient(to bottom, #f5fdf9, white);
}
.resource-item.category-multimedia.featured-item {
    border-color: rgba(236, 72, 153, 0.2);
    background: linear-gradient(to bottom, #fff6fa, white);
}

/* Header layout within card */
.resource-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
}

/* Row containing category icon/name and date */
.resource-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
}

.resource-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--category-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resource-category-badge .lucide {
    width: 14px;
    height: 14px;
}

.resource-date {
    font-size: 12px;
    color: var(--text-light);
    background: rgba(0, 0, 0, 0.04);
    padding: 4px 10px;
    border-radius: 9999px;
    font-weight: 500;
}

/* Title */
.resource-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 4px;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.resource-item:hover .resource-title a {
    color: var(--category-color);
    text-decoration: none;
}

/* Stretched Link Overlay: expande el área clicable de la tarjeta */
.stretched-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

/* Description */
.resource-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
    margin-top: 4px;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer / Meta area */
.resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    padding-top: 16px;
    width: 100%;
}

/* Tag Pills */
.resource-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-pill {
    font-size: 11px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-light);
    padding: 2px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.resource-item:hover .tag-pill {
    background: var(--tag-bg-hover);
    color: var(--category-color);
}

.resource-item.category-noticias:hover .tag-pill { --tag-bg-hover: rgba(59, 130, 246, 0.08); }
.resource-item.category-herramientas:hover .tag-pill { --tag-bg-hover: rgba(245, 158, 11, 0.08); }
.resource-item.category-guias:hover .tag-pill { --tag-bg-hover: rgba(139, 92, 246, 0.08); }
.resource-item.category-cursos:hover .tag-pill { --tag-bg-hover: rgba(16, 185, 129, 0.08); }
.resource-item.category-multimedia:hover .tag-pill { --tag-bg-hover: rgba(236, 72, 153, 0.08); }

/* Source */
.resource-source-badge {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
}

/* Featured star animation & style */
.featured-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
}

.featured-badge .lucide {
    width: 16px;
    height: 16px;
    fill: #f59e0b;
    filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.2));
    transition: transform 0.3s ease;
}

.resource-item:hover .featured-badge .lucide {
    transform: scale(1.2) rotate(15deg);
}


/* TAGS */
.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: white;
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid var(--primary-color);
}

/* FILTERS */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 2px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* FOOTER */
.footer {
    background-color: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 32px 24px;
    margin-top: 80px;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copyright {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.footer-love {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}

.footer-icon {
    width: 14px;
    height: 14px;
    fill: #ef4444;
    stroke: #ef4444;
    animation: heartbeat 1.5s infinite ease-in-out;
    display: inline-block;
    vertical-align: middle;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

/* RESPONSIVE - TABLET (768px and below) */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .navbar .container {
        padding: 12px 15px;
    }

    .logo {
        font-size: 20px;
    }

    .nav-menu {
        gap: 12px;
        font-size: 13px;
    }

    .nav-menu a {
        padding: 5px 0;
    }

    main {
        padding: 40px 15px 30px 15px;
    }

    .hero h1 {
        font-size: 32px;
        margin-bottom: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .hero-icon {
        width: 32px;
        height: 32px;
    }

    .hero p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    h1 {
        font-size: 28px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .category-card {
        padding: 20px;
    }

    .category-card .emoji {
        font-size: 32px;
    }

    .category-card h2 {
        margin-bottom: 8px;
        font-size: 16px;
    }

    .resource-header {
        flex-direction: column;
        gap: 8px;
    }

    .resource-date {
        align-self: flex-start;
        font-size: 11px;
    }

    .resource-item {
        padding: 10px 12px;
    }

    .resource-title {
        font-size: 16px;
    }

    .resource-description {
        font-size: 13px;
    }

    .resource-meta {
        gap: 8px;
    }

    .resource-source {
        font-size: 11px;
    }

    .footer {
        padding: 20px 15px;
        margin-top: 30px;
    }

    .footer-copyright,
    .footer-love {
        font-size: 12px;
    }
}

/* RESPONSIVE - MOBILE (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .navbar .container {
        padding: 10px 12px;
        flex-wrap: nowrap;
    }

    .logo {
        font-size: 18px;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        gap: 0;
        padding: 15px 20px;
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 500px;
        display: flex;
    }

    .nav-menu li {
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        padding: 5px 0;
    }

    main {
        padding: 30px 12px 20px 12px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .hero p {
        font-size: 14px;
        margin-bottom: 15px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }

    .category-card {
        padding: 15px;
    }

    .category-card .emoji {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .category-card h2 {
        font-size: 14px;
        margin-bottom: 5px;
    }

    .category-card p {
        font-size: 12px;
    }

    .resources-list {
        gap: 8px;
    }

    .resource-item {
        padding: 10px 10px;
        border-left: 3px solid var(--primary-color);
    }

    .resource-header {
        gap: 6px;
    }

    .resource-title {
        font-size: 15px;
        margin-bottom: 0px;
    }

    .resource-date {
        font-size: 10px;
        padding: 3px 8px;
    }

    .resource-description {
        font-size: 12px;
        margin-bottom: 3px;
        line-height: 1.3;
    }

    .resource-meta {
        gap: 6px;
    }

    .resource-source {
        font-size: 10px;
    }

    .resource-duration {
        font-size: 10px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .footer {
        padding: 15px 12px;
        margin-top: 20px;
    }

    .footer-copyright,
    .footer-love {
        font-size: 11px;
    }

    .category-description {
        margin-bottom: 15px;
        font-size: 14px;
    }

    /* Search responsive */
    .search-container {
        padding: 15px;
        margin-bottom: 30px;
    }

    .search-input {
        padding: 10px 12px 10px 38px;
        font-size: 16px;
    }

    .filter-controls {
        gap: 10px;
    }

    .filter-group {
        min-width: 100%;
    }

    .filter-select,
    .filter-input {
        height: 38px;
        box-sizing: border-box;
        padding: 8px 10px;
        font-size: 13px;
    }

    .filter-stats {
        height: 38px;
        box-sizing: border-box;
        padding: 8px 10px;
        font-size: 12px;
    }

    .resource-tags {
        font-size: 11px;
    }

    .empty-state {
        padding: 40px 20px;
    }

    .empty-state h3 {
        font-size: 16px;
    }

    .empty-state p {
        font-size: 13px;
    }
}

/* Estilos Globales de Lucide Icons e Iconos específicos */
.lucide {
    display: inline-block;
    vertical-align: middle;
    width: 1em;
    height: 1em;
    stroke-width: 2px;
}

.footer-icon {
    width: 14px;
    height: 14px;
    stroke: #ef4444;
    fill: #ef4444;
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
    position: relative;
    top: -1px;
}

/* Colores de categoría para iconos de títulos */
.text-noticias { stroke: #3b82f6; }
.text-herramientas { stroke: #f59e0b; }
.text-guias { stroke: #8b5cf6; }
.text-cursos { stroke: #10b981; }
.text-multimedia { stroke: #ec4899; }

/* ═══════════════════════════════════════════════════════
   USER CARD COMPONENT
   ═══════════════════════════════════════════════════════ */

.user-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px 24px 24px;
    width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.12);
}

/* Avatar with gradient ring */
.user-card__avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.user-card__avatar-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: box-shadow 0.25s ease;
}

.user-card:hover .user-card__avatar-ring {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.user-card__avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    z-index: 1;
}

/* Online status dot */
.user-card__status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    z-index: 2;
}

.user-card__status--online { background: #22c55e; }
.user-card__status--offline { background: #9ca3af; }
.user-card__status--busy { background: #ef4444; }

/* Text block */
.user-card__info {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-card__name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

.user-card__role {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.01em;
}

/* Stats row */
.user-card__stats {
    display: flex;
    gap: 24px;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    justify-content: center;
}

.user-card__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.user-card__stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.2;
}

.user-card__stat-label {
    font-size: 0.6875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* CTA button */
.user-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    transition: opacity 0.2s ease, transform 0.15s ease;
    text-decoration: none;
}

.user-card__cta:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.user-card__cta:active {
    transform: scale(0.98);
}

.user-card__cta:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Joined date */
.user-card__meta {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ── Reduced motion ──────────────────────────────────── */

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

    .user-card,
    .user-card__avatar-ring,
    .user-card__cta {
        transition: none;
    }
    .user-card:hover {
        transform: none;
    }
    .user-card__cta:hover {
        transform: none;
    }
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 480px) {
    .user-card {
        width: 100%;
        max-width: 320px;
    }
}
