/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors from design system */
    --primary-green-dark: #005E2A;
    --primary-green: #0BA44B;
    --primary-green-light: #49D868;
    --accent-yellow: #FFD84A;
    --accent-gold: #F1C730;
    --accent-red: #E0403A;
    --text-primary: #FFFFFF;
    --text-secondary: #E6F5E8;
    --text-body: #222222;
    --text-muted: #666666;
    --bg-deep-green: #003A1A;
    --bg-section-light: #F5FFF7;
    --bg-card-light: #FFFFFF;
    --border-light: #D7E8D8;
    --shadow-dark: rgba(0, 0, 0, 0.35);
    
    /* Typography */
    --font-size-h1: 38px;
    --font-size-h2: 30px;
    --font-size-h3: 24px;
    --font-size-body: 16px;
    --font-size-caption: 14px;
    
    /* Spacing */
    --spacing-section: 60px 20px;
    --spacing-card: 24px;
    --spacing-button: 14px 32px;
    
    /* Border Radius */
    --radius-button: 12px;
    --radius-card: 18px;
    --radius-input: 10px;
    --radius-icon: 8px;
    
    /* Shadows */
    --shadow-medium: 0px 6px 18px rgba(0,0,0,0.20);
    --shadow-card: 0px 3px 12px rgba(0,0,0,0.12);
    
    /* Container */
    --container-max-width: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--font-size-body);
    line-height: 1.6;
    color: var(--text-body);
    background-color: var(--bg-card-light);
}

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

/* Typography */
h1 {
    font-size: var(--font-size-h1);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
    text-align: center;
}

h2 {
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--bg-deep-green);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    text-align: center;
}

h3 {
    font-size: var(--font-size-h3);
    font-weight: 600;
    color: var(--bg-deep-green);
    line-height: 1.4;
    margin-bottom: 1rem;
    text-align: center;
}

/* Exclude h3 from author block and footer */
#author h3,
footer h3 {
    text-align: left;
}

p {
    margin-bottom: 1rem;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 1rem 20px;
    background-color: var(--bg-section-light);
    border-bottom: 1px solid var(--border-light);
}

.breadcrumbs ol {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumbs li {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.breadcrumbs a {
    color: var(--primary-green);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--text-muted);
}

/* Step-by-step section */
.steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.step-card {
    background-color: var(--bg-card-light);
    border-radius: var(--radius-card);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-card);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: transform 0.2s, box-shadow 0.2s;
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.step-index {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(180deg, #25C84B 0%, #00983A 100%);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.step-body {
    flex: 1;
    min-width: 0;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--bg-deep-green);
    margin-bottom: 0.25rem;
    text-align: left;
    line-height: 1.3;
}

.step-body p {
    margin-bottom: 0;
    color: var(--text-body);
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
}

/* Pros & Cons */
.pros-cons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.pros-col,
.cons-col {
    background-color: var(--bg-card-light);
    border-radius: var(--radius-card);
    padding: var(--spacing-card);
    box-shadow: var(--shadow-card);
}

.pros-col {
    border-left: 4px solid #0BA44B;
}

.cons-col {
    border-left: 4px solid #E0403A;
}

.pros-list,
.cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pros-list li,
.cons-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0;
}

.pros-list li:last-child,
.cons-list li:last-child {
    margin-bottom: 0;
}

.icon-check,
.icon-cross {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color 0.2s;
}

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

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--spacing-button);
    border: none;
    border-radius: var(--radius-button);
    font-size: var(--font-size-body);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(180deg, #25C84B 0%, #00983A 100%);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #2EEA5C 0%, #00B447 100%);
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

.btn-primary:active {
    transform: scale(0.96);
    background: #007A2F;
}

.btn-secondary {
    background: var(--bg-card-light);
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
}

.btn-secondary:hover {
    background: #E9FFE8;
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.1);
}

.btn:focus {
    outline: 2px solid var(--accent-yellow);
    outline-offset: 4px;
    box-shadow: 0 0 0 4px rgba(255,216,74,0.3);
}

/* Header */
header {
    background-color: var(--primary-green-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-medium);
}

.header-top {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
    max-width: 200px;
}

.logo svg {
    height: 50px;
    width: auto;
    display: block;
    max-width: 200px;
}

.header-ctas {
    display: flex;
    gap: 1rem;
}

.header-bottom {
    background-color: var(--primary-green-dark);
    overflow: hidden;
}

.main-nav {
    position: relative;
    display: flex;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

/* Navigation scroll buttons */
.nav-scroll-btn {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 94, 42, 0.9);
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-scroll-btn:hover {
    background-color: var(--primary-green);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.nav-scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.nav-scroll-btn svg {
    width: 20px;
    height: 20px;
}

.nav-scroll-left {
    left: 0;
}

.nav-scroll-right {
    right: 0;
}

/* Show scroll buttons on hover for desktop */
@media (min-width: 769px) {
    .main-nav:hover .nav-scroll-btn {
        display: flex;
    }
    
    .nav-list {
        padding: 0 50px;
    }
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    justify-content: center;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s;
}

.nav-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 2rem;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.nav-list::-webkit-scrollbar {
    display: none;
}

.nav-list li {
    margin: 0;
}

.nav-list a {
    color: var(--text-primary);
    padding: 1rem 0;
    display: block;
    transition: color 0.2s;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-list a:hover {
    color: var(--accent-yellow);
    border-bottom-color: var(--accent-yellow);
}

/* Table of Contents */
.toc-wrapper {
    background-color: var(--primary-green-dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

.toc {
    padding: 0.75rem 0;
}

.toc-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.toc-list::-webkit-scrollbar {
    display: none;
}

.toc-list li {
    margin: 0;
    flex-shrink: 0;
}

.toc-list a {
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    display: block;
    white-space: nowrap;
    border-radius: var(--radius-input);
    transition: all 0.2s;
    font-size: var(--font-size-caption);
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--text-primary);
    background-color: rgba(255,255,255,0.1);
}

/* Hero Section */
#hero {
    background: linear-gradient(to right, #005A28, #00A243);
    padding: var(--spacing-section);
    color: var(--text-primary);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.hero-text {
    display: flex;
    flex-direction: column;
}

.hero-lead {
    margin-bottom: 1.5rem;
}

.hero-lead p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.reading-time {
    display: flex;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: var(--font-size-caption);
}

.reading-time-label {
    font-weight: 600;
}

.hero-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-image figure {
    margin: 0;
    width: 100%;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-card);
    object-fit: contain;
}

.hero-cta {
    width: 100%;
    max-width: 300px;
}

.fact-checked {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: var(--text-secondary);
    font-size: var(--font-size-caption);
}

/* Games Section */
#games {
    padding: var(--spacing-section);
    background-color: var(--bg-section-light);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.game-card {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s, box-shadow 0.3s;
    aspect-ratio: 3/2;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.game-card-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; /* Allow clicks to pass through to the link */
}

.game-card:hover .game-card-overlay {
    opacity: 1;
}

.game-play-btn {
    animation: popIn 0.3s ease-out;
    pointer-events: auto; /* Make button clickable */
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Content Sections */
section[id^="czy"],
section[id^="rejestracja"],
section[id^="bonus"],
section[id^="gry"],
section[id^="zaklady"],
section[id^="metody"],
section[id^="verde-casino-na-telefonie"],
section[id^="verde-casino-kontakt"],
section[id^="faq"] {
    padding: var(--spacing-section);
}

section[id^="czy"]:nth-child(even),
section[id^="rejestracja"]:nth-child(even),
section[id^="bonus"]:nth-child(even),
section[id^="gry"]:nth-child(even),
section[id^="zaklady"]:nth-child(even),
section[id^="metody"]:nth-child(even),
section[id^="verde-casino-na-telefonie"]:nth-child(even),
section[id^="verde-casino-kontakt"]:nth-child(even),
section[id^="faq"]:nth-child(even) {
    background-color: var(--bg-section-light);
}

.section-image {
    margin: 0 auto 2rem;
    text-align: center;
    max-width: 100%;
}

.section-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-card);
    object-fit: contain;
}

.content {
    max-width: 800px;
    margin: 0 auto;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-card-light);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-card);
    overflow: hidden;
}

thead {
    background-color: var(--primary-green-dark);
    color: var(--text-primary);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-top: 1px solid var(--border-light);
}

tbody tr:hover {
    background-color: var(--bg-section-light);
}

/* Author Section */
#author {
    padding: var(--spacing-section);
    background-color: var(--bg-section-light);
}

.author-block {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--bg-card-light);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.author-avatar {
    border-radius: 50%;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-name {
    margin-bottom: 0.5rem;
}

.author-bio {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.author-updated {
    color: var(--text-muted);
    font-size: var(--font-size-caption);
}

/* FAQ Section */
#faq {
    padding: var(--spacing-section);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

details {
    margin-bottom: 1rem;
    background-color: var(--bg-card-light);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    padding: 0.5rem 0;
    color: var(--bg-deep-green);
    position: relative;
    padding-left: 2rem;
}

summary::-webkit-details-marker {
    display: none;
}

summary::before {
    content: '+';
    position: absolute;
    left: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-green);
    transition: transform 0.2s;
}

details[open] summary::before {
    content: '−';
    transform: rotate(180deg);
}

details summary + * {
    margin-top: 1rem;
    padding-left: 2rem;
}

/* Footer */
footer {
    background-color: var(--bg-deep-green);
    color: var(--text-secondary);
    padding: var(--spacing-section);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

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

.footer-nav ul {
    list-style: none;
    padding: 0;
}

.footer-nav li {
    margin-bottom: 0.75rem;
}

.footer-nav a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--text-primary);
}

.footer-payments h3 {
    color: var(--text-primary);
    font-size: var(--font-size-body);
    margin-bottom: 1rem;
}

.payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.payment-icons svg {
    border-radius: var(--radius-icon);
}

.footer-responsible {
    margin-top: 1rem;
}

.footer-copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    font-size: var(--font-size-caption);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-green);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    z-index: 999;
    transition: all 0.3s;
}

.back-to-top:hover {
    background-color: var(--primary-green-dark);
    transform: translateY(-2px);
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:focus {
    outline: 2px solid var(--accent-yellow);
    outline-offset: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --font-size-h1: 28px;
        --font-size-h2: 24px;
        --font-size-h3: 20px;
        --spacing-section: 40px 20px;
    }
    
    .header-top-content {
        flex-wrap: wrap;
    }
    
    .header-ctas {
        width: 100%;
        margin-top: 1rem;
        flex-direction: column;
    }
    
    .header-ctas .btn {
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        top: 1rem;
        right: 20px;
        z-index: 1001;
        background-color: rgba(0, 58, 26, 0.95);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .nav-scroll-btn {
        display: none !important;
    }
    
    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 1rem 0;
    }
    
    .nav-list.active {
        display: flex;
    }
    
    .nav-list li {
        width: 100%;
    }
    
    .nav-list a {
        padding: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-image {
        order: -1;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .game-card {
        scroll-snap-align: start;
        min-width: 200px;
    }
    
    .author-block {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .step-card {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
    
    .step-index {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .step-title {
        font-size: 16px;
    }
    
    .step-body p {
        font-size: 13px;
    }
    
    .pros-cons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .game-card {
        min-width: 150px;
    }
}

/* Accessibility */
.visually-hidden {
    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 styles */
*:focus-visible {
    outline: 2px solid var(--accent-yellow);
    outline-offset: 4px;
    box-shadow: 0 0 0 4px rgba(255,216,74,0.3);
}

/* Print styles */
@media print {
    header,
    footer,
    .back-to-top,
    .toc-wrapper {
        display: none;
    }
}

