/* Design System & Base Styling */
:root {
    --bg-main: #0b0f17;
    --bg-card: rgba(18, 26, 43, 0.75);
    --bg-card-hover: rgba(28, 40, 65, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.3);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-indigo: #6366f1;
    --accent-indigo-hover: #4f46e5;
    --accent-cyan: #06b6d4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.2);

    /* Holiday Type Colors */
    --type-inamovible: #f43f5e;
    --type-inamovible-bg: rgba(244, 63, 94, 0.15);
    --type-trasladable: #f59e0b;
    --type-trasladable-bg: rgba(245, 158, 11, 0.15);
    --type-puente: #10b981;
    --type-puente-bg: rgba(16, 185, 129, 0.15);
    --badge-xlargo: #a855f7;
    --badge-xlargo-bg: rgba(168, 85, 247, 0.18);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.2);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 65%, rgba(6, 182, 212, 0.1) 0%, transparent 45%);
}

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

/* Header Navbar */
.site-header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 15, 23, 0.85);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-cafecito {
    padding: 0.35rem 0.85rem;
    font-size: 0.825rem;
}

.header-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    padding: 2.5rem 0 3rem 0;
}

.hero-card {
    background: linear-gradient(145deg, rgba(26, 35, 58, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-indigo), var(--accent-cyan), #a855f7);
}

.hero-header {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.hero-tag-pulse {
    width: 8px;
    height: 8px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.hero-date {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.hero-meta-badges {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Countdown Grid */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 640px;
    margin: 2rem auto;
}

.countdown-box {
    background: rgba(11, 15, 23, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 0.5rem;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.countdown-box:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.4);
}

.countdown-value {
    font-size: 2.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.35rem;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-indigo) 0%, #4338ca 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

/* Controls Section (Filters & Search) */
.controls-section {
    margin-bottom: 2.5rem;
}

.controls-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    backdrop-filter: blur(12px);
}

.search-box {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 3rem;
    background: rgba(11, 15, 23, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.search-input::placeholder {
    color: var(--text-muted);
}

.filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    margin-right: 0.5rem;
}

.pill-btn {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.pill-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.pill-btn.active {
    background: var(--accent-indigo);
    border-color: var(--accent-indigo);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

/* Holiday List Grid */
.calendar-section {
    margin-bottom: 3.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.results-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.holidays-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

/* Holiday Card */
.holiday-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(10px);
}

.holiday-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: var(--shadow-soft);
    background: var(--bg-card-hover);
}

.holiday-card.is-next {
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

.card-top {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.date-badge {
    background: rgba(11, 15, 23, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.8rem;
    text-align: center;
    min-width: 60px;
    flex-shrink: 0;
}

.date-day {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.date-month {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-top: 0.2rem;
}

.card-title-group {
    flex-grow: 1;
}

.holiday-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

.holiday-weekday {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.holiday-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.badge-inamovible {
    background: var(--type-inamovible-bg);
    color: var(--type-inamovible);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-trasladable {
    background: var(--type-trasladable-bg);
    color: var(--type-trasladable);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-puente {
    background: var(--type-puente-bg);
    color: var(--type-puente);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-xlargo {
    background: var(--badge-xlargo-bg);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.btn-card-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-card-action:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-google:hover {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.4);
}

.btn-ical:hover {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.4);
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--bg-card);
    border: 1px border var(--border-color);
    border-radius: var(--radius-lg);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Support / Donaciones Widget */
.support-section {
    margin-bottom: 4rem;
}

.support-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 2rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    backdrop-filter: blur(12px);
}

.support-info {
    max-width: 550px;
}

.support-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.support-desc {
    color: var(--text-secondary);
    font-size: 0.925rem;
    line-height: 1.5;
}

.support-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 280px;
}

.btn-cafecito {
    background: #ffdd00;
    color: #000000;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 221, 0, 0.25);
}

.btn-cafecito:hover {
    background: #ffe53b;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 221, 0, 0.35);
}

.copy-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(11, 15, 23, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
}

.copy-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.copy-value {
    color: var(--text-primary);
    font-family: monospace;
    font-weight: 600;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
}

/* Toast Feedback */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent-indigo);
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    z-index: 1000;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Footer */
.site-footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    background: rgba(11, 15, 23, 0.9);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-cyan);
}

/* Responsiveness */
@media (max-width: 868px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .countdown-grid {
        gap: 0.75rem;
    }

    .countdown-value {
        font-size: 2rem;
    }

    .support-card {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem 1.5rem;
    }

    .support-actions {
        width: 100%;
        min-width: unset;
    }

    .support-title {
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .holidays-grid {
        grid-template-columns: 1fr;
    }

    .card-actions {
        flex-direction: column;
    }
}
