/* ==========================================
   main.css — Rebuilt Light Glass Theme
   Structure: 00-variables, 10-base, 20-layout, 30-components,
              40-forms, 50-pages, 60-utils, 90-responsive
   Goal: single source of truth for spacing and visuals.
   ==========================================
*/

/* ---------------------- 00 - Variables ---------------------- */
:root {
    --primary: #5aa6ff;
    --primary-2: #7fc3ff;
    --primary-dark: #0073d1;
    --accent: #00a3ff;

    --bg-light: linear-gradient(180deg, #f6f9ff 40%, #e6f1ff 60%);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 24px rgba(15, 35, 70, 0.06);

    --muted: #6b7280;
    --text: #0f1724;

    /* spacing scale */
    --space-xs: 6px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 32px;
    --space-xl: 48px;

    --radius: 14px;
    --radius-sm: 10px;
    --transition: 180ms ease;
    --card-padding: 20px;
    --max-width: 1200px;
}

/* ---------------------- 10 - Base / Reset ---------------------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

* {
    box-sizing: border-box
}

html,
body {
    height: 100%;
    margin: 0;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    background: var(--bg-light);
    color: var(--text);
    -webkit-font-smoothing: antialiased
}

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

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color var(--transition)
}

a:hover {
    color: var(--accent)
}

/* ---------------------- 20 - Layout containers ---------------------- */
/* Only containers control page spacing — cards only handle inner padding */
.container,
.card-container,
.form-container,
.main-container,
.register-container,
.login-container {
    max-width: var(--max-width);
    margin: var(--space-lg) auto;
    padding: var(--space-md);
}

/* Utility full-width section wrapper used across pages */
.section {
    margin-bottom: var(--space-lg)
}

.page-wrapper {
    max-width: 900px;
    /* keeps a narrow centered layout */
    margin: 30px auto;
    /* horizontal centering */
    padding: 20px;
}
/* ---------------------- 30 - Card (glass) ---------------------- */
.card,
.form-card,
.profile-card,
.learnership-card,
.how-it-works,
.contact-info {
    background: var(--glass-bg);
    border-radius: var(--radius);
    padding: var(--card-padding);
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15, 35, 70, 0.08)
}

.card h2,
.card h3,
.form-card h2 {
    margin: 0 0 10px;
    color: var(--primary-dark);
    font-weight: 700
}

.card.center {
    max-width: 720px;
    margin: 18px auto;
    text-align: center
}

/* ---------------------- 40 - Forms ---------------------- */
/* Grid-based forms: two-column default, single column on narrow screens */
.form-grid,
.register-form,
.login-form,
form,
.profile-form {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 1fr;
}

/* elements that should span full width of the grid */
.form-full,
.subjects-section.form-full,
.form-full-submit {
    grid-column: 1 / -1
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--primary-dark)
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(15, 23, 36, 0.06);
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    transition: box-shadow var(--transition), border-color var(--transition)
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(90, 166, 255, 0.12)
}

.button,
.btn,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border: 0;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition)
}

.button:hover,
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(15, 35, 70, 0.08)
}

/* ---------------------- 50 - Page specific components ---------------------- */
/* Hero */
.hero {
    padding: 48px 18px;
    border-radius: var(--radius);
}

.hero .title {
    font-size: clamp(1.6rem, 2.6vw, 2.6rem);
    color: var(--primary-dark);
    font-weight: 700
}

.hero .subtitle {
    color: var(--muted);
    margin-top: 8px
}

/* How-it-works image — smaller by default and responsive */
.how-it-works {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--space-md)
}

.how-it-works img {
    max-width: 520px;
    width: 80%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08)
}

/* Learnership cards list */
.learnership-list {
    display: flex;
    flex-direction: column;
    gap: 18px
}

.learnership-card {
    margin-bottom: 28px;
            /* add spacing between cards */
    padding: 18px 22px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    background: var(--glass-bg)
}

.learnership-card h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: var(--primary-dark)
}

.learnership-card p {
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--muted);
    margin: 6px 0
}

.learnership-card .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px
}

.learnership-card .view-more {
    margin-top: 10px
}

.details-box {
    background: rgba(255, 255, 255, 0.78);
    padding: 14px;
    border-radius: 10px;
    margin-top: 12px
}

/* Profile card wrapper */
.profile-container {
    max-width: 980px;
    margin: 26px auto;
    padding: 16px
}

.profile-card {
    padding: 22px;
    border-radius: 16px
}

.btn-back {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--primary-dark)
}

/* Subjects */
#subjects-container {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.subject-row {
    display: flex;
    gap: 10px;
    align-items: center
}

.subject-row select {
    flex: 1 1 420px
}

.subject-row input[type="number"] {
    width: 110px
}

/* ---------------------- 60 - Utilities ---------------------- */
.center {
    text-align: center
}

.row {
    display: flex;
    gap: 12px;
    align-items: center
}

.col-1 {
    flex: 1
}

.muted {
    color: var(--muted)
}

.small-note {
    font-size: 0.92rem;
    color: var(--muted)
}

.error-text {
    color: #b43434;
    display: none;
    margin-top: 6px;
    font-size: 0.92rem
}

/* ---------------------- 90 - Responsive ---------------------- */
@media (max-width:980px) {

    .container,
    .card-container,
    .form-container,
    .main-container {
        padding: 18px;
        margin: 16px
    }

    .how-it-works img {
        max-width: 420px
    }
}

@media (max-width:820px) {

    .register-form,
    .login-form,
    form,
    .profile-form,
    .form-grid {
        grid-template-columns: 1fr
    }

    .subject-row {
        flex-direction: column;
        align-items: stretch
    }

    .subject-row input[type="number"] {
        width: 100%
    }

    .how-it-works img {
        width: 100%;
        max-width: 480px
    }

    .learnership-card {
        padding: 14px
    }
}

@media (max-width:640px) {

    .container,
    .card-container,
    .form-container,
    .main-container {
        padding: 14px;
        margin: 12px
    }

    .hero {
        padding: 28px 12px
    }

    .card {
        padding: 14px;
        border-radius: 12px
    }

    .how-it-works img {
        max-width: 360px
    }
}

/* End of main.css */

/* helpers/layout.css — helper utilities & fixes
   - Keep page spacing consistent across pages
   - Footer behavior, centered containers, image helpers
*/

/* Footer stick-to-bottom helper when content short */
.site-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

.site-content {
    flex: 1
}

/* Keep all main pages inside consistent wrapper when desired */
.wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px
}

/* Image helpers */
.img-fit {
    max-width: 100%;
    height: auto;
    display: block
}

.img-small {
    max-width: 260px
}

.img-medium {
    max-width: 480px
}

/* Compact text helper for learnerships */
.text-compact {
    font-size: 0.92rem;
    line-height: 1.35;
    color: var(--muted)
}

/* Reduce long paragraphs in lists to 3 lines with ellipsis */
.truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden
}

/* Fix for forms that accidentally stretch full width if missing container class */
.form-fix {
    max-width: 760px;
    margin: 0 auto
}

/* Small responsive tweaks */
@media (max-width:820px) {
    .img-medium {
        max-width: 360px
    }
}

/* --- How It Works Slider --- */
/* --- How It Works Slider --- */
.how-slider-wrapper {
    width: 100%;
    max-width: 700px;
    margin: 20px auto;
    text-align: center;
}
.how-slider {
    width: 100%;
    max-width: 700px;
    /* smaller frame like before */
    margin: 25px auto;
    overflow: hidden;
    /* the FRAME effect */
    border-radius: 16px;
    /* rounded corners */
    background: transparent;
    border: none;

    /* shadow around slider */
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}

/* Track uses flex, but stays inside the frame */
.slider-track {
    display: flex;
    transition: transform 0.55s ease;
    will-change: transform;
}

/* Each slide is exactly one frame width */
.slide {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* IMAGE SIZE — same “good size” as before */
.slide-img {
    width: 100%;
    /* 🔥 Full width of the slider */
    height: auto;
    /* Keep natural height */
    object-fit: contain;
    /* Never cut image */
    border-radius: 0;
    /* remove inner curves */
    display: block;
}
/* Dots */
.slider-dots {
    margin-top: 14px;
    /* space below slider */
    display: flex;
    justify-content: center;
    gap: 10px;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    background: #d0d7e6;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider-dots .dot.active {
    background: var(--primary);
}

@media (max-width: 600px) {

    /* Make mobile slider look EXACTLY like desktop but smaller */
    .how-slider-wrapper {
        max-width: 95%;
    }

    .how-slider {
        border-radius: 14px;
        margin: 15px auto;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    }

    /* Track still flexible */
    .slider-track {
        transition: transform 0.55s ease;
    }

    /* Slide stays full width */
    .slide {
        flex: 0 0 100%;
    }

    /* Image fills the slider frame (just like desktop) */
    .slide-img {
        width: 100%;
        height: auto;
        object-fit: contain;
        /* Keep full image visible */
        display: block;
    }


        /* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 16px 10px;
    font-size: 0.95rem;
    color: var(--muted);
    
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(14px) saturate(160%);
    webkit-backdrop-filter: blur(14px) saturate(160%);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    
    box-shadow: 0 -8px 18px rgba(15, 35, 70, 0.05);
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease,
        box-shadow 0.6s ease;
    }
        
.site-footer.visible {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 -8px 18px rgba(15, 35, 70, 0.08);
    }            
}

/* Reveal Effects */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
}

.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Make cards pop slightly more */
.card,
.feature-card {
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 26px;
}

/* Make headings more vibrant */
.card h3,
.feature-card h3 {
    font-size: 1.4em;
    margin-bottom: 12px;
    font-weight: 600;
}

.section-title {
    margin-top: 20px;
    margin-bottom: 12px;
}

.container .card,
.container .feature-card {
    margin-bottom: 22px;
}

/* CONTACT CARD STYLING */
.contact-card {
    background: linear-gradient(135deg, #f3f7ff, #dfe8ff);
    /* smooth pastel blue, fits modern style */
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
    margin-top: 20px;
}
/* 2 columns desktop → 1 column mobile */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 25px 0;
}

/* Left alignment + spacing */
.person {
    text-align: left;
}

/* Bigger QR */
.qr-img {
    width: 250px;
    /* Increased from 120px → bigger */
    height: auto;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Font under QR slightly cleaner */
.person p {
    margin: 6px 0;
    font-size: 15px;
    line-height: 1.4;
}

/* Mobile responsive */
@media(max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .qr-img {
        width: 200px;
        /* Slightly bigger for mobile readability */
        margin: 0 auto 12px;
        /* Center QR only, text still left */
        display: block;
    }
}

/* ===============================
   Partners – FORCE SIDE-BY-SIDE
   =============================== */

.partners-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 16px 0;
}

/* Each logo box */
.partner-logo {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Images */
.partner-logo img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
    background: #f8f9fb;
    padding: 10px;
}

/* Text */
.partners-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}

/* Mobile: stack */
@media (max-width: 768px) {
    .partners-row {
        flex-direction: column;
    }
}