* {
    font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

section {
    scroll-margin-top: 70px;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary: #e7501e;
    --button: #536876;
    --background: #fbfdfd;
    --text-dark: #2b2f38;
    --text-light: #555555;
}

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

.d-flex {
    display: flex;
}

.justify-center {
    justify-content: center;
}

.profile-row-center {
    display: block !important;
    text-align: center;
}

.profiles-section#problem .profile-row-center {
    margin: 0 auto 3rem;
    max-width: 1100px;
    padding: 0 2rem;
}

.profiles-section#problem .profile-row-center h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-dark);
    text-transform: uppercase;
}

.flashcards-section .profile-row-center {
    margin: 0 auto 3rem;
    max-width: 1100px;
    padding: 0 2rem;
}

.flashcards-section .profile-row-center h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-dark);
    text-transform: uppercase;
}

.video-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.video-frame {
    width: min(600px, 85vw);
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    box-shadow:
        0 4px 20px rgba(43, 47, 56, 0.15),
        inset 0 0 0 3px rgba(83, 104, 118, 0.2);
    background: #1a1a2e;
    transition: none;
}

body {
    background-color: var(--background);
    min-height: 100vh;
}

header {
    height: 70px;
    width: 100%;
    position: fixed;
    top: 0;
    right: 0;
    background-color: #ffffff;
    border-bottom: 1px solid var(--primary);
    z-index: 100;
    transition:
        box-shadow 0.3s ease,
        backdrop-filter 0.3s ease;
}

header .header-inner {
    max-width: 1380px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    font-size: 1.2rem;
    font-weight: 600;
}

header .language-select {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.language-select-desktop {
    display: none;
    position: relative;
    align-items: center;
}

.language-select-desktop .lang-selected {
    text-decoration: none;
    color: var(--text-dark);
    cursor: pointer;
}

.language-select-desktop .lang-select {
    position: absolute;
    top: 100%;
    left: 8px;
    z-index: 100;
    background: white;
    min-width: 120px;
    margin-top: 4px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    outline: none;
    display: none;
}

.language-select-desktop .lang-select.open {
    display: block;
}

.language-select-desktop .lang-option {
    display: block;
    padding: 8px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.2s ease;
}

.language-select-desktop .lang-option:hover {
    background-color: rgba(231, 80, 30, 0.08);
}

.language-select-desktop .lang-option.active {
    background-color: var(--primary);
    color: white;
}

.language-select-desktop .lang-chevron {
    display: none;
    font-size: 0.8rem;
    pointer-events: none;
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateX(6px) translateY(-50%);
}

.lang-link {
    font-size: 1rem;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.lang-link:hover {
    opacity: 1;
}

.lang-link.active {
    opacity: 1;
    font-weight: 700;
}

.lang-link:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

header img {
    height: 100%;
    object-fit: contain;
}

header.scrolled {
    box-shadow: 0 4px 20px rgba(20, 23, 33, 0.1);
    backdrop-filter: blur(10px);
    background-color: rgba(240, 240, 240, 0.95);
}

.burger-menu {
    display: none !important;
}

.menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 13px 20px;
    color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0);
    text-decoration: none;
    transition: all 0.4s ease;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 400;
    box-sizing: border-box;
}

.menu a:hover {
    color: var(--primary);
}

.menu a.active {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--primary);
}

.flag-senyera {
    width: 1.1em;
    height: 0.85em;
    background: #ffcc00;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.flag-senyera::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        #cc0000 0,
        #cc0000 20%,
        transparent 20%,
        transparent 25%
    );
}

main {
    margin-top: 8vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.front-page {
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    text-align: center;
    max-width: 1480px;
    margin: 0 auto;
    padding: 7rem 7rem 5rem;
    animation: fadeIn 0.6s ease-in;
    position: relative;
}

.hero-copy {
    flex: 0 1 760px;
    max-width: 760px;
}

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

.front-page h1 {
    font-size: clamp(3.2rem, 5.2vw, 5.4rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #7b8390 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    line-height: 1.02;
    will-change: transform;
    padding-bottom: 0.2rem;
    max-width: none;
}

.front-page .subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    font-weight: 400;
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    text-decoration: none;
    background-color: var(--button);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(83, 104, 118, 0.25);
    letter-spacing: 0.3px;
    display: inline-block;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-button:hover {
    background-color: #465965;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(83, 104, 118, 0.35);
}

.cta-button:active {
    transform: translateY(-1px);
}

.cta-button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.profiles-section {
    padding: 0 7rem 6rem 7rem;
    border-bottom: 2px solid var(--primary);
}

.profiles-section#teachers {
    padding-top: 6rem;
}

.profile-row {
    max-width: 1200px;
    margin: 0 auto 4rem auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 0 2rem;
}

.profiles-section .profile-row.profile-row-text-only {
    grid-template-columns: 1fr;
    max-width: 900px;
}

.problem-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.problem-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.problem-cards-grid .flip-card {
    min-height: 210px;
    padding: 1rem;
}

.problem-visual {
    display: flex;
    justify-content: center;
}

.problem-visual .profile-image {
    width: min(560px, 100%);
    max-width: 100%;
    margin: 0 auto;
}

.profile-row-reverse {
    direction: rtl;
}

.profile-row-reverse > * {
    direction: ltr;
}

.profile-image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #e8eaef 0%, #d8dce6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #999;
    font-weight: 600;
    border: 2px dashed #b0b8c4;
    position: relative;
}

.profile-image-placeholder::after {
    content: attr(data-label);
    position: absolute;
}

.profile-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 12px;
    --tilt: 0deg;
    --zoom: 1;
    transform: rotate(var(--tilt)) scale(var(--zoom));
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    cursor: pointer;
}

.profile-image:hover {
    --zoom: 1.05;
}

.student-fan-gallery {
    position: relative;
    display: block;
    min-height: 420px;
}

.student-gallery-caption,
.student-fan-caption {
    margin: 0 auto;
    min-height: 1.6em;
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    /*border-radius: 999px;*/
    border: 1px solid rgba(231, 80, 30, 0.16);
    background: linear-gradient(
        135deg,
        rgba(231, 80, 30, 0.12),
        rgba(83, 104, 118, 0.1)
    );
    box-shadow: 0 10px 24px rgba(43, 47, 56, 0.08);
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.student-fan-item {
    --offset-x: 0px;
    --offset-y: 0px;
    --layer: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(280px, 24vw);
    transform: translate(
        calc(-50% + var(--offset-x)),
        calc(-50% + var(--offset-y))
    );
    z-index: var(--layer);
}

.student-fan-item .profile-image {
    display: block;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.student-fan-item:hover {
    z-index: 10;
}

.student-fan-item:focus {
    outline: none;
    z-index: 10;
}

.student-fan-gallery .student-fan-item:nth-child(1) {
    --offset-x: -330px;
    --offset-y: 28px;
    --layer: 1;
}

.student-fan-gallery .student-fan-item:nth-child(1) .profile-image {
    --tilt: -28deg;
}

.student-fan-gallery .student-fan-item:nth-child(2) {
    --offset-x: -170px;
    --offset-y: 10px;
    --layer: 2;
}

.student-fan-gallery .student-fan-item:nth-child(2) .profile-image {
    --tilt: -14deg;
}

.student-fan-gallery .student-fan-item:nth-child(3) {
    --offset-x: 0px;
    --offset-y: 0px;
    --layer: 3;
}

.student-fan-gallery .student-fan-item:nth-child(3) .profile-image {
    --tilt: 0deg;
}

.student-fan-gallery .student-fan-item:nth-child(4) {
    --offset-x: 170px;
    --offset-y: 10px;
    --layer: 2;
}

.student-fan-gallery .student-fan-item:nth-child(4) .profile-image {
    --tilt: 14deg;
}

.student-fan-gallery .student-fan-item:nth-child(5) {
    --offset-x: 330px;
    --offset-y: 28px;
    --layer: 1;
}

.student-fan-gallery .student-fan-item:nth-child(5) .profile-image {
    --tilt: 28deg;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(17, 20, 26, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
    z-index: 1000;
    padding: 2rem;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    max-width: min(900px, 90vw);
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
}

.lightbox-image.is-portrait {
    max-width: min(420px, 90vw);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #1b1f26;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.lightbox-close:hover {
    background: white;
}

.profiles-section .profile-content,
.flashcards-section .profile-content {
    position: relative;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(
                160deg,
                rgba(255, 248, 242, 0.95),
                rgba(241, 250, 255, 0.94) 55%,
                rgba(245, 246, 255, 0.95)
            )
            padding-box,
        linear-gradient(
                135deg,
                rgba(231, 80, 30, 0.75),
                rgba(255, 159, 67, 0.72),
                rgba(31, 126, 171, 0.7),
                rgba(83, 104, 118, 0.72)
            )
            border-box;
    box-shadow:
        0 18px 38px rgba(83, 104, 118, 0.2),
        0 10px 26px rgba(231, 80, 30, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.75) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    overflow: visible;
}

.profiles-section .profile-content:hover,
.flashcards-section .profile-content:hover {
    box-shadow:
        0 24px 48px rgba(83, 104, 118, 0.24),
        0 14px 30px rgba(231, 80, 30, 0.24),
        0 0 0 1px rgba(255, 255, 255, 0.78) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.profiles-section .profile-content::before,
.flashcards-section .profile-content::before {
    content: '';
    position: absolute;
    inset: -16px;
    border-radius: 24px;
    background:
        radial-gradient(
            circle at 18% 20%,
            rgba(231, 80, 30, 0.34),
            transparent 58%
        ),
        radial-gradient(
            circle at 82% 75%,
            rgba(31, 126, 171, 0.3),
            transparent 54%
        ),
        radial-gradient(
            circle at 50% 100%,
            rgba(255, 159, 67, 0.22),
            transparent 60%
        );
    filter: blur(20px);
    z-index: -1;
    pointer-events: none;
}

h3.video-title,
.profile-content h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--button));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-content .profile-tagline {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.profile-content .profile-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

.profile-gallery {
    max-width: 1200px;
    margin: 3rem auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
    width: 100%;
}

.profile-gallery .profile-image-placeholder {
    width: 100%;
    aspect-ratio: 1;
}

.student-gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.ai-section {
    padding: 6rem 7rem;
    background: white;
    border-top: 4px solid var(--primary);
    margin: 0;
}

.flashcards-section {
    border-top: 4px solid var(--primary);
    overflow-x: hidden;
}

.ai-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.flashcards-section .ai-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    min-width: 0;
    overflow-x: visible;
}

.flashcards-section .ai-content {
    width: 100%;
    min-width: 0;
    overflow-x: visible;
}

.ai-image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background:
        linear-gradient(
            135deg,
            rgba(255, 248, 242, 0.96),
            rgba(249, 250, 251, 0.98)
        ),
        linear-gradient(135deg, #e8eaef 0%, #d8dce6 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 700;
    text-align: center;
    padding: 2rem;
    border: 1px solid rgba(231, 80, 30, 0.16);
    box-shadow: 0 14px 34px rgba(20, 23, 33, 0.1);
    position: relative;
}

.ai-image-placeholder::after {
    content: attr(data-label);
    position: absolute;
    max-width: 18ch;
    line-height: 1.4;
}

.ai-content h2 {
    font-size: clamp(2rem, 3.4vw, 3.1rem);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    max-width: 14ch;
}

.ai-description {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin: 0;
    max-width: 56ch;
}

.ai-lead {
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--text-light);
    margin: 0;
    max-width: 58ch;
}

.ai-flip-grid {
    margin-top: 1.6rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.8rem;
    width: 100%;
    overflow-x: visible;
}

.ai-flip-grid .flip-card {
    min-height: 0;
    padding: 1rem;
}

.study-card {
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(0, 0.9fr);
    grid-template-areas: 'media content';
    align-items: center;
    gap: 1rem;
    max-width: 100%;
    width: 100%;
}

.study-card:nth-child(even) {
    grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
    grid-template-areas: 'content media';
}

.study-card > * {
    min-width: 0;
}

.study-card-image {
    grid-area: media;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
    border: none;
    box-shadow: none;
    cursor: pointer;
    transform: scale(1);
    transform-origin: center center;
    transition:
        transform 0.25s ease,
        filter 0.25s ease;
    will-change: transform;
}

.flashcards-section .study-card-image {
    margin-block: 0.7rem;
}

.study-card-image:hover {
    transform: scale(1.05);
    filter: saturate(1.03) contrast(1.02);
}

.study-card .profile-content {
    grid-area: content;
    align-self: center;
    overflow: visible;
}

.flashcards-section .study-card .profile-content::before {
    inset: 0;
    filter: blur(12px);
    opacity: 0.55;
}

.flashcards-section .profile-content h2 {
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
    display: block;
    width: 100%;
    max-width: none;
}

.flashcards-section .profile-content .profile-description {
    font-size: 0.95rem;
    line-height: 1.55;
}

.panels-section {
    padding: 6rem 7rem;
    background: white;
    border-top: 4px solid var(--primary);
    overflow-x: hidden;
}

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

.panels-section .profile-row-center {
    margin: 0 auto 3rem;
    max-width: 1100px;
    padding: 0 2rem;
}

.panels-section .profile-row-center h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-dark);
    text-transform: uppercase;
}

.panels-subtitle {
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--text-light);
    text-align: center;
    max-width: 62ch;
    margin: 0 auto 2.5rem;
}

.panels-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.2rem;
}

.panel-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(0, 0.9fr);
    grid-template-areas: 'media content';
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.panel-row.panel-row-reverse {
    grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
    grid-template-areas: 'content media';
}

.panel-row > * {
    min-width: 0;
}

.panel-card-image {
    grid-area: media;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
    border: none;
    box-shadow: none;
    cursor: pointer;
    transform: scale(1);
    transform-origin: center center;
    transition:
        transform 0.25s ease,
        filter 0.25s ease;
    margin-block: 0.7rem;
}

.panel-card-image:hover {
    transform: scale(1.05);
    filter: saturate(1.03) contrast(1.02);
}

.panel-flip-card {
    grid-area: content;
    width: 100%;
    min-height: 0;
    padding: 1rem;
    position: relative;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(
                160deg,
                rgba(255, 248, 242, 0.95),
                rgba(241, 250, 255, 0.94) 55%,
                rgba(245, 246, 255, 0.95)
            )
            padding-box,
        linear-gradient(
                135deg,
                rgba(231, 80, 30, 0.75),
                rgba(255, 159, 67, 0.72),
                rgba(31, 126, 171, 0.7),
                rgba(83, 104, 118, 0.72)
            )
            border-box;
    box-shadow:
        0 18px 38px rgba(83, 104, 118, 0.2),
        0 10px 26px rgba(231, 80, 30, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.75) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    overflow: visible;
}

.panel-flip-card:hover {
    box-shadow:
        0 24px 48px rgba(83, 104, 118, 0.24),
        0 14px 30px rgba(231, 80, 30, 0.24),
        0 0 0 1px rgba(255, 255, 255, 0.78) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.panel-flip-card .flip-card-front,
.panel-flip-card .flip-card-back {
    border-radius: 18px;
    overflow: hidden;
}

.panel-flip-front {
    padding: 1.6rem 1.6rem 4rem;
    background: transparent;
}

.panel-flip-front h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    display: block;
    width: 100%;
    max-width: none;
    background: linear-gradient(135deg, var(--primary), var(--button));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.panel-flip-front p {
    font-size: 0.98rem;
    line-height: 1.65;
    color: #6f7785;
    margin: 0;
}

.panel-flip-back {
    padding: 1.6rem;
}

.panel-flip-back h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.panel-flip-back p {
    font-size: 1rem;
    line-height: 1.7;
}

.panel-flip-card .flip-hint {
    right: 1rem;
    bottom: 1rem;
}

.specs-section {
    padding: 6rem 7rem;
}

.video-section {
    padding: 4rem 7rem;
    background: white;
    border-top: 4px solid var(--primary);
}

.d-flex {
    display: flex;
}

.justify-center {
    justify-content: center;
}

.universal-section {
    padding: 6rem 7rem;
    background: white;
    border-top: 4px solid var(--primary);
}

.universal-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.universal-section h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.universal-subtitle {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.universal-section p {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.7;
}

.specs-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.specs-section h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.specs-subtitle {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 3rem;
}

.specs-slider {
    position: relative;
    max-width: 1024px;
    margin: 0 auto;
    padding: 2rem 200px;
    overflow: hidden;
    margin-bottom: 3rem;
}

.specs-slider .slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.specs-slider .slider-track {
    display: flex;
    width: 100%;
    justify-content: center;
}

.specs-slider .slide {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e8eaef;
    box-shadow: 0 8px 24px rgba(20, 23, 33, 0.12);
    transform: scale(0.85);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 1;
    min-height: 220px;
    text-align: left;
}

.specs-slider .slide.active {
    transform: scale(1);
    opacity: 1;
    z-index: 10;
    pointer-events: auto;
    position: relative;
}

.specs-slider .slide.prev {
    transform: translateX(-100%) scale(0.9);
    opacity: 0.5;
    z-index: 5;
}

.specs-slider .slide.next {
    transform: translateX(100%) scale(0.9);
    opacity: 0.5;
    z-index: 5;
}

.specs-slider .slide h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
    padding-top: 1rem;
}

.specs-slider .slide p {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
}

.specs-slider .slide p:last-child {
    margin-bottom: 0;
}

.specs-slider .sprev,
.specs-slider .snext {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 1.25rem;
    font-weight: 700;
    z-index: 20;
}

.specs-slider .sprev {
    left: 0;
}

.specs-slider .snext {
    right: 0;
}

.specs-slider .sprev:hover,
.specs-slider .snext:hover {
    background: var(--primary);
    color: white;
}

.specs-slider .sdots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.specs-slider .sdot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d8dce6;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.specs-slider .sdot:hover {
    background: var(--button);
}

.specs-slider .sdot.active {
    background: var(--primary);
    transform: scale(1.2);
}

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

.spec-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e8eaef;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 14px 30px rgba(83, 104, 118, 0.12),
        0 6px 18px rgba(231, 80, 30, 0.12);
}

.spec-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.spec-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 18px 34px rgba(83, 104, 118, 0.18),
        0 10px 24px rgba(231, 80, 30, 0.2);
    border-color: var(--primary);
}

.spec-card:hover::before {
    transform: scaleX(1);
}

.spec-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.spec-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.technical-section {
    padding: 6rem 7rem;
}

.technical-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.technical-section h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.technical-subtitle {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 3rem;
}

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

.technical-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e8eaef;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.technical-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.technical-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(20, 23, 33, 0.12);
    border-color: var(--primary);
}

.technical-card:hover::before {
    transform: scaleX(1);
}

.technical-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.technical-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.technical-section h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.bloque-section,
.contact-section {
    padding: 4rem 7rem;
    background: white;
    border-top: 4px solid var(--primary);
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.contact-header p {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.85rem 1rem;
    border: 1px solid #d8dce6;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    background-color: #f9fafb;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(231, 80, 30, 0.1);
}

.form-group textarea {
    resize: vertical;
    line-height: 1.5;
}

.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.form-consent input[type='checkbox'] {
    margin-top: 0.2rem;
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.form-consent label {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--text-light);
}

.form-consent a {
    color: var(--primary);
    font-weight: 600;
}

.form-consent a:hover {
    text-decoration: underline;
}

.form-button {
    background-color: var(--button);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(83, 104, 118, 0.25);
    letter-spacing: 0.3px;
    margin-top: 1rem;
}

.form-button:hover {
    background-color: #465965;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(83, 104, 118, 0.35);
}

.form-button:active {
    transform: translateY(-1px);
}

.form-button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.lms-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 1.25rem;
}

.lms-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
    margin: 3rem 0;
}

.lms-logos a {
    display: inline-block;
    line-height: 0;
}

.lms-logos img {
    height: 40px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition:
        filter 0.3s ease,
        opacity 0.3s ease;
}

.lms-logos a:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.lms-cta {
    margin: 1.5rem 0 0;
    font-size: 0.95rem;
    color: var(--text-dark);
    text-align: center;
    font-weight: 500;
}

footer {
    border-top: 4px solid var(--primary);
}

footer .footer-content {
    margin: 0 auto;
    margin: 0 auto;
    padding: 6rem 7rem 3rem 7rem;
}

footer .footer-content .lms-section {
    margin: 0 auto 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

footer .footer-columns {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    padding-top: 1.5rem;
    max-width: 1380px;
    margin: 0 auto;
}

footer .footer-col {
    width: 20%;
    min-width: 150px;
}

footer .footer-col img {
    max-width: 180px;
    height: auto;
    margin-bottom: 1rem;
    display: block;
}

footer .footer-col p {
    font-size: 16px;
    line-height: 28px;
    color: #8a909a;
    margin-bottom: 1rem;
}

footer .footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: #6e7a84;
}

footer .footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer .footer-col li {
    margin-bottom: 0.5rem;
}

footer .footer-col a {
    color: #000000;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

footer .footer-col a:hover {
    color: var(--primary);
}

footer .footer-social {
    display: flex;
    gap: 0.75rem;
}

footer .footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid #000000;
    border-radius: 50%;
    color: #000000;
    font-size: 1rem;
}

footer .footer-social a:hover {
    background: #000000;
    color: #ffffff;
}

footer .footer-bottom {
    max-width: 1380px;
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid #e7e7f3;
}

footer .footer-bottom p {
    line-height: 28px;
    color: #8a909a;
    margin: 0;
}

.site-footer {
    background: #1a1a2e;
    color: #fff;
    padding: 4rem 2rem 2rem;
}

.site-footer .footer-main {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.site-footer .footer-brand {
    flex: 0 0 250px;
}

.site-footer .footer-brand img {
    max-width: 180px;
    height: auto;
    margin-bottom: 1rem;
}

.site-footer .footer-brand p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.site-footer .footer-social {
    display: flex;
    gap: 1rem;
}

.site-footer .footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

.site-footer .footer-social a:hover {
    background: var(--primary);
}

.site-footer .footer-nav {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.site-footer .footer-col {
    min-width: 140px;
}

.site-footer .footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    color: var(--primary);
}

.site-footer .footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .footer-col li {
    margin-bottom: 0.5rem;
}

.site-footer .footer-col a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.site-footer .footer-col a:hover {
    color: var(--primary);
}

.site-footer .footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.site-footer .footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.fan-container {
    position: relative;
    width: 300px;
    height: 400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fan-image {
    position: absolute;
    width: 200px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition:
        transform 0.4s ease,
        z-index 0.4s ease;
    transform-origin: bottom center;
}

.fan-1 {
    transform: rotate(-30deg) translateX(-60px) translateY(20px);
    z-index: 1;
}

.fan-2 {
    transform: rotate(-15deg) translateX(-30px) translateY(10px);
    z-index: 2;
}

.fan-3 {
    transform: rotate(0deg) translateY(0);
    z-index: 3;
}

.fan-4 {
    transform: rotate(15deg) translateX(30px) translateY(10px);
    z-index: 2;
}

.fan-5 {
    transform: rotate(30deg) translateX(60px) translateY(20px);
    z-index: 1;
}

.fan-image:hover {
    transform: rotate(0deg) translateY(-20px) scale(1.1);
    z-index: 10;
}

.flip-card {
    width: 100%;
    min-height: 200px;
    perspective: 1000px;
    display: grid;
    grid-template-areas: 'stack';
    padding: 1.6rem;
}

.flip-card > div {
    width: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s ease;
    display: flex;
    flex-direction: column;
    grid-area: stack;
}

.flip-card-front {
    z-index: 2;
    position: relative;
    padding: 1.6rem 1.6rem 4rem;
}

.flip-hint {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    animation: double-pulse 6s ease-in-out infinite;
    z-index: 10 !important;
    pointer-events: none;
}

.flip-hint svg {
    width: 18px;
    height: 18px;
    display: block;
}

.flip-back-hint {
    position: absolute;
    bottom: 0.4rem;
    left: 0.4rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    animation: double-pulse 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes double-pulse {
    0%,
    80%,
    100% {
        transform: scale(1);
    }
    5% {
        transform: scale(1.08);
    }
    10% {
        transform: scale(1);
    }
    15% {
        transform: scale(1.08);
    }
    20% {
        transform: scale(1);
    }
}

.flip-card-back {
    transform: rotateY(180deg);
    z-index: 1;
    position: relative;
    padding: 1.6rem;
    background: linear-gradient(
        135deg,
        rgba(231, 80, 30, 0.9),
        rgba(83, 104, 118, 0.9)
    );
    border-radius: 18px;
    color: white;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.flip-card-back h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.flip-card-back p {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.flip-card-back ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.flip-card-back ul li {
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.flip-card-back ul li i {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.flip-card.flip-active .flip-card-front {
    transform: rotateY(180deg);
    z-index: 1;
}

.flip-card.flip-active .flip-card-back {
    transform: rotateY(360deg);
    z-index: 2;
    pointer-events: auto;
}

.flip-card.flip-active .flip-card-front {
    pointer-events: none;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.6s,
        visibility 0.6s;
    z-index: 9999 !important;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top {
    opacity: 0;
    visibility: hidden;
}

.back-to-top:hover {
    background: #e7501e;
    color: white;
}

/*MEDIA QUERIES*/

@media (max-width: 1024px) {
    .burger-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        width: 30px;
        height: 30px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
        position: fixed;
        right: 2rem;
        top: 20px;
        display: flex !important;
    }

    header .header-inner {
        position: relative;
        width: 100%;
        padding: 0 2rem;
        box-sizing: border-box;
    }

    .burger-menu span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--primary);
        transition:
            transform 0.3s ease,
            opacity 0.3s ease;
    }

    .burger-menu.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 0;
        background-color: #ffffff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 0.5rem;
        transition:
            max-height 0.95s ease,
            opacity 0.35s ease;
        z-index: 1000;
        padding: 1.5rem 1.5rem 2rem 1.5rem;
        overflow-y: auto;
        box-shadow: 0 6px 20px rgba(20, 23, 33, 0.15);
        opacity: 0;
        pointer-events: none;
    }

    .menu.active {
        max-height: calc(100vh - 70px);
        opacity: 1;
        pointer-events: auto;
    }

    .menu a {
        font-size: 1.1rem;
        width: 100%;
        justify-content: flex-start;
        padding: 0.6rem 1rem;
    }

    .language-select {
        position: fixed;
        top: 24px;
        right: 6rem;
    }
    main {
        width: 100%;
    }

    footer .footer-columns {
        display: none;
    }

    header .header-inner,
    main,
    .front-page,
    section,
    .profiles-section,
    .ai-section,
    .specs-section,
    .technical-section,
    .contact-section,
    .contact-container,
    .specs-container,
    .technical-container {
        max-width: 100%;
        width: 100%;
    }

    .front-page {
        min-height: 100vh;
    }

    .hero-section {
        min-height: calc(100svh - 70px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding-top: 0;
        padding-bottom: 0;
    }

    .hero-section .hero-copy {
        margin: 0 auto;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-visual {
        min-height: 460px;
    }

    .front-page,
    .profiles-section,
    .bloque-section,
    .contact-section,
    .video-section,
    .ai-section,
    .specs-section,
    .technical-section,
    .contact-section {
        padding: 4rem 2rem;
    }

    .profile-gallery,
    .profile-row {
        padding: 0;
        grid-template-columns: 1fr;
    }

    .problem-layout {
        padding: 0;
    }

    .problem-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ai-flip-grid {
        grid-template-columns: 1fr;
    }

    .flashcards-section .ai-flip-grid .study-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            'media'
            'content';
        justify-self: stretch;
        max-width: none;
    }

    .study-card-image {
        min-height: 180px;
        height: auto;
        margin-block: 0;
    }

    .panels-section {
        padding: 4rem 2rem;
    }

    .panels-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .panel-row,
    .panel-row.panel-row-reverse {
        grid-template-columns: 1fr;
        grid-template-areas:
            'media'
            'content';
        gap: 1rem;
    }

    .panel-card-image {
        margin-block: 0;
    }

    .problem-visual .profile-image {
        width: min(70%, 520px);
    }

    .profile-gallery .profile-content .profile-row .profile-content {
        width: 100%;
        text-align: center;
    }

    .profile-gallery img.profile-image,
    .profile-row img.profile-image {
        max-width: 70%;
        margin: 0 auto;
    }

    .lightbox-image.is-portrait {
        max-width: min(80%, 90vw);
    }

    .profile-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .student-fan-gallery {
        min-height: 320px;
    }

    .student-fan-caption {
        margin-top: 1.25rem;
        font-size: 0.95rem;
        padding: 0.5rem 0.9rem;
    }

    .student-fan-item {
        width: min(220px, 36vw);
    }

    .student-fan-gallery .student-fan-item:nth-child(1) {
        --offset-x: -195px;
        --offset-y: 20px;
    }

    .student-fan-gallery .student-fan-item:nth-child(2) {
        --offset-x: -102px;
        --offset-y: 8px;
    }

    .student-fan-gallery .student-fan-item:nth-child(4) {
        --offset-x: 102px;
        --offset-y: 8px;
    }

    .student-fan-gallery .student-fan-item:nth-child(5) {
        --offset-x: 195px;
        --offset-y: 20px;
    }

    footer {
        padding: 2rem;
    }

    footer .footer-content {
        padding: 0;
    }
}

@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: none;
    }

    main {
        width: 100%;
    }

    .specs-section,
    .technical-section,
    .contact-section {
        padding: 4rem 2rem;
    }

    .profile-row-reverse {
        direction: ltr;
    }

    .profile-content h2 {
        font-size: 1.5rem;
    }

    .profile-content .profile-tagline {
        font-size: 1.1rem;
    }

    .profile-content .profile-description {
        font-size: 0.95rem;
    }

    .universal-section h2 {
        font-size: 1.8rem;
    }

    .front-page h1 {
        font-size: 3rem;
    }

    .front-page .subtitle {
        font-size: 1.1rem;
    }

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

    .front-page {
        padding: 2rem 1.5rem;
    }

    .front-page {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
    }

    .hero-copy,
    .hero-visual {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .hero-copy {
        max-width: 720px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .cta-buttons {
        justify-content: center;
    }

    .hero-visual {
        min-height: 380px;
        padding-top: 0;
    }

    .flashcard-stack {
        width: min(100%, 360px);
        height: 390px;
    }

    .flashcard-card {
        width: min(320px, 100%);
        min-height: 185px;
        padding: 1.25rem;
    }

    .hero-footer-chip {
        white-space: normal;
        text-align: center;
    }

    footer .footer-bottom {
        max-width: 768px;
        margin: 0;
        padding: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    footer .lms-section .lms-logos {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        flex-wrap: wrap;
        margin: 1.5rem 0;
    }

    footer .lms-section .lms-logos img {
        max-height: 40px;
        width: auto;
    }

    footer h4 {
        font-size: 0.85rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 1rem;
        color: var(--primary);
    }

    footer ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    footer li {
        margin-bottom: 0.5rem;
    }

    footer a {
        color: rgba(255, 255, 255, 0.7);
        text-decoration: none;
        font-size: 0.9rem;
        transition: color 0.3s ease;
    }

    footer a:hover {
        color: var(--primary);
    }

    footer .footer-social {
        display: flex;
        gap: 1rem;
        margin-top: 1rem;
    }

    footer .footer-social a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        color: #fff;
        font-size: 1rem;
    }

    footer .footer-social a:hover {
        background: var(--primary);
        color: #fff;
    }

    .site-footer {
        padding: 2rem 1rem;
    }

    .site-footer .footer-brand {
        flex: 1 1 100%;
        text-align: center;
    }

    .site-footer .footer-social {
        justify-content: center;
    }

    .site-footer .footer-nav {
        justify-content: center;
    }

    .site-footer .footer-col {
        flex: 1 1 45%;
        text-align: center;
    }

    .contact-section {
        margin: 0;
    }

    .contact-header h2 {
        font-size: 1.6rem;
    }

    .contact-header p {
        font-size: 0.95rem;
    }

    .contact-form {
        gap: 1.25rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px;
    }

    .specs-section {
        padding: 3rem 1rem;
    }

    .specs-section h2 {
        font-size: 1.8rem;
    }

    .specs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .spec-card {
        padding: 1.5rem;
    }

    .spec-card h3 {
        font-size: 1.1rem;
    }

    .spec-card p {
        font-size: 0.9rem;
    }

    .technical-section {
        padding: 3rem 1rem;
    }

    .technical-section h2 {
        font-size: 1.8rem;
    }

    .technical-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .technical-card {
        padding: 1.5rem;
    }

    .technical-card h3 {
        font-size: 1.1rem;
    }

    .technical-card p {
        font-size: 0.9rem;
    }

    .ai-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .flashcards-section .ai-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ai-content h2 {
        font-size: 1.6rem;
    }

    .ai-description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .burger-menu {
        top: 10px;
    }
    .ai-container {
        gap: 1.5rem;
    }

    .flashcards-section .ai-container {
        gap: 1.5rem;
    }

    .ai-content h2 {
        font-size: 1.3rem;
    }

    .ai-description {
        font-size: 0.9rem;
    }

    .contact-header h2 {
        font-size: 1.3rem;
    }

    .contact-header p {
        font-size: 0.9rem;
    }

    .contact-form {
        gap: 1rem;
    }

    .form-button {
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
    }

    .contact-section {
        padding: 2rem 1rem;
    }

    .specs-section {
        padding: 2rem 1rem;
    }

    .specs-section h2 {
        font-size: 1.5rem;
    }

    .specs-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .specs-card {
        padding: 1.25rem;
    }

    .spec-card h3 {
        font-size: 1rem;
    }

    .spec-card p {
        font-size: 0.85rem;
    }

    .technical-section {
        padding: 2rem 1rem;
    }

    .technical-section h2 {
        font-size: 1.5rem;
    }

    .technical-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .technical-card {
        padding: 1.25rem;
    }

    .technical-card h3 {
        font-size: 1rem;
    }

    .technical-card p {
        font-size: 0.85rem;
    }

    .ai-section {
        padding: 2rem 1rem;
    }

    .lightbox {
        padding: 1rem;
    }

    .lightbox-close {
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .front-page h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .front-page .subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 300px;
    }

    .front-page {
        padding: 2rem 1.5rem;
    }

    main {
        margin-top: 7vh;
    }

    .lang-link {
        font-size: 1rem;
    }

    .menu {
        gap: 0.3rem;
        padding: 1rem 1rem 1.5rem 1rem;
        top: 7vh;
        left: 0;
        right: 0;
        max-height: 0;
        transition:
            max-height 0.95s ease,
            opacity 0.35s ease;
        opacity: 0;
        pointer-events: none;
    }

    .menu.active {
        max-height: calc(100vh - 7vh);
        opacity: 1;
        pointer-events: auto;
    }

    .menu a {
        font-size: 0.95rem;
        padding: 0.5rem 0.8rem;
    }

    header {
        padding: 0;
        font-size: 0.9rem;
        height: 7vh;
    }

    header .header-inner {
        padding: 0;
    }

    .language-select {
        gap: 0.4rem;
        top: 14px;
    }

    .front-page h1 {
        font-size: 4rem;
        margin-bottom: 1rem;
    }

    .front-page .subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 300px;
    }

    .front-page {
        padding: 1.5rem 1rem;
    }

    .hero-section {
        min-height: calc(100svh - 7vh);
    }

    .hero-section .hero-copy {
        justify-content: center;
    }

    .ai-section {
        margin: 0;
    }

    .profile-content h2 {
        font-size: 1.3rem;
    }

    .profile-content .profile-tagline {
        font-size: 1rem;
    }

    .profile-content .profile-description {
        font-size: 0.9rem;
    }

    .student-fan-gallery {
        min-height: 250px;
        margin-top: 2rem;
    }

    .student-fan-caption {
        margin-top: 1rem;
        font-size: 0.9rem;
        padding: 0.45rem 0.8rem;
    }

    .student-fan-item {
        width: min(170px, 42vw);
    }

    .student-fan-gallery .student-fan-item:nth-child(1) {
        --offset-x: -80px;
        --offset-y: 12px;
    }

    .student-fan-gallery .student-fan-item:nth-child(2) {
        --offset-x: -40px;
        --offset-y: 4px;
    }

    .student-fan-gallery .student-fan-item:nth-child(4) {
        --offset-x: 40px;
        --offset-y: 4px;
    }

    .student-fan-gallery .student-fan-item:nth-child(5) {
        --offset-x: 80px;
        --offset-y: 12px;
    }

    .profile-gallery {
        gap: 1rem;
        margin: 2rem auto 0;
    }

    .specs-slider {
        padding: 1.5rem 35px 1.5rem;
    }

    .specs-slider .slide {
        padding: 1.25rem;
        min-height: 180px;
    }

    .specs-slider .slide h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .specs-slider .slide p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .specs-slider .sprev,
    .specs-slider .snext {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

@media (min-width: 1025px) {
    .language-select-desktop {
        display: flex;
    }

    .language-select-desktop .lang-chevron {
        display: block;
    }

    header .language-select {
        display: none;
    }
}
