/* Main CSS File - Modernized */

/* Import core utilities */
@import url('core/utilities.css');

/* Import shared components */
@import url('components/buttons.css');

/* ===== ACCESSIBILITY ===== */

/* Skip Link - Hidden until focused */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary, #064EA1);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ===== PROVIDER ICON ITEMS ===== */

.provider-icon-item {
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    cursor: default;
}

.provider-icon-item:hover,
.provider-icon-item:focus-within {
    opacity: 1;
}

/* ===== GLOBAL STYLES ===== */

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    color: var(--color-text-dark);
    background: var(--gradient-bg-subtle);
    overflow-x: hidden;
    line-height: var(--line-height-normal);
    padding-top: var(--header-height);
}

/* Smooth animations for page entrance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(var(--space-xl));
    }

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

/* Main Content Area */
.main-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--space-lg) var(--space-lg);
}

.main-content>section {
    animation: fadeInUp 0.6s var(--ease-smooth) backwards;
}

.main-content>section:nth-child(1) {
    animation-delay: 0.1s;
}

.main-content>section:nth-child(2) {
    animation-delay: 0.2s;
}

.main-content>section:nth-child(3) {
    animation-delay: 0.3s;
}

/* ===== HEADINGS WITH GRADIENT ===== */

h1 {
    font-size: var(--font-h1);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-lg);
}

h2 {
    font-size: var(--font-h2);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-md);
    color: var(--gradient-text-primary);
}

h3 {
    font-size: var(--font-h3);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-md);
    color: var(--color-text-dark);
}

/* ===== CONTENT SECTIONS ===== */

/* Section styling with modern cards */
section {
    margin-bottom: var(--section-gap);
}

section p {
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-md);
    color: var(--color-text-dark);
}

/* Modern list styling */
ul,
ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-xl);
}

li {
    margin-bottom: var(--space-sm);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-dark);
}

li strong {
    color: var(--color-primary);
}

/* Links with modern underline animation */
a {
    color: var(--color-primary);
    text-decoration: none;
    position: relative;
    transition: color var(--transition-fast) var(--ease-smooth);
}

a:hover {
    color: var(--color-primary-hover);
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background: transparent;
    padding: var(--space-sm) 0;
}

.breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    margin: 0;
    display: flex;
    align-items: center;
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
}

.breadcrumb li a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

.breadcrumb li a:hover {
    color: var(--color-primary);
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin: 0 var(--space-sm);
    color: var(--color-text-light);
    font-size: var(--font-size-lg);
}

.breadcrumb li:last-child {
    color: var(--color-text-dark);
    font-weight: 600;
}

/* SEO Hero Section - Defined in seo-content.css (single source of truth) */
/* NOTE: .seo-hero-section removed from here to avoid duplication */

/* Features Section with cards - Following internal ≤ external rule */
.features-section,
.getting-started-section,
.why-bk8-section,
.comparison-section {
    background: var(--color-white);
    padding: var(--space-md) 0;
    border-radius: 0;
    margin-bottom: var(--space-lg);
    box-shadow: none;
}

.responsible-gaming-section {
    padding: var(--space-md) 0;
    border-radius: 0;
    margin-bottom: var(--space-lg);
    box-shadow: none;
}

/* FAQ Section */
.faq-section {
    background: var(--color-white);
    padding: var(--space-md) 0;
    border-radius: var(--border-radius-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: var(--space-lg) 0;
    transition: all var(--transition-fast) var(--ease-smooth);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    color: var(--color-text-dark);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-md);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.faq-item:hover h3 {
    color: var(--color-primary);
}

/* Comparison Table */
.comparison-table-wrapper {
    overflow-x: auto;
    margin: var(--space-xl) 0;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
}

.comparison-table thead {
    background: var(--gradient-hero);
    color: var(--color-white);
}

.comparison-table th,
.comparison-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.comparison-table tbody tr {
    transition: background var(--transition-fast);
}

.comparison-table tbody tr:hover {
    background: var(--gradient-card);
}

.comparison-table strong {
    color: var(--color-primary);
}

/* Row headers in table body - for accessibility */
.comparison-table tbody th[scope="row"] {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-dark);
    background: inherit;
}

/* Loading State */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Smooth Scrolling - Handled by JavaScript for anchor links only */
/* Removed scroll-behavior: smooth from html - it was causing bounce-back issues with carousel */


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

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

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-hover);
}

/* Performance Optimizations */
img {
    content-visibility: auto;
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

/* Focus visible */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

/* Category Grid - Browse Categories section */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

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

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    /* Mobile: Fixed 16px left/right padding */
    .main-content {
        padding: var(--space-md) 16px;
    }

    .container {
        padding: 0 16px;
    }

    .features-section,
    .getting-started-section,
    .why-bk8-section,
    .comparison-section,
    .responsible-gaming-section,
    .faq-section {
        padding: var(--space-lg) 16px;
    }

    /* .seo-hero-section responsive - handled by seo-content.css */

    /* Category grid: 2 columns on mobile */
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

/* Very Small Mobile Screens (320px - 459px) */
@media (max-width: 459px) {
    .container {
        padding: 0 var(--space-sm);
        /* Reduced padding for very small screens */
    }

    html,
    body {
        overflow-x: hidden;
        /* Prevent horizontal scroll */
        max-width: 100vw;
    }

    /* Ensure all sections respect max-width */
    section {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {

    .header-container,
    .hero-section,
    .carousel-section,
    .footer-payments,
    .social-icons {
        display: none;
    }

    body {
        font-size: 12pt;
        background: white;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}