/*
Theme Name: Atlas Learning Collective
Theme URI: https://atlaslearningcollective.com
Author: Atlas Learning Collective
Author URI: https://atlaslearningcollective.com
Description: A custom WordPress theme for Atlas Learning Collective homeschool enrichment classes in Marion, Iowa.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: atlas-theme
Tags: education, homeschool, responsive, custom-menu, custom-logo
*/

/* ========================================
   CSS RESET & BASE
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #044a57;
    --primary-dark: #022833;
    --primary-light: #055f70;
    --accent: #7ab2a0;
    --accent-dark: #6ca394;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --text-dark: #333333;
    --text-medium: #555555;
    --text-light: #666666;
    --border: #dddddd;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 15px;
    --radius-full: 50px;
    --max-width: 1200px;
    --section-padding: 5rem 2rem;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ========================================
   SKIP LINK (ACCESSIBILITY)
   ======================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: var(--white);
    padding: 8px;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
#masthead {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

#masthead nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Logo */
.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.custom-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.custom-logo {
    height: 60px;
    width: auto;
}

.atlas-logo-svg {
    height: 60px;
    width: auto;
}

.site-title-group {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    text-decoration: none;
    margin: 0;
}

.site-title a {
    color: var(--white);
    text-decoration: none;
}

.site-description {
    font-size: 0.75rem;
    color: var(--white);
    opacity: 0.9;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Nav Menu */
#primary-menu-container {
    display: flex;
    align-items: center;
}

#primary-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

#primary-menu li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    padding: 0.5rem 0;
    display: block;
}

#primary-menu li a:hover,
#primary-menu li a:focus {
    color: var(--accent);
    outline: none;
}

/* Mobile menu button */
.menu-toggle {
    display: none;
    background: none;
    border: 2px solid rgba(255,255,255,0.5);
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: border-color 0.3s;
    line-height: 1;
}

.menu-toggle:hover,
.menu-toggle:focus {
    border-color: var(--white);
    outline: none;
}

.menu-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    margin: 5px 0;
    transition: all 0.3s;
    border-radius: 2px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(122,178,160,0.08) 0%, transparent 60%);
    pointer-events: none;
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.7;
}

/* ========================================
   CTA BUTTON
   ======================================== */
.cta-button,
.wp-block-button__link,
a.cta-button {
    background: var(--accent);
    color: var(--white) !important;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}

.cta-button:hover,
a.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(122, 178, 160, 0.4);
    background: var(--accent-dark);
    color: var(--white) !important;
}

button.cta-button {
    font-family: inherit;
}

/* ========================================
   GENERIC SECTIONS
   ======================================== */
.site-section {
    padding: var(--section-padding);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--primary);
    line-height: 1.2;
}

/* Full-width sections (contact, about bg) */
.section-full {
    width: 100%;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
#about {
    background: var(--off-white);
}

#about .section-inner {
    padding: var(--section-padding);
    max-width: var(--max-width);
    margin: 0 auto;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-medium);
}

.about-content p + p {
    margin-top: 1.5rem;
}

/* Values Grid */
.values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.value-item {
    text-align: center;
    padding: 2rem;
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.value-item h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.value-item p {
    color: var(--text-medium);
    line-height: 1.7;
}

/* ========================================
   CLASSES / PROGRAMS SECTION
   ======================================== */
#classes {
    padding: var(--section-padding);
    max-width: var(--max-width);
    margin: 0 auto;
}

.subtitle-note {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1rem;
    font-style: italic;
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.class-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.class-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.class-card h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.class-card .age-label {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.class-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.class-card .tuition {
    margin-top: 1rem;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.6;
}

.class-card .tuition-note {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    display: block;
    margin-top: 0.25rem;
}

/* ========================================
   SCHEDULE SECTIONS
   ======================================== */
.schedule-section {
    background: var(--off-white);
    padding: 0;
}

.schedule-section .section-inner {
    padding: var(--section-padding);
    max-width: var(--max-width);
    margin: 0 auto;
}

.schedule-meta {
    text-align: center;
    margin-bottom: 2rem;
}

.schedule-meta .reg-open {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.schedule-meta .session-dates {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.schedule-meta .price {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
}

.schedule-meta .price-note {
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
}

.schedule-container {
    max-width: 1000px;
    margin: 0 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    min-width: 600px;
}

.schedule-grid.four-col {
    grid-template-columns: repeat(4, 1fr);
}

.schedule-day {
    display: none;
}

.desktop-cell {
    display: flex;
}

.schedule-day .schedule-header {
    display: none;
}

.schedule-header {
    background: var(--primary);
    color: var(--white);
    padding: 1rem;
    font-weight: 600;
    text-align: center;
    font-size: 1.1rem;
}

.schedule-cell {
    background: var(--white);
    padding: 1.5rem 1rem;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.class-time {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.4;
}

.class-hours {
    color: var(--text-light);
    font-size: 0.9rem;
}

.schedule-cta {
    text-align: center;
    margin-top: 2rem;
}

/* Book Club Box */
.book-club-box {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 2rem auto 0;
    max-width: 600px;
    box-shadow: 0 5px 20px rgba(122, 178, 160, 0.3);
}

.book-club-box h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.book-club-box p {
    color: var(--white);
    opacity: 0.95;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.book-club-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.3);
}

/* ========================================
   SESSIONS SECTION
   ======================================== */
#sessions {
    padding: var(--section-padding);
    max-width: var(--max-width);
    margin: 0 auto;
}

.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.session-card {
    background: var(--white);
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.session-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(122,178,160,0.2);
}

.session-card h3 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.session-card p {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

/* ========================================
   FOUNDER SECTION
   ======================================== */
#founder {
    padding: var(--section-padding);
    max-width: var(--max-width);
    margin: 0 auto;
}

.founder-content {
    display: flex;
    gap: 3rem;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.founder-photo {
    width: 300px;
    height: 300px;
    object-fit: contain;
    object-position: center;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    background: var(--off-white);
    flex-shrink: 0;
}

.founder-photo-placeholder {
    width: 300px;
    height: 300px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--off-white) 0%, #e8f0ee 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.founder-photo-placeholder span {
    font-size: 4rem;
}

.founder-bio h3 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.founder-title {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    display: block;
}

.founder-bio p {
    color: var(--text-medium);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* ========================================
   FAQ SECTION
   ======================================== */
#faq {
    padding: var(--section-padding);
    max-width: var(--max-width);
    margin: 0 auto;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
    cursor: pointer;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
    justify-content: space-between;
}

.faq-question::before {
    content: "Q:";
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 0.25rem;
}

.faq-toggle {
    color: var(--accent);
    font-size: 1.4rem;
    flex-shrink: 0;
    line-height: 1;
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
}

.faq-body {
    display: none;
    margin-top: 1rem;
}

.faq-item.open .faq-body {
    display: block;
}

.faq-answer {
    color: var(--text-medium);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.faq-answer:last-child {
    margin-bottom: 0;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
#contact {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    text-align: center;
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
}

#contact::before {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(122,178,160,0.1) 0%, transparent 70%);
    pointer-events: none;
}

#contact .section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

#contact h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

#contact .contact-intro {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.contact-form {
    max-width: 600px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--white);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-dark);
    background: var(--white);
    transition: box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(122,178,160,0.5);
}

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

.contact-direct {
    margin-top: 2rem;
    text-align: center;
}

.contact-direct p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.contact-direct a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-direct a:hover {
    color: #9fcec0;
}

.contact-location {
    font-size: 1rem;
    color: var(--white);
    margin-top: 1rem;
    opacity: 0.9;
}

/* ========================================
   FOOTER
   ======================================== */
#colophon {
    background: var(--primary-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem;
}

#colophon p {
    opacity: 0.85;
    font-size: 0.9rem;
    line-height: 1.7;
}

#colophon p + p {
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* ========================================
   WORDPRESS CORE STYLES
   ======================================== */
.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 0.5rem;
}

.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin: 0 auto 1rem;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ========================================
   PAGE / POST CONTENT
   ======================================== */
.entry-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-medium);
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content ul,
.entry-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
    list-style: disc;
}

/* ========================================
   TABLET RESPONSIVE (max-width: 1024px)
   ======================================== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 4rem 2rem;
    }

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

    .classes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .founder-content {
        gap: 2rem;
    }

    .founder-photo,
    .founder-photo-placeholder {
        width: 250px;
        height: 250px;
    }

    .schedule-grid {
        min-width: 550px;
    }
}

/* ========================================
   MOBILE RESPONSIVE (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
    :root {
        --section-padding: 3rem 1.25rem;
    }

    /* Header */
    #masthead nav {
        padding: 0 1rem;
        flex-wrap: wrap;
    }

    .site-title {
        font-size: 1rem;
    }

    .custom-logo,
    .atlas-logo-svg {
        height: 45px;
    }

    /* Mobile nav */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0.5rem;
        min-width: 44px;
        min-height: 44px;
    }

    #primary-menu-container {
        display: none;
        width: 100%;
        order: 3;
    }

    #primary-menu-container.is-open {
        display: flex;
    }

    #primary-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 0.5rem 0;
        background: var(--primary);
    }

    #primary-menu li a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 1rem;
    }

    /* Hero */
    .hero {
        padding: 4rem 1.25rem;
    }

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

    .hero p {
        font-size: 1.1rem;
    }

    /* Section titles */
    .section-title {
        font-size: 2rem;
    }

    /* Classes */
    .classes-grid {
        grid-template-columns: 1fr;
    }

    /* Schedule */
    .schedule-container {
        padding: 0;
        overflow-x: visible;
    }

    .schedule-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        min-width: auto;
        background: transparent;
        border: none;
        border-radius: 0;
    }

    .desktop-header {
        display: none !important;
    }

    .desktop-cell {
        display: none !important;
    }

    .schedule-day {
        display: block;
        background: var(--white);
        border-radius: var(--radius-sm);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        overflow: hidden;
    }

    .schedule-day .schedule-header {
        display: block !important;
        background: var(--primary);
        color: var(--white);
        padding: 0.75rem 1rem;
        font-weight: bold;
        font-size: 1.1rem;
        text-align: left;
    }

    .schedule-day .schedule-cell {
        display: block !important;
        padding: 1rem;
        border-bottom: 1px solid #e0e0e0;
        min-height: auto;
        text-align: left;
        flex-direction: column;
        align-items: flex-start;
    }

    .schedule-day .schedule-cell:last-child {
        border-bottom: none;
    }

    .schedule-day .schedule-cell:empty {
        display: none !important;
    }

    .class-time {
        font-size: 1.05rem;
    }

    .class-hours {
        font-size: 0.95rem;
        margin-top: 0.25rem;
    }

    /* Founder */
    .founder-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .founder-photo,
    .founder-photo-placeholder {
        width: 220px;
        height: 220px;
        margin: 0 auto;
    }

    /* Contact */
    #contact h2 {
        font-size: 2rem;
    }

    /* Footer */
    #colophon {
        padding: 1.5rem 1rem;
    }

    /* CTA button */
    .cta-button {
        padding: 0.85rem 2rem;
        font-size: 1rem;
    }
}

/* ========================================
   SMALL MOBILE (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .class-card {
        padding: 1.5rem;
    }

    .faq-question {
        font-size: 1.05rem;
    }

    .values {
        grid-template-columns: 1fr;
    }
}
