/* ===== CSS Variables (Brand Colors) ===== */
:root {
    /* Primary Colors */
    --primary-blue: #1E3A5F;
    --bright-blue: #0066FF;
    --primary-red: #E63946;
    --primary-green: #2DC653;

    /* Secondary Colors */
    --white: #FFFFFF;
    --dark-text: #1A1A1A;
    --light-gray: #F5F5F5;
    --medium-gray: #666666;

    /* Accent Colors */
    --orange-coral: #FF6B35;
    --dark-navy: #0D1B2A;

    /* Typography */
    --font-primary: 'Open Sans', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 60px 20px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--white);
}

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

ul {
    list-style: none;
}

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

/* ===== Utility Classes ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--bright-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #0052CC;
}

.btn-secondary {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #25A847;
}

.btn-cta {
    background-color: var(--primary-red);
    color: var(--white);
    padding: 16px 36px;
    font-size: 18px;
}

.btn-cta:hover {
    background-color: #D32F3F;
}

/* ===== Header ===== */
.header {
    background-color: var(--white);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
}

.logo-img-footer {
    height: 60px;
    width: auto;
}

.nav {
    display: flex;
    gap: 12px;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(to right, var(--white) 50%, rgba(30, 58, 95, 0.1) 50%);
    padding: 40px 20px;
    min-height: 600px;
}

.hero-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content {
    padding-right: 40px;
}

.hero-headline {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    line-height: 1.1;
}

.hero-subheadline {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    font-style: italic;
}

.hero-text {
    font-size: 18px;
    color: var(--dark-text);
    margin-bottom: 20px;
    line-height: 1.7;
}

.hero-cta-text {
    font-size: 18px;
    margin-bottom: 15px;
}

.hero-benefits {
    margin-bottom: 25px;
}

.hero-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
    font-style: italic;
    color: var(--primary-green);
}

.check-icon {
    color: var(--primary-green);
    font-size: 20px;
    font-weight: bold;
}

.hero-form {
    margin-top: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.form-input {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--bright-blue);
}

.form-login-link {
    font-size: 14px;
    margin-bottom: 15px;
}

.form-login-link a {
    color: var(--bright-blue);
    text-decoration: underline;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-height: 500px;
    object-fit: contain;
}

/* ===== Categories Section ===== */
.categories {
    padding: var(--section-padding);
    background-color: var(--white);
}

.categories-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.category-card {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-label {
    display: block;
    font-size: 12px;
    color: var(--medium-gray);
    margin-bottom: 8px;
}

.category-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 12px;
    background-color: var(--light-gray);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 8px;
}

.category-price {
    font-size: 14px;
    color: var(--medium-gray);
}

/* ===== How It Works Section ===== */
.how-it-works {
    background-color: var(--primary-blue);
    padding: var(--section-padding);
}

.how-it-works-container {
    max-width: var(--container-width);
    margin: 0 auto;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--white);
    text-align: center;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.how-it-works-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.how-it-works-video {
    background-color: var(--dark-navy);
    border-radius: 8px;
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
}

/* Video placeholder - styled as button for WCAG 2.1.1 keyboard accessibility */
button.video-placeholder {
    text-align: center;
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    padding: 20px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}

button.video-placeholder:hover,
button.video-placeholder:focus {
    transform: scale(1.05);
}

button.video-placeholder:focus-visible {
    outline: 3px solid var(--bright-blue);
    outline-offset: 4px;
}

.play-button {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

.how-it-works-steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
}

.step-icon svg {
    width: 48px;
    height: 48px;
}

.step-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 16px;
    color: var(--white);
    margin-bottom: 12px;
    line-height: 1.6;
}

.step-note {
    font-style: italic;
    opacity: 0.9;
}

/* ===== FAQ Section ===== */
.faq {
    background-color: var(--white);
}

.faq-header {
    background-color: var(--primary-blue);
    padding: 30px 20px;
    text-align: center;
}

.faq-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.faq-header p {
    font-size: 14px;
    color: var(--white);
    opacity: 0.8;
}

.faq-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 20px;
}

.faq-item {
    border-bottom: 1px solid #eee;
}

.faq-question {
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-text);
    cursor: pointer;
    text-align: left;
    font-family: var(--font-primary);
}

.faq-question:hover {
    color: var(--bright-blue);
}

.faq-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.faq-icon.rotated {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 0 20px 0;
    color: var(--medium-gray);
    line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 60px 20px 30px;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 60px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-column h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--white);
}

.footer-disclaimer {
    max-width: var(--container-width);
    margin: 40px auto 0;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-disclaimer strong {
    color: var(--white);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding-right: 0;
    }

    .hero-image {
        display: none;
    }

    .categories-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .how-it-works-content {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .hero-headline {
        font-size: 28px;
    }

    .hero-subheadline {
        font-size: 20px;
    }

    .form-row {
        flex-direction: column;
    }

    .categories-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-title {
        font-size: 24px;
    }

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

    .step-icon {
        margin: 0 auto;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ===== Alpine.js Collapse Animation ===== */
[x-cloak] {
    display: none !important;
}

/* ===== Skip Navigation Link ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-blue);
    color: var(--white);
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* ===== Loading Indicator ===== */
.htmx-indicator {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9999;
    overflow: hidden;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: block;
}

.loading-bar {
    height: 100%;
    background: var(--bright-blue);
    animation: loading 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ===== Notification Toast System ===== */
.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 8px;
    color: var(--white);
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
}

.notification.info {
    background: var(--bright-blue);
}

.notification.success {
    background: var(--primary-green);
}

.notification.error {
    background: var(--primary-red);
}

.notification.warning {
    background: var(--orange-coral);
}

.notification-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    margin-left: 12px;
    padding: 0;
    opacity: 0.8;
}

.notification-close:hover {
    opacity: 1;
}

/* Notification transition classes */
.notification-enter {
    transition: all 0.3s ease-out;
}

.notification-enter-start {
    opacity: 0;
    transform: translateX(100%);
}

.notification-enter-end {
    opacity: 1;
    transform: translateX(0);
}

.notification-leave {
    transition: all 0.2s ease-in;
}

.notification-leave-start {
    opacity: 1;
    transform: translateX(0);
}

.notification-leave-end {
    opacity: 0;
    transform: translateX(100%);
}

@media (max-width: 768px) {
    .notification-container {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }

    .notification {
        min-width: auto;
    }
}

/* ===== Mobile Menu ===== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark-text);
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--dark-text);
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav {
        display: none;
    }

    .nav-mobile {
        display: flex;
    }

    .header-container {
        position: relative;
    }
}

/* ===== Loading Spinner ===== */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--bright-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

/* ===== Modal Base Styles ===== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
}

.modal-content {
    background: var(--white);
    border-radius: 8px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--medium-gray);
    line-height: 1;
    padding: 0;
}

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

/* ===== Dropdown Styles ===== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    margin-top: 4px;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--dark-text);
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
}

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

/* Focus visible styles for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--bright-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================================
   COMPONENT STYLES (for macros.html)
   ================================================ */

/* ===== Button Component Enhancements ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-primary);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-md {
    padding: 12px 28px;
    font-size: 16px;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 18px;
}

.btn-full {
    width: 100%;
}

.btn-nav {
    background-color: var(--bright-blue);
    color: var(--white);
}

.btn-nav:hover {
    background-color: #0052CC;
}

.btn-ghost {
    background-color: transparent;
    color: var(--bright-blue);
    border: 2px solid var(--bright-blue);
}

.btn-ghost:hover {
    background-color: var(--bright-blue);
    color: var(--white);
}

.btn-danger {
    background-color: var(--primary-red);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #c9303c;
}

.btn-success {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-success:hover {
    background-color: #25A847;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-loading {
    color: transparent !important;
}

.btn-spinner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

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

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    width: 1em;
    height: 1em;
}

/* ===== Form Components ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-text);
}

.form-required {
    color: var(--primary-red);
    margin-left: 2px;
}

.form-input-wrapper {
    position: relative;
}

.form-input-wrapper.has-icon .form-input {
    padding-left: 42px;
}

.form-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--medium-gray);
    pointer-events: none;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-family: var(--font-primary);
    color: var(--dark-text);
    background-color: var(--light-gray);
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--bright-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--medium-gray);
}

.form-input.input-error,
.form-textarea.input-error,
.form-select.input-error {
    border-color: var(--primary-red);
}

.form-input.input-error:focus,
.form-textarea.input-error:focus,
.form-select.input-error:focus {
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.form-error {
    margin-top: 6px;
    font-size: 13px;
    color: var(--primary-red);
}

.form-hint {
    margin-top: 6px;
    font-size: 13px;
    color: #595959; /* WCAG 1.4.3: 7.0:1 contrast ratio for small text */
}

.form-group-error .form-label {
    color: var(--primary-red);
}

/* Select wrapper for custom arrow */
.form-select-wrapper {
    position: relative;
}

.form-select {
    appearance: none;
    padding-right: 42px;
    cursor: pointer;
}

.form-select-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--medium-gray);
    pointer-events: none;
}

/* Checkbox component */
.form-checkbox {
    margin-bottom: 12px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: var(--white);
    transition: all 0.2s;
}

.checkbox-icon {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s;
    color: var(--white);
}

.checkbox-input:checked + .checkbox-custom {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.checkbox-input:checked + .checkbox-custom .checkbox-icon {
    opacity: 1;
    transform: scale(1);
}

.checkbox-input:focus + .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(45, 198, 83, 0.2);
}

.checkbox-text {
    font-size: 14px;
    color: var(--dark-text);
}

/* ===== Card Component ===== */
.card {
    display: block;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.card-bordered {
    border: 1px solid #e5e5e5;
}

.card-elevated {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-flat {
    background-color: var(--light-gray);
}

a.card:hover,
.card-product:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

a.card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 14px;
    color: var(--medium-gray);
    margin-bottom: 12px;
}

.card-footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e5e5;
    background-color: var(--light-gray);
}

/* ===== Alert Component ===== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-content {
    flex: 1;
    min-width: 0;
}

.alert-title {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.alert-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.alert-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-close:hover {
    opacity: 1;
}

.alert-info {
    background-color: #e8f4fd;
    color: #0066CC;
}

.alert-info .alert-close {
    color: #0066CC;
}

.alert-success {
    background-color: #e8f8ed;
    color: #1a7f37;
}

.alert-success .alert-close {
    color: #1a7f37;
}

.alert-warning {
    background-color: #fff8e6;
    color: #9a6700;
}

.alert-warning .alert-close {
    color: #9a6700;
}

.alert-error {
    background-color: #ffeef0;
    color: #c9303c;
}

.alert-error .alert-close {
    color: #c9303c;
}

/* ===== Modal Component Enhancements ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.modal-sm .modal-container { max-width: 400px; }
.modal-md .modal-container { max-width: 600px; }
.modal-lg .modal-container { max-width: 800px; }
.modal-xl .modal-container { max-width: 1000px; }
.modal-full .modal-container { max-width: calc(100vw - 40px); }

.modal-content {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--medium-gray);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
    background-color: var(--light-gray);
    color: var(--dark-text);
}

.modal-body {
    padding: 24px;
}

/* ===== Pagination Component ===== */
.pagination {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.pagination-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-item {
    display: flex;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-text);
    background-color: var(--white);
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    gap: 6px;
}

.pagination-link:hover:not(.pagination-current):not(.pagination-disabled) {
    background-color: var(--light-gray);
    border-color: var(--bright-blue);
    color: var(--bright-blue);
}

.pagination-current {
    background-color: var(--bright-blue);
    border-color: var(--bright-blue);
    color: var(--white);
}

.pagination-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-ellipsis {
    color: var(--medium-gray);
    padding: 0 8px;
}

.pagination-prev span,
.pagination-next span {
    display: none;
}

@media (min-width: 640px) {
    .pagination-prev span,
    .pagination-next span {
        display: inline;
    }
}

/* ===== Spinner Component ===== */
.spinner-container {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.spinner {
    display: inline-flex;
    animation: spinner-rotate 1s linear infinite;
}

.spinner svg {
    width: 100%;
    height: 100%;
}

.spinner-track {
    opacity: 0.2;
}

.spinner-head {
    stroke-dasharray: 60 200;
    stroke-dashoffset: 0;
    animation: spinner-dash 1.5s ease-in-out infinite;
}

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

@keyframes spinner-dash {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 60, 200;
        stroke-dashoffset: -30;
    }
    100% {
        stroke-dasharray: 60, 200;
        stroke-dashoffset: -124;
    }
}

.spinner-xs { width: 16px; height: 16px; }
.spinner-sm { width: 20px; height: 20px; }
.spinner-md { width: 32px; height: 32px; }
.spinner-lg { width: 48px; height: 48px; }

.spinner-primary { color: var(--bright-blue); }
.spinner-secondary { color: var(--medium-gray); }
.spinner-white { color: var(--white); }

.spinner-text {
    font-size: 14px;
    color: var(--medium-gray);
}

/* ===== Badge Component ===== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border-radius: 4px;
}

.badge-sm { padding: 4px 8px; font-size: 11px; }
.badge-md { padding: 6px 10px; font-size: 12px; }
.badge-lg { padding: 8px 14px; font-size: 14px; }

.badge-pill { border-radius: 999px; }

.badge-default {
    background-color: var(--light-gray);
    color: var(--dark-text);
}

.badge-primary {
    background-color: var(--bright-blue);
    color: var(--white);
}

.badge-secondary {
    background-color: var(--medium-gray);
    color: var(--white);
}

.badge-success {
    background-color: var(--primary-green);
    color: var(--white);
}

.badge-warning {
    background-color: #ffc107;
    color: #1A1A1A;
}

.badge-danger {
    background-color: var(--primary-red);
    color: var(--white);
}

.badge-info {
    background-color: #17a2b8;
    color: var(--white);
}

/* ===== Avatar Component ===== */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--primary-blue);
    color: var(--white);
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-xl { width: 80px; height: 80px; font-size: 24px; }

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

.avatar-initials {
    text-transform: uppercase;
}

/* ===== Breadcrumb Component ===== */
.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--medium-gray);
}

.breadcrumb-link {
    color: var(--bright-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: #0052CC;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #ccc;
    display: flex;
    align-items: center;
}

.breadcrumb-current {
    color: var(--dark-text);
    font-weight: 500;
}

/* ===== Tooltip Component ===== */
.tooltip-trigger {
    position: relative;
    display: inline-flex;
}

.tooltip {
    position: absolute;
    z-index: 9999;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--white);
    background-color: var(--dark-navy);
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
}

.tooltip::after {
    content: '';
    position: absolute;
    border: 6px solid transparent;
}

.tooltip-top {
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
}

.tooltip-top::after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: var(--dark-navy);
}

.tooltip-bottom {
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
}

.tooltip-bottom::after {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: var(--dark-navy);
}

.tooltip-left {
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
}

.tooltip-left::after {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: var(--dark-navy);
}

.tooltip-right {
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
}

.tooltip-right::after {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: var(--dark-navy);
}

/* ===== Icon Utility ===== */
.icon {
    display: inline-flex;
    flex-shrink: 0;
    vertical-align: middle;
}

/* ===== [x-cloak] Hide elements until Alpine.js initializes ===== */
[x-cloak] {
    display: none !important;
}
