/* Base font size for better readability */
html {
    font-size: 18px;
}

body {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Sarabun', sans-serif;
    font-weight: 700;
}

.btn {
    font-family: 'Sarabun', sans-serif;
    font-size: 1rem;
    font-weight: 500;
}

a,
.btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLj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1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

.modal {
    z-index: 1071 !important;
}

/* Premium Styles for Home Page */
:root {
    --primary-gradient: linear-gradient(135deg, #006bb7 0%, #258cfb 100%);
    --secondary-gradient: linear-gradient(135deg, #1b6ec2 0%, #004a80 100%);
    --accent-gradient: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    --glass-bg: rgba(255, 255, 255, 0.90);
    --glass-border: 1px solid rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.10);
    --card-hover-transform: translateY(-8px);
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
}

body {
    background-color: #f8f9fc;
}

.hero-section {
    background: var(--primary-gradient);
    color: white;
    padding: 7rem 2rem 8rem;
    /* Increased bottom padding for seamless overlap */
    border-radius: 50px;
    margin-bottom: 0;
    /* Remove margin to let content overlap naturally */
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 107, 183, 0.15);
    text-align: center;
}

.hero-bg-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 500px;
    height: 500px;
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    top: 25%;
    right: 15%;
    background: rgba(255, 255, 255, 0.05);
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, -20px);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Unified Seamless Card Style */
.seamless-card {
    border: none;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.seamless-card .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.seamless-card .card-footer {
    background: #fcfcfc;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-col {
    padding: 2rem;
    transition: background 0.3s ease;
}

.feature-col:hover {
    background: #f9fbfd;
}

.feature-col i {
    transition: transform 0.3s ease;
}

.feature-col:hover i {
    transform: scale(1.1);
}

.feature-hover:hover .transition-transform {
    transform: scale(1.1);
}

.transition-transform {
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.object-fit-cover {
    object-fit: cover;
}

/* Glass Card for Dashboard */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.glass-card:hover {
    transform: var(--card-hover-transform);
    box-shadow: 0 20px 40px rgba(31, 38, 135, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
}

.icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    transition: transform 0.3s ease;
}

.glass-card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
}

.icon-box-primary {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.icon-box-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.icon-box-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.btn-premium {
    background: white;
    color: #006bb7;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-premium:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    color: #005694;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

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

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom Scrollbar for nicer look */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Blazor Reconnect Modal Styles */
#components-reconnect-modal {
    display: none;
    z-index: 10000;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: block;
}

#components-reconnect-modal .show,
#components-reconnect-modal .failed,
#components-reconnect-modal .rejected {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .show {
    display: block;
}

#components-reconnect-modal.components-reconnect-failed .failed {
    display: block;
}

#components-reconnect-modal.components-reconnect-rejected .rejected {
    display: block;
}

/* Custom Animations */
@keyframes bounce-subtle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.animate-bounce-subtle {
    animation: bounce-subtle 2s infinite ease-in-out;
}

@keyframes pulse-soft {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.animate-pulse-soft {
    animation: pulse-soft 3s infinite ease-in-out;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}