@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

html, body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    scroll-behavior: smooth;
    transition: background-color 0.3s, color 0.3s;
    background-color: var(--mud-palette-background) !important;
    color: var(--mud-palette-text-primary) !important;
}

h1:focus {
    outline: none;
}

/* Glassmorphism Header - Forced Theme Styling to prevent ugly gray background */
.glass-header {
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    background: rgba(255, 255, 255, 0.8) !important;
    color: #0F172A !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease-in-out !important;
}

.mud-theme-dark .glass-header {
    background: rgba(9, 13, 22, 0.8) !important;
    color: #F9FAFB !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Modern Hover Card */
.hover-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease !important;
    background-color: var(--mud-palette-surface) !important;
    border: 1px solid var(--mud-palette-divider) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
}

.hover-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(30, 41, 59, 0.06), 0 10px 10px -5px rgba(30, 41, 59, 0.02) !important;
    border-color: var(--mud-palette-primary) !important;
}

.mud-theme-dark .hover-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1) !important;
}

.mud-theme-dark .hover-card:hover {
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6) !important;
    border-color: var(--mud-palette-primary) !important;
}

/* Responsive Headings */
.hero-title {
    font-size: 2.25rem !important;
    line-height: 1.15;
    font-weight: 800;
}
@media (min-width: 960px) {
    .hero-title {
        font-size: 3.75rem !important;
    }
}

.hero-subtitle {
    font-size: 1.25rem !important;
    font-weight: 600;
}
@media (min-width: 960px) {
    .hero-subtitle {
        font-size: 1.5rem !important;
    }
}

.section-title {
    font-size: 1.875rem !important;
    font-weight: 800;
}
@media (min-width: 960px) {
    .section-title {
        font-size: 3rem !important;
    }
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Pill chip style override */
.mud-chip {
    font-weight: 500 !important;
    border-radius: 8px !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.25);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.45);
}

/* Responsive MudTimeline on Mobile Screens */
@media (max-width: 959.98px) {
    .mud-timeline {
        padding-left: 8px !important;
    }
    .mud-timeline-item {
        flex-direction: row !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .mud-timeline-item-opposite {
        display: none !important;
    }
    .mud-timeline-item-content {
        width: 100% !important;
        padding-left: 16px !important;
    }
    .mud-timeline-item-dot {
        margin-left: 0 !important;
    }
}

/* Error UI */
#blazor-error-ui {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    bottom: 12px;
    right: 12px;
    left: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid var(--mud-palette-divider);
    box-sizing: border-box;
    display: none;
    padding: 1rem 2rem;
    position: fixed;
    z-index: 1000;
}

/* Loading animation customization */
.loading-progress {
    position: absolute;
    display: block;
    width: 6rem;
    height: 6rem;
    inset: 30vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--mud-palette-divider);
    stroke-width: 0.4rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--mud-palette-primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.6), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
    inset: calc(30vh + 2.25rem) 0 auto 0;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Cargando");
}