/*
 * ========================================
 * UK Gambling Compliance Website Styles
 * ========================================
 * Dark theme with purple accents for professional casino industry styling
 * Responsive design: Mobile-first approach with desktop breakpoint at 768px
 */

/* 1. CSS Custom Properties (CSS Variables) for Easy Theme Management */
:root {
    /* EDIT: Primary color scheme - modify these for theme changes */
    --bg-primary: #020202;           /* Near black background */
    --bg-secondary: #151523;         /* Dark indigo for cards/sections */
    --accent-purple-1: #361F5B;      /* Deep purple for gradients start */
    --accent-purple-2: #510B69;      /* Vivid purple for gradients end */
    --highlight-yellow: #E5FF00;     /* Electric yellow for CTAs */
    --highlight-blue: #516DFF;       /* Bright blue for secondary highlights */
    --text-primary: #F5F5F5;         /* Off-white for main text */
    --text-secondary: #A9A9A9;       /* Light grey for subtitles/disclaimers */
    --border-color: #2A2A45;         /* Muted purple for borders */
    
    /* Typography */
    --font-main: 'Montserrat', sans-serif;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* 2. Global Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* 3. Utility Classes for Responsive Content Switching */
.hide-on-desktop { 
    display: block; 
}

.hide-on-mobile { 
    display: none; 
}

/* Container for consistent spacing */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 4. Typography Styles (Mobile-First) */
h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
}

p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

/* Link styling */
a {
    color: var(--highlight-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--highlight-yellow);
}

a:focus {
    outline: 2px solid var(--highlight-blue);
    outline-offset: 3px;
    border-radius: 3px;
}

/* 5. Header Styles */
.site-header {
    padding: var(--spacing-lg) 0;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-purple-1) 0%, var(--accent-purple-2) 100%);
}

.site-header h1 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.site-header .subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* 6. Compliance Bar */
.compliance-bar {
    background: var(--bg-secondary);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.compliance-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    text-align: center;
}

.age-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.disclaimer-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.disclaimer-text strong {
    color: var(--highlight-yellow);
}

.disclaimer-text a {
    color: var(--highlight-blue);
    font-weight: 600;
}

/* 7. Star Rating Component */
.star-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: var(--spacing-sm) 0;
    font-size: 18px;
}

.star-rating i {
    color: var(--highlight-yellow);
}

.star-rating .rating-text {
    margin-left: var(--spacing-xs);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* 8. CTA Button Styles */
.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--highlight-yellow) 0%, #FFFF33 100%);
    color: var(--bg-primary);
    font-weight: 700;
    font-size: 16px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    text-transform: uppercase;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 255, 0, 0.2);
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.cta-button:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 255, 0, 0.4);
    color: var(--bg-primary);
}

.cta-button:active {
    transform: scale(0.98);
}

/* 9. Desktop Hero Section (Hidden on Mobile) */
.hero-section {
    padding: var(--spacing-xl) 0;
    margin: var(--spacing-lg) 0;
}

.hero-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: visible;
}

.casino-logo-large {
    max-height: 80px;
    margin: var(--spacing-md) 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.offer-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--highlight-yellow);
    margin: var(--spacing-lg) 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.review-highlights {
    margin: var(--spacing-lg) 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.review-highlights ul {
    list-style: none;
    padding: 0;
}

.review-highlights li {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    font-size: 16px;
}

.review-highlights li i {
    color: var(--highlight-yellow);
    font-size: 14px;
    width: 16px;
}

.terms-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: var(--spacing-md);
    line-height: 1.4;
}

/* 10. Mobile Offers List (Hidden on Desktop) */
.offers-list {
    padding: var(--spacing-lg) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

.offer-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: visible;
}

.offer-card:hover {
    border-color: var(--highlight-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.featured-card {
    border-color: var(--highlight-yellow);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #1a1a2e 100%);
}

.casino-logo-card {
    max-height: 60px;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.offer-details {
    font-size: 18px;
    font-weight: 600;
    color: var(--highlight-yellow);
    margin: var(--spacing-md) 0;
}

/* 11. Left-Aligned Pink Ribbon Styles */
.corner-ribbon {
    position: absolute;
    top: 15px;
    left: 0;
    background: #FF69B4; /* Pink background */
    color: white;
    padding: 8px 20px 8px 15px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 15;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

/* Ribbon arrow/tail effect */
.corner-ribbon::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 16px 0 16px 10px;
    border-color: transparent transparent transparent #FF69B4;
}

/* 12. Clickable Card Overlay Styles - FIXED */
.card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    pointer-events: auto;
    display: block;
}

.card-link:hover {
    background: rgba(81, 109, 255, 0.05);
}

.card-link:focus {
    outline: 2px solid var(--highlight-blue);
    outline-offset: 2px;
}

/* Ensure content stays above overlay but allows clicks through */
.offer-card > *:not(.card-link):not(.corner-ribbon) {
    position: relative;
    z-index: 8;
    pointer-events: none;
}

.hero-content > *:not(.card-link):not(.corner-ribbon) {
    position: relative;
    z-index: 8;
    pointer-events: none;
}

/* Re-enable clicks on interactive elements */
.cta-button,
.logo-link {
    pointer-events: auto;
    position: relative;
    z-index: 12;
}

/* Logo Link Styles */
.logo-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-link:focus {
    outline: 2px solid var(--highlight-blue);
    outline-offset: 4px;
    border-radius: 4px;
}

/* 13. Responsible Gaming Section */
.responsible-gaming {
    background: var(--bg-secondary);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
    border-top: 2px solid var(--accent-purple-1);
}

.responsible-gaming h3 {
    text-align: center;
    color: var(--highlight-yellow);
    margin-bottom: var(--spacing-md);
}

.responsible-gaming p {
    max-width: 800px;
    margin: 0 auto var(--spacing-md) auto;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
}

.help-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.help-links a {
    background: var(--accent-purple-1);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}

.help-links a:hover {
    background: var(--accent-purple-2);
    transform: translateY(-2px);
}

/* 14. Footer Styles */
.site-footer {
    background: var(--bg-secondary);
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

.compliance-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.compliance-logos img {
    height: 40px;
    filter: grayscale(100%) brightness(0.8);
    transition: all 0.3s ease;
}

.compliance-logos img:hover {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    padding: var(--spacing-xs);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--highlight-blue);
}

.footer-disclaimer,
.copyright {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto var(--spacing-sm) auto;
}

.copyright {
    font-weight: 600;
    color: var(--accent-purple-1);
    margin-bottom: 0;
}

/* 15. Desktop Media Query (768px and above) */
@media (min-width: 768px) {
    
    /* Switch responsive utility classes */
    .hide-on-desktop { 
        display: none; 
    }
    
    .hide-on-mobile { 
        display: block; 
    }
    
    /* Adjust container padding for desktop */
    .container {
        padding: 0 20px;
    }
    
    /* Desktop typography scaling */
    h1 {
        font-size: 42px;
    }
    
    h2 {
        font-size: 32px;
    }
    
    h3 {
        font-size: 24px;
    }
    
    /* Desktop header */
    .site-header {
        padding: var(--spacing-xl) 0;
    }
    
    .site-header .subtitle {
        font-size: 18px;
    }
    
    /* Desktop compliance bar */
    .compliance-content {
        flex-direction: row;
        justify-content: center;
        gap: var(--spacing-md);
    }
    
    .age-badge {
        width: 60px;
        height: 60px;
    }
    
    .disclaimer-text {
        font-size: 16px;
    }
    
    /* Desktop CTA buttons */
    .cta-button {
        font-size: 18px;
        padding: 16px 32px;
    }
    
    /* Desktop hero section refinements */
    .hero-content {
        padding: var(--spacing-xl) var(--spacing-xl);
    }
    
    .casino-logo-large {
        max-height: 120px;
    }
    
    .offer-text {
        font-size: 36px;
    }
    
    /* Desktop star ratings */
    .star-rating {
        font-size: 20px;
        justify-content: center;
    }
    
    /* Desktop ribbon sizing */
    .corner-ribbon {
        top: 20px;
        padding: 10px 25px 10px 20px;
        font-size: 12px;
    }
    
    .corner-ribbon::after {
        right: -12px;
        border-width: 18px 0 18px 12px;
    }
    
    /* Desktop footer adjustments */
    .compliance-logos {
        gap: 50px;
    }
    
    .compliance-logos img {
        height: 50px;
    }
    
    .footer-links {
        gap: var(--spacing-lg);
    }
    
    .footer-links a {
        font-size: 16px;
    }
    
    .footer-disclaimer,
    .copyright {
        font-size: 14px;
    }
}

/* 16. Large Desktop Media Query (1200px and above) */
@media (min-width: 1200px) {
    
    .container {
        padding: 0;
    }
    
    .hero-content {
        padding: 80px 60px;
    }
    
    .offer-text {
        font-size: 40px;
    }
    
    .review-highlights {
        max-width: 600px;
    }
    
    .review-highlights li {
        font-size: 18px;
    }
}

/* 17. Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply subtle animations to cards */
.offer-card,
.hero-content {
    animation: fadeInUp 0.6s ease-out;
}

/* 18. Print Styles */
@media print {
    .cta-button,
    .compliance-bar,
    .site-footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* 19. High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #1a1a1a;
        --text-primary: #ffffff;
        --border-color: #ffffff;
    }
}

/* 20. 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;
        scroll-behavior: auto !important;
    }
}