/* ============================================================
   CaliforniaTeenDriverEd.com — design system
   Palette matches sister sites (driveedca.com, hillsdriving.com,
   drivered4teens.com): purple + orange, warm off-white background.
   ============================================================ */

:root {
  --purple: #5B2D8E;
  --purple-dark: #3D1D60;
  --purple-l: #7B4DB8;
  --purple-light: #EDE5F8;
  --purple-pale: #F2ECF9;
  --orange: #F4914A;
  --orange-dark: #E8621A;
  --orange-light: #FFF3E9;
  --ink: #2A2724;
  --ink-muted: #6B5E52;
  --border: #EDE6DF;
  --border-strong: #D9D2C8;
  --bg: #FFFCF9;
  --green: #1E5C38;
  --green-light: #E9F6EE;
  --red: #C0392B;
  --red-light: #FDECE8;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(42, 39, 36, 0.08);
  --shadow-lg: 0 16px 48px rgba(42, 39, 36, 0.12);
}

/* ----------------------------
   Reset & basic styling
----------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

a { color: var(--purple); }

/* ----------------------------
   Background grid texture (matches hillsdriving.com's aerospace section)
----------------------------- */
.bg-grid-texture {
    position: relative;
}
.bg-grid-texture::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(91, 45, 142, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91, 45, 142, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    z-index: 0;
}
.bg-grid-texture > * {
    position: relative;
    z-index: 1;
}

/* ----------------------------
   Header
----------------------------- */
header {
    background-color: var(--purple-light);
    color: var(--ink);
    padding: 18px 24px;
    box-shadow: 0 1px 28px rgba(91, 45, 142, 0.09);
    border-bottom: 1px solid var(--border);
}

header .header-top h1 {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    color: var(--ink);
}

header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

header nav a {
    color: var(--ink-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 8px 16px;
    border-radius: 999px;
    transition: all 0.15s ease;
}

header nav a:hover {
    background-color: #fff;
    color: var(--purple);
}

/* ----------------------------
   Main content
----------------------------- */
main {
    padding: 40px 20px;
}

/* ----------------------------
   Buttons
----------------------------- */
button, .btn {
    background-color: var(--orange);
    color: white;
    border: none;
    padding: 13px 26px;
    margin: 10px 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn:hover {
    background-color: var(--orange-dark);
    box-shadow: 0 6px 16px rgba(232, 98, 26, 0.25);
}

button:disabled, .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-ghost {
    background-color: transparent;
    color: var(--purple);
    border: 1.5px solid var(--border-strong);
}

.btn-ghost:hover {
    background-color: var(--purple-light);
    box-shadow: none;
}

/* ----------------------------
   Profile button (matches Courses button)
----------------------------- */
.profile-btn {
    background-color: var(--purple);
    color: white;
}

.profile-btn:hover {
    background-color: var(--purple-dark);
    box-shadow: 0 6px 16px rgba(108, 79, 212, 0.25);
}

/* ----------------------------
   Footer
----------------------------- */
footer {
    background-color: #fff;
    padding: 28px 20px;
    font-size: 0.88rem;
    color: var(--ink-muted);
    margin-top: 60px;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer a {
    color: var(--ink-muted);
    text-decoration: none;
}

footer a:hover {
    color: var(--purple);
    text-decoration: underline;
}

/* ----------------------------
   Auth & Profile Containers
----------------------------- */
.auth-container, .profile-container {
    max-width: 460px;
    margin: 48px auto;
    padding: 36px 32px;
    background-color: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: left;
}

.auth-container h2, .profile-container h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
}

.auth-subtitle {
    color: var(--ink-muted);
    font-size: 0.92rem;
    margin-bottom: 24px;
}

/* ----------------------------
   Input Fields for Auth/Register/Login/Reset
----------------------------- */
.auth-container .form-group,
.profile-container .form-group {
    margin-bottom: 18px;
}

.auth-container label,
.profile-container label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}

.auth-container input,
.auth-container select,
.profile-container input,
.reset-container input[type="email"] {
    width: 100%;
    padding: 13px 14px;
    font-size: 1rem;
    min-height: 48px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-strong);
    margin-top: 2px;
    transition: all 0.15s ease;
    background: #fff;
    color: var(--ink);
}

.auth-container input:focus,
.auth-container select:focus,
.profile-container input:focus,
.reset-container input[type="email"]:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(108, 79, 212, 0.15);
}

.auth-container small {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--ink-muted);
}

/* ----------------------------
   🔧 FIX: Make ALL input elements full width
----------------------------- */
input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
}

/* ----------------------------
   Auth buttons
----------------------------- */
.auth-container button {
    width: 100%;
    background-color: var(--orange);
    color: white;
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-top: 6px;
}

.auth-container button:hover {
    background-color: var(--orange-dark);
}

.auth-container a {
    color: var(--purple);
    text-decoration: none;
    font-weight: 600;
}

.auth-container a:hover {
    text-decoration: underline;
}

.auth-container p {
    font-size: 0.92rem;
    color: var(--ink-muted);
    margin-top: 14px;
}

/* Error messages */
.error-messages {
    background: var(--red-light);
    border: 1px solid #F3B5A6;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 20px;
}

.error-messages p {
    font-weight: 700;
    color: var(--red);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.error-messages ul {
    list-style: none;
    color: var(--red);
    font-size: 0.88rem;
}

.error-messages li {
    padding: 2px 0;
}

/* ----------------------------
   Profile Page
----------------------------- */
.profile-container p {
    font-size: 1rem;
    color: var(--ink-muted);
    margin-bottom: 10px;
}

.profile-container .btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 12px;
}

/* ----------------------------
   Home Page Hero
----------------------------- */
.home-container {
    max-width: 700px;
    margin: 100px auto 60px auto;
    padding: 48px 40px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.home-container h1 {
    font-size: 2.2rem;
    color: var(--ink);
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.home-container p {
    font-size: 1.1rem;
    margin-bottom: 36px;
    color: var(--ink-muted);
}

.home-container .auth-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.home-container .auth-links a.btn {
    display: inline-block;
    padding: 14px 30px;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
}

.home-container .auth-links a.btn:first-child {
    background-color: var(--orange);
    color: #fff;
}

.home-container .auth-links a.btn:last-child {
    background-color: transparent;
    color: var(--purple);
    border: 1.5px solid var(--border-strong);
}

.home-container .auth-links a.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ----------------------------
   Reset Email Form
----------------------------- */
.reset-container {
    max-width: 480px;
    margin: 48px auto;
    padding: 36px 32px;
    background-color: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.reset-container h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.reset-container p {
    margin-bottom: 20px;
    color: var(--ink-muted);
}

.reset-container form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.reset-container input[type="email"] {
    width: 100%;
    padding: 13px 14px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-strong);
    margin-bottom: 18px;
    max-width: 100%;
}

.reset-container button {
    width: 100%;
    max-width: 300px;
}

/* ----------------------------
   Trust badges / status cards (used on payment, check-email, etc)
----------------------------- */
.status-card {
    max-width: 520px;
    margin: 60px auto;
    padding: 40px 36px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.status-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.6rem;
}

.status-icon.info { background: var(--purple-light); color: var(--purple); }
.status-icon.success { background: var(--green-light); color: var(--green); }

.status-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--ink);
}

.status-card p {
    color: var(--ink-muted);
    margin-bottom: 8px;
    font-size: 0.98rem;
}

.status-note {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--ink-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}

/* ----------------------------
   Responsive Design
----------------------------- */
@media (max-width: 768px) {
    header nav {
        gap: 6px;
    }
    header nav a {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    .auth-container, .profile-container, .reset-container, .status-card {
        margin: 24px 16px;
        padding: 26px 22px;
    }
    button, .btn {
        width: 100%;
        font-size: 1.02rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 16px 16px;
    }
    header .header-top img {
        height: 28px !important;
    }
    header .header-top span {
        font-size: 0.98rem !important;
    }
    .home-container {
        margin: 60px auto 40px auto;
        padding: 32px 22px;
    }
    .home-container h1 {
        font-size: 1.6rem;
    }
    .home-container p {
        font-size: 0.95rem;
    }
    .reset-container button {
        width: 100%;
    }
    .summary-price {
        font-size: 1.8rem !important;
    }
}

/* ----------------------------------------------------
   🔧 FINAL FIX — prevents narrow input on laptop ONLY
------------------------------------------------------ */
main.container > .container {
    max-width: 600px;
    width: 100%;
}
/* ----------------------------
   Quiz question spacing fix
----------------------------- */
.quiz-container .question p {
    margin-bottom: 12px; /* gap between question text and answers */
}

.quiz-container .question > div {
    margin-bottom: 8px; /* gap between each answer */
}
