/* ===============================================
   C.R.I. PICKS - Main Stylesheet
   Version: 1.0
   =============================================== */

/* ===============================================
   1. CSS Variables & Root
   =============================================== */
:root {
    /* Primary - Racing Green */
    --primary: #1B5E20;
    --primary-light: #4CAF50;
    --primary-dark: #0D3311;

    /* Secondary - Gold/Yellow */
    --secondary: #FFD700;
    --secondary-light: #FFEB3B;
    --secondary-dark: #FFC107;

    /* Accent - Racing Red */
    --accent: #D32F2F;

    /* Neutrals */
    --background: #FAFAFA;
    --surface: #FFFFFF;
    --text-primary: #212121;
    --text-secondary: #757575;
    --border-color: #E0E0E0;

    /* Status Colors */
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #F44336;
    --info: #2196F3;

    /* Expert Pick Badge */
    --expert-pick: #1976D2;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
}

/* ===============================================
   2. Reset & Base Styles
   =============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

ul {
    list-style: none;
}

/* ===============================================
   3. Container & Layout
   =============================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ===============================================
   4. Navigation
   =============================================== */
.navbar {
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-md) 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-logo {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
}

.nav-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.btn-login {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    color: var(--primary);
}

.btn-login:hover {
    background: var(--primary);
    color: white;
}

.btn-cta {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--secondary);
    color: var(--primary-dark);
    border-radius: var(--radius-md);
    font-weight: 600;
}

.btn-cta:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.active {
    max-height: 500px;
}

.mobile-link {
    display: block;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.mobile-link:hover,
.mobile-link.active {
    background: var(--primary-light);
    color: white;
}

.btn-mobile-cta {
    background: var(--secondary);
    color: var(--primary-dark);
    font-weight: 600;
}

/* ===============================================
   5. Hero Section
   =============================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: var(--spacing-xxl) 0;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/hero-bg.jpg') center/cover;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: var(--spacing-xl);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-xl);
}

.hero-stats {
    display: flex;
    gap: var(--spacing-xl);
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
    font-family: 'Roboto Mono', monospace;
}

.stat-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* ===============================================
   6. Buttons
   =============================================== */
.btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

.btn-gold {
    background: var(--secondary);
    color: var(--primary-dark);
}

.btn-gold:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-large {
    padding: var(--spacing-lg) var(--spacing-xxl);
    font-size: 1.125rem;
}

/* ===============================================
   7. Sections
   =============================================== */
section {
    padding: var(--spacing-xxl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
}

.section-title {
    color: var(--primary-dark);
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ===============================================
   8. Free Pick Section
   =============================================== */
.free-pick {
    background: var(--surface);
}

.picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.pick-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
}

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

.race-header {
    background: var(--primary);
    color: white;
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.race-number {
    font-weight: 700;
    font-size: 1.125rem;
}

.race-time {
    font-size: 0.875rem;
    opacity: 0.9;
}

.badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

.badge-premium {
    background: var(--expert-pick);
    color: white;
}

.pick-content {
    padding: var(--spacing-lg);
}

.horse-name {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.horse-details {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.post-position {
    background: var(--primary-light);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.win-percentage {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Roboto Mono', monospace;
}

.connections {
    margin-bottom: var(--spacing-md);
}

.connections p {
    margin-bottom: var(--spacing-xs);
    font-size: 0.875rem;
}

.cri-selection {
    background: var(--secondary-light);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    color: var(--primary-dark);
}

.pick-card.locked .pick-content {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
}

.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

.locked-overlay i {
    width: 48px;
    height: 48px;
}

/* ===============================================
   9. Track Record Section
   =============================================== */
.track-record {
    background: var(--background);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
}

.stat-card {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin: 0 auto var(--spacing-md);
}

.stat-value {
    font-size: 2.5rem;
    color: var(--primary);
    font-family: 'Roboto Mono', monospace;
    margin-bottom: var(--spacing-sm);
}

.stat-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===============================================
   10. Video Section
   =============================================== */
.latest-video {
    background: var(--surface);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
}

/* ===============================================
   11. How It Works Section
   =============================================== */
.how-it-works {
    background: var(--background);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.step-card {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: var(--secondary);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.step-icon {
    width: 64px;
    height: 64px;
    color: var(--primary);
    margin: var(--spacing-lg) auto;
}

.step-card h3 {
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
}

/* ===============================================
   12. Pricing Section
   =============================================== */
.pricing-preview {
    background: var(--surface);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured {
    border-color: var(--primary);
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-8px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.pricing-title {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.pricing-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.pricing-price {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.currency {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Roboto Mono', monospace;
}

.period {
    color: var(--text-secondary);
}

.pricing-features {
    margin-bottom: var(--spacing-xl);
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.pricing-features i {
    width: 20px;
    height: 20px;
    color: var(--success);
}

/* ===============================================
   13. Tracks Section
   =============================================== */
.tracks {
    background: var(--background);
}

.tracks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.track-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-align: center;
}

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

.track-card.featured {
    border: 2px solid var(--primary);
}

.track-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--primary-light);
}

.track-card h3 {
    color: var(--primary-dark);
    margin: var(--spacing-md) 0 var(--spacing-sm);
}

.track-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

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

.badge-soon {
    background: var(--warning);
    color: white;
}

/* ===============================================
   14. Testimonials Section
   =============================================== */
.testimonials {
    background: var(--surface);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
}

.testimonial-card {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.testimonial-stars {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.testimonial-stars i {
    width: 20px;
    height: 20px;
}

.testimonial-stars .filled {
    color: var(--secondary);
}

.testimonial-text {
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
}

.testimonial-author strong {
    color: var(--primary-dark);
    margin-bottom: var(--spacing-xs);
}

.testimonial-author span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===============================================
   15. Newsletter Section
   =============================================== */
.newsletter {
    background: var(--primary);
    color: white;
    padding: var(--spacing-xxl) 0;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-title {
    color: white;
    margin-bottom: var(--spacing-sm);
}

.newsletter-subtitle {
    color: var(--secondary);
    margin-bottom: var(--spacing-xl);
}

.newsletter-form {
    display: flex;
    gap: var(--spacing-md);
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: var(--spacing-md);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
}

/* ===============================================
   16. Footer
   =============================================== */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-title {
    color: var(--secondary);
    margin-bottom: var(--spacing-md);
}

.footer-text {
    color: rgba(255,255,255,0.8);
    margin-bottom: var(--spacing-md);
}

.footer-heading {
    color: white;
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: rgba(255,255,255,0.8);
}

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

.footer-social {
    display: flex;
    gap: var(--spacing-md);
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--secondary);
    color: var(--primary-dark);
}

.footer-social i {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* ===============================================
   17. Responsive Design
   =============================================== */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu {
        display: block;
    }
    
    /* Hero */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: var(--spacing-lg);
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Sections */
    section {
        padding: var(--spacing-xl) 0;
    }
    
    /* Grids */
    .picks-grid,
    .stats-grid,
    .steps-grid,
    .pricing-grid,
    .tracks-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    /* Pricing */
    .pricing-card.featured {
        transform: none;
    }
    
    /* Newsletter */
    .newsletter-form {
        flex-direction: column;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    /* Hero */
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Cards */
    .pick-card,
    .stat-card,
    .step-card,
    .pricing-card,
    .testimonial-card {
        padding: var(--spacing-md);
    }
}

/* ===============================================
   18. Utilities
   =============================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.hidden { display: none; }
.visible { display: block; }

/* ===============================================
   19. Animations
   =============================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slideIn {
    animation: slideIn 0.5s ease forwards;
}

.animate-pulse {
    animation: pulse 2s ease infinite;
}

/* ===============================================
   20. Print Styles
   =============================================== */
@media print {
    .navbar,
    .mobile-menu,
    .hero-buttons,
    .newsletter,
    .footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}