/*
Theme Name:  Cascade Driving School
Theme URI:   https://cascadedriving.com
Author:      Cascade Driving School
Description: Modern SEO-optimized WordPress theme for Cascade Driving School of Aberdeen, WA. Includes custom MySQL tables for registrations and contacts, class management, and structured data.
Version:     1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License:     GNU General Public License v2 or later
Text Domain: cascade-driving
*/

/* ── CUSTOM PROPERTIES ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:        #0d2b4a;
    --navy-dark:   #091e35;
    --navy-mid:    #1a4068;
    --blue:        #1b5ea7;
    --blue-light:  #2a7fd4;
    --gold:        #c8912a;
    --gold-light:  #e8ac42;
    --gold-pale:   #fdf3e3;
    --white:       #ffffff;
    --off-white:   #f7f8fa;
    --gray-100:    #eef0f3;
    --gray-200:    #dde0e6;
    --gray-500:    #6b7280;
    --gray-700:    #374151;
    --green:       #166534;
    --green-bg:    #dcfce7;
    --red:         #9b1c1c;
    --red-bg:      #fee2e2;
    --font-display:'DM Serif Display', Georgia, serif;
    --font-body:   'DM Sans', system-ui, sans-serif;
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   16px;
    --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
    --shadow-md:   0 4px 16px rgba(0,0,0,.10);
    --max-width:   1140px;
}

body { font-family: var(--font-body); background: var(--white); color: var(--gray-700); line-height: 1.65; font-size: 16px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ── LAYOUT ── */
.site-container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.section-wrap   { max-width: var(--max-width); margin: 0 auto; padding: 4rem 1.5rem; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 600; font-size: .95rem; padding: .75rem 1.6rem; border-radius: var(--radius-sm); border: none; cursor: pointer; transition: all .2s; text-decoration: none; }
.btn-gold    { background: var(--gold);    color: var(--navy); }
.btn-gold:hover    { background: var(--gold-light); transform: translateY(-1px); box-shadow: var(--shadow-md); color: var(--navy); }
.btn-primary { background: var(--blue);    color: var(--white); }
.btn-primary:hover { background: var(--blue-light); transform: translateY(-1px); box-shadow: var(--shadow-md); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.4); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); color: var(--white); }
.btn-full { width: 100%; justify-content: center; }

/* ── SITE HEADER & NAV ── */
.site-header { background: var(--navy); position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.nav-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; height: 68px; }
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo-icon { width: 400px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-logo-icon svg { width: 26px; height: 26px; fill: var(--navy); }
.nav-logo-text { font-family: var(--font-display); color: var(--white); font-size: 1.1rem; line-height: 1.2; }
.nav-logo-text span { display: block; font-size: .68rem; font-family: var(--font-body); color: var(--gold-light); letter-spacing: .06em; text-transform: uppercase; }
.nav-menu { display: flex; align-items: center; gap: .25rem; }
.nav-menu a { color: rgba(255,255,255,.82); font-size: .9rem; font-weight: 500; padding: .5rem .85rem; border-radius: var(--radius-sm); transition: background .2s, color .2s; }
.nav-menu a:hover,.nav-menu .current-menu-item > a,.nav-menu .current_page_item > a { background: rgba(255,255,255,.1); color: var(--white); }
.nav-menu .menu-item-register > a { background: var(--gold); color: var(--navy) !important; font-weight: 700 !important; }
.nav-menu .menu-item-register > a:hover { background: var(--gold-light); }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; border-radius: 2px; }

/* ── ALERT BAR ── */
.alert-bar { background: #fef9c3; border-bottom: 1px solid #fde047; padding: .6rem 1.5rem; text-align: center; font-size: .88rem; color: #713f12; }
.alert-bar a { color: #92400e; font-weight: 600; text-decoration: underline; }

/* ── PAGE HERO ── */
.page-hero { background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-mid) 60%, #1e4d7a 100%); color: var(--white); padding: 3.5rem 1.5rem; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E"); }
.page-hero-inner { max-width: var(--max-width); margin: 0 auto; position: relative; z-index: 1; }
.page-hero-tag { display: inline-block; background: rgba(200,145,42,.2); border: 1px solid var(--gold); color: var(--gold-light); font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: .3rem .8rem; border-radius: 100px; margin-bottom: 1rem; }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(2rem,4vw,3rem); line-height: 1.1; margin-bottom: 1rem; }
.page-hero p  { color: rgba(255,255,255,.75); max-width: 600px; font-size: 1.05rem; }

/* ── HOME HERO ── */
.home-hero { padding: 5rem 1.5rem 4rem; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(200,145,42,.2); border: 1px solid var(--gold); color: var(--gold-light); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: .35rem .85rem; border-radius: 100px; margin-bottom: 1.25rem; }
.home-hero h1 { font-family: var(--font-display); font-size: clamp(2.4rem,5vw,3.8rem); line-height: 1.1; margin-bottom: 1.25rem; max-width: 680px; }
.home-hero h1 em { color: var(--gold-light); font-style: italic; }
.home-hero .lead { font-size: 1.1rem; color: rgba(255,255,255,.78); max-width: 540px; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; }
.hero-stat strong { display: block; font-size: 1.9rem; font-family: var(--font-display); color: var(--gold-light); }
.hero-stat span   { font-size: .82rem; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .06em; }

/* ── SECTION HEADERS ── */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag { display: inline-block; background: var(--gold-pale); color: var(--gold); font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .8rem; border-radius: 100px; margin-bottom: .75rem; }
.section-header h2 { font-family: var(--font-display); font-size: clamp(1.8rem,3vw,2.5rem); color: var(--navy); margin-bottom: .75rem; }
.section-header p  { color: var(--gray-500); max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

/* ── CARDS ── */
.card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1.5rem; }
.card h3 { font-family: var(--font-display); font-size: 1.2rem; color: var(--navy); margin-bottom: .5rem; }
.card p  { color: var(--gray-500); font-size: .93rem; margin-bottom: 1rem; }
.card ul li { color: var(--gray-700); font-size: .9rem; padding: .3rem 0; display: flex; align-items: flex-start; gap: 8px; }
.card ul li::before { content: '✓'; color: var(--gold); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; font-size: .9rem; margin-top: 1rem; }

/* ── PRICING ── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1.25rem; }
.price-card   { background: var(--white); border: 1.5px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; text-align: center; }
.price-card.featured { border-color: var(--gold); background: var(--gold-pale); }
.price-card h4 { font-family: var(--font-display); font-size: 1.1rem; color: var(--navy); margin-bottom: .5rem; }
.price-amount  { font-size: 2.2rem; font-family: var(--font-display); color: var(--gold); }
.price-card p  { color: var(--gray-500); font-size: .85rem; margin-top: .5rem; }
.price-badge   { display: inline-block; background: var(--gold); color: var(--navy); font-size: .7rem; font-weight: 700; text-transform: uppercase; padding: .2rem .6rem; border-radius: 100px; margin-bottom: .75rem; }

/* ── INFO STRIP ── */
.info-strip { background: var(--navy); color: var(--white); }
.info-strip-inner { max-width: var(--max-width); margin: 0 auto; padding: 3rem 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 2rem; }
.info-item h4 { font-family: var(--font-display); font-size: 1.1rem; color: var(--gold-light); margin-bottom: .5rem; }
.info-item p,.info-item a { color: rgba(255,255,255,.75); font-size: .9rem; }
.info-item a:hover { color: var(--gold-light); }

/* ── FAQ ── */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--gray-200); }
.faq-question { width: 100%; background: none; border: none; cursor: pointer; text-align: left; padding: 1.25rem 0; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--navy); }
.faq-chevron { transition: transform .2s; font-size: 1.2rem; color: var(--gold); flex-shrink: 0; }
.faq-answer { display: none; padding: 0 0 1.25rem; color: var(--gray-500); font-size: .95rem; line-height: 1.7; }
.faq-item.open .faq-answer  { display: block; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }

/* ── FORMS ── */
.form-wrap { max-width: 680px; margin: 0 auto; }
.form-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-md); }
.form-section-title { font-family: var(--font-display); font-size: 1.3rem; color: var(--navy); margin-bottom: 1.5rem; padding-bottom: .75rem; border-bottom: 2px solid var(--gold-pale); }
.form-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 1rem; }
.form-group.full { grid-column: 1/-1; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--navy); }
.form-group label .req { color: var(--gold); }
.form-group input,.form-group select,.form-group textarea { font-family: var(--font-body); font-size: .95rem; padding: .65rem .9rem; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); background: var(--white); color: var(--gray-700); transition: border-color .2s; width: 100%; }
.form-group input:focus,.form-group select:focus,.form-group textarea:focus { outline: none; border-color: var(--blue); }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-note { font-size: .8rem; color: var(--gray-500); }
.notice { padding: 1rem 1.25rem; border-radius: var(--radius-md); margin-bottom: 1rem; }
.notice-success { background: var(--green-bg); border: 1px solid #86efac; color: var(--green); }
.notice-error   { background: var(--red-bg);   border: 1px solid #fca5a5; color: var(--red); }

/* ── CLASSES ── */
.classes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1.25rem; }
.class-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.class-card h3 { font-family: var(--font-display); color: var(--navy); font-size: 1.15rem; margin-bottom: .5rem; }
.badge { display: inline-block; padding: .2rem .65rem; border-radius: 100px; font-size: .75rem; font-weight: 600; }
.badge-teen  { background: #dbeafe; color: #1e40af; }
.badge-adult { background: #dcfce7; color: #166534; }
.badge-exam  { background: #fef9c3; color: #854d0e; }
.badge-court { background: #f3e8ff; color: #6b21a8; }

/* ── INFO BOXES ── */
.info-box { border-radius: var(--radius-lg); padding: 1.75rem; margin-top: 2rem; }
.info-box-blue { background: #eff6ff; border: 1.5px solid #bfdbfe; }
.info-box-gold { background: var(--gold-pale); border: 1.5px solid #fed7aa; }
.info-box h3 { font-family: var(--font-display); color: var(--navy); margin-bottom: .75rem; }

/* ── CONTACT ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 900px; margin: 0 auto; }
.hours-table { width: 100%; font-size: .9rem; margin-top: .75rem; }
.hours-table td:last-child { text-align: right; }

/* ── PROGRAMS ── */
.programs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 800px; margin: 0 auto; }

/* ── FOOTER ── */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,.65); padding: 3rem 1.5rem 1.5rem; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; }
.footer-grid  { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-brand p { font-size: .88rem; margin-top: .75rem; line-height: 1.7; }
.footer-col h4 { color: var(--white); font-weight: 600; margin-bottom: .75rem; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a  { font-size: .88rem; transition: color .2s; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.25rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .82rem; }

/* ── WP ADMIN DATA TABLES ── */
.cds-admin-wrap { max-width: 1100px; }
.cds-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 1rem; margin: 1.5rem 0; }
.cds-stat  { background: #fff; border: 1px solid #dde0e6; border-radius: 10px; padding: 1.25rem; text-align: center; }
.cds-stat .num { font-size: 2rem; font-weight: 700; color: var(--navy,#0d2b4a); }
.cds-stat .lbl { font-size: .8rem; color: #6b7280; text-transform: uppercase; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .contact-grid,.programs-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .nav-menu { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--navy); padding: 1rem 1.5rem; gap: 0; } .nav-menu.open { display: flex; } .nav-menu a { padding: .75rem 0; border-bottom: 1px solid rgba(255,255,255,.08); width: 100%; } .hamburger { display: block; } .site-header { position: relative; } .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } .pricing-grid { grid-template-columns: 1fr; } }
