/* ========================================
   SPANISH LEARNING THEME CSS
   Colors: Red (#C60B1E), Yellow (#FFC400), White (#FFFFFF)
   ======================================== */

:root {
    --spain-red: #C60B1E;
    --spain-yellow: #FFC400;
    --spain-white: #FFFFFF;
    --spain-blue: #007BFF;
    --spain-green: #198754;
    --spain-purple: #6f42c1;
    --primary-color: #C60B1E;
    --secondary-color: #FFC400;
    --accent-color: #FF6B35;
    --dark-color: #2C3E50;
    --light-color: #F9F9F9;
    --text-gray: #546E7A;
    --navbar-height: 56px;
}

/* ========== Smooth Scrolling ========== */
html {
    scroll-behavior: smooth;
}

/* ========== General Styles ========== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
}

/* ========== Navbar ========== */
.navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

.brand-text {
    color: var(--spain-red);
    transition: all 0.3s ease;
}

.brand-dot {
    color: var(--spain-yellow);
    font-weight: 900;
    font-size: 1.8rem;
}

.brand-net {
    color: var(--dark-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.navbar-brand:hover .brand-text {
    color: var(--spain-yellow);
}

.navbar-brand:hover .brand-net {
    color: var(--spain-red);
}

.nav-link {
    position: relative;
    font-weight: 600 !important;
    color: var(--dark-color) !important;
    padding: 0.6rem 1.3rem !important;
    margin: 0 0.3rem !important;
    border-radius: 30px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 0.95rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--spain-red);
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--spain-red) !important;
    background: rgba(198, 11, 30, 0.08) !important;
    transform: translateY(-2px);
}

.nav-link:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
    background: var(--spain-red) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(198, 11, 30, 0.3);
}

.nav-link.active::before {
    display: none;
}

.navbar-toggler {
    border: 2px solid var(--spain-red);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: rgba(198, 11, 30, 0.1);
    transform: rotate(90deg);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(198, 11, 30, 0.25);
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28198, 11, 30, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5rem;
    height: 1.5rem;
}

/* ========================================
   READER CONTENT STYLES
   ======================================== */

.reader-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* TOC Styling */
.toc-sticky {
    position: sticky;
    top: var(--navbar-height);
    z-index: 1020;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(198, 11, 30, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin-top: 0;
}

.toc-sticky.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.toc-nav {
    padding: 0.5rem 0;
}

.toc-item {
    position: relative;
    padding: 0.6rem 1.2rem;
    margin: 0 0.3rem;
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.toc-item:hover {
    color: var(--spain-red);
    background: rgba(198, 11, 30, 0.08);
    transform: translateY(-1px);
}

.toc-item.active {
    color: white;
    background: linear-gradient(135deg, var(--spain-red) 0%, #A00916 100%);
    box-shadow: 0 4px 12px rgba(198, 11, 30, 0.25);
    font-weight: 600;
}

.toc-item i {
    font-size: 0.85em;
    margin-right: 0.5rem;
}

.mobile-toc {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    z-index: 1030;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
    padding: 0.75rem;
    border: 2px solid var(--spain-yellow);
}

.mobile-toc select {
    width: 100%;
    padding: 0.85rem;
    border: 2px solid var(--spain-red);
    border-radius: 8px;
    background: white;
    color: var(--spain-red);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-toc select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(198, 11, 30, 0.2);
}

/* Story Section */
.story-section {
    margin-bottom: 3rem;
}

.story-paragraph {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0;
}

/* Grammar Note */
.grammar-note {
    border-left: 4px solid;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-top: 1rem;
}

.grammar-note.warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: var(--spain-yellow);
}

.grammar-note.info {
    background: rgba(23, 162, 184, 0.1);
    border-left-color: #17a2b8;
}

.grammar-note.success {
    background: rgba(40, 167, 69, 0.1);
    border-left-color: var(--spain-green);
}

.grammar-note.purple {
    background: rgba(111, 66, 193, 0.1);
    border-left-color: var(--spain-purple);
}

/* Highlight Styles */
.highlight-era {
    background: rgba(13, 110, 253, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    color: #0d6efd;
    transition: all 0.3s ease;
}

.highlight-eran {
    background: rgba(220, 53, 69, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    color: #dc3545;
    transition: all 0.3s ease;
}

.highlight-era:hover, 
.highlight-eran:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Phrase List */
.phrase-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.phrase-item {
    display: flex;
    align-items: baseline;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--spain-red);
    transition: all 0.3s ease;
}

.phrase-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.phrase-number {
    min-width: 40px;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Vocabulary List */
.vocab-list {
    font-size: 0.95rem;
}

.vocab-item {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.vocab-item strong {
    font-weight: 600;
    color: var(--dark-color);
}

.vocab-item .float-end {
    font-style: italic;
    color: var(--text-gray);
}

/* Key Point */
.key-point {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    border-left: 4px solid var(--spain-yellow);
}

.key-point:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.key-point.danger {
    border-left-color: #dc3545;
}

/* Card Header Gradients */
.card-header.gradient-blue {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%) !important;
}

.card-header.gradient-green {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%) !important;
}

section[id] {
    scroll-margin-top: calc(var(--navbar-height) + 60px);
}

/* ========================================
   READER DETAIL PAGE HEADER
   ======================================== */

.reader-header-section {
    background: linear-gradient(135deg, rgba(198, 11, 30, 0.03) 0%, rgba(255, 196, 0, 0.03) 100%);
    border-bottom: 3px solid rgba(198, 11, 30, 0.1);
    padding: 3rem 0 2.5rem;
    margin-top: 56px;
}

.reader-header-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.reader-level-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--spain-red), #A00916);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(198, 11, 30, 0.25);
    animation: fadeInDown 0.6s ease;
}

.reader-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--dark-color);
    margin: 1.5rem 0;
    line-height: 1.2;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.reader-meta-info {
    margin-top: 2rem;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.meta-item-group {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.meta-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.meta-info-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(198, 11, 30, 0.15);
    border-color: rgba(198, 11, 30, 0.2);
}

.meta-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--spain-red), #A00916);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.meta-icon i {
    color: white;
    font-size: 0.95rem;
}

.meta-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-gray);
    letter-spacing: 0.5px;
    margin-bottom: 0.15rem;
}

.meta-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-color);
}

.reader-detail-container {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.reader-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* ========================================
   SERIES BADGES
   ======================================== */

.series-badge,
.reader-series-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--spain-yellow), #FFA500);
    color: var(--dark-color);
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid rgba(198, 11, 30, 0.2);
}

.series-badge {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 196, 0, 0.2);
    white-space: nowrap;
}

.reader-series-badge {
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.85rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(255, 196, 0, 0.25);
    margin-left: 0.75rem;
    border-color: rgba(198, 11, 30, 0.15);
    animation: fadeInDown 0.6s ease 0.15s both;
}

.series-footer {
    background: linear-gradient(135deg, rgba(255, 196, 0, 0.05) 0%, rgba(198, 11, 30, 0.05) 100%);
    padding: 3rem 0;
    margin-top: 3rem;
    border-top: 3px solid rgba(255, 196, 0, 0.3);
    animation: fadeInUp 0.6s ease;
}

.series-footer .card {
    border: 2px solid rgba(255, 196, 0, 0.3);
    max-width: 900px;
    margin: 0 auto;
}

.series-footer .card-header {
    background: linear-gradient(135deg, var(--spain-yellow), #FFA500) !important;
    border-bottom: 2px solid rgba(198, 11, 30, 0.2);
}

/* ========== Hero Section ========== */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(198, 11, 30, 0.95) 0%, rgba(255, 196, 0, 0.85) 100%),
                url('https://images.unsplash.com/photo-1543783207-ec64e4d95325?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 196, 0, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(198, 11, 30, 0.3) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.emoji {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-weight: 900;
    font-size: 3.5rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.spanish-flag-colors {
    height: 5px;
    background: linear-gradient(to right, 
        var(--spain-red) 0%, var(--spain-red) 33.33%, 
        var(--spain-yellow) 33.33%, var(--spain-yellow) 66.66%, 
        var(--spain-red) 66.66%, var(--spain-red) 100%);
    width: 150px;
    margin: 0 auto 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-text {
    font-size: 1.35rem;
    line-height: 1.8;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--spain-red);
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-hero-primary:hover {
    background: white;
    color: var(--spain-red);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: white;
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1rem;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: white;
}

/* ========== Alert Messages ========== */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* ========== Footer ========== */
footer,
.footer {
    background: linear-gradient(135deg, var(--spain-red) 0%, #A00916 100%);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    border-top: 5px solid var(--spain-yellow);
}

.footer-brand {
    font-weight: 700;
    color: var(--spain-yellow);
    font-size: 1.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-text {
    opacity: 0.95;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.footer-subtext {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.5rem;
    font-weight: 400;
}

/* ========================================
   BLOG ARCHIVE
   ======================================== */

.blog-hero {
    min-height: 60vh;
    padding: 3rem 0;
}

.blog-hero .hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.blog-hero .hero-text {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.search-wrapper {
    position: relative;
    margin-bottom: 0;
}

.search-input {
    padding: 1rem 3.5rem 1rem 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--dark-color);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-input:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: var(--text-gray);
    opacity: 0.7;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--spain-red);
    color: white;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(198, 11, 30, 0.3);
}

.search-btn:hover {
    background: #A00916;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(198, 11, 30, 0.4);
}

.search-btn i {
    font-size: 1rem;
}

.section-padding {
    padding: 4rem 0;
    background: var(--light-color);
}

.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(198, 11, 30, 0.15);
}

.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--spain-red), #A00916);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(198, 11, 30, 0.2);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.4;
}

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

.card-title a:hover {
    color: var(--spain-red);
}

.card-text {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-meta {
    border-top: 2px solid rgba(0, 0, 0, 0.05);
    padding-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.meta-author {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--spain-red), var(--spain-yellow));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-circle span {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.author-name {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    color: var(--spain-red);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.card-link:hover {
    color: #A00916;
    transform: translateX(5px);
}

.card-link i {
    transition: transform 0.3s ease;
}

.card-link:hover i {
    transform: translateX(4px);
}

.content-card {
    background: white;
    border-radius: 20px;
    padding: 4rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.empty-state h3 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-gray);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    gap: 0.5rem;
}

.page-item {
    margin: 0;
}

.page-link {
    border: 2px solid rgba(198, 11, 30, 0.2);
    color: var(--spain-red);
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
}

.page-link:hover {
    background: var(--spain-red);
    color: white;
    border-color: var(--spain-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 11, 30, 0.3);
}

.page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(198, 11, 30, 0.25);
    outline: none;
}

.page-item.active .page-link {
    background: var(--spain-red);
    border-color: var(--spain-red);
    color: white;
    box-shadow: 0 4px 12px rgba(198, 11, 30, 0.3);
}

.page-item.disabled .page-link {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-gray);
    opacity: 0.5;
    cursor: not-allowed;
}

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

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 20px;
        padding: 1.5rem;
        margin-top: 1rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    }
    
    .nav-link {
        margin: 0.4rem 0 !important;
        text-align: center;
        padding: 0.8rem 1.5rem !important;
    }

    .toc-sticky {
        display: none !important;
    }

    section[id] {
        scroll-margin-top: 70px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 100vh;
        padding: 3rem 0;
        background-attachment: scroll;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-text {
        font-size: 1.1rem;
    }

    .emoji {
        font-size: 3rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        max-width: 300px;
    }

    .blog-hero {
        min-height: 70vh;
        padding: 2rem 0;
    }

    .blog-hero .hero-title {
        font-size: 2rem;
    }

    .blog-hero .hero-text {
        font-size: 1rem;
    }

    .blog-card {
        margin-bottom: 1.5rem;
    }

    .card-content {
        padding: 1.5rem;
    }

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

    .search-input {
        font-size: 0.95rem;
        padding: 0.875rem 3rem 0.875rem 1.25rem;
    }

    .search-btn {
        width: 38px;
        height: 38px;
    }

    .pagination {
        gap: 0.25rem;
    }

    .page-link {
        padding: 0.5rem 0.875rem;
        font-size: 0.9rem;
    }

    .story-section .row {
        flex-direction: column;
    }

    .story-section .col-lg-6 {
        margin-bottom: 1rem;
    }

    .mobile-toc {
        width: 95%;
        bottom: 10px;
    }

    .reader-header-section {
        padding: 2rem 0 1.5rem;
    }
    
    .reader-title {
        font-size: 1.75rem;
    }
    
    .meta-item-group {
        gap: 1rem;
    }
    
    .meta-info-item {
        padding: 0.75rem 1.25rem;
    }
    
    .meta-icon {
        width: 32px;
        height: 32px;
    }
    
    .meta-icon i {
        font-size: 0.85rem;
    }
    
    .meta-label {
        font-size: 0.65rem;
    }
    
    .meta-value {
        font-size: 0.875rem;
    }

    .reader-series-badge {
        display: block;
        margin-left: 0;
        margin-top: 0.5rem;
        font-size: 0.75rem;
        padding: 0.4rem 1.25rem;
    }
    
    .series-badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.875rem;
    }

    .series-footer {
        padding: 2rem 0;
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        padding: 0.875rem 2rem;
        font-size: 0.9rem;
    }

    .empty-state {
        padding: 3rem 1rem;
    }

    .reader-header-section {
        padding: 1.5rem 0 1rem;
    }
    
    .reader-title {
        font-size: 1.5rem;
    }
    
    .meta-item-group {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .meta-info-item {
        justify-content: flex-start;
    }

    .reader-series-badge {
        font-size: 0.7rem;
        padding: 0.35rem 1rem;
    }

    .series-footer {
        padding: 1.5rem 0;
    }
}

/* Print Styles */
@media print {
    .toc-sticky,
    .mobile-toc,
    .article-actions,
    .article-footer,
    .navbar,
    footer {
        display: none !important;
    }

    .reader-content {
        font-size: 12pt !important;
        line-height: 1.5 !important;
    }

    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    h1, h2, h3, h4 {
        page-break-after: avoid;
    }

    section[id] {
        scroll-margin-top: 0;
    }
}