/* ============================================
   1. BASE STYLES
   ============================================ */

body {
    font-family: 'Roboto', sans-serif;
}

.prelogin-main {
    padding: 0;
    margin: 0;
    background-color: var(--color-bg-primary);
}


/* ============================================
   2. ANNOUNCEMENT BAR
   ============================================ */

.announcement-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-primary);
    color: var(--color-bg-primary);
    padding: 3px 0;
    z-index: 10001;
    box-shadow: none;
    transform: translateY(-100%);
    transition: transform 0.4s ease-out;
    height: auto;
    pointer-events: none;
}

/* Hide announcement bar when mobile sidebar is open */
body.sidebar-open .announcement-bar {
    display: none;
}

.announcement-bar * {
    pointer-events: auto;
}

.announcement-bar.show {
    transform: translateY(0);
}

.announcement-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
}

.announcement-text {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    color: var(--color-bg-primary);
}

.announcement-text-mobile {
    display: none;
}

.announcement-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.announcement-actions .announcement-btn {
    margin-left: 0.5rem;
}

.announcement-close {
    background: none;
    border: none;
    color: var(--color-bg-primary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    opacity: 0.8;
    position: absolute;
    right: 2rem;
}

.announcement-close:hover {
    opacity: 1;
}

.announcement-btn {
    background-color: var(--color-bg-primary);
    color: #0E2431;
    border: none;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.announcement-btn:hover {
    background-color: var(--color-bg-tertiary);
    transform: translateY(-1px);
    box-shadow: none;
}
 /* Critical CSS - Above the fold content */
 :root {
    --color-primary: #2563eb;
    --color-bg-primary: #ffffff;
    --color-text-primary: #111827;
    --color-text-secondary: #374151;
    --color-accent-yellow: #fbbf24;
    --color-accent-yellow-hover: #f59e0b;
    --color-accent-yellow-text: #78350f;
    --color-bg-tertiary: #f3f4f6;
}
body { font-family: 'Roboto', sans-serif; }

/* Index page specific - Box text styling */
#boxtext {
    font-weight: 300;
    font-family: 'Roboto', sans-serif;
}

.prelogin-main { padding: 0; margin: 0; background-color: #ffffff; }
.announcement-bar {
    position: fixed; top: 0; left: 0; right: 0; background: #2563eb; color: #ffffff;
    padding: 3px 0; z-index: 10001; box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    transform: translateY(-100%); transition: transform 0.4s ease-out; height: auto; pointer-events: none;
}
.announcement-bar.show { transform: translateY(0); }
.announcement-bar.error {
    background: #dc2626; color: #ffffff;
}
.announcement-bar * { pointer-events: auto; }
.announcement-content {
    max-width: 1400px; margin: 0 auto; padding: 0 2rem; display: flex;
    align-items: center; justify-content: center; gap: 1rem; position: relative;
}
.announcement-text { margin: 0; font-size: 13px; font-weight: 500; font-family: 'Roboto', sans-serif; color: #ffffff; }
.hero-section-new {
    text-align: center; padding: 1.5rem 1.5rem 3rem; max-width: 1200px; margin: 0 auto;
    position: relative; overflow: hidden; min-height: 750px;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 0 60 L 60 60' stroke='%23d9dce0' stroke-width='1.5' fill='none' stroke-dasharray='4 4'/%3E%3Cpath d='M 60 0 L 60 60' stroke='%23d9dce0' stroke-width='1.5' fill='none' stroke-dasharray='4 4'/%3E%3C/svg%3E");
    background-size: 60px 60px; background-position: 0 0;
}
.hero-headline-new {
    font-size: 4.5rem; font-weight: 700; line-height: 1.1; color: #111827;
    margin: 0 0 1rem 0; font-family: 'Roboto', sans-serif; letter-spacing: -0.02em;
    position: relative; z-index: 2;
}
.hero-headline-new .highlight-blue { color: #3161ff; }
.hero-description-new {
    font-size: 1.25rem; line-height: 1.6; color: #374151; margin: 0 auto 1.5rem;
    font-family: 'Roboto', sans-serif; max-width: 700px; position: relative; z-index: 2;
}
.hero-cta-new {
    display: flex; gap: 1rem; justify-content: center; align-items: center; flex-wrap: wrap;
    margin-bottom: 1.5rem; position: relative; z-index: 2;
}
.cta-button-new {
    padding: 0.875rem 2rem; font-size: 1.125rem; font-weight: 600; border-radius: 0.75rem;
    text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.2s ease; font-family: 'Roboto', sans-serif; cursor: pointer;
    height: 56px; box-sizing: border-box; white-space: nowrap; line-height: 1;
}
.cta-primary-new {
    background: #fbbf24; color: #78350f; border: none;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}
.cta-secondary-new {
    background-color: #ffffff; color: #111827; border: 2px solid #e5e7eb;
    box-shadow: 0 2px 2px rgba(15,10,31,0.04), 0 2px 6px rgba(15,10,31,0.06);
}
.hero-image-container {
    max-width: 900px; margin: 0 auto; padding: 0 1rem; height: 700px;
    display: flex; align-items: center; justify-content: center; position: relative; z-index: 2;
}
.hero-image {
    width: 100%; height: 100%; max-width: 100%; max-height: 100%; display: block;
    object-fit: contain; transform-origin: center center;
}
/* Adjust nav position when announcement bar is visible - but not on mobile where sidebar overlays */
@media (min-width: 769px) {
    body.announcement-visible nav {
        position: sticky;
        top: 32px !important;
        margin-top: 0 !important;
    }
}

body.announcement-visible .hero-section-new {
    padding-top: 3rem;
}

/* ============================================
   3. HERO SECTION
   ============================================ */

/* Hero Animation */
@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero animation - text only (image stays visible for LCP) */
.hero-section-new > .user-count-badge,
.hero-section-new > .hero-headline-new,
.hero-section-new > .hero-description-new,
.hero-section-new > .hero-cta-new {
    opacity: 0;
    transform: translateY(15px);
    animation: slideUp 0.5s ease-out forwards;
}

.hero-section-new > .user-count-badge {
    animation-delay: 0.05s;
}

.hero-section-new > .hero-headline-new {
    animation-delay: 0.1s;
}

.hero-section-new > .hero-description-new {
    animation-delay: 0.15s;
}

.hero-section-new > .hero-cta-new {
    animation-delay: 0.2s;
}

/* Hero image container - no animation for optimal LCP */

.hero-section-new {
    text-align: center;
    padding: 1.5rem 1.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 0 60 L 60 60' stroke='%23d9dce0' stroke-width='1.5' fill='none' stroke-dasharray='4 4'/%3E%3Cpath d='M 60 0 L 60 60' stroke='%23d9dce0' stroke-width='1.5' fill='none' stroke-dasharray='4 4'/%3E%3C/svg%3E");
    background-size: 60px 60px;
    background-position: 0 0;
    overflow: hidden;
    min-height: 750px;
}

.hero-section-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 10%, rgba(255, 255, 255, 0) 90%, rgba(255, 255, 255, 1) 100%),
        linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 8%, rgba(255, 255, 255, 0) 92%, rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
    z-index: 1;
}

.user-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--color-bg-primary);
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 0.5rem 1.25rem;
    box-shadow: none;
    margin-top: 5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.user-count-badge span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
    font-family: 'Roboto', sans-serif;
}

.banner-logos {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.banner-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.logo-1 {
    background-image: url('../images/hero/balcombe.svg');
}

.logo-2 {
    background-image: url('../images/hero/nga.svg');
}

.logo-3 {
    background-image: url('../images/hero/sawston.svg');
}

.hero-headline-new {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-text-primary);
    margin: 0 0 1rem 0;
    font-family: 'Roboto', sans-serif;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
}

.hero-headline-new .highlight-blue {
    color: #3161ff;
}

.hero-description-new {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin: 0 auto 1.5rem;
    font-family: 'Roboto', sans-serif;
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.hero-cta-new {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.cta-button-new {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    height: 56px;
    box-sizing: border-box;
    white-space: nowrap;
    line-height: 1;
}

.cta-primary-new {
    background: var(--color-accent-yellow);
    color: var(--color-accent-yellow-text);
    border: none;
    box-shadow: none;
}

.cta-primary-new:hover {
    background: var(--color-accent-yellow-hover);
    transform: translateY(-2px);
    box-shadow: none;
}

.cta-secondary-new {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    border: 2px solid #e5e7eb;
    box-shadow: none;
}

.cta-secondary-new:hover {
    background-color: var(--color-bg-secondary);
    border-color: var(--color-border-medium);
    transform: translateY(-2px);
    box-shadow: none;
}

.hero-image-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* ============================================
   4. SCHOOLS SECTION
   ============================================ */

.school-logo-container {
    width: 100%;
    height: auto;
    background-color: var(--color-bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 40px 20px;
}

.school-logos {
    display: flex;
    flex-wrap: wrap;
    max-width: 900px;
    justify-content: space-between;
    gap: 50px;
    align-items: center;
}

.school-logo {
    opacity: 0.5;
    transition: ease-in-out 0.3s;
    height: 50px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.school-logo:hover {
    opacity: 1;
    transition: ease-in-out 0.3s;
}

.school-text {
    font-size: 18px;
    font-weight: 500;
    line-height: 20px;
    font-family: 'Roboto', sans-serif;
    color: #4F4F4F;
    margin-bottom: 30px;
    text-align: center;
}

/* ============================================
   5. WHY CHOOSE MATHSBOX SECTION
   ============================================ */

.why-choose-section {
    width: 100%;
    padding: 60px 20px 40px 20px;
    background-color: var(--color-bg-primary);
}

.why-choose-container {
    max-width: 1200px;
    margin: 0 auto;
}

.why-choose-title {
    font-size: 56px;
    font-weight: 800;
    color: var(--color-text-primary);
    text-align: center;
    margin: 0 0 16px 0;
    font-family: 'Roboto', sans-serif;
    letter-spacing: -0.02em;
}

.why-choose-subtitle {
    font-size: 20px;
    color: var(--color-text-muted);
    text-align: center;
    margin: 0 0 60px 0;
    font-family: 'Roboto', sans-serif;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.custom-resources-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(107, 114, 128, 0.3);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.custom-resources-link:hover {
    color: var(--color-text-tertiary);
    border-bottom-color: rgba(75, 85, 99, 0.6);
}

.why-choose-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 0 auto 5rem auto;
    width: fit-content;
    max-width: 100%;
}

.why-choose-cards-2x2 {
    grid-template-columns: repeat(2, 1fr);
}

.why-choose-cards-2x2 .why-choose-card {
    min-height: 300px;
    aspect-ratio: 16/9;
}

.why-choose-card {
    border-radius: 16px;
    padding: 0;
    min-height: 200px;
    max-height: 200px;
    height: 200px;
    width: 100%;
    min-width: 280px;
    max-width: 280px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(30px);
}

/* Index page (prelogin-body) cards need more height for text and images */
body.prelogin-body .why-choose-card {
    min-height: 400px;
    max-height: 400px;
    height: 400px;
}

/* Index page card text layout - add gap above description */
body.prelogin-body .why-choose-card-text {
    flex: 0 0 auto;
    padding-top: 24px;
    padding-bottom: 20px;
}

body.prelogin-body .why-choose-card-subtitle {
    margin-top: 12px;
}

/* Index page card image positioning - bottom right corner, center of image at corner */
body.prelogin-body .why-choose-card-image-wrapper {
    flex: 1 1 auto;
    position: relative;
    overflow: hidden;
}

body.prelogin-body .why-choose-card-image {
    position: absolute;
    right: 0;
    bottom: 0;
    top: auto;
    left: auto;
    margin: 0;
    transform: translate(calc(50% - 40px), calc(50% - 40px)) scale(1) !important;
    -webkit-transform: translate(calc(50% - 40px), calc(50% - 40px)) scale(1) !important;
    transform-origin: center center;
    -webkit-transform-origin: center center;
    width: auto;
    height: auto;
    min-width: 200px;
    min-height: 200px;
    max-width: none;
    max-height: none;
    object-fit: contain;
    z-index: 1;
}

/* Primary image - move down, slightly smaller on desktop */
body.prelogin-body .card-primary .why-choose-card-image {
    transform: translate(calc(50% - 40px), calc(50% - 20px)) scale(0.95) !important;
    -webkit-transform: translate(calc(50% - 40px), calc(50% - 20px)) scale(0.95) !important;
}

/* Secondary, GCSE, and A Level images - slightly bigger */
body.prelogin-body .card-secondary .why-choose-card-image,
body.prelogin-body .card-gcse .why-choose-card-image,
body.prelogin-body .card-alevel .why-choose-card-image {
    min-width: 240px;
    min-height: 240px;
    transform: translate(calc(50% - 40px), calc(50% - 40px)) scale(1.1) !important;
    -webkit-transform: translate(calc(50% - 40px), calc(50% - 40px)) scale(1.1) !important;
}

.why-choose-card.animate-in {
    animation: fadeInUp 0.8s ease forwards;
    animation-fill-mode: forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.why-choose-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-primary {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.card-primary .why-choose-card-image {
    bottom: -100%;
}

.card-secondary {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.card-secondary .why-choose-card-image {
    bottom: -40%;
}

.card-alevel {
    background: linear-gradient(135deg, #fb7185 0%, #ef4444 100%);
}

.card-alevel .why-choose-card-image {
    bottom: -40%;
}

.card-gcse {
    background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
}

.card-gcse .why-choose-card-title,
.card-gcse .why-choose-card-subtitle {
    color: var(--color-text-primary);
}

.card-gcse .why-choose-card-years {
    color: var(--color-text-primary);
}

.why-choose-card-text {
    flex: 0 0 35%;
    z-index: 2;
    position: relative;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.why-choose-card-years {
    font-size: 14px;
    font-weight: 400;
    margin: 0 0 0.25rem 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
}

.why-choose-card-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.2;
    color: var(--color-bg-primary);
}

.why-choose-card-subtitle {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.why-choose-card-image-wrapper {
    flex: 0 0 65%;
    position: relative;
    overflow: visible;
    margin-top: 0;
    width: 100%;
    min-height: 120px;
    padding: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.why-choose-card-image {
    position: relative;
    right: -20%;
    bottom: -45%;
    opacity: 1;
    z-index: 1;
    pointer-events: none;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 150px;
    min-height: 150px;
    transform: scale(0.9) !important;
    -webkit-transform: scale(0.9) !important;
    transform-origin: center center;
    -webkit-transform-origin: center center;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
}

.why-choose-card-plus {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.card-primary .why-choose-card-plus {
    background-color: rgba(16, 185, 129, 0.8);
}

.card-secondary .why-choose-card-plus {
    background-color: rgba(59, 130, 246, 0.8);
}

.card-alevel .why-choose-card-plus {
    background-color: rgba(239, 68, 68, 0.8);
}

.card-gcse .why-choose-card-plus {
    background-color: rgba(251, 191, 36, 0.8);
}

.why-choose-card-plus svg {
    color: var(--color-bg-primary);
    stroke: currentColor;
}

.card-gcse .why-choose-card-plus svg {
    color: var(--color-text-primary);
}

.why-choose-card:hover .why-choose-card-plus {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.why-choose-stats-divider {
    width: 100%;
    max-width: 1200px;
    height: 1px;
    background-color: var(--color-border-light);
    margin: 60px auto;
}

.why-choose-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.why-choose-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.why-choose-stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text-primary);
    font-family: 'Roboto', sans-serif;
}

.why-choose-stat-label {
    font-size: 16px;
    color: var(--color-text-muted);
    font-family: 'Roboto', sans-serif;
}

/* ============================================
   6. QUESTION GENERATOR SECTION (First)
   ============================================ */

.question-generator-section {
    width: 100%;
    padding: 60px 20px 80px 20px;
    background-color: var(--color-bg-primary);
    font-family: 'Roboto', sans-serif;
}

.qg-container {
    max-width: 1200px;
    margin: 0 auto;
}

.qg-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 0;
}

.qg-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
}

.qg-left {
    display: flex;
    flex-direction: column;
    padding-top: 100px;
}

.qg-logo {
    margin-bottom: 0;
    flex-shrink: 0;
}

.qg-logo-image {
    width: 72px;
    height: 72px;
    display: block;
}

.qg-headline {
    display: block;
    margin-bottom: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.2;
    text-align: left;
    max-width: 600px;
}

.qg-headline-bold {
    font-size: 56px;
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-family: 'Roboto', sans-serif;
}

.qg-headline-light {
    font-size: 56px;
    font-weight: 800;
    color: #6b7280;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-family: 'Roboto', sans-serif;
}

.qg-link-text {
    margin-top: 24px;
    margin-bottom: 0;
}

.qg-link {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    transition: color 0.2s ease;
}

.qg-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.qg-steps-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
}

.qg-step-btn {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    padding-left: 20px;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: 'Roboto', sans-serif;
    position: relative;
    margin-bottom: 32px;
}

.qg-step-btn:last-child {
    margin-bottom: 0;
}

.qg-step-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--color-border-light);
    transition: all 0.2s ease;
    z-index: 1;
    border-radius: 2px;
}

.qg-step-btn.active::before {
    background-color: #8b5cf6;
    width: 4px;
    opacity: 0.3;
    border-radius: 2px;
}

.qg-step-btn.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 0%;
    background-color: #8b5cf6;
    z-index: 2;
    transition: none;
    border-radius: 2px;
}

.qg-step-btn.active.progressing::after {
    height: 100%;
    transition: height 5s linear;
}

.qg-step-btn-number {
    display: none;
}

.qg-step-btn-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qg-step-btn-content strong {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
    font-family: 'Roboto', sans-serif;
    line-height: 1.3;
    display: block;
}

.qg-step-btn-content p {
    font-size: 16px;
    color: var(--color-text-muted);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
}

.qg-step-btn-content p strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-secondary);
    display: inline;
}

.qg-right {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.qg-steps {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: 800px;
}

.qg-step {
    position: relative;
    display: none;
}

.qg-step.active {
    display: block;
}

.qg-step-card {
    background: #8689ff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: none;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    overflow: hidden;
}

.qg-step-card-1,
.qg-step-card-2,
.qg-step-card-3 {
    background: #8689ff;
    border: none;
}

.qg-step-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ============================================
   7. RESOURCES SECTION (With Tiles)
   ============================================ */

.resources-section {
    width: 100%;
    padding: 60px 20px 40px 20px;
    background-color: var(--color-bg-primary);
}

.resources-container {
    max-width: 1200px;
    margin: 0 auto;
}

.resources-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 60px;
}

.resources-logo {
    margin-bottom: 0;
    flex-shrink: 0;
}

.resources-logo-image {
    width: 72px;
    height: 72px;
    display: block;
}

.resources-headline {
    display: block;
    margin-bottom: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.2;
    text-align: left;
    max-width: 800px;
}

.resources-headline-bold {
    font-size: 48px;
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.resources-headline-light {
    font-size: 48px;
    font-weight: 800;
    color: #6b7280;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.cards-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin: 24px auto;
    width: 90vw;
    max-width: 1200px;
}

.card-column {
    flex: 0 0 220px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tile {
    aspect-ratio: 4 / 3;
    width: 100%;
    border-radius: 16px;
    background: #f5f5f5;
    border: none;
    padding: 16px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(100px);
    will-change: transform, opacity;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.6s ease-out,
                box-shadow 0.3s ease;
}

a.tile {
    text-decoration: none;
    color: inherit;
    display: flex;
}

.tile.c1 {
    transform: translateY(100px) rotate(-2deg);
}

.tile.c2 {
    transform: translateY(100px) rotate(1.5deg);
}

.tile.c3 {
    transform: translateY(100px) rotate(-1deg);
}

.tile.c4 {
    transform: translateY(100px) rotate(2deg);
}

.tile.c5 {
    transform: translateY(100px) rotate(-1.5deg);
}

.tile.c6 {
    transform: translateY(100px) rotate(-1deg);
}

.tile.c7 {
    transform: translateY(100px) rotate(-2deg);
}

.tile.c8 {
    transform: translateY(100px) rotate(1.2deg);
}

.tile.c9 {
    transform: translateY(100px) rotate(-1deg);
}

.tile.c10 {
    transform: translateY(100px) rotate(0.8deg);
}

.tile.show {
    opacity: 1;
}

.tile.c1.show {
    transform: translateY(0) rotate(-2deg);
}

.tile.c2.show {
    transform: translateY(0) rotate(1.5deg);
}

.tile.c3.show {
    transform: translateY(0) rotate(-1deg);
}

.tile.c4.show {
    transform: translateY(0) rotate(2deg);
}

.tile.c5.show {
    transform: translateY(0) rotate(-1.5deg);
}

.tile.c6.show {
    transform: translateY(0) rotate(-1deg);
}

.tile.c7.show {
    transform: translateY(0) rotate(-2deg);
}

.tile.c8.show {
    transform: translateY(0) rotate(1.2deg);
}

.tile.c9.show {
    transform: translateY(0) rotate(-1deg);
}

.tile.c10.show {
    transform: translateY(0) rotate(0.8deg);
}

.tile {
    position: relative;
}

.tile::after {
    content: 'View free resources';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-text-primary);
    color: var(--color-bg-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 99;
    font-family: 'Roboto', sans-serif;
}


.tile::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #111827;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.tile:hover::after,
.tile:hover::before {
    opacity: 1;
}

.tile:hover::after {
    transform: translateX(-50%) translateY(4px);
}

.tile:hover {
    box-shadow: none;
    transition: 0.3s ease-in-out;
}

.tile.c1:hover {
    transform: scale(1.03) rotate(-2deg);
}

.tile.c2:hover {
    transform: scale(1.03) rotate(1.5deg);
}

.tile.c3:hover {
    transform: scale(1.03) rotate(-1deg);
}

.tile.c4:hover {
    transform: scale(1.03) rotate(2deg);
}

.tile.c5:hover {
    transform: scale(1.03) rotate(-1.5deg);
}

.tile.c6:hover {
    transform: scale(1.03) rotate(-1deg);
}

.tile.c7:hover {
    transform: scale(1.03) rotate(-2deg);
}

.tile.c8:hover {
    transform: scale(1.03) rotate(1.2deg);
}

.tile.c9:hover {
    transform: scale(1.03) rotate(-1deg);
}

.tile.c10:hover {
    transform: scale(1.03) rotate(0.8deg);
}

.tile small {
    position: absolute;
    top: 12px;
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 600;
    text-align: center;
}

.tile img {
    width: 80%;
    height: auto;
    border-radius: 8px;
}

.tile.c7 {
    padding: 12px;
}

.tile.c7 img {
    width: 70%;
    position: relative;
    top: 10px;
}

.tile.c9 .revision-notes-img {
    max-height: 120px;
    object-fit: contain;
    width: auto;
}

.tile.c6 .times-table-img {
    max-height: 120px;
    object-fit: contain;
    width: auto;
}

/* ============================================
   8. GET STARTED CTA SECTION
   ============================================ */

.get-started-cta-section {
    width: 100%;
    padding: 60px 20px 40px 20px;
    background-color: var(--color-bg-primary);
    margin-top: 0;
}

.get-started-cta-card {
    display: block;
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 20px;
    padding: 32px 48px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: none;
}

.get-started-cta-card:hover {
    transform: translateY(-4px);
    box-shadow: none;
}

.get-started-cta-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.get-started-cta-text {
    flex: 1;
    text-align: left;
}

.get-started-cta-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-bg-primary);
    margin: 0 0 8px 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.2;
}

.get-started-cta-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.5;
}

.get-started-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.get-started-cta-card:hover .get-started-cta-button {
    background-color: var(--color-bg-tertiary);
    transform: translateX(4px);
}

.get-started-cta-button svg {
    transition: transform 0.2s ease;
}

.get-started-cta-card:hover .get-started-cta-button svg {
    transform: translateX(4px);
}

.frame {
    padding-top: 40px;
    padding-bottom: 50px;
}


/* ============================================
   13. Why Mathsbox Container
   ============================================ */

.prelogin-main .container {
    display: flex;
    flex-direction: row;
    max-width: 1000px;
    width: 90%;
    height: 700px;
    margin: 50px auto 80px;
    background: var(--color-bg-primary);
    border-radius: 10px;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
}

.prelogin-main .content, .prelogin-main .tabs {
    flex: 1;
    padding: 40px;
}

.prelogin-main .content {
    text-align: left;
    margin: auto 0;
    font-family: 'Roboto', sans-serif;
}

.prelogin-main .tabs {
    background: #fff;
    font-family: 'Roboto', sans-serif;
}

.prelogin-main .tabs h3 {
    color: #6d6d6d;
    font-size: 14px;
    font-weight: 550;
    font-family: 'Roboto', sans-serif;
}

.prelogin-main .tabs h2 {
    margin: 5px 10px 50px 0;
    font-size: 35px;
    line-height: 40px;
    font-family: 'Roboto', sans-serif;
}

.tab {
    margin: 10px 0;
    border-bottom: 1px solid #c8c8c8;
}

.tab button {
    display: flex;
    width: 100%;
    padding: 10px 0;
    border: none;
    background: none;
    color: #252525;
    font-size: 18px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: 0.3s ease-in-out;
    font-family: 'Roboto', sans-serif;
}

.tab button:hover,
.tab button.active {
    color: #000;
    font-weight: 700;
}

.tab-content {
    display: none;
    padding: 5px 10px 5px 20px;
    font-size: 16px;
    color: #343434;
    transition: max-height 0.4s ease-in-out;
    font-family: 'Roboto', sans-serif;
}

/* Box Styling */
.box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 600px;
    margin: auto;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    overflow: hidden;
    z-index: 0;
}

/* Background color per box */
.box1 { background-color: #64B5F6; }
.box2 { background-color: #fce9c9; }
.box3 { background-color: #E57373; }
.box4 { background-color: #4DD0E1; }
.box5 { background-color: #BA68C8; }
.box6 { background-color: #FFD54F; }

/* Shared background image behavior */
.box::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.9;
    z-index: -1;
}

/* Individual background images */
.box1::before { background-image: url('../images/box1lg2.svg'); background-position: 75% center; }
.box2::before { background-image: url('../images/box2lg.svg'); }
.box3::before { background-image: url('../images/box3lg1.svg'); background-position: left; }
.box4::before { background-image: url('../images/box4lg.svg'); background-position: left; }
.box5::before { background-image: url('../images/box5lg1.svg'); background-position: left; }
.box6::before { background-image: url('../images/support.svg'); background-position: left; }

.icon {
    color: black;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    margin-right: 10px;
    font-size: 14px;
}

.toggle-symbol {
    font-size: 24px;
    font-weight: bold;
    color: #4070f4;
    margin-left: auto;
}


/* ============================================
   19. RESPONSIVE STYLES
   ============================================ */

/* Announcement Bar Responsive */
@media (max-width: 768px) {
    .announcement-bar {
        padding: 8px 0;
        height: auto;
    }

    .announcement-content {
        padding: 0 0.25rem 0 0.5rem;
        flex-wrap: nowrap;
        gap: 0.5rem;
        justify-content: center;
        align-items: center;
        position: relative;
    }

    .announcement-text {
        font-size: 14px;
        flex: 1;
        text-align: center;
        margin: 0;
        line-height: 1.4;
        padding: 0;
        white-space: nowrap;
        min-width: 0;
    }

    .announcement-text-desktop {
        display: none;
    }

    .announcement-text-mobile {
        display: inline;
    }

    .announcement-close {
        position: static;
        width: 20px;
        height: 20px;
        font-size: 18px;
        padding: 0;
        flex-shrink: 0;
        margin-left: 0;
    }

    .announcement-actions {
        display: none;
    }

    .announcement-btn {
        display: none;
    }

    body.announcement-visible nav {
        top: 36px !important;
        margin-top: 0 !important;
    }

    body.announcement-visible .hero-section-new {
        padding-top: 3.5rem;
    }
}

@media (max-width: 480px) {
    .announcement-bar {
        padding: 6px 0;
    }

    .announcement-content {
        padding: 0 1rem;
        gap: 0.75rem;
    }

    .announcement-text {
        font-size: 13px;
        padding: 0;
    }

    .announcement-close {
        right: 1.5rem;
        width: 20px;
        height: 20px;
        font-size: 18px;
    }

    body.announcement-visible nav {
        top: 39px !important;
    }
}

/* Hero Section Responsive */
@media (max-width: 768px) {
    .hero-headline-new {
        font-size: 3.2rem;
    }

    .hero-description-new {
        font-size: 1.125rem;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .hero-cta-new {
        flex-direction: column;
        width: 100%;
    }

    .cta-button-new {
        width: 100%;
        max-width: 300px;
        height: 56px;
    }
}

/* Schools Section Responsive */
@media screen and (max-width: 768px) {
    .school-logos {
        justify-content: center;
        gap: 30px;
        max-width: 90vw;
    }

    .school-logo {
        height: 40px;
    }

    .school-text {
        font-size: 16px;
        line-height: 18px;
    }

    .school-logo-container {
        padding: 30px 20px;
    }
}

@media screen and (max-width: 480px) {
    .school-logos {
        display: block;
        text-align: center;
        width: 100%;
        margin: 0 auto;
        white-space: nowrap;
        overflow: hidden;
    }

    .school-logo {
        height: 35px;
        max-height: 35px;
        width: auto;
        max-width: calc((100% - 48px) / 3);
        display: inline-block;
        vertical-align: middle;
        margin: 0 8px;
        object-fit: contain;
    }

    .school-text {
        font-size: 15px;
        margin-bottom: 20px;
        margin-top: 30px;
    }
}

/* Why Choose Section Responsive */
@media (max-width: 1200px) {
    .why-choose-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .why-choose-section {
        padding: 40px 20px;
    }

    .why-choose-title {
        font-size: 36px;
    }

    .why-choose-subtitle {
        font-size: 18px;
    }

    .why-choose-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 0 auto;
        justify-items: center;
        width: fit-content;
        max-width: 100%;
    }
    
    .why-choose-card {
        height: 200px;
        min-height: 200px;
        max-height: 200px;
        width: 280px;
        min-width: 280px;
        max-width: 280px;
    }
    
    /* Index page cards taller */
    body.prelogin-body .why-choose-card {
        height: 280px;
        min-height: 280px;
        max-height: 280px;
    }
}

/* Hide images on index page between 768px and 640px */
@media (max-width: 768px) and (min-width: 641px) {
    body.prelogin-body .why-choose-card-image-wrapper {
        display: none;
    }
}

/* iPad - make primary image bigger, slightly smaller */
@media (min-width: 768px) and (max-width: 1440px) {
    body.prelogin-body .card-primary .why-choose-card-image {
        min-width: 240px !important;
        min-height: 240px !important;
        transform: translate(calc(50% - 40px), calc(50% - 20px)) scale(1.1) !important;
        -webkit-transform: translate(calc(50% - 40px), calc(50% - 20px)) scale(1.1) !important;
    }
}

@media (max-width: 640px) {
    .why-choose-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 0 auto;
        justify-items: center;
        width: 100%;
        max-width: 100%;
    }
    
    .why-choose-card {
        height: 200px;
        min-height: 200px;
        max-height: 200px;
        width: 280px;
        min-width: 280px;
        max-width: 280px;
    }
    
    /* Index page cards taller */
    body.prelogin-body .why-choose-card {
        height: 400px;
        min-height: 400px;
        max-height: 400px;
    }
    
    /* Phones - make primary image bigger, slightly smaller */
    body.prelogin-body .card-primary .why-choose-card-image {
        min-width: 220px !important;
        min-height: 220px !important;
        transform: translate(calc(50% - 40px), calc(50% - 20px)) scale(1.05) !important;
        -webkit-transform: translate(calc(50% - 40px), calc(50% - 20px)) scale(1.05) !important;
    }
    
    /* Home page specific - exclude prelogin-body (index page) */
    body:not(.prelogin-body) .why-choose-card-image {
        min-width: 180px !important;
        min-height: 180px !important;
        transform: scale(1.05) !important;
        -webkit-transform: scale(1.05) !important;
        transform-origin: center center;
        -webkit-transform-origin: center center;
    }
    
    body:not(.prelogin-body) .card-primary .why-choose-card-image {
        min-width: 230px !important;
        min-height: 230px !important;
        transform: scale(1.3) !important;
        -webkit-transform: scale(1.3) !important;
        transform-origin: center center;
        -webkit-transform-origin: center center;
    }
    
    body:not(.prelogin-body) .card-gcse .why-choose-card-image,
    body:not(.prelogin-body) .card-alevel .why-choose-card-image {
        min-width: 190px !important;
        min-height: 190px !important;
        transform: scale(1.1) !important;
        -webkit-transform: scale(1.1) !important;
        transform-origin: center center;
        -webkit-transform-origin: center center;
    }

    .why-choose-stats {
        gap: 40px;
    }

    .why-choose-stat-number {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    /* Home page specific mobile styles */
    body:not(.prelogin-body) .why-choose-card-image {
        min-width: 190px !important;
        min-height: 190px !important;
        transform: scale(1.1) !important;
        -webkit-transform: scale(1.1) !important;
        transform-origin: center center;
        -webkit-transform-origin: center center;
    }
    
    /* High DPI screens - adjust for consistency */
    @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
        body:not(.prelogin-body) .why-choose-card-image {
            image-rendering: -webkit-optimize-contrast;
            image-rendering: crisp-edges;
        }
    }
    
    body:not(.prelogin-body) .card-primary .why-choose-card-image {
        min-width: 240px !important;
        min-height: 240px !important;
        transform: scale(1.35) !important;
        -webkit-transform: scale(1.35) !important;
        transform-origin: center center;
        -webkit-transform-origin: center center;
    }
    
    body:not(.prelogin-body) .card-gcse .why-choose-card-image,
    body:not(.prelogin-body) .card-alevel .why-choose-card-image {
        min-width: 200px !important;
        min-height: 200px !important;
        transform: scale(1.15) !important;
        -webkit-transform: scale(1.15) !important;
        transform-origin: center center;
        -webkit-transform-origin: center center;
    }
}

/* Question Generator Section Responsive */
@media (max-width: 1200px) {
    .qg-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .qg-right {
        order: -1;
    }
}

@media (max-width: 768px) {
    .question-generator-section {
        padding: 60px 20px;
    }

    .qg-left {
        padding-top: 0;
    }

    .qg-headline {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }

    .qg-headline-bold,
    .qg-headline-light {
        font-size: 42px;
    }

    .qg-headline-light {
        display: block;
    }

    .qg-steps {
        gap: 30px;
    }
}

/* Get Started CTA Section Responsive */
@media (max-width: 768px) {
    .get-started-cta-card {
        padding: 24px 20px;
    }
    
    .get-started-cta-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .get-started-cta-text {
        text-align: left;
    }
    
    .get-started-cta-title {
        font-size: 24px;
    }
    
    .get-started-cta-description {
        font-size: 15px;
    }
    
    .get-started-cta-button {
        width: 100%;
        justify-content: center;
    }
}

/* Resources Section Responsive */
@media (max-width: 900px) {
    .card-column:nth-child(n+7) {
        display: none;
    }
}

@media (max-width: 800px) {
    .frame h2 {
        font-size: 35px;
        line-height: 40px;
        max-width: 90vw;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 640px) {
    .card-column {
        display: flex;
    }

    .frame h2 {
        font-size: 24px;
        line-height: 30px;
    }
}

@media (max-width: 500px) {
    .tile {
        aspect-ratio: 4 / 3;
        width: 70vw;
    }

    .frame {
        padding-top: 80px;
        padding-bottom: 40px;
    }
}

/* Question Generator Reasons Section Responsive */
@media (max-width: 900px) {
    .prelogin-main .container {
        flex-direction: column;
        height: auto;
        padding: 0 10px 20px;
        margin-bottom: 40px;
    }

    .prelogin-main .content {
        display: none;
    }

    .prelogin-main .tabs {
        padding: 20px;
    }

    .prelogin-main .tabs h2 {
        font-size: 24px;
        margin-bottom: 0;
    }

    .tab button {
        font-size: 16px;
    }
}

/* Comprehensive Mobile Styles for Phones */
@media (max-width: 600px) {
    /* Hero Section Mobile */
    .hero-section-new {
        padding: 1rem 1rem 0.5rem;
    }

    .hero-headline-new {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    .hero-description-new {
        font-size: 1rem;
        margin-bottom: 1.25rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .hero-cta-new {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .cta-button-new {
        width: 100%;
        max-width: 100%;
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
        height: 52px;
    }

    .hero-image-container {
        max-width: 100%;
        height: 250px;
        margin-top: 1rem;
    }

    .user-count-badge {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        margin-top: 3.5rem;
        margin-bottom: 1rem;
    }

    .banner-logo {
        width: 20px;
        height: 20px;
    }

    /* Frame Section Mobile */
    .frame {
        padding: 30px 1rem 40px;
    }

    .frame h2 {
        font-size: 24px;
        margin: 8px 0 10px;
    }

    .cards-wrapper {
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .tile {
        padding: 16px;
    }

    .tile small {
        font-size: 18px;
        font-weight: 700;
    }

    .resources-headline-bold,
    .resources-headline-light {
        font-size:44px;
    }

    /* Subscription Section Mobile */
    .subscription-section {
        padding: 0.75rem 0.5rem 0.75rem 0.5rem !important;
    }

    .pricing-header {
        font-size: 2rem;
        padding: 0 1rem;
        margin-bottom: 3rem !important;
    }

    .pricing-section {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
        margin: 0 auto 1rem auto !important;
    }

    .card {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
    }

    .plan-title {
        font-size: 1.375rem;
        margin-bottom: 0.5rem;
    }

    .plan-desc {
        font-size: 0.875rem;
        margin-bottom: 1rem;
        line-height: 1.4;
    }

    .price {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    ul.features {
        margin-bottom: 1rem;
    }

    ul.features li {
        font-size: 0.8125rem;
    }
}

/* Back Button Positioning */
@media (max-width: 640px) {
    .pagecontainer .page-back-button-container {
        padding: 0 1rem 0 1rem;
        margin-bottom: 0.5rem;
    }
}
