/* ========================================
   HOMEPAGE SPECIFIC STYLES
   TECH WITH TKS - Homepage CSS
   ======================================== */

/* Prevent horizontal scroll on all devices */
html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Page Architecture Enhancement Styles */

/* Section Wrappers with Dividers */
.section-wrapper {
    padding: 80px 0;
    border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    overflow-x: hidden;
    width: 100%;
}

.section-wrapper:last-of-type {
    border-bottom: none;
}


/* ========================================
   HERO SECTION - PREMIUM SAAS
   ======================================== */

.hero-section {
    padding: 100px 0 80px;
    border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    background: var(--bg, #fff);
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    /* prevent any child from causing horizontal scroll */
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* Left Column - Content */
.hero-content {
    display: flex;
    flex-direction: column;
}

/* Individual spacing — these override the generic selector */
.hero-content>*+* {
    margin-top: 28px;
}

.hero-heading {
    font-size: clamp(2rem, 5vw, 52px);
    font-weight: 800;
    line-height: 1.08;
    color: var(--text-primary, #1a1a1a);
    letter-spacing: -0.03em;
    margin: 0;
    max-width: 560px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.hero-description {
    font-size: 18px;
    line-height: 1.65;
    color: var(--text-secondary, #666);
    margin: 28px 0 0;
    /* heading → description */
    max-width: 520px;
    font-weight: 400;
    word-break: break-word;
    overflow-wrap: break-word;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-top: 36px;
    /* description → buttons */
}

.hero-buttons .btn-parallelogram {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
}

/* Stats Row */
.hero-stats {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    margin-top: 12px;
    /* buttons → divider line */
    max-width: 100%;
    overflow: visible;
    padding-top: 28px;
    /* divider line → stats numbers */
    border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}

.hero-stat {
    display: flex;
    flex-direction: column;
    flex-shrink: 1;
}

.hero-stat-number {
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 800;
    line-height: 1;
    color: var(--primary-color, #3B82F6);
    margin-bottom: 8px;
    letter-spacing: -0.04em;
    /* tighter = more premium */
}

.hero-stat-label {
    font-size: 13px;
    color: var(--text-muted, #888);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ==============================================
   SCROLL REVEAL SYSTEM
   Base state: invisible + slightly shifted down
   Active state (added by IntersectionObserver):
   visible + back to natural position
   ============================================== */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.7s cubic-bezier(.2, .8, .2, 1),
        transform 0.7s cubic-bezier(.2, .8, .2, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for hero elements */
.hero-buttons.reveal {
    transition-delay: 0.1s;
}

.hero-stats.reveal {
    transition-delay: 0.22s;
}

/* Reduced motion preference — respect accessibility */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Right Column - Terminal Block */
.hero-terminal {
    position: relative;
    transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
    transition: transform 0.3s ease;
}

.hero-terminal:hover {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.terminal-window {
    background: #1E293B;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #263445;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red {
    background: #EF4444;
}

.terminal-dot.yellow {
    background: #F59E0B;
}

.terminal-dot.green {
    background: #22C55E;
}

.terminal-filename {
    font-size: 13px;
    color: #CBD5E1;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.terminal-version {
    background: #312E81;
    color: #C4B5FD;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.terminal-content {
    padding: 24px 20px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.8;
    background: #1E293B;
    color: #E2E8F0;
}

.terminal-line {
    display: block;
    margin-bottom: 3px;
    white-space: pre-wrap;
    color: #94A3B8;
}

.terminal-line:last-child {
    margin-bottom: 0;
}

.line-number {
    display: inline-block;
    width: 32px;
    color: #64748B;
    text-align: right;
    margin-right: 16px;
    user-select: none;
}

/* Syntax Highlighting - New Premium Colors */
.syntax-php {
    color: #C084FC;
}

.syntax-keyword {
    color: #C084FC;
    font-weight: 600;
}

.syntax-class {
    color: #60A5FA;
}

.syntax-function {
    color: #4ADE80;
}

.syntax-variable {
    color: #60A5FA;
}

.syntax-string {
    color: #FCD34D;
}

.syntax-number {
    color: #FCD34D;
}

.syntax-comment {
    color: #64748B;
    font-style: italic;
}

.terminal-prompt {
    color: #38BDF8;
    font-weight: 700;
    margin-right: 12px;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

/* Blinking cursor animation */
.terminal-line:last-child::after {
    content: '▊';
    color: #38BDF8;
    animation: blink 1s infinite;
    margin-left: 4px;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Section Headers with Improved Dividers */
.section-header-centered {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title {
    margin: 0 0 12px 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--primary-color, #3B82F6);
    margin: 16px auto 0;
    border-radius: 2px;
}

.section-description {
    margin: 0;
    font-size: 16px;
    color: var(--text-secondary, #666);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.section-footer {
    margin-top: 50px;
}

.section-footer-centered {
    margin-top: 50px;
    text-align: center;
}


/* ========================================
   TRUST BAR - AUTO-SCROLLING
   ======================================== */

.trust-bar {
    padding: 20px 0;
    background: var(--bg-surface, rgba(0, 0, 0, 0.02));
    border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    overflow: hidden;
    width: 100%;
}

.trust-scroll-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.trust-scroll-container:last-child {
    margin-bottom: 0;
}

/* Fade edges for smooth appearance */
.trust-scroll-container::before,
.trust-scroll-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.trust-scroll-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg, #f9fafb), transparent);
}

.trust-scroll-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg, #f9fafb), transparent);
}

.trust-scroll-track {
    display: flex;
    gap: 40px;
    width: fit-content;
}

/* Right to Left scroll (default) */
.trust-scroll-track.scroll-rtl {
    animation: scroll-rtl 30s linear infinite;
}

/* Left to Right scroll (reverse direction) */
.trust-scroll-track.scroll-ltr {
    animation: scroll-rtl 30s linear infinite reverse;
}



.trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border, rgba(0, 0, 0, 0.06));
    border-radius: 50px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.trust-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
}

.trust-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #2c3e50);
    letter-spacing: 0.3px;
}

.trust-item:hover .trust-text {
    color: var(--primary-color, #3B82F6);
}

/* Scroll animations */
@keyframes scroll-rtl {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Consistent Container Max-Width */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Learning Paths - Equal Bordered Containers */
.learning-paths-grid {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.path-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    padding: 32px;
    background: var(--bg-card, #fff);
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .path-card {
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.path-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.path-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary, #1a1a1a);
}

.path-level {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color, #3B82F6);
}

.path-description {
    font-size: 14px;
    color: var(--text-secondary, #666);
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.path-skills {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    flex-grow: 1;
}

.path-skills li {
    font-size: 14px;
    color: var(--text-secondary, #444);
    padding: 8px 0;
    border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.05));
}

.path-skills li:last-child {
    border-bottom: none;
}

.path-skills li::before {
    content: '✓';
    color: var(--primary-color, #3B82F6);
    font-weight: 700;
    margin-right: 8px;
}

/* ========================================
   CORE VALUE SECTION — PHASE C
   ======================================== */

.core-value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.core-value-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    /* custom-container handles bg, border, radius */
}

.core-value-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md, 8px);
    background: rgba(37, 99, 235, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #2563EB);
    flex-shrink: 0;
}

[data-theme="dark"] .core-value-icon {
    background: rgba(59, 130, 246, 0.12);
    color: #60A5FA;
}

.core-value-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #111827);
    margin: 0;
}

.core-value-desc {
    font-size: 15px;
    color: var(--text-secondary, #4B5563);
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

.core-value-stat {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary, #2563EB);
    letter-spacing: 0.3px;
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 6px;
}

@media (max-width: 768px) {
    .core-value-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .core-value-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Hub Grid - Equal Containers */
.hub-grid {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.hub-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    padding: 32px;
    background: var(--bg-card, #fff);
    text-align: center;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .hub-card {
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.hub-icon {
    margin: 0 auto 20px;
    color: var(--primary-color, #3B82F6);
}

.hub-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--text-primary, #1a1a1a);
}

.hub-description {
    font-size: 14px;
    color: var(--text-secondary, #666);
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex-grow: 1;
}

.hub-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color, #3B82F6);
    margin: 0 0 20px 0;
}

/* Why Grid - Equal Containers */
.why-grid {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.why-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    padding: 32px;
    background: var(--bg-card, #fff);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .why-card {
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.why-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md, 8px);
    background: rgba(37, 99, 235, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #2563EB);
    margin-bottom: 16px;
}

[data-theme="dark"] .why-icon {
    background: rgba(59, 130, 246, 0.12);
    color: #60A5FA;
}

.why-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--text-primary, #1a1a1a);
}

.why-description {
    font-size: 14px;
    color: var(--text-secondary, #666);
    line-height: 1.6;
    margin: 0;
}


/* Newsletter Section - Redesigned */
.newsletter-section {
    background: var(--bg-surface, rgba(0, 0, 0, 0.02));
}

.newsletter-box {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 40px;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    border-radius: 8px;
    background: var(--bg-card, rgba(255, 255, 255, 0.5));
}

.newsletter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.newsletter-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.newsletter-title {
    margin: 0 0 16px 0;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary, #1a1a1a);
    line-height: 1.2;
}

.newsletter-description {
    margin: 0;
    font-size: 15px;
    color: var(--text-secondary, #666);
    line-height: 1.6;
}

.newsletter-form-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.newsletter-form {
    width: 100%;
    max-width: 600px;
}

.newsletter-input-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    background: var(--bg-card, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.newsletter-input-wrapper:focus-within {
    border-color: var(--primary, #2563EB);
}

.newsletter-input-inline {
    flex: 1;
    padding: 14px 20px;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text-primary, #1f2937);
    background: transparent;
    font-family: 'Inter', sans-serif;
}

.newsletter-input-inline::placeholder {
    color: #9ca3af;
}

.newsletter-btn-inline {
    position: relative;
    padding: 14px 28px;
    background: #7B77EB;
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s ease;
    clip-path: polygon(15px 0, 100% 0, 100% 100%, 0 100%);
    margin-left: -15px;
}

.newsletter-btn-inline span {
    position: relative;
    z-index: 1;
}

.newsletter-btn-inline:hover {
    background: #5B5FEF;
}

.newsletter-btn-inline:active {
    background: #4B4FDF;
}


/* ========================================
   TRUST LOGOS AUTO-SCROLLING SECTION
   ======================================== */

.trust-logos-section {
    background: rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.logos-scroll-container {
    margin-top: 40px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Fade edges for smooth appearance */
.logos-scroll-container::before,
.logos-scroll-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.logos-scroll-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg, #f9fafb), transparent);
}

.logos-scroll-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg, #f9fafb), transparent);
}

.logos-scroll-track {
    display: flex;
    gap: 80px;
    animation: scroll-logos 30s linear infinite;
    width: fit-content;
}

/* Pause on hover */
.logos-scroll-track:hover {
    animation-play-state: paused;
}

.logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 80px;
    padding: 10px 30px;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.logo-item:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.logo-item img {
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
    filter: grayscale(20%);
}

.logo-item:hover img {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Legacy SVG support */
.logo-item svg {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.logo-item:hover svg {
    opacity: 1;
}

/* Infinite scroll animation */
@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ========================================
   MOBILE RESPONSIVE — HERO RULES MOVED
   Hero breakpoints are now consolidated in
   the canonical block at end-of-file (~line 2252).
   Non-hero section rules follow below.
   ======================================== */

@media (max-width: 768px) {
    /* =====================================================
       NON-HERO SECTION MOBILE RULES
       Hero responsive rules are in the canonical block
       at end-of-file. Only non-hero rules live here.
       ===================================================== */

    .section-wrapper {
        padding: 60px 0;
    }

    .section-header-centered {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 28px;
    }

    .section-footer {
        margin-top: 40px;
    }

    /* Stack learning paths on mobile */
    .learning-paths-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .path-card {
        padding: 24px;
    }

    /* Stack hub cards on mobile */
    .hub-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hub-card {
        padding: 24px;
    }

    /* Stack why cards on mobile */
    .why-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .why-card {
        padding: 24px;
    }

    /* Stack newsletter on mobile */
    .newsletter-box {
        padding: 40px 24px;
    }

    .newsletter-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .newsletter-content {
        text-align: center;
    }

    .newsletter-title {
        font-size: 24px;
    }

    .newsletter-description {
        font-size: 14px;
    }

    .newsletter-input-inline {
        padding: 12px 16px;
        font-size: 14px;
    }

    .newsletter-btn-inline {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Trust bar mobile */
    .trust-bar {
        padding: 20px 0;
    }

    .trust-scroll-track {
        gap: 24px;
        animation-duration: 18s;
    }

    .trust-item {
        padding: 10px 20px;
    }

    .trust-text {
        font-size: 13px;
    }

    .trust-scroll-container::before,
    .trust-scroll-container::after {
        width: 40px;
    }

    /* Logos scroll mobile */
    .logos-scroll-track {
        gap: 40px;
        animation-duration: 20s;
    }

    .logo-item {
        min-width: 100px;
        height: 50px;
        padding: 8px 16px;
    }

    .logo-item svg {
        width: 100px;
        height: 35px;
    }

    .logos-scroll-container::before,
    .logos-scroll-container::after {
        width: 50px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {

    /* Tablet adjustments */
    .learning-paths-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hub-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

/* Initial state - hidden */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Animated state - visible */
.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations for cards */
.path-card.animate-on-scroll,
.hub-card.animate-on-scroll,
.why-card.animate-on-scroll {
    transition-delay: 0.1s;
}

.path-card:nth-child(2).animate-on-scroll,
.hub-card:nth-child(2).animate-on-scroll {
    transition-delay: 0.2s;
}

.path-card:nth-child(3).animate-on-scroll,
.hub-card:nth-child(3).animate-on-scroll {
    transition-delay: 0.3s;
}

/* Hero animations */
.hero-content.animate-on-scroll {
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero-content.animate-on-scroll.animated {
    transform: translateX(0);
}

.hero-terminal.animate-on-scroll {
    transform: translateX(30px) scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero-terminal.animate-on-scroll.animated {
    transform: translateX(0) scale(1);
}


/* Newsletter box animation */
.newsletter-box.animate-on-scroll {
    transform: scale(0.95);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.newsletter-box.animate-on-scroll.animated {
    transform: scale(1);
}

/* ========================================
   ALTERNATING LEFT-RIGHT ANIMATIONS
   ======================================== */

/* Why Cards - Alternating from left and right */
.why-card:nth-child(odd).animate-on-scroll {
    transform: translateX(-50px);
    opacity: 0;
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.why-card:nth-child(even).animate-on-scroll {
    transform: translateX(50px);
    opacity: 0;
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.why-card:nth-child(1).animate-on-scroll {
    transition-delay: 0.1s;
}

.why-card:nth-child(2).animate-on-scroll {
    transition-delay: 0.2s;
}

.why-card:nth-child(3).animate-on-scroll {
    transition-delay: 0.3s;
}

.why-card:nth-child(4).animate-on-scroll {
    transition-delay: 0.4s;
}

.why-card.animate-on-scroll.animated {
    transform: translateX(0);
    opacity: 1;
}

/* Tutorial Cards - Alternating animation */
.tutorial-card:nth-child(odd).animate-on-scroll {
    transform: translateX(-50px);
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.tutorial-card:nth-child(even).animate-on-scroll {
    transform: translateX(50px);
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.tutorial-card.animate-on-scroll.animated {
    transform: translateX(0);
    opacity: 1;
}

/* Project Cards - Alternating animation */
.project-card:nth-child(odd).animate-on-scroll {
    transform: translateX(-50px);
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.project-card:nth-child(even).animate-on-scroll {
    transform: translateX(50px);
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.project-card.animate-on-scroll.animated {
    transform: translateX(0);
    opacity: 1;
}

/* Stagger delays for tutorial and project cards */
.tutorial-card:nth-child(1).animate-on-scroll,
.project-card:nth-child(1).animate-on-scroll {
    transition-delay: 0.1s;
}

.tutorial-card:nth-child(2).animate-on-scroll,
.project-card:nth-child(2).animate-on-scroll {
    transition-delay: 0.2s;
}

.tutorial-card:nth-child(3).animate-on-scroll,
.project-card:nth-child(3).animate-on-scroll {
    transition-delay: 0.3s;
}

.tutorial-card:nth-child(4).animate-on-scroll,
.project-card:nth-child(4).animate-on-scroll {
    transition-delay: 0.4s;
}

.tutorial-card:nth-child(5).animate-on-scroll,
.project-card:nth-child(5).animate-on-scroll {
    transition-delay: 0.5s;
}

.tutorial-card:nth-child(6).animate-on-scroll,
.project-card:nth-child(6).animate-on-scroll {
    transition-delay: 0.6s;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ========================================
   PROFESSIONAL SAAS ANIMATIONS & EFFECTS
   ======================================== */

/* Floating Animation for Hero Terminal */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px) perspective(1200px) rotateY(-2deg) rotateX(1deg);
    }

    50% {
        transform: translateY(-10px) perspective(1200px) rotateY(-2deg) rotateX(1deg);
    }
}

.hero-terminal {
    animation: float 6s ease-in-out infinite;
}

/* Gradient Background Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-section {
    background: linear-gradient(-45deg, #ffffff, #f8f9ff, #fff5f7, #f0f9ff);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Card Hover Effects - 3D Lift */
.path-card,
.hub-card,
.why-card,
.tutorial-card,
.project-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.path-card::before,
.hub-card::before,
.why-card::before,
.tutorial-card::before,
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(123, 119, 235, 0.1), rgba(59, 130, 246, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.path-card:hover::before,
.hub-card:hover::before,
.why-card:hover::before,
.tutorial-card:hover::before,
.project-card:hover::before {
    opacity: 1;
}

.path-card:hover,
.hub-card:hover,
.why-card:hover,
.tutorial-card:hover,
.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Button Ripple Effect */
.newsletter-btn-inline,
.search-btn-inline,
.btn-parallelogram {
    position: relative;
    overflow: hidden;
}

.newsletter-btn-inline::after,
.search-btn-inline::after,
.btn-parallelogram::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.newsletter-btn-inline:active::after,
.search-btn-inline:active::after,
.btn-parallelogram:active::after {
    width: 300px;
    height: 300px;
}

/* Pulse Animation for Stats */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.hero-stat-number {
    animation: pulse 2s ease-in-out infinite;
}

/* Shimmer Effect for Section Headers */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.section-title {
    background: linear-gradient(90deg, var(--text-primary, #1a1a1a) 0%, var(--primary, #2563EB) 50%, var(--text-primary, #1a1a1a) 100%);
    background-size: 1000px 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}


/* ============================================================
   CARD TECH STACK + VERSION LABEL — PHASE E
   ============================================================ */

/* Tech stack row below image section on project cards */
.card-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.tech-pill {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary, #2563EB);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 4px;
    letter-spacing: 0.3px;
}

[data-theme="dark"] .tech-pill {
    background: rgba(59, 130, 246, 0.1);
    color: #60A5FA;
    border-color: rgba(59, 130, 246, 0.25);
}

/* Version label on top-left of project image */
.card-version-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    letter-spacing: 0.5px;
    z-index: 4;
}

/* Glow Effect on Focus */
.newsletter-input-wrapper:focus-within,
.search-input-wrapper:focus-within {
    box-shadow: 0 0 0 4px rgba(123, 119, 235, 0.1),
        0 8px 24px rgba(123, 119, 235, 0.2);
}

/* Smooth Page Load Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: fadeInUp 0.6s ease-out;
}

/* Trust Bar Items - Continuous Smooth Scroll */
.trust-item,
.logo-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trust-item:hover,
.logo-item:hover {
    transform: translateY(-4px) scale(1.05);
}

/* Newsletter Box Gradient Border */
.newsletter-box {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 255, 0.9));
    backdrop-filter: blur(10px);
}

.newsletter-box::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 10px;
    background: linear-gradient(45deg, #7B77EB, #3B82F6, #7B77EB);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    z-index: -1;
    opacity: 0.3;
}

/* Hero Heading — context-aware gradient */
.hero-heading {
    background: linear-gradient(135deg, var(--text-primary, #1a1a1a) 0%, #3B6AC8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .hero-heading {
    background: linear-gradient(135deg, #F1F5F9 0%, #60A5FA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Terminal Window Glow */
.terminal-window {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08),
        0 0 40px rgba(123, 119, 235, 0.1);
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Loading State Animation */
@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Icon Bounce on Hover */
.hub-icon {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hub-card:hover .hub-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Path Card Progress Bar Animation */
.path-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #7B77EB, #3B82F6);
    transition: width 0.5s ease;
}

.path-card:hover::after {
    width: 100%;
}

/* Parallax Effect for Sections */
@media (min-width: 769px) {
    .section-wrapper {
        transform-style: preserve-3d;
    }
}

/* Micro-interaction: Button Press */
.newsletter-btn-inline:active,
.search-btn-inline:active,
.btn-parallelogram:active {
    transform: scale(0.95);
}

/* Stagger Animation for List Items */
.path-skills li {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.path-card:hover .path-skills li:nth-child(1) {
    animation-delay: 0.1s;
}

.path-card:hover .path-skills li:nth-child(2) {
    animation-delay: 0.2s;
}

.path-card:hover .path-skills li:nth-child(3) {
    animation-delay: 0.3s;
}

.path-card:hover .path-skills li:nth-child(4) {
    animation-delay: 0.4s;
}

.path-card:hover .path-skills li:nth-child(5) {
    animation-delay: 0.5s;
}

/* Glass Morphism Effect */
.newsletter-input-wrapper,
.search-input-wrapper {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Smooth Color Transitions */
* {
    transition-property: color, background-color, border-color;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* Remove transition from animated elements */
.animate-on-scroll * {
    transition-property: none;
}

/* Restore transitions after animation */
.animate-on-scroll.animated * {
    transition-property: color, background-color, border-color;
}

/* ========================================
   DISABLE HOVER EFFECTS ON HOMEPAGE
   ======================================== */

/* Allow item-card hover
   The old DISABLE block targeted .tutorial-card and .project-card class names
   which no longer exist in the new HTML (all cards use .item-card now) */
.hub-card:hover {
    transform: none;
    box-shadow: none;
}

/* Disable terminal hover */
.hero-terminal:hover {
    transform: perspective(1200px) rotateY(-2deg) rotateX(1deg) !important;
}

/* Disable trust/logo item hover */
.trust-item:hover,
.logo-item:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.trust-item:hover .trust-text {
    color: #444 !important;
}

.logo-item:hover svg {
    opacity: 0.7 !important;
}

/* Disable hub icon hover */
.hub-card:hover .hub-icon {
    transform: none !important;
}

/* Disable path card progress bar */
/* .path-card:hover::after - REMOVED */

/* Disable path skills animation - REMOVED to allow animations */
/* .path-card:hover .path-skills li - REMOVED */

/* Keep button hover effects (only for buttons) */
/* Newsletter and search buttons can still have hover */
/* Tablet Responsive - Hero Stats Horizontal */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-stats {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 28px;
        flex-wrap: wrap;
        max-width: 100%;
        overflow: visible;
    }

    .hero-stat {
        align-items: center;
        flex-shrink: 1;
        min-width: 90px;
        flex: 0 1 auto;
    }

    .hero-stat-number {
        font-size: 34px;
    }

    .hero-stat-label {
        font-size: 12px;
        white-space: nowrap;
    }

    .hero-container {
        padding: 0 24px;
    }

    .container {
        padding: 0 24px;
    }
}

/* ========================================
   ADDITIONAL OVERFLOW FIXES
   ======================================== */

/* Ensure all images are responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent any element from causing horizontal overflow */
* {
    box-sizing: border-box;
}

/* Ensure all grid containers don't overflow */
.items-grid,
.learning-paths-grid,
.hub-grid,
.why-grid {
    width: 100%;
    max-width: 100%;
}

/* Fix newsletter box on small screens */
@media (max-width: 768px) {
    .newsletter-box {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
}

/* Ensure terminal doesn't cause overflow on tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-terminal {
        max-width: 100%;
    }

    .terminal-window {
        max-width: 100%;
    }
}

/* Small Mobile - Extra Compact Stats */
@media (max-width: 480px) {
    .hero-stats {
        gap: 16px;
        padding: 0 10px;
    }

    .hero-stat {
        min-width: 70px;
    }

    .hero-stat-number {
        font-size: 28px;
    }

    .hero-stat-label {
        font-size: 11px;
    }
}

/* ========================================
   DARK MODE OVERRIDES (homepage-specific)
   ======================================== */
[data-theme="dark"] .hero-section {
    background: var(--bg);
}

[data-theme="dark"] .hero-section {
    animation: none;
    background: var(--bg);
}

[data-theme="dark"] .hero-heading {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--text-primary);
    background-clip: unset;
    color: var(--text-primary);
}

[data-theme="dark"] .section-title {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--text-primary);
    background-clip: unset;
    animation: none;
    color: var(--text-primary);
}

[data-theme="dark"] .newsletter-box {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="dark"] .newsletter-box::before {
    opacity: 0.15;
}

[data-theme="dark"] .trust-item {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="dark"] .path-card,
[data-theme="dark"] .hub-card,
[data-theme="dark"] .why-card {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="dark"] .trust-logos-section,
[data-theme="dark"] .newsletter-section {
    background: var(--bg-surface);
}

[data-theme="dark"] .newsletter-input-wrapper {
    background: var(--bg-surface);
    border-color: var(--border);
}

[data-theme="dark"] .section-wrapper {
    border-color: var(--border);
}

/* ============================================================
   TOOLS PROMO BANNER — FULLY RESPONSIVE
   ============================================================ */

.tools-promo-banner {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 50%, #16213e 100%);
    padding: 56px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    overflow: hidden;
    margin-bottom: 36px;
    border-radius: 4px;
}

/* Glow accent */
.tools-promo-glow {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(123, 119, 235, 0.28) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ---- Left column ---- */
.tools-promo-content {
    flex: 1;
    min-width: 0;
    /* ← allows shrinking below min-content */
    position: relative;
    z-index: 1;
}

.tools-promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(123, 119, 235, 0.15);
    border: 1px solid rgba(123, 119, 235, 0.35);
    color: #a5a2f7;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-radius: 3px;
}

.tools-promo-title {
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 14px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.tools-promo-title span {
    color: #7B77EB;
}

.tools-promo-description {
    font-size: 0.97rem;
    color: #a0a0b0;
    line-height: 1.7;
    margin: 0 0 24px;
    max-width: 440px;
}

.tools-promo-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.tools-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ccccdd;
    padding: 5px 13px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
}

.tools-promo-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #7B77EB 0%, #5B5FEF 100%);
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    border-radius: 4px;
    box-shadow: 0 6px 24px rgba(123, 119, 235, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tools-promo-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(123, 119, 235, 0.55);
    color: #ffffff;
}

/* ---- Right column: Stats grid ---- */
.tools-promo-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    width: 280px;
    /* fixed width on desktop */
}

.tools-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    padding: 18px 16px;
    text-align: center;
    border-radius: 4px;
}

.tools-stat-value {
    font-size: 1rem;
    font-weight: 800;
    color: #7B77EB;
    line-height: 1.3;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.tools-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #8888aa;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.4;
}

/* ============================================================
   RESPONSIVE — TABLET  (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .tools-promo-banner {
        padding: 44px 36px;
        gap: 32px;
    }

    .tools-promo-stats {
        width: 240px;
    }
}

/* ============================================================
   RESPONSIVE — TABLET PORTRAIT / LARGE MOBILE  (≤ 768px)
   Stack into single column
   ============================================================ */
@media (max-width: 768px) {
    .tools-promo-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 36px 28px;
        gap: 28px;
    }

    .tools-promo-content {
        min-width: unset;
    }

    .tools-promo-title {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
    }

    .tools-promo-description {
        max-width: 100%;
        font-size: 0.93rem;
    }

    /* Stats go full width, 4 equal columns */
    .tools-promo-stats {
        width: 100%;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .tools-stat-card {
        padding: 14px 10px;
    }

    .tools-stat-value {
        font-size: 0.85rem;
    }

    .tools-stat-label {
        font-size: 10px;
    }

    /* Pill list scrolls horizontally if needed */
    .tools-promo-pills {
        gap: 6px;
    }

    .tools-pill {
        font-size: 11px;
        padding: 4px 10px;
    }

    .tools-promo-cta {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE  (≤ 480px)
   Stats go 2-column again (4 cols too tight)
   ============================================================ */
@media (max-width: 480px) {
    .tools-promo-banner {
        padding: 28px 20px;
        gap: 24px;
    }

    .tools-promo-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .tools-stat-card {
        padding: 14px 12px;
    }

    .tools-stat-value {
        font-size: 0.9rem;
    }

    .tools-stat-label {
        font-size: 10px;
    }

    .tools-promo-badge {
        font-size: 11px;
        padding: 4px 12px;
    }

    .tools-promo-pills {
        gap: 6px;
        margin-bottom: 20px;
    }
}

/* ============================================================
   HERO SECTION — RESPONSIVE BREAKPOINTS (canonical, end-of-file)
   These override earlier base styles. Desktop untouched.
   ============================================================ */

/* ---- LARGE TABLET (≤ 1024px) — 2-col kept, reduce gaps & font sizes ---- */
@media (max-width: 1024px) {
    /* .hero-section padding intentionally omitted here:
       Desktop base (100px 0 80px) applies for >1024px.
       Tablet-only (769–1024px) block below sets 110px 0 80px.
       Mobile block below sets 80px 0 56px.
       No value here would ever win — removed as dead code (Task 4). */

    .hero-container {
        gap: 40px;
        padding: 0 24px;
    }

    .hero-heading {
        font-size: clamp(1.9rem, 4.5vw, 44px);
    }

    .hero-description {
        font-size: 17px;
    }

    .hero-stat-number {
        font-size: clamp(26px, 4vw, 40px);
    }

    .hero-stats {
        gap: 32px;
    }
}

/* ---- TABLET-ONLY (769px – 1024px) — precision tablet layout ----
   Buttons go horizontal (row), heading pinned at 34px.            */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section {
        padding: 110px 0 80px;
        /* Phase 1 — tablet breathing space */
    }

    .hero-heading {
        font-size: 34px;
        letter-spacing: -0.03em;
        line-height: 1.08;
    }

    /* Buttons: row, left-aligned on tablet (2-col layout) */
    .hero-buttons {
        flex-direction: row;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 16px;
    }

    .hero-buttons .btn-parallelogram {
        width: auto;
        min-width: 160px;
    }
}

/* ---- MOBILE (≤ 768px) — single column, stacked buttons, centered ---- */
@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0 56px;
        /* Phase 1 — proper mobile breathing space */
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0 20px;
        text-align: center;
    }

    .hero-content {
        align-items: center;
        width: 100%;
    }

    .hero-content>*+* {
        margin-top: 18px;
    }

    .hero-heading {
        font-size: clamp(1.3rem, 5.5vw, 26px);
        line-height: 1.14;
        margin: 0;
        max-width: 100%;
        letter-spacing: -0.015em;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .hero-description {
        font-size: 15.5px;
        line-height: 1.65;
        margin: 0;
        max-width: 100%;
        text-align: center;
        word-break: break-word;
        overflow-wrap: break-word;
        padding: 0 8px;
        /* Phase 2 — slight breathing on sides */
        opacity: 0.88;
    }

    /* Buttons: stacked full-width, max 320px, centered */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 12px;
        margin-top: 24px;
        /* Phase 1 — more space before buttons */
    }

    .hero-buttons .btn-parallelogram {
        width: 100%;
        max-width: 300px;
        text-align: center;
        justify-content: center;
        height: auto;
        min-height: 50px;
        padding: 14px 28px;
        font-weight: 600;
        letter-spacing: 0.3px;
        box-sizing: border-box;
    }

    /* Stats: balanced row, wraps on very small screens */
    .hero-stats {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 32px;
        /* Phase 4 — more breathing above stats */
        padding-top: 24px;
        width: 100%;
        max-width: 100%;
        overflow: visible;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        /* Phase 4 — light mode separator */
    }

    .hero-stat {
        align-items: center;
        text-align: center;
        flex: 1;
        min-width: 68px;
    }

    .hero-stat-number {
        font-size: clamp(22px, 6vw, 30px);
        margin-bottom: 4px;
        letter-spacing: -0.04em;
    }

    .hero-stat-label {
        font-size: 11px;
        white-space: nowrap;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    /* Hide terminal — content-first on mobile */
    .hero-terminal {
        display: none;
    }
}

/* ---- SMALL MOBILE (≤ 480px) — tightest layout ---- */
@media (max-width: 480px) {
    .hero-section {
        padding: 64px 0 44px;
        /* Phase 1 — still generous on small phones */
    }

    .hero-container {
        padding: 0 16px;
    }

    .hero-heading {
        font-size: clamp(1.15rem, 6.5vw, 22px);
        line-height: 1.18;
    }

    .hero-description {
        font-size: 14.5px;
        line-height: 1.6;
        padding: 0 4px;
    }

    .hero-buttons {
        margin-top: 22px;
        gap: 10px;
    }

    .hero-buttons .btn-parallelogram {
        padding: 13px 22px;
        font-size: 14px;
        min-height: 48px;
        max-width: 280px;
    }

    .hero-stats {
        padding-top: 18px;
        margin-top: 24px;
        gap: 8px;
    }

    .hero-stat-number {
        font-size: clamp(20px, 6.5vw, 28px);
        margin-bottom: 3px;
    }

    .hero-stat-label {
        font-size: 10px;
    }
}

/* ---- EXTRA SECTION RESPONSIVE — section-wrapper, learning paths, why grid ---- */
@media (max-width: 1024px) {
    .section-wrapper {
        padding: 60px 0;
    }

    .learning-paths-grid {
        grid-template-columns: 1fr 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .section-wrapper {
        padding: 48px 0;
    }

    .learning-paths-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .why-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .why-grid .why-card {
        padding: 24px;
    }

    .path-card {
        padding: 24px;
    }

    .hub-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .section-header-centered {
        margin-bottom: 32px;
    }

    .section-title {
        font-size: 24px;
    }

    .section-description {
        font-size: 15px;
    }

    .section-footer-centered {
        margin-top: 32px;
    }

    .newsletter-box {
        padding: 36px 24px;
    }

    .newsletter-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .newsletter-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .section-wrapper {
        padding: 36px 0;
    }

    .core-value-card {
        padding: 20px;
    }

    .why-grid .why-card {
        padding: 20px;
    }

    .newsletter-box {
        padding: 28px 16px;
    }
}

/* ---- Hero button height override on mobile (prevents flat-design.css h:40px from clipping) ---- */
@media (max-width: 768px) {
    .hero-buttons .btn-parallelogram {
        height: auto;
        min-height: 48px;
        padding: 13px 24px;
        box-sizing: border-box;
    }
}