/*
Theme Name: Quicademy Theme
Author: Nicholas Sokol
Description: A custom theme for Quicademy.
Version: 2.0

Palette: The Gnostic Order
Primary Purple: #581C87
Darker Purple (Hover): #3B0764
Gold Accent: #D97706
Dark Text: #2d3748
Body Text: #4a5568
Light Lavender: #F3E8FF
Border Grey: #e2e8f0
*/

/* --- Basic Reset & Typography --- */
body {
    margin: 0;
    font-family: 'Lora', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #4a5568;
    line-height: 1.7;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: #2d3748;
    margin-top: 1.5em;
    margin-bottom: 0.7em;
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.5em; }

p {
    margin-bottom: 1.5em;
}

a {
    color: #581C87;
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover, a:focus {
    color: #3B0764;
    text-decoration: underline;
    outline: none;
}
a:active {
    color: #D97706;
}

/* --- Accessibility Focus Styles --- */
a:focus,
.btn:focus,
.main-navigation a:focus,
.read-more.hero-button:focus,
.post-card a:focus,
.widget a:focus,
.widget_search .search-field:focus {
    outline: 2px solid #D97706;
    outline-offset: 2px;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.site-content {
    padding-top: 80px;
    min-height: 60vh;
}

.content-area {
    width: 100%;
    background: #ffffff;
    padding: 32px;
    box-sizing: border-box;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* --- Header & Navigation --- */
.site-header {
    background-color: transparent;
    padding: 15px 0;
    box-shadow: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

body.admin-bar .site-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    float: none;
    display: flex;
    align-items: center;
}
.site-branding img {
    height: 40px;
    width: auto;
    max-height: 40px;
}
.site-branding .site-title {
    margin: 0;
    padding: 0;
}
.site-branding .site-title a {
    color: #581C87;
    text-decoration: none;
    font-size: 1.8em;
    font-weight: 800;
    display: inline-block;
    padding: 5px 10px;
}

.main-navigation {
    float: none;
}
.main-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.main-navigation li {
    display: inline-block;
    margin-left: 32px;
    position: relative;
}
.main-navigation a {
    color: #2d3748;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 0;
    line-height: 40px;
    position: relative;
    transition: color 0.3s ease;
    display: block;
}
.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #581C87;
    transition: width 0.3s ease;
}
.main-navigation a:hover,
.main-navigation a:focus {
    color: #581C87;
}
.main-navigation a:active {
    color: #D97706;
}
.main-navigation a:hover::after,
.main-navigation a:focus::after {
    width: 100%;
    background-color: #3B0764;
}

/* Scrolled Header Style */
.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 10px 0;
}

.site-header.scrolled .site-branding .site-title a {
    color: #581C87;
}

.site-header.scrolled .main-navigation a {
    color: #2d3748;
}

.site-header.scrolled .main-navigation a:hover,
.site-header.scrolled .main-navigation a:focus {
    color: #581C87;
}

.site-header.scrolled .hamburger-icon,
.site-header.scrolled .hamburger-icon::before,
.site-header.scrolled .hamburger-icon::after {
    background-color: #2d3748;
}

/* * --- CSS FIX 1: GLOBAL SUB-MENU STATE ---
 * This rule hides ALL sub-menus by default.
 */
.main-navigation .sub-menu {
    display: none;
}

/* * --- CSS FIX 2: DESKTOP SUB-MENU STYLES ---
 * These rules are now correctly wrapped in a min-width media query.
 * They only apply to desktop screens.
 */
@media (min-width: 993px) {
    .main-navigation .sub-menu {
        display: none; /* Re-affirm display none */
        position: absolute;
        top: 100%;
        right: 0; 
        background: #F3E8FF; 
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        border-radius: 8px;
        padding: 10px 0;
        min-width: 200px;
        z-index: 1001;
    }

    /* This is the hover/focus rule that shows the desktop menu */
    .main-navigation li:hover > .sub-menu,
    .main-navigation li:focus-within > .sub-menu {
        display: block;
    }

    .main-navigation .sub-menu li {
        display: block;
        margin: 0;
    }

    .main-navigation .sub-menu a {
        padding: 10px 20px;
        line-height: 1.5;
        color: #581C87 !important; 
        font-weight: 500;
    }

    .main-navigation .sub-menu a:hover,
    .main-navigation .sub-menu a:focus {
        background-color: #3B0764; 
        color: #ffffff !important; 
    }

    .main-navigation .sub-menu a:active {
        background-color: #D97706; 
        color: #ffffff !important; 
    }

    .main-navigation .sub-menu a::after {
        display: none;
    }
} /* --- End of min-width 993px query --- */


/* --- Mobile Menu Button ("Sandwich") --- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
}
.hamburger-icon {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background-color: #2d3748;
    transition: all 0.3s ease;
}
.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #2d3748;
    transition: all 0.3s ease;
}
.hamburger-icon::before {
    top: -7px;
}
.hamburger-icon::after {
    bottom: -7px;
}
.nav-open .hamburger-icon {
    background-color: transparent;
}
.nav-open .hamburger-icon::before,
.nav-open .hamburger-icon::after {
    background-color: #581C87;
}
.nav-open .hamburger-icon::before {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-open .hamburger-icon::after {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Buttons (Global) --- */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}
.btn-primary {
    background-color: #581C87;
    color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: #3B0764;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.12);
}
.btn-primary:active {
    background-color: #D97706;
    color: #fff;
}
.btn-secondary {
    background-color: #fff;
    color: #581C87;
    border: 2px solid #e2e8f0;
}
.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #F3E8FF;
    color: #3B0764;
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.12);
}
.btn-secondary:active {
    border-color: #D97706;
    color: #D97706;
}

/* --- Homepage: Hero Section --- */
.hero-section {
    background-color: #f7fafc;
    color: #2d3748;
    text-align: center;
    padding: 120px 24px;
}
.hero-section h1 {
    color: #2d3748;
    font-size: 3.5em;
    font-weight: 800;
    margin-bottom: 24px;
}
.hero-section .hero-subheadline {
    font-size: 1.25em;
    color: #4a5568;
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* --- Homepage: Section Styling --- */
.homepage-section {
    padding: 80px 0;
    text-align: center;
}
.homepage-section.bg-light {
    background-color: #f7fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}
.section-title {
    font-size: 2.25em;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 16px;
}
.section-subtitle {
    font-size: 1.15em;
    color: #4a5568;
    max-width: 700px;
    margin: 0 auto 60px;
}

/* --- Homepage: Featured Courses --- */
.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: left;
}
.course-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(88,28,135,0.1);
}
.course-card-image {
    height: 220px;
    background-color: #e2e8f0;
}
.course-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.course-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.course-card-content h3 {
    margin-top: 0;
    font-size: 1.25em;
}
.course-card-content h3 a:hover {
    text-decoration: none;
}
.course-card-content .price {
    font-size: 1.1em;
    font-weight: 700;
    color: #D97706;
    margin-bottom: 16px;
}
.course-card-content .btn {
    margin-top: auto;
}

/* --- Homepage: Feature Grid --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: left;
}
.feature-card {
    background: #ffffff;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}
.feature-card:hover,
.feature-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: #581C87;
}
.feature-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
    color: #581C87;
}
.feature-card h3 {
    margin-top: 0;
    font-size: 1.3em;
}

/* --- Homepage: How it Works --- */
.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 32px;
}
.step-card {
    position: relative;
    text-align: center;
}
.step-number {
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    background-color: #F3E8FF;
    color: #581C87;
    font-weight: 700;
    font-size: 1.2em;
    margin: 0 auto 20px;
    display: block;
    transition: all 0.2s ease;
}
.step-card:hover .step-number,
.step-card:focus-within .step-number {
    background-color: #581C87;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(88,28,135,0.15);
}
.step-number:active {
    background-color: #D97706;
    color: #fff;
}
.step-card h4 {
    font-size: 1.15em;
    color: #2d3748;
}

/* --- Homepage: AI/Human Feedback Section --- */
.dual-feature-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    text-align: left;
}
.dual-feature-section h2 {
    font-size: 1.8em;
    margin-top: 0;
}
.dual-feature-icon {
    width: 60px;
    height: 60px;
    color: #D97706;
    margin-bottom: 16px;
}
.dual-feature-visual {
    padding: 40px;
    border-radius: 12px;
    color: #ffffff;
    text-align: center;
}
.bg-primary-purple {
    background-color: #581C87;
}
.dual-feature-visual h3 {
    color: #ffffff;
    font-size: 1.8em;
    font-weight: 700;
    margin-top: 0;
}


/* --- Homepage: Final CTA --- */
.cta-section {
    background-color: #581C87;
    color: #ffffff;
    padding: 80px 24px;
    border-radius: 12px;
}
.cta-section h2 {
    color: #ffffff;
    font-size: 2.25em;
    margin-top: 0;
    margin-bottom: 16px;
}
.cta-section p {
    font-size: 1.15em;
    max-width: 600px;
    margin: 0 auto 32px;
    opacity: 0.9;
}

/* --- Footer --- */
.site-footer {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 60px 0 40px;
    margin-top: 80px;
    text-align: left;
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #4a5568;
    margin-bottom: 40px;
}
.footer-widget-area h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-widget-area ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-widget-area li {
    margin-bottom: 10px;
}
.footer-widget-area a {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-widget-area a:hover {
    color: #ffffff;
    text-decoration: underline;
}
.site-info {
    font-size: 0.9em;
    text-align: center;
    color: #a0aec0;
}

/* --- Blog / Index Page Layout --- */
.blog-header {
    padding: 60px 0;
    text-align: center;
    background-color: #F3E8FF;
    border-bottom: 1px solid #e2e8f0;
}

.blog-header .page-title {
    margin: 0;
    font-size: 3em;
    font-weight: 800;
}

.blog-container {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 48px;
    margin-top: 48px;
}

.blog-main-content {
    max-width: 100%;
}

/* --- Blog Post Grid --- */
.blog-post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

/* --- Post Card Styling (for blog page) --- */
.post-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(88,28,135,0.1);
}
.post-card-image {
    height: 220px;
    background-color: #e2e8f0;
    display: block;
    text-decoration: none;
}
.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.post-card .entry-title {
    margin-top: 0;
    font-size: 1.25em;
    line-height: 1.4;
    margin-bottom: 12px;
}
.post-card .entry-title a {
    text-decoration: none;
}
.post-card .entry-title a:hover {
    color: #3B0764;
}
.post-card .entry-excerpt {
    font-size: 0.95em;
    color: #4a5568;
    margin-bottom: 16px;
    flex-grow: 1;
}
.post-card .read-more {
    margin-top: auto;
    font-weight: 700;
    font-size: 0.9em;
    text-decoration: none;
}
.post-card .read-more:hover {
    text-decoration: underline;
}


/* --- Sidebar Widget Styling --- */
.widget-area {
}

.widget {
    background: #F3E8FF;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
}

.widget-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #2d3748;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #581C87;
    padding-bottom: 10px;
}

/* --- Category List Styling --- */
.widget_categories ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget_categories ul li {
    margin: 0;
    border-bottom: 1px solid rgba(88, 28, 135, 0.1);
}
.widget_categories ul li:last-child {
    border-bottom: none;
}
.widget_categories ul li a {
    text-decoration: none;
    font-weight: 600;
    display: block;
    padding: 12px 10px;
    transition: all 0.2s ease;
}
.widget_categories ul li a::before {
    content: '›';
    margin-right: 10px;
    font-weight: 700;
    color: #581C87;
}
.widget_categories ul li a:hover,
.widget_categories ul li a:focus {
    background: #ffffff;
    color: #3B0764;
    text-decoration: none;
    border-radius: 6px;
}

/* --- Tag Cloud Styling --- */
.widget .tagcloud a {
    display: inline-block;
    background: #ffffff;
    color: #581C87;
    padding: 6px 14px;
    border-radius: 6px;
    margin: 0 6px 6px 0;
    font-size: 0.9em !important;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(88, 28, 135, 0.2);
}
.widget .tagcloud a:hover,
.widget .tagcloud a:focus {
    background: #581C87;
    color: #ffffff;
    border-color: #581C87;
}

/* --- Search Widget Styling --- */
.widget_search .search-form {
    display: flex;
    position: relative;
}
.widget_search .search-field {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Lora', sans-serif;
    background: #ffffff;
}
.widget_search .search-field:focus {
    border-color: #581C87;
    background: #fff;
    outline: none;
}
.widget_search .search-submit {
    padding: 10px;
    border: none;
    background: #581C87;
    color: #ffffff;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    transition: background 0.2s ease;
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 50px;
}
.widget_search .search-submit:hover,
.widget_search .search-submit:focus {
    background: #3B0764;
}
.widget_search .search-submit {
    font-size: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z' clip-rule='evenodd' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
}
.widget_search .search-field {
    padding-right: 60px;
}
/* --- END OF NEW WIDGET STYLES --- */


/* --- WooCommerce Styling --- */
.woocommerce ul.products li.product {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: all 0.3s ease;
}
.woocommerce ul.products li.product:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(88,28,135,0.1);
}
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.woocommerce ul.products li.product img {
    height: 220px;
    object-fit: cover;
    border-radius: 0;
    margin-bottom: 0;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: 24px 24px 0 24px;
    font-size: 1.25em;
    color: #2d3748;
}
.woocommerce ul.products li.product .price {
    padding: 0 24px 16px 24px;
    font-size: 1.1em;
    font-weight: 700;
    color: #D97706;
}
.woocommerce ul.products li.product .button {
    margin: 0 24px 24px 24px;
    text-align: center;
    display: block;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-color: #581C87;
    color: #FFF;
    transition: all 0.3s ease;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .button:focus {
    background-color: #3B0764;
    color: #FFF;
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.12);
}
.woocommerce ul.products li.product .button:active {
    background-color: #D97706;
}

/* --- Responsive --- */

/* * --- CSS FIX 3: MOBILE STYLES ---
 * This block contains the fade-in/out logic for the main menu
 * and the 'display: none' for the mobile sub-menu.
 */
@media (max-width: 992px) {
    /* Show burger menu button */
    .mobile-menu-toggle {
        display: block;
    }

    /* Hide menu by default on mobile - FIXED */
    .main-navigation {
        /* Use visibility/opacity for fade animation */
        visibility: hidden; 
        opacity: 0; 
        pointer-events: none;
        width: 100%;
        position: absolute;
        top: 100%; 
        left: 0;
        background: #F3E8FF; 
        box-shadow: 0 8px 16px rgba(88,28,135,0.10);
        border-radius: 0 0 12px 12px;
        padding: 10px 0;
        z-index: 1001;
        /* Animate opacity, hide with visibility *after* fade */
        transition: opacity 0.3s ease, visibility 0s 0.3s;
        
        /* This rule must be here so JS .slideToggle() works */
        display: none; 
    }

    /* When toggle class "nav-open" on header, show menu - FIXED */
    .site-header.nav-open .main-navigation {
        visibility: visible; 
        opacity: 1;
        pointer-events: auto;
        /* Make visible immediately so it can fade IN */
        transition-delay: 0s;
        
        /* This rule is for the JS .slideToggle() */
        display: block;
    }

    /* Style menu links for touch targets */
    .main-navigation ul {
        padding: 0;
        margin: 0;
        list-style: none;
    }
    .main-navigation li {
        display: block;
        margin: 0;
        border-bottom: 1px solid rgba(88, 28, 135, 0.1);
    }
    .main-navigation li:last-child {
        border-bottom: none;
    }
    .main-navigation a {
        display: block;
        padding: 18px 32px;
        font-size: 1.2em;
        font-weight: 700;
        color: #581C87; 
        background: transparent;
        transition: background 0.2s, color 0.2s;
    }
    .main-navigation a:hover,
    .main-navigation a:focus {
        background: #ffffff;
        color: #3B0764;
    }

    /* --- MOBILE SUB-MENU ---
     * This rule is correct. It's 'display: none' so your
     * JS slideToggle() can work. 
     */
    .main-navigation .sub-menu {
        position: static; 
        display: none; /* <<< CRITICAL: Start hidden, let JS slideToggle() work */
        background: #ffffff;
        padding-left: 18px; 
        margin: 0;
        box-shadow: none;
        border-radius: 0;
        border-left: 3px solid #581C87; 
        border-bottom: 1px solid rgba(88, 28, 135, 0.1);
    }
    .main-navigation .sub-menu li:last-child {
        border-bottom: none;
    }


    /* Hide pseudo-element underline for mobile */
    .main-navigation a::after {
        display: none;
    }
    
    /* --- Homepage grids --- */
    .course-grid, .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .how-it-works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-container {
        grid-template-columns: 1fr; /* Stack blog content and sidebar */
    }
    .blog-post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .widget-area {
        margin-top: 40px;
        border-left: none;
        padding-left: 0;
    }
}


/* --- Small Mobile Breakpoint (768px) --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5em; }

    .hero-section h1 { font-size: 2.8em; }

    /* Homepage grids: stack to 1 column */
    .course-grid, .feature-grid, .how-it-works-grid, .dual-feature-section, .footer-widgets, .blog-post-grid {
        grid-template-columns: 1fr;
    }

    .dual-feature-section {
        text-align: center;
    }

    .footer-widgets {
        text-align: center;
    }

    .footer-widget-area {
        text-align: center;
    }
}

/* --- Final Touches --- */
.step-card:hover .step-number {
    background-color: #581C87; 
    color: #fff; 
    box-shadow: 0 0 0 4px rgba(88,28,135,0.15); 
    transition: all 0.2s ease;
}

.step-number {
    transition: all 0.2s ease;
}

.quicademy-cta-container .wp-block-button__link {
    background: linear-gradient(135deg, #4F46E5, #7C3AED); 
    color: #FFFFFF !important; 
    padding: 14px 28px; 
    border-radius: 8px; 
    text-decoration: none !important; 
    font-weight: 600; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
    transition: all 0.3s ease; 
    display: inline-block; 
    border: none !important; 
}

.quicadem-cta-container .wp-block-button__link:hover {
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); 
    background: linear-gradient(135deg, #4338CA, #6D28D9); 
}