/* =============================================
   ATLS Public Website - Stylesheet
   Design: Clinical authority with modern edge
   ============================================= */

/* --- CSS Variables --- */
:root {
    --navy:        #1B3A5C;
    --navy-light:  #2A4F7A;
    --slate:       #2C3E50;
    --charcoal:    #1A2A3E;
    --blue:        #2980B9;
    --blue-dark:   #1F6FA3;
    --blue-light:  #5DADE2;
    --pale-blue:   #EBF5FB;
    --pale-blue-mid: #D6EAF8;
    --gold:        #D4A843;
    --gold-light:  #E8C96A;
    --white:       #FFFFFF;
    --off-white:   #F0F7FC;
    --grey-100:    #DCE8F0;
    --grey-200:    #B8CCD9;
    --grey-300:    #8BA6B8;
    --grey-600:    #4A6275;
    --grey-800:    #1C3245;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'Source Sans 3', 'Segoe UI', sans-serif;
    --font-mono:    'IBM Plex Mono', monospace;
    --shadow-sm:   0 1px 3px rgba(0,0,0,.06);
    --shadow-md:   0 4px 12px rgba(0,0,0,.08);
    --shadow-lg:   0 8px 30px rgba(0,0,0,.12);
    --radius:      6px;
    --transition:  .25s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--font-body);
    color: var(--grey-800);
    background: var(--pale-blue);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-dark); }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }

.section-label {
    font-family: var(--font-mono);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 8px;
    display: block;
}

/* =============================================
   HEADER / NAV
   ============================================= */
.site-header {
    background: var(--pale-blue);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    border-bottom: 1px solid var(--grey-100);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.5px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -.3px;
    line-height: 1.2;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--blue);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--white);
}

.logo span { color: var(--blue-dark); }

/* Desktop nav */
.main-nav { display: flex; align-items: center; gap: 0; }

.main-nav a {
    color: var(--navy);
    font-size: .9rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: var(--radius);
    transition: all var(--transition);
    letter-spacing: .3px;
    opacity: .7;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--navy);
    opacity: 1;
    background: rgba(41,128,185,.08);
}

.main-nav a.active { border-bottom: 2px solid var(--blue); }

.nav-cta {
    background: var(--blue) !important;
    color: var(--white) !important;
    padding: 10px 24px !important;
    margin-left: 12px;
    border-radius: var(--radius) !important;
}

.nav-cta:hover { background: var(--blue-dark) !important; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--navy);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    background: linear-gradient(180deg, var(--white) 0%, var(--pale-blue) 40%, var(--pale-blue-mid) 100%);
    color: var(--grey-800);
    padding: 80px 0 70px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(41,128,185,.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue-light), transparent);
}

.hero-logo {
    margin: 0 auto 32px;
    max-width: 280px;
}

.hero-logo img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.hero h1 {
    color: var(--navy);
    margin-bottom: 20px;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.hero h1 em {
    font-style: normal;
    color: var(--blue);
}

.hero p {
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--grey-600);
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* --- Stats Bar --- */
.stats-bar {
    background: var(--white);
    border-bottom: 1px solid var(--grey-100);
    border-top: 1px solid var(--grey-100);
    padding: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
}

.stat-item {
    padding: 28px 16px;
    border-right: 1px solid var(--grey-100);
}

.stat-item:last-child { border-right: none; }

.stat-number {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: .85rem;
    color: var(--grey-600);
    font-weight: 500;
    letter-spacing: .3px;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: .95rem;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: .3px;
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--blue-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--grey-200);
}

.btn-outline:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: rgba(41,128,185,.05);
}

.btn-outline-dark {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--grey-200);
}

.btn-outline-dark:hover {
    border-color: var(--navy);
    background: var(--navy);
    color: var(--white);
}

/* =============================================
   COURSES PAGE
   ============================================= */
.page-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
    padding: 60px 0 48px;
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue-light), transparent);
}

.page-header h1 { color: var(--white); margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,.7); font-size: 1.1rem; }

/* Filters */
.filters-bar {
    background: var(--off-white);
    border-bottom: 1px solid var(--grey-100);
    padding: 20px 0;
}

.filters-inner {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--grey-600);
    margin-bottom: 4px;
}

.filter-group select {
    font-family: var(--font-body);
    font-size: .9rem;
    padding: 8px 36px 8px 12px;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--grey-800);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234B5563' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(41,128,185,.1);
}

/* Course cards */
.courses-section { padding: 48px 0 80px; }

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

.course-card {
    background: var(--white);
    border: 1px solid var(--grey-100);
    border-radius: 8px;
    overflow: hidden;
    transition: all var(--transition);
    position: relative;
}

.course-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--grey-200);
}

.course-card-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--blue-light));
}

.course-card-body { padding: 28px; }

.course-type-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--blue);
    background: rgba(41,128,185,.07);
    padding: 4px 12px;
    border-radius: 3px;
    margin-bottom: 14px;
}

.course-card h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--navy);
}

.course-detail {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: .9rem;
    color: var(--grey-600);
}

.course-detail svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--grey-300);
}

.course-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    border-top: 1px solid var(--grey-100);
    background: var(--off-white);
}

.spots-badge {
    font-size: .82rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.spots-available {
    background: rgba(39,174,96,.1);
    color: #1B7A41;
}

.spots-full {
    background: rgba(41,128,185,.1);
    color: var(--blue);
}

.no-courses-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--grey-600);
}

.no-courses-msg h3 { color: var(--grey-600); margin-bottom: 8px; }

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-section { padding: 60px 0 80px; }

/* Regional Contacts Grid */
.region-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.region-card {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-left: 4px solid var(--blue);
    border-radius: 6px;
    padding: 24px;
    transition: all var(--transition);
}

.region-card:hover {
    box-shadow: var(--shadow-md);
    border-left-color: var(--blue-light);
}

.region-card h4 {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
}

.region-card .region-detail {
    font-size: .88rem;
    color: var(--grey-600);
    line-height: 1.6;
    margin-bottom: 4px;
}

.region-card .region-detail strong {
    color: var(--grey-800);
    font-weight: 600;
}

.region-card .region-detail a {
    color: var(--grey-600);
    transition: color var(--transition);
}

.region-card .region-detail a:hover {
    color: var(--blue);
}

/* Contact Form Section */
.contact-form-section {
    max-width: 720px;
    margin: 60px auto 0;
}

.contact-form-section h2 {
    text-align: center;
    margin-bottom: 32px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 40px;
}

.contact-info-block {
    background: var(--off-white);
    border-radius: 8px;
    padding: 32px;
    border: 1px solid var(--grey-100);
}

.contact-info-block h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info-block h3 svg { color: var(--blue); }

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--grey-100);
}

.contact-item:last-child { border-bottom: none; }

.contact-item svg {
    flex-shrink: 0;
    color: var(--grey-300);
    margin-top: 3px;
}

.contact-item strong {
    display: block;
    font-size: .95rem;
    color: var(--navy);
    margin-bottom: 2px;
}

.contact-item span,
.contact-item a {
    font-size: .9rem;
    color: var(--grey-600);
}

.coordinator-card {
    padding: 16px 0;
    border-bottom: 1px solid var(--grey-100);
}

.coordinator-card:last-child { border-bottom: none; }

.coordinator-card .name {
    font-weight: 600;
    color: var(--navy);
    font-size: .95rem;
}

.coordinator-card .email { font-size: .9rem; }
.coordinator-card .phone { font-size: .85rem; color: var(--grey-600); }

/* Contact form */
.contact-form { margin-top: 0; }

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--grey-800);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    font-family: var(--font-body);
    font-size: .95rem;
    padding: 12px 16px;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--grey-800);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(41,128,185,.1);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-status {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: .9rem;
    font-weight: 500;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(39,174,96,.1);
    color: #1B7A41;
    border: 1px solid rgba(39,174,96,.2);
}

.form-status.error {
    display: block;
    background: rgba(41,128,185,.08);
    color: var(--blue);
    border: 1px solid rgba(41,128,185,.15);
}

/* =============================================
   ABOUT / INFO SECTIONS (Homepage)
   ============================================= */
.about-section {
    padding: 80px 0;
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content h2 { margin-bottom: 20px; }

.about-content p {
    color: var(--grey-600);
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.about-image-placeholder {
    background: linear-gradient(135deg, var(--off-white), var(--grey-100));
    border-radius: 8px;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey-300);
    font-size: .9rem;
    border: 1px solid var(--grey-100);
}

.features-list {
    list-style: none;
    margin-top: 24px;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: .95rem;
    color: var(--grey-600);
}

.features-list li svg { flex-shrink: 0; color: var(--blue); margin-top: 2px; }

/* CTA section */
.cta-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--charcoal) 100%);
    padding: 80px 0;
    text-align: center;
    color: var(--white);
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue-light), transparent);
}

.cta-section h2 { color: var(--white); margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,.7); font-size: 1.1rem; margin-bottom: 32px; }
.cta-section .btn-outline {
    color: var(--white);
    border-color: rgba(255,255,255,.35);
}
.cta-section .btn-outline:hover {
    border-color: var(--white);
    color: var(--white);
    background: rgba(255,255,255,.08);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background: var(--grey-800);
    color: rgba(255,255,255,.6);
    padding: 48px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand .logo { margin-bottom: 16px; font-size: 1.3rem; }

.footer-brand p {
    font-size: .9rem;
    line-height: 1.7;
    max-width: 320px;
}

.footer-links h4 {
    color: var(--white);
    font-family: var(--font-body);
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

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

.footer-links li { margin-bottom: 10px; }

.footer-links a {
    color: rgba(255,255,255,.5);
    font-size: .9rem;
    transition: color var(--transition);
}

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

.footer-bottom {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .82rem;
}

.footer-bottom a { color: rgba(255,255,255,.4); }
.footer-bottom a:hover { color: var(--white); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .about-grid,
    .contact-grid { grid-template-columns: 1fr; gap: 32px; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    
    .courses-grid { grid-template-columns: 1fr; }
    
    .region-grid { grid-template-columns: repeat(2, 1fr); }
    
    .stats-grid { grid-template-columns: 1fr; }
    .stat-item { border-right: none; border-bottom: 1px solid var(--grey-100); padding: 20px 16px; }
    .stat-item:last-child { border-bottom: none; }
}

@media (max-width: 600px) {
    .region-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--pale-blue);
        flex-direction: column;
        padding: 16px 24px 24px;
        border-top: 1px solid var(--grey-100);
        box-shadow: var(--shadow-lg);
    }
    
    .main-nav.open { display: flex; }
    
    .main-nav a { padding: 12px 0; width: 100%; }
    .nav-cta { margin-left: 0 !important; text-align: center; margin-top: 8px; }
    
    .hero { padding: 60px 0 50px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { text-align: center; justify-content: center; }
    
    .form-row { grid-template-columns: 1fr; }
    
    .filters-inner { flex-direction: column; align-items: stretch; }
    
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

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

.fade-in-up {
    animation: fadeInUp .6s ease forwards;
    opacity: 0;
}

.fade-in-up:nth-child(2) { animation-delay: .1s; }
.fade-in-up:nth-child(3) { animation-delay: .2s; }
.fade-in-up:nth-child(4) { animation-delay: .3s; }

/* --- Utility --- */
.text-center { text-align: center; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }