/* ============================================
   CARMARTHEN STROKE CLUB - DESIGN SYSTEM
   Premium NPO Website Styles
   ============================================ */

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - Stroke Awareness Purple */
    --primary-900: #4A148C;
    --primary-800: #6A1B9A;
    --primary-700: #7B2CBF;
    --primary-600: #9D4EDD;
    --primary-500: #C77DFF;
    --primary-400: #E0AAFF;

    /* Secondary Colors - Calming Blues */
    --secondary-900: #1E3A8A;
    --secondary-800: #3F37C9;
    --secondary-700: #4361EE;
    --secondary-600: #4CC9F0;
    --secondary-500: #7209B7;

    /* Accent Colors */
    --accent-pink: #F72585;
    --accent-orange: #FF6B35;
    --accent-green: #06D6A0;

    /* Neutral Colors */
    --neutral-50: #FAFAFA;
    --neutral-100: #F5F5F5;
    --neutral-200: #E5E5E5;
    --neutral-300: #D4D4D4;
    --neutral-400: #A3A3A3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;

    /* Semantic Colors */
    --success: #06D6A0;
    --warning: #FFB703;
    --error: #EF476F;
    --info: #4CC9F0;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'Merriweather', Georgia, serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */
    --text-5xl: 3rem;
    /* 48px */
    --text-6xl: 3.75rem;
    /* 60px */

    /* Spacing */
    --space-1: 0.25rem;
    /* 4px */
    --space-2: 0.5rem;
    /* 8px */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-5: 1.5rem;
    /* 24px */
    --space-6: 2rem;
    /* 32px */
    --space-8: 3rem;
    /* 48px */
    --space-10: 4rem;
    /* 64px */
    --space-12: 6rem;
    /* 96px */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--neutral-800);
    background-color: var(--neutral-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-4);
    color: var(--neutral-900);
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

p {
    margin-bottom: var(--space-4);
}

a {
    color: var(--primary-700);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

a:focus {
    outline: 2px solid var(--primary-700);
    outline-offset: 2px;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-wide {
    max-width: 1400px;
}

.container-narrow {
    max-width: 800px;
}

.section {
    padding: var(--space-10) 0;
}

.section-sm {
    padding: var(--space-8) 0;
}

.section-lg {
    padding: var(--space-12) 0;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-6);
}

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

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

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-3 {
    gap: var(--space-3);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

/* ============================================
   HEADER STYLES
   ============================================ */
.header-top {
    background: var(--neutral-900);
    /* Darker, more premium / modern */
    color: var(--neutral-300);
    padding: var(--space-2) 0;
    font-size: 0.8125rem;
    /* Slight optical adjustment */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-top a {
    color: white;
    margin-right: var(--space-4);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.header-top a:hover {
    color: var(--primary-400);
}

.charity-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.header-main {
    background: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--primary-700);
}

.logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--space-6);
    align-items: center;
}

.main-nav a {
    color: var(--neutral-600);
    font-weight: 600;
    /* Bolder for readability */
    font-size: 0.95rem;
    padding: var(--space-2) 0;
    /* Removing side padding for link-only focus */
    margin: 0 var(--space-3);
    border-radius: 0;
    position: relative;
    /* For underline effect */
    transition: color var(--transition-fast);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    /* Space below text */
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-600);
    transition: width var(--transition-base);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-800);
    background: transparent;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.nav-cta {
    background: var(--primary-700) !important;
    /* Solid trusted color */
    color: white !important;
    padding: 10px 24px !important;
    /* Larger touch target */
    border-radius: 50px !important;
    /* Full pill */
    font-weight: 600;
    box-shadow: 0 4px 14px 0 rgba(123, 44, 191, 0.39);
    margin-left: var(--space-2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta::after {
    display: none;
    /* No underline for button */
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 44, 191, 0.23);
    background: var(--primary-800) !important;
    color: white !important;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--neutral-800);
    margin: 5px 0;
    transition: var(--transition-base);
    border-radius: var(--radius-sm);
}

/* ============================================
   FOOTER STYLES
   ============================================ */
.footer {
    background: linear-gradient(to bottom, var(--neutral-900), var(--neutral-800));
    color: var(--neutral-200);
    padding-top: var(--space-10);
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--neutral-700);
}

.footer-column h4 {
    color: white;
    margin-bottom: var(--space-4);
    font-size: var(--text-lg);
}

.footer-column p {
    margin-bottom: var(--space-3);
    font-size: var(--text-sm);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-3);
}

.footer-links a {
    color: var(--neutral-300);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

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

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    font-size: var(--text-sm);
}

.footer-contact-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-bottom {
    padding: var(--space-5) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-bottom p {
    margin: 0;
    font-size: var(--text-sm);
}

.social-links {
    display: flex;
    gap: var(--space-4);
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--neutral-700);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary-700);
    transform: translateY(-3px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-900), var(--primary-700));
    color: white;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero h1 {
    color: white;
    font-size: var(--text-6xl);
    margin-bottom: var(--space-5);
    line-height: 1.1;
}

.hero p {
    font-size: var(--text-xl);
    margin-bottom: var(--space-6);
    opacity: 0.95;
}

.hero-image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    z-index: 1;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    font-family: var(--font-primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-800), var(--primary-700));
}

.btn-secondary {
    background: white;
    color: var(--primary-700);
    border: 2px solid var(--primary-700);
}

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

.btn-accent {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-orange));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

.btn-group {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    height: 100%;
}

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

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    color: white;
    font-size: var(--text-3xl);
}

.card h3 {
    color: var(--neutral-900);
    margin-bottom: var(--space-3);
}

.card p {
    color: var(--neutral-600);
    line-height: 1.7;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
}

/* ============================================
   STATISTICS
   ============================================ */
.stats-section {
    background: linear-gradient(135deg, var(--secondary-800), var(--secondary-700));
    color: white;
    padding: var(--space-10) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-8);
    text-align: center;
}

.stat-item h3 {
    color: white;
    font-size: var(--text-5xl);
    margin-bottom: var(--space-2);
    font-weight: 800;
}

.stat-item p {
    font-size: var(--text-lg);
    opacity: 0.95;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    color: var(--neutral-700);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3);
    border: 2px solid var(--neutral-300);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-family: var(--font-primary);
    transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-700);
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.text-white {
    color: white;
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mt-6 {
    margin-top: var(--space-6);
}

.bg-gradient-purple {
    background: linear-gradient(135deg, var(--primary-900), var(--primary-600));
}

.bg-gradient-blue {
    background: linear-gradient(135deg, var(--secondary-800), var(--secondary-600));
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --text-5xl: 2.5rem;
        --text-6xl: 3rem;
    }

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

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

@media (max-width: 768px) {
    :root {
        --text-4xl: 1.875rem;
        --text-5xl: 2rem;
        --text-6xl: 2.5rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-base);
    }

    .main-nav.active {
        max-height: 500px;
    }

    .main-nav ul {
        flex-direction: column;
        padding: var(--space-4);
        gap: 0;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        display: block;
        padding: var(--space-3);
        border-bottom: 1px solid var(--neutral-200);
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .hero {
        min-height: 500px;
    }

    .hero h1 {
        font-size: var(--text-4xl);
    }

    .hero-image {
        opacity: 0.15;
    }

    .section {
        padding: var(--space-8) 0;
    }
}

@media (max-width: 480px) {
    .header-top .container {
        justify-content: center;
        text-align: center;
    }

    .header-top a {
        margin: var(--space-1);
    }

    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

/* ============================================
   ACCESSIBILITY
   ============================================ */
.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 {
    outline: 2px solid var(--primary-700);
    outline-offset: 2px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Additional Utility Classes */
.mb-0 {
    margin-bottom: 0 !important;
}