/* Base Styles */
/* Fallback métrico de Inter (Arial ajustada): evita el salto de layout al
   llegar la fuente de Google (CLS 0,12 medido en la home, 11-sep-2026). */
@font-face {
    font-family: 'Inter Fallback';
    src: local('Arial'), local('Helvetica');
    size-adjust: 107.12%;
    ascent-override: 90.49%;
    descent-override: 22.56%;
    line-gap-override: 0%;
}

:root {
    --primary-color: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #a5b4fc;
    --secondary-color: #10b981;
    --accent-color: #f97316;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --gray-light: #e2e8f0;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --border-radius: 8px;
    --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Inter Fallback', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* El reset de arriba deja los enlaces del cuerpo de los posts indistinguibles del
   texto normal: nadie hace clic en lo que no parece un enlace. Se re-estilan solo
   dentro del contenido del blog, sin tocar navegacion ni footer. */
.blog-content a:not(.btn),
.blog-post-content a:not(.btn) {
    color: #4F46E5;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.blog-content a:not(.btn):hover,
.blog-post-content a:not(.btn):hover {
    color: #3730A3;
}

ul {
    list-style: none;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.highlight {
    color: var(--primary-color);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Iconos SVG inline (Lucide-style). Sustituyen a los <i class="fas"> de FontAwesome:
   el kit devolvía 403 y los iconos se pintaban vacíos. Escalan con el font-size
   del contenedor (.feature-icon 2.5rem, .badge 1rem, .stat-number 1.2rem). */
.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.125em;
    flex: none;
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 15px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* La barra se alinea con el contenido (mismas medidas que .container); antes el
   logo y el CTA iban pegados a los bordes de la ventana en pantallas anchas. */
header > nav {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Entre 900 y 1279 px las barras más largas (homes ES/FR, «Synt en cifras»,
   blog) no caben alineadas con el contenido: ahí la barra usa todo el ancho con
   un margen de 16 px y los enlaces se juntan un poco. */
@media (min-width: 900px) and (max-width: 1279px) {
    header > nav {
        width: 100%;
        padding: 0 16px;
    }
    .nav-links {
        gap: 16px;
    }
    .nav-links a {
        font-size: 0.92rem;
    }
}

.logo img {
    height: 40px;
    width: auto; /* las tool pages llevan width="120": sin esto el logo se estira */
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    transition: var(--transition);
}

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

.cta-buttons {
    display: flex;
    gap: 15px;
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-color);
    margin-bottom: 30px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.users-stats {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Son 3 stats (usuarios + nota + valoraciones): wrap evita que el bloque se
       desborde en movil (se parte en vez de salirse). El tamano se ajusta abajo,
       en las reglas .users-stats .stat-* — hace falta esa especificidad porque un
       .stat-number global mas abajo (linea ~548, de otra seccion) pisa al del hero. */
    flex-wrap: wrap;
    gap: 12px 14px;
    margin-bottom: 30px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
    white-space: nowrap;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.stat-number .icon {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-left: 2px;
    vertical-align: middle;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-color);
    font-weight: 500;
    text-align: center;
    margin-top: 5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background-color: var(--gray-light);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
}

.badge .icon {
    font-size: 1rem;
    flex: none;
}

.app-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.app-button {
    display: inline-block;
}

.app-button img {
    height: auto;
    max-height: 45px;
    width: auto;
    transition: var(--transition);
}

.app-button:hover img {
    transform: translateY(-3px);
}

/* CTA a la web-app (app.synt.app): un tercer badge con el mismo lenguaje que
   los de las tiendas (45 px, icono + texto), no un botón suelto.
   17-sep-2026 (decisión de Roberto, 1.5 del plan de tráfico orgánico): PRIMARIO
   (morado) en TODOS los tamaños; antes era negro en < 900 px. El orden sigue
   dependiendo del ancho: tiendas primero en móvil, web primero en desktop. */
.web-app-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 45px;
    padding: 0 12px 0 10px;
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 7px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    transition: var(--transition);
}

.web-app-badge:hover {
    transform: translateY(-3px);
    color: #fff;
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.web-app-badge-icon {
    flex: none;
    width: 24px;
    height: 24px;
}

.web-app-badge-text {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Desktop: el SaaS es el CTA principal. El badge web pasa a primera posición
   (order, sin duplicar HTML), con el mismo alto que los badges de las tiendas.
   En móvil se queda tercero (tiendas primero: ahí la app es la mejor
   experiencia), pero ya en morado (arriba). */
@media (min-width: 900px) {
    .web-app-badge {
        order: -1;
    }

    /* Los tres badges del hero en una sola fila (gap 20 → 12 y 45 → 42 px de alto). */
    .hero .app-buttons {
        gap: 10px;
    }
    .hero .app-button img,
    .hero .web-app-badge {
        max-height: 40px;
        height: 40px;
    }
    .hero .web-app-badge .web-app-badge-text {
        font-size: 0.9rem;
    }

}

/* Tool pages: .app-buttons va por encima de .users-stats y el hero lleva menos
   aire arriba, para que los badges entren en un viewport de 1512×771. */
.hero-tool .app-buttons {
    margin-top: 0;
    margin-bottom: 30px;
}

@media (min-width: 900px) {
    .hero-tool {
        padding-top: 40px;
    }
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: perspective(1000px) rotateY(0);
}

/* Features Section */
.features {
    padding: 100px 0;
    background-color: white;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.feature-icon {
    font-size: 2.5rem;
    line-height: 1;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--gray-color);
}

/* Subjects Section */
.subjects {
    padding: 80px 0;
    background-color: var(--light-color);
    text-align: center;
}

.subjects h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
}

.subject-item {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.subject-item:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: var(--box-shadow);
    background-color: var(--primary-color);
    color: white;
}

.subject-item:hover .subject-icon {
    background-color: white;
    color: var(--primary-color);
    transform: scale(1.1);
}

.subject-item:hover::after {
    opacity: 1;
}

.subject-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.subject-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    margin: 0 auto 15px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.subject-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    z-index: 2;
}

.subject-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    z-index: 2;
}

.subject-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    transition: var(--transition);
}

/* How It Works Section */
.how-it-works {
    padding: 100px 0;
    background-color: white;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.step {
    display: flex;
    align-items: center;
    gap: 40px;
}

.step:nth-child(even) {
    flex-direction: row-reverse;
}

.step-number {
    background-color: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.75rem;
    margin-bottom: 15px;
}

.step-content p {
    color: var(--gray-color);
}

.step-image {
    flex: 1;
}

.step-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
}

/* Stats Section */
.stats {
    padding: 80px 0;
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-number-2 {
    color: white;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Testimonials Section */
.testimonials {
    padding: 100px 0;
    background-color: var(--light-color);
}

.testimonials h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.testimonial-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.testimonial-slider::-webkit-scrollbar {
    display: none;
}

.testimonial {
    flex: 0 0 calc(33.333% - 20px);
    scroll-snap-align: start;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    min-width: 280px;
}

.testimonial:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.testimonial-content {
    margin-bottom: 20px;
}

.testimonial-content p {
    font-style: italic;
    color: var(--dark-color);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.testimonial-author p {
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* Pricing Section */
.pricing {
    padding: 100px 0;
    background-color: white;
}

.pricing h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.pricing-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.pricing-card {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    flex: 1;
    min-width: 280px;
    max-width: 350px;
}

.pricing-card.featured {
    transform: scale(1.05);
    box-shadow: var(--box-shadow);
    border: 2px solid var(--primary-color);
    background-color: white;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.pricing-header {
    text-align: center;
    margin-bottom: 30px;
}

.pricing-header h3 {
    font-size: 1.75rem;
    margin-bottom: 15px;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray-color);
}

.pricing-header p {
    color: var(--gray-color);
}

.pricing-features {
    margin-bottom: 30px;
}

.pricing-features li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features i {
    font-size: 1.1rem;
}

.pricing-features .fa-check {
    color: var(--success-color);
}

.pricing-features .fa-times {
    color: var(--danger-color);
}

.pricing-card .btn {
    width: 100%;
}

.student-verification {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(79, 70, 229, 0.1);
    border-radius: var(--border-radius);
    color: var(--primary-color);
}

.student-verification p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
}

.student-verification i {
    font-size: 1.2rem;
}

/* FAQ Section */
.faq {
    padding: 100px 0;
    background-color: var(--light-color);
}

.faq h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
}

.faq-item {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    cursor: pointer;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.faq-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    position: relative;
}

.faq-item h3::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    transition: transform 0.3s ease;
}

.faq-item.active h3::after {
    transform: rotate(45deg);
}

.faq-item p {
    color: var(--gray-color);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease, margin 0.5s ease;
}

.faq-item.active p {
    max-height: 200px;
    opacity: 1;
    margin-top: 15px;
}

/* Use Cases Section */
.use-cases {
    padding: 80px 0;
    background-color: white;
    text-align: center;
}

.use-cases h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.use-case {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    transition: var(--transition);
}

.use-case:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.use-case-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
    position: relative;
    overflow: hidden;
}

.use-case-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    z-index: 2;
    position: relative;
}

.use-case h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.use-case p {
    color: var(--gray-color);
}

/* Download Section */
.download {
    padding: 100px 0;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    text-align: center;
}

.download h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.download .highlight {
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0 10px;
    border-radius: 4px;
    font-weight: 700;
}

.download p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.download .app-buttons {
    justify-content: center;
}

.download .app-button img {
    max-height: 45px;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 15px;
    background-color: transparent;
    border-radius: 8px;
    padding: 5px;
}

.footer-logo p {
    opacity: 0.9;
    font-weight: 500;
    color: var(--primary-light);
}

.footer-links h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    opacity: 0.7;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-light);
}

.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Fila de idiomas del footer (30-sep-2026): enlaces <a hreflang> rastreables a la misma página en
   cada idioma (scripts/footer-seo-links.js y el blog). El <select> del header se queda como está. */
.footer-langs {
    margin: 0 0 24px;
}

.footer-langs ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.footer-langs a {
    color: inherit;
    opacity: 0.7;
    transition: var(--transition);
}

.footer-langs a:hover {
    opacity: 1;
    color: var(--primary-light);
}

.footer-langs [aria-current] {
    opacity: 1;
    font-weight: 600;
}

/* Enhanced Responsive Styles */
@media (max-width: 1200px) {
    html {
        font-size: 15px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .testimonial {
        flex: 0 0 calc(50% - 15px);
    }
    
    .subject-icon {
        width: 65px;
        height: 65px;
        font-size: 1.6rem;
    }
}

@media (max-width: 992px) {
    html {
        font-size: 14px;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content, .hero-image {
        text-align: center;
    }
    
    .hero-badges, .users-stats {
        justify-content: center;
    }
    
    .app-buttons {
        justify-content: center;
    }
    
    .step, .step:nth-child(even) {
        flex-direction: column;
    }
    
    .step-image {
        order: -1;
        margin-bottom: 20px;
    }
    
    .testimonial {
        flex: 0 0 calc(50% - 15px);
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .subjects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Nav móvil (< 900 px): los enlaces se ocultan y salen al pulsar
   .mobile-nav-toggle (script.js alterna .active en los dos). El CTA y el
   selector de idioma se quedan visibles en la barra. */
@media (max-width: 899px) {
    nav {
        position: relative;
        gap: 10px;
    }

    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        gap: 18px;
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        padding: 20px;
        text-align: center;
        z-index: 100;
        border-radius: var(--border-radius);
    }

    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: var(--border-radius);
        order: 10;
    }

    .mobile-nav-toggle.active {
        background-color: rgba(79, 70, 229, 0.1);
        color: var(--primary-color);
    }

    .mobile-nav-toggle svg {
        width: 24px;
        height: 24px;
    }

    .cta-buttons .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .language-switcher {
        margin-left: 0;
    }

    /* La barra lleva logo + CTA + selector + hamburguesa: el selector se compacta
       para que en 375 px no salte a una segunda línea (nav hace wrap). */
    .language-select {
        padding: 6px 26px 6px 10px;
        font-size: 13px;
        background-position: right 8px center;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }
    
    header {
        padding: 10px 0;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .features, .subjects, .how-it-works, .testimonials, .faq, .use-cases, .download {
        padding: 60px 0;
    }
    
    .features h2, .subjects h2, .how-it-works h2, .testimonials h2, .faq h2, .use-cases h2, .download h2 {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .testimonial {
        flex: 0 0 100%;
    }
    
    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .subject-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    html {
        font-size: 12px;
    }
    
    .container {
        width: 95%;
        padding: 0 10px;
    }

    header > nav {
        width: 95%;
        padding: 0 10px;
    }
    
    .hero-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .subjects-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .subject-item {
        padding: 20px 15px;
    }
    
    .subject-icon {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
        margin-bottom: 10px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-item {
        padding: 20px;
    }
    
    .faq-item h3 {
        font-size: 1.1rem;
        padding-right: 20px;
    }
}

/* Language Switcher Styles */
.language-switcher {
    display: flex;
    gap: 8px;
    margin-left: 20px;
}

.language-switcher button {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.language-switcher button:hover {
    background-color: var(--primary-color);
    color: white;
}

.language-switcher button.active {
    background-color: var(--primary-color);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .language-switcher {
        margin-left: 10px;
    }
    
    .language-switcher button {
        padding: 2px 6px;
        font-size: 14px;
    }
}

/* --- Stats del hero: 3 columnas (usuarios + nota + valoraciones) ---
   Van al final y con .users-stats por delante porque el `.stat-number` global de
   la seccion de estadisticas (3.5rem) pisaba al del hero. */
.users-stats .stat-item {
    padding: 0;
    min-width: 0;
    flex: 0 1 auto;   /* que NO crezcan: con `1 1 auto` los dos primeros llenaban la fila y el tercero se iba abajo */
}

.users-stats .stat-number {
    font-size: clamp(1.5rem, 2.6vw, 2.4rem);
    margin-bottom: 4px;
}

/* Sin nowrap: las etiquetas largas (de: "Bewertungen weltweit") forzaban el ancho
   de la columna y partian la fila de 3 en dos. Que envuelva la etiqueta, no la fila. */
.users-stats .stat-label {
    text-align: center;
    line-height: 1.25;
}

.users-stats .stat-divider {
    flex: 0 0 auto;
}

/* --- «Otras herramientas» (tool pages, antes del FAQ; scripts/related-tools.js) ---
   Reutiliza .features-grid/.feature-card; aquí solo lo propio del bloque. */
.related-tools {
    padding: 80px 0;
    background-color: white;
}

.related-tools h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.related-tool h3 a {
    color: var(--primary-color);
}

.related-tool h3 a:hover {
    text-decoration: underline;
}

.related-tool-current {
    box-shadow: inset 0 0 0 2px var(--primary-light);
}

.related-tool-current:hover {
    transform: none;
}

.related-tool-current-tag {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 12px;
    border-radius: 50px;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Los enlaces del subtítulo del hero (a las tool pages) se veían del mismo gris
   que el texto: que se distingan. */
.hero-subtitle a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: rgba(79, 70, 229, 0.35);
    text-underline-offset: 3px;
}

/* ≤ 600 px: logo + CTA + selector + hamburguesa en UNA línea (la barra saltaba a
   dos con Inter en ES/FR/DE y desplazaba todo el hero: CLS 0,35). */
@media (max-width: 600px) {
    nav {
        flex-wrap: nowrap;
        gap: 6px;
    }
    .logo img {
        height: 32px;
    }
    .cta-buttons .btn {
        padding: 8px 10px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .language-switcher {
        min-width: 0;
        flex: 0 1 auto;
    }
    .language-select {
        max-width: 30vw;
        padding: 6px 22px 6px 8px;
        font-size: 12px;
        background-position: right 6px center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-nav-toggle {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
    }
}

/* ── Bloque «Pruébalo» de las tool pages (scripts/anon-preview.js + /preview.js) ──
   La página ES la herramienta: textarea → 3 preguntas o resumen corto sin cuenta,
   y cierre en «crea tu cuenta gratis». Alturas fijas (textarea, botón, contador)
   para que nada salte al cargar; el hueco del resultado se reserva al enviar. */
.preview {
    padding: 56px 0;
    background-color: white;
    border-bottom: 1px solid var(--gray-light);
}

.preview-panel {
    max-width: 860px;
    margin: 0 auto;
    background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 120px);
    border: 1px solid #dfe3f5;
    border-radius: 16px;
    padding: 36px 40px 32px;
    box-shadow: 0 10px 30px -12px rgba(79, 70, 229, 0.18);
}

.preview h2 {
    font-size: 2rem;
    line-height: 1.25;
    margin-bottom: 12px;
    text-align: left;
}

.preview-lead {
    color: var(--gray-color);
    font-size: 1.05rem;
    margin-bottom: 22px;
}

.preview-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.preview-textarea {
    display: block;
    width: 100%;
    height: 200px;
    resize: vertical;
    padding: 14px 16px;
    font: inherit;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--dark-color);
    background-color: white;
    border: 1.5px solid #cdd3ea;
    border-radius: var(--border-radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.preview-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.preview-textarea::placeholder {
    color: #94a3b8;
}

.preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
    min-height: 48px;
}

.preview-count {
    color: var(--gray-color);
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.preview-submit {
    min-width: 220px;
    min-height: 48px;
    font-size: 1rem;
}

.preview-submit:disabled {
    opacity: 0.7;
    cursor: progress;
    transform: none;
}

.preview-error {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-size: 0.95rem;
}

.preview-error-link {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Al enviar se reserva la altura de un resultado típico (3 tarjetas / resumen)
   dentro de la ventana de interacción, que no cuenta como CLS. */
.preview-result-reserved {
    min-height: 420px;
}

.preview-busy .preview-result-reserved:empty {
    background:
        linear-gradient(90deg, #eef0fb 0%, #f7f8fe 50%, #eef0fb 100%);
    background-size: 200% 100%;
    animation: preview-shimmer 1.4s ease-in-out infinite;
    border-radius: 12px;
    margin-top: 20px;
}

@keyframes preview-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.preview-card {
    margin-top: 20px;
    padding: 22px 24px;
    background-color: white;
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

.preview-question {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 14px;
}

.preview-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.preview-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--dark-color);
    background-color: #f8fafc;
    border: 1.5px solid var(--gray-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.preview-option:hover:not(:disabled) {
    border-color: var(--primary-light);
    background-color: #f5f6ff;
}

.preview-option:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.35);
    outline-offset: 2px;
}

.preview-option:disabled {
    cursor: default;
    color: var(--gray-color);
}

.preview-option-letter {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: white;
    border: 1.5px solid var(--gray-light);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.preview-option-correct,
.preview-option-correct:disabled {
    border-color: var(--success-color);
    background-color: #ecfdf5;
    color: #065f46;
}

.preview-option-correct .preview-option-letter {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.preview-option-wrong,
.preview-option-wrong:disabled {
    border-color: var(--danger-color);
    background-color: #fef2f2;
    color: #991b1b;
}

.preview-option-wrong .preview-option-letter {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.preview-feedback {
    margin-top: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #991b1b;
}

.preview-feedback-ok {
    color: #065f46;
}

.preview-score {
    margin-top: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.preview-summary-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.preview-summary-label + .preview-summary-label,
.preview-headline + .preview-summary-label {
    margin-top: 18px;
}

.preview-headline {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.45;
}

.preview-bullets {
    list-style: disc;
    padding-left: 22px;
    display: grid;
    gap: 8px;
    color: var(--dark-color);
}

/* Flashcards (kind=flashcards, 17-sep): anverso visible, reverso tras «Ver respuesta». */
.preview-flashcard-front {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 14px;
}

.preview-flashcard-toggle {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    border: 1.5px solid var(--primary-color);
    border-radius: 999px;
    background-color: white;
    color: var(--primary-color);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.preview-flashcard-toggle:hover {
    background-color: rgba(79, 70, 229, 0.08);
}

.preview-flashcard-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.preview-flashcard-open .preview-flashcard-toggle {
    background-color: var(--primary-color);
    color: white;
}

.preview-flashcard-back {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    background-color: #f5f3ff;
    border-left: 3px solid var(--primary-color);
    line-height: 1.55;
    color: var(--dark-color);
}

.preview-status {
    margin-top: 14px;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.preview-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 26px;
    padding: 18px 22px;
    border-radius: 12px;
    background-color: rgba(79, 70, 229, 0.06);
    border: 1px solid rgba(79, 70, 229, 0.15);
    font-weight: 500;
}

.preview-cta-emphasis {
    background-color: rgba(79, 70, 229, 0.12);
    border-color: var(--primary-color);
}

.preview-cta-link {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .preview {
        padding: 40px 0;
    }
    .preview-panel {
        padding: 24px 18px 22px;
        border-radius: 12px;
    }
    .preview h2 {
        font-size: 1.5rem;
    }
    .preview-lead {
        font-size: 0.98rem;
    }
    .preview-textarea {
        height: 180px;
    }
    .preview-submit {
        width: 100%;
    }
    .preview-options {
        grid-template-columns: 1fr;
    }
    .preview-cta {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .preview-cta-link {
        white-space: normal;
    }
    .preview-result-reserved {
        min-height: 520px;
    }
}

/* «Apuntes → test» (24-sep-2026, rama feat/widget-apuntes-a-test): enlace del hero a
   #try-it, chips de modo y botón de ejemplo del bloque «Pruébalo». */
.hero-try {
    margin: -6px 0 22px;
}

.hero-try-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background-color: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.25);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.hero-try-link:hover {
    background-color: rgba(79, 70, 229, 0.14);
    border-color: var(--primary-color);
}

.hero-try-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.hero-try-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

#try-it {
    scroll-margin-top: 80px;
}

.preview-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.preview-mode {
    min-height: 40px;
    padding: 8px 18px;
    border: 1.5px solid #cdd3ea;
    border-radius: 999px;
    background-color: white;
    color: var(--dark-color);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.preview-mode:hover {
    border-color: var(--primary-color);
}

.preview-mode:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.preview-mode[aria-pressed="true"] {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.preview-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.preview-label-row .preview-label {
    margin-bottom: 0;
}

.preview-example {
    padding: 0;
    border: 0;
    background: none;
    color: var(--primary-color);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.preview-example:hover {
    color: var(--primary-dark);
}

.preview-example:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .hero-try {
        margin: 0 0 18px;
    }
    .hero-try-link {
        font-size: 0.92rem;
        border-radius: 14px;
    }
}

/* --- «関連記事» en las 4 tool pages JA (antes del FAQ; scripts/ja-blog-posts.js) ---
   Misma sección que «Otras herramientas» (.related-tools) con fondo claro y
   tarjetas de solo título + description. */
.related-posts-tool {
    background-color: var(--light-color);
    padding-top: 0;
}

.related-posts-tool h2 {
    font-size: 2rem;
}

.related-post h3 {
    font-size: 1.15rem;
    line-height: 1.45;
}

.related-post h3 a {
    color: var(--primary-color);
}

.related-post h3 a:hover {
    text-decoration: underline;
}

/* «Respuesta primero» bajo el H1 de las tool pages que citan los asistentes de IA
   (24-sep-2026, scripts/answer-first.js). */
.answer-first {
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--dark-color, #1f2937);
    border-left: 3px solid var(--primary-color);
    padding: 2px 0 2px 14px;
    margin: -6px 0 18px;
    max-width: 62ch;
}

.answer-first strong {
    display: block;
    margin-bottom: 2px;
}

@media (max-width: 768px) {
    .answer-first {
        font-size: 0.98rem;
        text-align: left;
        margin: -6px auto 18px;
    }
}

/* 2.ª tanda SEO (20-oct-2026): ejemplo resuelto (texto → pregunta, resumen o tarjeta) con las tarjetas del
   widget (.preview-card) pero estático, y bloque de texto corrido en las tool pages. */
.tool-example {
    padding: 56px 0;
    background-color: #fafbff;
    border-bottom: 1px solid var(--gray-light);
}

.tool-example h2 {
    font-size: 2rem;
    line-height: 1.25;
    margin-bottom: 12px;
    text-align: left;
}

.tool-example-source {
    margin: 0 0 6px;
    padding: 14px 18px;
    background-color: white;
    border-left: 3px solid var(--primary-color);
    border-radius: 8px;
    color: var(--gray-color);
    font-size: 0.98rem;
    line-height: 1.6;
}

.tool-example .preview-option {
    cursor: default;
}

.tool-example-note {
    margin-top: 18px;
    color: var(--gray-color);
    font-size: 0.95rem;
    line-height: 1.55;
}

.tool-text {
    padding: 56px 0;
    border-bottom: 1px solid var(--gray-light);
}

.tool-text .container {
    max-width: 860px;
}

.tool-text h2 {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 18px;
}

.tool-text p {
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 14px;
}

.tool-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 26-oct-2026: subtítulos y listas dentro de .tool-text (sección 期末テスト de /ja/teiki-test-taisaku/) */
.tool-text h3 {
    font-size: 1.25rem;
    line-height: 1.4;
    margin: 26px 0 10px;
}

.tool-text ul,
.tool-text ol {
    padding-left: 1.4em;
    margin-bottom: 14px;
}

.tool-text ul {
    list-style: disc;
}

.tool-text li {
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 8px;
}

/* Hub de herramientas por idioma (scripts/tools-hub.js) */
.tools-hub-group {
    padding: 48px 0;
}

.tools-hub-group h2 {
    margin-bottom: 24px;
}

.tools-hub-group .feature-card h3 a {
    color: inherit;
}

.tools-hub-group .feature-card h3 a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .tool-example,
    .tool-text {
        padding: 40px 0;
    }

    .tool-example h2,
    .tool-text h2 {
        font-size: 1.5rem;
    }
}

/* 31-oct-2026 (auditoría SEO): bloques de scripts/seo-blocks.js (intención de cada quiz, PDF, examen, reviewer…) */
.seo-block-intro {
    max-width: 760px;
    margin: -1.5rem auto 2rem;
    text-align: center;
    line-height: 1.6;
    color: var(--gray-color, #4b5563);
}
.seo-block-note {
    max-width: 760px;
    margin: 2rem auto 0;
    text-align: center;
    line-height: 1.6;
}
.seo-block p a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}
