/* DARK TECH THEME - EV RANGE RESCUERS */
:root {
    /* Color Palette */
    --bg-dark: #0F172A;
    /* Deep Slate (Main Background) */
    --bg-card: rgba(30, 41, 59, 0.7);
    /* Translucent Slate (Cards) */
    --text-primary: #F8FAFC;
    /* White/Off-White */
    --text-secondary: #94A3B8;
    /* Muted Blue-Grey */

    /* Neon Accents */
    --accent-cyan: #06B6D4;
    /* Tech Cyan (Speed/Electricity) */
    --accent-amber: #F59E0B;
    /* Amber (Action/Rescue) */
    --accent-glow: rgba(6, 182, 212, 0.4);

    /* Gradients */
    --grad-hero: linear-gradient(135deg, #020617 0%, #0F172A 100%);
    --grad-btn: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);

    /* Spacing */
    --hero-pad-top: 3.375rem;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
    background-image: radial-gradient(circle at 50% 0%, #1e293b 0%, var(--bg-dark) 50%);
    min-height: 100vh;
}

/* HERO SECTION */
.hero {
    background: transparent;
    /* Let body gradient show through */
    color: var(--text-primary);
    padding: 4.5rem 1.5rem 4rem;
    /* Reduced to ~4.5rem based on feedback */
    text-align: center;
    position: relative;
    overflow: hidden;
}

@media (max-width: 600px) {
    .hero {
        padding-top: 5.5rem;
        /* Reduced to 5.5rem (closer to original 5rem) */
    }
}

h1 {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

h1 span {
    color: var(--accent-cyan);
    text-shadow: 0 0 15px var(--accent-glow);
}

p.subhead {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 3.5rem;
}

/* CARDS (Glassmorphism) */
.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1400px;
    margin: -3rem auto 0;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    flex: 1 1 300px;
    max-width: 380px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(6, 182, 212, 0.15);
    border-color: var(--accent-cyan);
}

.card h3 {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* TEXT UTILITIES */
p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

strong {
    color: var(--text-primary);
}

/* BUTTONS */
.rescue-btn {
    background: var(--grad-btn);
    color: #ffffff;
    padding: 1.25rem 2.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.rescue-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.6);
}

.rescue-btn:active {
    transform: scale(0.95);
}

.rescue-btn.small {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.landing-header {
    position: absolute;
    top: 60px;
    right: 20px;
    z-index: 100;
}

.header-login-btn {
    display: inline-block;
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(6, 182, 212, 0.5);
    background: rgba(6, 182, 212, 0.1);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.75rem;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

.header-login-btn:hover {
    background-color: var(--accent-cyan);
    color: #fff;
    box-shadow: 0 0 10px var(--accent-glow);
}

.user-header-widget {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 41, 59, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--accent-cyan);
    backdrop-filter: blur(5px);
    transition: all 0.2s;
}

.user-header-widget:hover {
    background: rgba(30, 41, 59, 1);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
    border-color: #fff;
}

.learn-more-btn {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(6, 182, 212, 0.5);
    background: rgba(6, 182, 212, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-transform: uppercase;
}

.learn-more-btn:hover {
    background-color: var(--accent-cyan);
    color: #fff;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 2rem 2rem 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 1.5rem;
}

footer a {
    color: var(--text-secondary);
    transition: color 0.2s;
    display: inline-block;
    /* Ensure transforms work */
}

footer a img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

footer a:hover img {
    transform: translateY(-5px);
    filter: drop-shadow(0 5px 15px rgba(6, 182, 212, 0.4));
}

footer a:hover {
    color: var(--accent-cyan);
}

/* MODAL STYLES */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: #1e293b;
    border: 1px solid var(--accent-cyan);
    padding: 2rem;
    border-radius: 16px;
    max-width: 90%;
    width: 400px;
    text-align: center;
    color: var(--text-primary);
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    margin-top: 1.5rem;
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 0.5rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.modal-close:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* FORM STYLES */
.form-container {
    max-width: 600px;
    margin: -4rem auto 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--accent-amber);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.section-title:first-of-type {
    margin-top: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 600px) {
    .form-row.two-col {
        grid-template-columns: 1fr 1fr;
    }

    .form-row.three-col {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

button.submit-btn {
    background: var(--grad-btn);
    color: #fff;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 800;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    transition: transform 0.2s;
    margin-top: 1.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

button.submit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
}

button.submit-btn:active {
    transform: scale(0.98);
}

@media (max-width: 600px) {
    .hero {
        padding-top: 5.5rem;
        /* Reduced to 5.5rem (closer to original 5rem) */
    }
}