/* New England E-Bike and PEV - Stylized ⚡ */

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-glow: rgba(16, 185, 129, 0.4);
    --secondary: #3b82f6;
    --secondary-glow: rgba(59, 130, 246, 0.4);
    --accent: #f59e0b;
    --electric: #22d3ee;
    --dark: #1f2937;
    --darker: #0f172a;
    --darkest: #020617;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --gradient: linear-gradient(135deg, #10b981 0%, #3b82f6 50%, #8b5cf6 100%);
    --gradient-electric: linear-gradient(135deg, #22d3ee 0%, #10b981 50%, #3b82f6 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 30px rgba(16, 185, 129, 0.3);
    --shadow-glow-blue: 0 0 30px rgba(59, 130, 246, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--darkest);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animated Background */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
    animation: pulse 8s ease-in-out infinite;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 0;
    transition: all 0.3s ease;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-links a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: white;
}

.nav-links a:not(.nav-cta):hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--gradient);
    color: white !important;
    padding: 12px 24px;
    border-radius: 50px;
    transition: all 0.3s !important;
    box-shadow: 0 4px 15px var(--primary-glow);
    font-weight: 600;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: white;
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 70px;
    background: #f5a623;
    position: relative;
    overflow: hidden;
}

.hero-banner {
    width: 100%;
    max-width: 1400px;
    height: auto;
    display: block;
}

.hero-buttons-overlay {
    background: var(--darker);
    width: 100%;
    padding: 40px 20px;
    text-align: center;
}

.hero-tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    margin-bottom: 25px;
    font-weight: 500;
}

/* Old hero content styles removed - using banner image */

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

/* Float animation removed - static hero */

/* Grid animation removed for static banner hero */

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

.btn-large {
    padding: 20px 40px;
    font-size: 1.1rem;
}

/* Sections - All Dark Theme */
.section {
    padding: 60px 0;
    background: var(--darker);
    color: white;
    position: relative;
}

.section-alt {
    background: var(--darkest);
    color: white;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 10px;
    color: white;
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 50px 35px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.4s;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), var(--shadow-glow);
    background: rgba(255, 255, 255, 0.08);
}

.about-card:hover::before {
    transform: scaleX(1);
}

.about-icon {
    font-size: 4rem;
    margin-bottom: 25px;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

.about-card:nth-child(2) .about-icon {
    animation-delay: 0.2s;
}

.about-card:nth-child(3) .about-icon {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.about-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: white;
    font-weight: 700;
}

.about-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Community Section */
.community-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.community-text .lead {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    line-height: 1.6;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 10px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    cursor: default;
    color: rgba(255, 255, 255, 0.8);
}

.feature-list li:hover {
    padding-left: 15px;
    color: var(--primary);
}

.community-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.stat {
    background: var(--gradient);
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
}

.stat:hover {
    transform: scale(1.05);
}

.stat::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.event-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: all 0.4s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.event-card:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.event-card.featured {
    background: var(--gradient);
    color: white;
    transform: scale(1.02);
}

.event-card.featured:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.event-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.event-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.event-date {
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.9;
    font-size: 0.9rem;
}

.event-card p:last-child {
    opacity: 0.85;
    line-height: 1.5;
    font-size: 0.9rem;
}

.events-cta {
    text-align: center;
}

.events-cta p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.resource-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--primary);
}

.resource-card:hover {
    border-left-color: var(--secondary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), var(--shadow-glow);
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.08);
}

.resource-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: white;
    font-weight: 700;
}

.resource-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    font-size: 0.9rem;
}

a.resource-link {
    text-decoration: none;
    display: block;
}

a.resource-link:hover {
    transform: translateX(5px) translateY(-3px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-left-color: var(--secondary);
}

/* CTA Section */
.cta-section {
    background: var(--darker);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 50%, var(--primary-glow) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, var(--secondary-glow) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.cta-section p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 20px;
}

.cta-section .btn-primary {
    background: white;
    color: var(--darker);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

.cta-section .btn-primary:hover {
    background: var(--light);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.4);
}

/* Footer */
.footer {
    background: var(--darkest);
    color: white;
    padding: 80px 0 40px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--gray);
    margin-top: 15px;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 35px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.footer-links a:hover {
    color: white;
    text-shadow: 0 0 10px var(--primary-glow);
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }

    .nav-links {
        display: none !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 40px 20px;
        gap: 24px;
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links a {
        font-size: 1.4rem !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        color: white !important;
        text-align: center;
        padding: 10px 20px;
        width: 100%;
        max-width: 280px;
    }

    .nav-links a:hover {
        color: var(--primary) !important;
    }

    .nav-links .nav-cta {
        margin-top: 10px;
    }

    .nav-container {
        position: relative;
    }

    .nav-toggle {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        padding: 10px !important;
        z-index: 1001 !important;
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .nav-toggle span {
        width: 25px !important;
        height: 3px !important;
        background: white !important;
        display: block !important;
        border-radius: 2px !important;
        transition: all 0.3s !important;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-visual {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .community-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .stat {
        padding: 15px 10px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .event-card, .resource-card {
        padding: 15px;
    }
    
    .events-grid, .resources-grid {
        gap: 10px;
    }

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

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

/* Scroll animations */
@media (prefers-reduced-motion: no-preference) {
    .about-card,
    .event-card,
    .resource-card,
    .stat {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 0.6s ease-out forwards;
    }

    .about-card:nth-child(1) { animation-delay: 0.1s; }
    .about-card:nth-child(2) { animation-delay: 0.2s; }
    .about-card:nth-child(3) { animation-delay: 0.3s; }

    .event-card:nth-child(1) { animation-delay: 0.1s; }
    .event-card:nth-child(2) { animation-delay: 0.2s; }
    .event-card:nth-child(3) { animation-delay: 0.3s; }
    .event-card:nth-child(4) { animation-delay: 0.4s; }
}

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

.intro-section {
    padding: 2rem 0;
    background: var(--bg);
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.intro-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

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

/* Featured Article Link */
.featured-article {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
    margin: 1.5rem auto 0;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    border: 1px solid var(--primary);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.featured-article:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

.featured-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.featured-title {
    flex: 1;
    font-weight: 500;
    color: var(--text);
}

.featured-arrow {
    color: var(--primary);
    font-size: 1.25rem;
    transition: transform 0.2s;
}

.featured-article:hover .featured-arrow {
    transform: translateX(4px);
}

@media (max-width: 640px) {
    .featured-article {
        flex-wrap: wrap;
        gap: 0.5rem;
        text-align: center;
        justify-content: center;
    }
    
    .featured-arrow {
        display: none;
    }
}

/* Featured Banner (Laws page) */
.featured-banner {
    padding: 1.5rem 0;
    background: var(--bg);
}

.banner-link {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.04));
    border: 1px solid var(--primary);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.banner-link:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.08));
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.banner-icon {
    font-size: 2rem;
}

.banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.banner-text strong {
    color: var(--text);
    font-size: 1.1rem;
}

.banner-text span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.banner-arrow {
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .banner-link {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .banner-arrow {
        margin-top: 0.5rem;
    }
}
