/* Medalla ludoteca */
.badge-jugable {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

/* Filtros de juegos */
.juegos-filtros {
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(154, 213, 8, 0.08) 0%, rgba(37, 99, 235, 0.05) 100%);
    padding: 1.5rem 1.8rem;
    border-radius: 14px;
    border: 1px solid rgba(154, 213, 8, 0.15);
    justify-content: center;

}

.juegos-filtros label {
    font-weight: 600;
    color: var(--color-dark);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.juegos-filtros .search-input,
.juegos-filtros select {
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    border: 2px solid rgba(154, 213, 8, 0.3);
    font-size: 0.95rem;
    background: #fff;
    color: var(--color-dark);
    transition: all 0.3s ease;
    font-weight: 500;
}

.juegos-filtros .search-input:focus,
.juegos-filtros select:focus {
    outline: none;
    border-color: #9ad508;
    box-shadow: 0 0 0 3px rgba(154, 213, 8, 0.15);
    background: #fafafa;
}

.juegos-filtros .search-input::placeholder {
    color: #999;
    font-style: italic;
}

.juegos-filtros .search-input {
    min-width: 200px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container::before {
    content: "🔍";
    position: absolute;
    left: 0.8rem;
    color: #999;
    pointer-events: none;
    font-size: 1rem;
}

.search-container input[type="text"] {
    padding-left: 2.5rem;
    /* Space for the icon */
    padding-right: 2.5rem;
    /* Space for the button */
}

.clear-search {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 50%;
    transition: color 0.3s ease;
}

.clear-search:hover {
    color: #666;
}

.search-input {
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    border: 2px solid rgba(154, 213, 8, 0.3);
    font-size: 0.95rem;
    background: #fff;
    color: var(--color-dark);
    transition: all 0.3s ease;
    font-weight: 500;
    font-family: inherit;
    min-width: 200px;
    max-width: 350px;
    width: 100%;
}

.search-input:focus {
    outline: none;
    border-color: #9ad508;
    box-shadow: 0 0 0 3px rgba(154, 213, 8, 0.15);
    background: #fafafa;
}

.search-input::placeholder {
    color: #999;
    font-style: italic;
}

.juegos-filtros select {
    min-width: 140px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1.2em 1.2em;
    padding-right: 2.5rem;
}

@media (max-width: 768px) {
    .juegos-filtros {
        padding: 1rem 1.2rem;
        gap: 0.8rem;
    }

    .juegos-filtros label {
        font-size: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .juegos-filtros input[type="text"],
    .juegos-filtros select {
        min-width: 100%;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}

/* =========================================
   FILTROS DE LIBROS
   ========================================= */
.libros-filtros {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    background: var(--color-bg-alt);
    padding: 1.5rem 1.8rem;
    border-radius: 14px;
    border: 1px solid rgba(154, 213, 8, 0.15);
    justify-content: center;
    align-items: center;
}

.libros-filtros label {
    font-weight: 600;
    color: var(--color-dark);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.libros-filtros .search-input,
.libros-filtros select {
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    border: 2px solid rgba(154, 213, 8, 0.3);
    font-size: 0.95rem;
    background: #fff;
    color: var(--color-dark);
    transition: all 0.3s ease;
    font-weight: 500;
}

.libros-filtros .search-input:focus,
.libros-filtros select:focus {
    outline: none;
    border-color: #9ad508;
    box-shadow: 0 0 0 3px rgba(154, 213, 8, 0.15);
    background: #fafafa;
}

.libros-filtros .search-input::placeholder {
    color: #999;
    font-style: italic;
}

.libros-filtros .search-input {
    min-width: 200px;
}

.libros-filtros .search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.libros-filtros .search-container::before {
    content: "🔍";
    position: absolute;
    left: 0.8rem;
    color: #999;
    pointer-events: none;
    font-size: 1rem;
}

.libros-filtros .search-container input[type="text"] {
    padding-left: 2.5rem;
}

.libros-filtros select:hover {
    border-color: rgba(154, 213, 8, 0.5);
}

@media (max-width: 768px) {
    .libros-filtros {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
    }

    .libros-filtros label {
        justify-content: center;
        font-size: 0.9rem;
    }

    .libros-filtros .search-input,
    .libros-filtros select {
        min-width: 100%;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}

/* =========================================
   MODAL EVENTO MEJORADO
   ========================================= */
.modal-evento {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal-evento.open {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 18px;
    max-width: 700px;
    width: 100%;
    padding: 2rem 2.5rem 1.5rem 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    position: relative;
    animation: fadeIn 0.3s;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.modal-close:hover {
    color: var(--color-danger);
}

.modal-loading {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    color: var(--color-text);
}

.modal-loading p {
    margin: 0;
    font-size: 0.95rem;
    color: #333;
}

.modal-loading.hidden {
    display: none;
}

.modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
}

.modal-fecha {
    font-size: 1rem;
    color: var(--color-primary-dark);
}

.modal-tipo {
    font-size: 1rem;
    color: var(--color-text-light);
}

.modal-desc {
    font-size: 1.05rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    overflow-y: auto;
    max-height: 40vh;
    padding-right: 0.5rem;
}

.modal-meetup {
    margin-top: 0.5rem;
    width: 100%;
    text-align: center;
}

.modal-evento img.modal-img {
    max-height: 220px;
    object-fit: cover;
    margin-bottom: 1rem;
    border-radius: 12px;
    width: 100%;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
    background: #eee;
    border-radius: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 8px;
}

@media (max-width: 900px) {
    .modal-content {
        max-width: 98vw;
        padding: 1.2rem 0.5rem 1rem 0.5rem;
    }

    .modal-title {
        font-size: 1.2rem;
    }

    .modal-evento img.modal-img {
        max-height: 140px;
    }
}

@media (max-width: 600px) {
    .modal-content {
        max-width: 100vw;
        padding: 0.7rem 0.2rem 0.7rem 0.2rem;
        border-radius: 0;
    }

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

    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 2.2rem;
    }

    .modal-desc {
        max-height: 30vh;
    }
}

body.modal-open {
    overflow: hidden;
}

/* =========================================
   MODAL EVENTO
   ========================================= */
.modal-evento {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal-evento.open {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 18px;
    max-width: 420px;
    width: 100%;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    position: relative;
    animation: fadeIn 0.3s;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.modal-close:hover {
    color: var(--color-danger);
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
}

.modal-fecha {
    font-size: 1rem;
    color: var(--color-primary-dark);
}

.modal-tipo {
    font-size: 1rem;
    color: var(--color-text-light);
}

.modal-desc {
    font-size: 1.05rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.modal-meetup {
    margin-top: 0.5rem;
    width: 100%;
    text-align: center;
}

.modal-evento img.modal-img {
    max-height: 220px;
    object-fit: cover;
    margin-bottom: 1rem;
    border-radius: 12px;
    width: 100%;
}

.event-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.event-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    width: 100%;
}

.event-card-header .card-tag {
    margin-bottom: 0;
}

.event-calendar {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
    padding-bottom: 1.2rem;
}

.calendar-weekdays-header {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 1.5rem 1.5rem 0 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

.calendar-weekday-label {
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.calendar-week {
    padding: 1.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0px;
    transition: background-color 0.3s ease;
}

.calendar-week.month-current {
    background: rgba(144, 238, 144, 0.15);
}

.calendar-week.month-next {
    background: rgba(255, 165, 0, 0.15);
}

.calendar-week.month-future {
    background: rgba(255, 127, 127, 0.15);
}

.calendar-week-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
    display: none;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
}

.calendar-day {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 150px;
}

.calendar-day-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.calendar-day-name {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: none;
}

.calendar-day-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-dark);
}

.calendar-event-item {
    background: #fff;
    border-radius: 12px;
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(37, 99, 235, 0.12);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);

}

.calendar-event-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.calendar-event-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-dark);
}

.calendar-event-time {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.calendar-event-empty {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: auto;
}

.calendar-days-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
}

.calendar-day {
    padding: 0.4rem;
    min-height: 80px;
}

@media (max-width: 768px) {
    .calendar-days-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.3rem;
    }

    .calendar-day {
        padding: 0.3rem;
        min-height: 70px;
    }

    .calendar-event-item {
        padding: 0.3rem 0.4rem;
    }
}

@media (max-width: 520px) {
    .calendar-days-grid {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .calendar-day {
        padding: 1rem;
        min-height: 60px;
    }

    .calendar-event-item {
        padding: 0.2rem 0.3rem;
    }

    .calendar-event-title {
        font-size: 0.75rem;
    }

    .calendar-event-time {
        font-size: 0.7rem;
    }
}

.btn-info {
    background: var(--color-info);
    color: #fff;
    border: none;
    transition: var(--transition);
}

.btn-info:hover {
    background: #2563eb;
    color: #fff;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .modal-content {
        max-width: 98vw;
        padding: 1.2rem 0.5rem 1rem 0.5rem;
    }

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

    .modal-evento img.modal-img {
        max-height: 140px;
    }
}

/* =========================================
   KAMIKAZE FREAK SHOP - MODERN STYLES
   ========================================= */

/* CSS Variables */
:root {
    --color-primary: #9ad508;
    --color-primary-dark: #698f08;
    --color-dark: #1a1a1a;
    --color-text: #2d2d2d;
    --color-text-light: #666666;
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-border: #e5e7eb;
    --color-card: #ffffff;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;
    --radius: 16px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Poppins', sans-serif;
    --max-width: 1200px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image: url(img/background.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: var(--radius);
}

/* =========================================
   PAGINACIÓN
   ========================================= */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.pagination button {
    min-width: 44px;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    border: 2px solid rgba(154, 213, 8, 0.3);
    background: #fff;
    color: var(--color-dark);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover:not(.btn-info) {
    border-color: #9ad508;
    background: rgba(154, 213, 8, 0.08);
}

.pagination .btn-primary {
    border-color: #9ad508;
    background: rgba(154, 213, 8, 0.12);
    color: var(--color-dark);
    padding: 0.6rem 1.2rem;
}

.pagination .btn-primary:hover {
    background: #9ad508;
    color: #000;
    transform: none;
    box-shadow: 0 4px 12px rgba(154, 213, 8, 0.25);
}

.pagination .btn-info {
    background: #9ad508;
    color: #000;
    border-color: #9ad508;
    box-shadow: 0 2px 8px rgba(154, 213, 8, 0.2);
}

.pagination span {
    color: #999;
    font-weight: 600;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 5px solid var(--color-primary);
    transition: var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-dark);
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 40px;
    height: 40px;
    /* background: var(--color-primary-dark); */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--color-dark);
    font-size: 1.1rem;
    border: var(--color-primary) solid 2px;
}

.logo-highlight {
    color: var(--color-primary-dark);
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-light);
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--color-dark);
    border-radius: 2px;
    transition: var(--transition);
}

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

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

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

/* =========================================
   MAIN CONTENT & SECTIONS
   ========================================= */

.main-content {
    padding-top: 72px;
    min-height: calc(100vh - 72px);
}

.page-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-bg);
    margin-bottom: 0.75rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--color-bg);
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

/* =========================================
   HERO
   ========================================= */

.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: var(--color-dark);
    background-size: cover;
    background-position: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(200, 230, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(200, 230, 0, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.5;
    background-image: url(img/IMG_20230718_204233-1024x576.jpg);
    background-size: cover;
    background-position: center;

}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2.5rem;
    font-weight: 300;
    line-height: 1.5;
}

/* =========================================
   WELCOME & FEATURES
   ========================================= */

.welcome-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.welcome-text .section-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.15rem;
    color: var(--color-bg);
    line-height: 1.8;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-card {
    background: var(--color-card);
    border: 5px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    line-height: 1;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* =========================================
   INFO STRIP
   ========================================= */

.info-strip {
    background: var(--color-bg-alt);
    padding: 4rem 0;
    padding-bottom: 0;
    border-top: 1px solid var(--color-border);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}

.info-block h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.info-block h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}

.info-block p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.info-block a {
    color: var(--color-dark);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--color-primary);
    text-underline-offset: 3px;
}

.info-block a:hover {
    color: var(--color-primary-dark);
}

/* =========================================
   CARDS GRID (Eventos, Juegos, MTG)
   ========================================= */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

#mtg-grid.cards-grid {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1200px) {
    #mtg-grid.cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    #mtg-grid.cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    #mtg-grid.cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    #mtg-grid.cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    #mtg-grid .card-title {
        font-size: 0.85rem;
    }

    #mtg-grid .card-meta {
        font-size: 0.75rem;
    }
}

.card {
    background: var(--color-card);
    border: 2px solid var(--color-dark);
    border-radius: 17px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    /* min-width: 0;
    max-width: 180px;
    margin: 0 auto;
    font-size: 0.92rem; */
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.juego-card-clickable {
    cursor: pointer;
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--color-bg-alt);
    overflow: hidden;
    justify-content: center;
    align-items: center;
    display: flex;
}

.card-image-wrapper img {
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.3s ease;
    opacity: 1;
}

.card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg-alt);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.3rem;
    line-height: 1.2;
    text-align: center;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
    text-align: center;
}

.card-meta strong {
    color: var(--color-dark);
}

.card-text {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.6;
    flex: 1;
}

.mtg-card-clickable .card-footer {
    display: none !important;
}

.card-footer {
    padding: 0.75rem 1rem;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: space-between;
    flex-direction: column-reverse;
}

.card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.badge-success::before {
    background: var(--color-success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-warning::before {
    background: var(--color-warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge-danger::before {
    background: var(--color-danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge-info::before {
    background: var(--color-info);
}

.badge-novedad {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

.badge-novedad::before {
    background: #2563eb;
}

/* =========================================
   ABOUT / CONÓCENOS
   ========================================= */

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 100px;
    background-color: white;
    padding: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.about-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius);
}

.about-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-bg);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.about-content p {
    font-size: 1.05rem;
    color: var(--color-bg);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.about-closing {
    font-size: 1.15rem !important;
    color: var(--color-dark) !important;
    font-weight: 500;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--color-primary);
    text-shadow: none !important;
    text-align: center;
}

/* =========================================
   FOOTER
   ========================================= */

.footer {
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.footer-brand p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.footer-info {
    text-align: right;
}

.footer-info p {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.footer-info a {
    color: var(--color-primary);
    transition: var(--transition);
}

.footer-info a:hover {
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.legal-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
}

.legal-links a,
.consent-more button,
.legal-links button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--color-primary);
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.legal-links a:hover,
.consent-more button:hover {
    color: #ffffff;
}

.consent-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 3000;
    padding: 1.25rem;
    color: #1f2937;
    background: #ffffff;
    border: 2px solid var(--color-primary);
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

.consent-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.consent-banner h2,
.consent-modal h2,
.legal-modal h2 {
    margin: 0 0 0.5rem;
    color: var(--color-dark);
}

.consent-banner p {
    max-width: 780px;
    margin: 0;
    line-height: 1.5;
}

.consent-more {
    margin-top: 0.5rem !important;
    font-size: 0.88rem;
}

.consent-actions,
.consent-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
}

.consent-modal,
.legal-modal {
    position: fixed;
    inset: 0;
    z-index: 3100;
    display: grid;
    place-items: center;
    padding: 1rem;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.7);
}

.consent-modal[hidden],
.legal-modal[hidden],
.consent-banner[hidden] {
    display: none;
}

.consent-modal-card,
.legal-modal-card {
    position: relative;
    width: min(100%, 680px);
    max-height: min(90vh, 850px);
    padding: 2rem;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

.legal-modal-card {
    width: min(100%, 820px);
}

.legal-document h3 {
    margin: 1.3rem 0 0.4rem;
    color: var(--color-dark);
    font-size: 1.05rem;
}

.legal-document p {
    line-height: 1.65;
}

.legal-document code {
    padding: 0.1rem 0.3rem;
    background: #eef2f7;
    border-radius: 4px;
}

.consent-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
}

.consent-option div {
    display: grid;
    gap: 0.25rem;
}

.consent-option span:not(.consent-status) {
    color: #4b5563;
    font-size: 0.9rem;
}

.consent-status {
    color: #166534;
    font-size: 0.85rem;
    font-weight: 700;
}

.switch input {
    position: absolute;
    opacity: 0;
}

.switch span {
    display: block;
    width: 46px;
    height: 26px;
    padding: 3px;
    background: #9ca3af;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.switch span::before {
    display: block;
    width: 20px;
    height: 20px;
    content: "";
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.switch input:checked + span {
    background: var(--color-primary-dark);
}

.switch input:checked + span::before {
    transform: translateX(20px);
}

.switch input:focus-visible + span,
.legal-links a:focus-visible,
.consent-more button:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 3px;
}

.third-party-placeholder {
    display: flex;
    min-height: 240px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    color: #4b5563;
    background: #e5e7eb;
    text-align: center;
}

.third-party-placeholder p {
    margin: 0;
}

.modal-open {
    overflow: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================
   UTILITIES
   ========================================= */

.loading-state,
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-light);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

.loading-state .spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spinner-rotate 0.9s linear infinite;
}

@keyframes spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* MTG Image Placeholder */
.mtg-placeholder {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.08));
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mtg-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.12) 50%, transparent 100%);
    transform: translateX(-100%);
    opacity: 0;
}

.mtg-placeholder.loading::before {
    opacity: 1;
    animation: mtg-shimmer 1.5s infinite;
}

.mtg-placeholder.failed {
    background: rgba(0, 0, 0, 0.12);
    color: rgba(255, 255, 255, 0.75);
}

.mtg-placeholder span {
    position: relative;
    z-index: 1;
}

@keyframes mtg-shimmer {
    100% {
        transform: translateX(100%);
    }
}

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

@media (max-width: 768px) {
    .header-inner {
        height: 64px;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        height: calc(100vh - 64px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        padding: 2rem 1.5rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }

    .main-nav.open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 1.25rem;
        color: var(--color-dark);
    }

    .main-content {
        padding-top: 64px;
    }

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

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

    .hero {
        min-height: 70vh;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        position: static;
        order: -1;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-info {
        text-align: center;
    }

    .consent-banner-content {
        align-items: stretch;
        flex-direction: column;
    }

    .consent-actions,
    .consent-modal-actions {
        justify-content: stretch;
    }

    .consent-actions .btn,
    .consent-modal-actions .btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

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

    .feature-card {
        padding: 2rem 1.5rem;
    }
}

/* Filtros de juegos - Estilo mejorado */
.juegos-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 1rem 1.5rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    align-items: flex-end;
    justify-content: center;
    /* align-items: center; */
}

.juegos-filtros label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
}

.juegos-filtros select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border-radius: 40px;
    border: 1px solid var(--color-border);
    font-size: 0.95rem;
    font-weight: 500;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>') no-repeat right 0.75rem center;
    background-size: 14px;
    appearance: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    min-width: 140px;
}

.juegos-filtros select:hover {
    border-color: var(--color-primary);
}

.juegos-filtros select:focus {
    outline: none;
    border-color: var(--color-primary-dark);
    box-shadow: 0 0 0 3px rgba(211, 235, 16, 0.2);
}

@media (max-width: 600px) {
    .juegos-filtros {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }

    .juegos-filtros label {
        width: 100%;
    }

    .juegos-filtros select {
        width: 100%;
        min-width: auto;
    }
}

.footer-social a:hover {
    scale: 1.1;
}

/* =========================================
   MEJORADO: BÚSQUEDA Y PAGINACIÓN DE JUEGOS
   ========================================= */

/* Estilo mejorado para el input de búsqueda */
.juegos-filtros input[type="text"] {
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    border: 2px solid var(--color-border);
    font-size: 0.95rem;
    font-weight: 500;
    background: white;
    color: var(--color-dark);
    cursor: text;
    transition: var(--transition);
    font-family: inherit;
    min-width: 200px;
    text-align: center;
}

.juegos-filtros input[type="text"]::placeholder {
    color: var(--color-text-light);
}

.juegos-filtros input[type="text"]:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(154, 213, 8, 0.15);
}

.juegos-filtros input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary-dark);
    box-shadow: 0 0 0 3px rgba(154, 213, 8, 0.2);
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.btn-pagination {
    min-width: 44px;
    height: 44px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--color-border);
    background: white;
    color: var(--color-dark);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-pagination:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-pagination-active {
    background: var(--color-primary) !important;
    color: var(--color-dark) !important;
    border-color: var(--color-primary-dark) !important;
    box-shadow: var(--shadow-lg);
}

.pagination-ellipsis {
    color: var(--color-text-light);
    font-weight: 600;
    padding: 0 0.25rem;
}

@media (max-width: 600px) {
    .pagination {
        gap: 0.5rem;
        padding: 1rem;
    }

    .btn-pagination {
        min-width: 40px;
        height: 40px;
        font-size: 0.85rem;
        padding: 0.35rem 0.7rem;
    }
}

/* Mejorar la cuadrícula de juegos */
#juegos-grid.cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    #juegos-grid.cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #juegos-grid.cards-grid {
        grid-template-columns: 1fr;
    }
}

#juegos-grid .card {
    border: 2px solid var(--color-primary);
    box-shadow: var(--shadow);
}

#juegos-grid .card:hover {
    border-color: var(--color-primary-dark);
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

#juegos-grid .card-body {
    padding: 1.25rem;
}

#juegos-grid .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

#juegos-grid .card-text {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* =========================================
   SECCIÓN LIBROS - ESTILO MODERNO Y RESPONSIVE
   ========================================= */

#libros-grid.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

#libros-grid .card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.35rem 1.4rem;
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 249, 255, 0.95) 100%);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

#libros-grid .card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 1) 0%, rgba(154, 213, 8, 0.9) 100%);
}

#libros-grid .card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 24px 45px rgba(15, 23, 42, 0.12);
}

#libros-grid .libro-card {
    padding-left: 1.3rem;
}

#libros-grid .card-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

#libros-grid .card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

#libros-grid .card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    margin: 0;
}

#libros-grid .card-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e3a8a;
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.2);
    white-space: nowrap;
}

#libros-grid .card-meta {
    font-size: 0.88rem;
    color: #4b5563;
    margin: 0;
    line-height: 1.6;
}

#libros-grid .card-meta strong {
    color: #111827;
}

#libros-grid .card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

#libros-grid .card-chip {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    background: rgba(14, 165, 233, 0.1);
    color: #0f172a;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

#libros .search-input {
    max-width: 420px;
    width: 100%;
}

@media (max-width: 992px) {
    #libros-grid.cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    #libros-grid.cards-grid {
        grid-template-columns: 1fr;
    }

    #libros-grid .card {
        padding: 1.1rem 1.2rem;
    }

    #libros-grid .card::before {
        width: 4px;
    }

    #libros-grid .card-header {
        gap: 0.6rem;
    }

    #libros-grid .card-title {
        font-size: 1.02rem;
    }

    #libros-grid .card-meta {
        font-size: 0.9rem;
    }
}

/* =========================================
   CALENDARIO DE EVENTOS
   ========================================= */

.event-calendar {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
    padding-bottom: 1.2rem;
}

/* --- VISTA DESKTOP/TABLET: Calendario de semanas --- */
.calendar-desktop {
    display: block;
}

.calendar-weekdays-header {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 1.5rem 1.5rem 0 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

.calendar-weekday-label {
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.calendar-week {
    padding: 1.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0px;
    transition: background-color 0.3s ease;
}

.calendar-week.month-current {
    background: rgba(144, 238, 144, 0.15);
}

.calendar-week.month-next {
    background: rgba(255, 165, 0, 0.15);
}

.calendar-week.month-future {
    background: rgba(255, 127, 127, 0.15);
}

.calendar-week-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
    display: none;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
}

.calendar-day {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 150px;
}

.calendar-day-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.calendar-day-name {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: none;
}

.calendar-day-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-dark);
}

.calendar-event-item {
    border-radius: 12px;
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(55, 56, 0, 0.486);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.calendar-event-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.calendar-event-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-dark);
}

.calendar-event-time {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.calendar-event-empty {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: auto;
}

/* =========================================
   COLORES DE EVENTOS POR TIPO (4 categorías)
   ========================================= */

/* MTG - Rojo */
.calendar-event-item.event-mtg {
    background: #fedbdb !important;
    border-color: #fd9393 !important;
    border-left: 4px solid #f63b3b !important;
}

.calendar-event-item.event-mtg:hover {
    background: #febfbf !important;
    border-color: #fa6060 !important;
}

.calendar-event-item.event-mtg .calendar-event-title {
    color: #af1e1e !important;
}

.calendar-event-item.event-mtg .calendar-event-time {
    color: #f63b3b !important;
}

/* Juego - Verde */
.calendar-event-item.event-juegos-de-mesa {
    background: #e9ffd5 !important;
    border-color: #9bfd74 !important;
    border-left: 4px solid #7cf916 !important;
}

.calendar-event-item.event-juegos-de-mesa:hover {
    background: #effeaa !important;
    border-color: #b2fb3c !important;
}

.calendar-event-item.event-juegos-de-mesa .calendar-event-title {
    color: #549a12 !important;
}

.calendar-event-item.event-juegos-de-mesa .calendar-event-time {
    color: #69f916 !important;
}

/* Rol - Gris */
.calendar-event-item.event-rol {
    background: #d3d3d3 !important;
    border-color: #888888 !important;
    border-left: 4px solid #575757 !important;
}

.calendar-event-item.event-rol:hover {
    background: #afafaf !important;
    border-color: #4b4b4b !important;
}

.calendar-event-item.event-rol .calendar-event-title {
    color: #4e4e4e !important;
}

.calendar-event-item.event-rol .calendar-event-time {
    color: #2b2b2b !important;
}

/* Evento - Rosa/Teja (eventos sociales, destacados) */
.calendar-event-item.event-evento {
    background: #e6e4ff !important;
    border-color: #a5a4fd !important;
    border-left: 4px solid #471de1 !important;
}

.calendar-event-item.event-evento:hover {
    background: #d2cdfe !important;
    border-color: #717afb !important;
}

.calendar-event-item.event-evento .calendar-event-title {
    color: #132888 !important;
}

.calendar-event-item.event-evento .calendar-event-time {
    color: #1d2ae1 !important;
}

/* Sin tipo / fallback - Gris neutro */
.calendar-event-item.event-,
.calendar-event-item.event-undefined {
    background: #F3F4F6 !important;
    border-color: #D1D5DB !important;
    border-left: 4px solid #9CA3AF !important;
}

.calendar-event-item.event-:hover,
.calendar-event-item.event-undefined:hover {
    background: #E5E7EB !important;
}

.calendar-event-item.event- .calendar-event-title,
.calendar-event-item.event-undefined .calendar-event-title {
    color: #4B5563 !important;
}

/* =========================================
   VISTA MÓVIL - Tipos de evento
   ========================================= */

.calendar-mobile-event-type.event-mtg {
    background: #fedbdb !important;
    color: #af1e1e !important;
    border: 1px solid #fd9393 !important;
}

.calendar-mobile-event-type.event-juegos-de-mesa {
    background: #e9ffd5 !important;
    color: #549a12 !important;
    border: 1px solid #9bfd74 !important;
}

.calendar-mobile-event-type.event-rol {
    background: #d3d3d3 !important;
    color: #4e4e4e !important;
    border: 1px solid #888888 !important;
}

.calendar-mobile-event-type.event-evento {
    background: #e6e4ff !important;
    color: #132888 !important;
    border: 1px solid #a5a4fd !important;
}

.calendar-mobile-event-type.event-,
.calendar-mobile-event-type.event-undefined {
    background: #F3F4F6 !important;
    color: #4B5563 !important;
    border: 1px solid #D1D5DB !important;
}


/* --- VISTA MÓVIL: Lista cronológica --- */
.calendar-mobile {
    display: none;
}

.calendar-mobile-day {
    margin-bottom: 1.5rem;
}

.calendar-mobile-date {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark);
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--color-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-mobile-date::before {
    content: "📅";
    font-size: 1.1rem;
}

.calendar-mobile-events {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.calendar-mobile-event {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.calendar-mobile-event:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.calendar-mobile-event-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.25rem;
}

.calendar-mobile-event-time {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.calendar-mobile-event-type {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive: mostrar lista en móvil, calendario en desktop */
@media (max-width: 768px) {
    .calendar-desktop {
        display: none;
    }

    .calendar-mobile {
        display: block;
    }

    .event-calendar {
        background: transparent;
        padding: 0;
    }

    .events-section-header {
        display: none;
    }
}

@media (max-width: 992px) {
    .calendar-days-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.4rem;
    }

    .calendar-day {
        padding: 0.4rem;
        min-height: 80px;
    }
}

@media (max-width: 768px) {
    .calendar-days-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.3rem;
    }

    .calendar-day {
        padding: 0.3rem;
        min-height: 70px;
    }

    .calendar-event-item {
        padding: 0.3rem 0.4rem;
    }
}

@media (max-width: 520px) {
    .calendar-days-grid {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .calendar-day {
        padding: 1rem;
        min-height: 60px;
    }

    .calendar-event-item {
        padding: 0.2rem 0.3rem;
    }

    .calendar-event-title {
        font-size: 0.75rem;
    }

    .calendar-event-time {
        font-size: 0.7rem;
    }
}

/* =========================================
   MEJORAS BÚSQUEDA DE LIBROS
   ========================================= */

.resultados-info {
    grid-column: 1 / -1;
    text-align: center;
    padding: 0.75rem 1rem;
    background: rgba(154, 213, 8, 0.08);
    border: 1px solid rgba(154, 213, 8, 0.2);
    border-radius: 12px;
    color: var(--color-dark);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.resultados-info strong {
    color: var(--color-primary-dark);
    font-weight: 700;
}

#libros-grid mark {
    background: rgba(154, 213, 8, 0.35);
    color: var(--color-dark);
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 600;
}

#libros-empty strong {
    color: var(--color-primary-dark);
}

#libros-empty p:first-child {
    font-size: 1.1rem;
    color: var(--color-dark);
    font-weight: 600;
}

/* Mejorar el input de búsqueda de libros */
#libros-search {
    min-width: 280px;
    max-width: 450px;
}

.libros-filtros .search-container {
    flex: 1;
    max-width: 450px;
}

.libros-filtros .search-container input {
    width: 100%;
}

/* Animación suave al filtrar */
#libros-grid {
    transition: opacity 0.2s ease;
}


.leyenda::before {
    display: none;
}

/* =========================================
   LEYENDA RESPONSIVA
   ========================================= */

.events-section-header h4 {
    width: 100%;
    max-width: 100%;
}

.events-section-header ul {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
}

/* Tabla de eventos en móvil */
@media (max-width: 768px) {
    .events-section-header h4 {
        display: grid !important;
        justify-content: center !important;
        grid-auto-flow: row !important;
        max-width: 100% !important;
        align-items: center !important;
        margin: auto !important;
        color: white !important;
        width: 100%;
        padding: 1rem 0;
    }

    .events-section-header ul {
        display: grid !important;
        justify-content: center !important;
        grid-auto-flow: row !important;
        grid-auto-columns: auto !important;
        max-width: 100% !important;
        align-items: center !important;
        margin: auto !important;
        width: 100%;
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .events-section-header ul li.leyenda {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: auto !important;
        padding: 0.75rem 1rem !important;
        margin: 0.5rem auto !important;
        width: auto;
        white-space: nowrap;
        font-size: 0.9rem;
        border-radius: 12px;
    }
}

@media (max-width: 520px) {
    .events-section-header h4 {
        font-size: 1rem;
        padding: 0.75rem 0;
    }

    .events-section-header ul {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }

    .events-section-header ul li.leyenda {
        min-height: auto !important;
        padding: 0.6rem 0.8rem !important;
        margin: 0.4rem auto !important;
        font-size: 0.8rem;
    }
}