*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
    overflow-x: hidden;
}

.top-bar {
    background: #dc3545;
    color: #fff;
    padding: 0.5em;
    text-align: right;
    font-size: 0.9em;
}

/* Igual que .hero + .hero-content: padding lateral en la barra, ancho máximo en el interior */
.main-nav {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 1em clamp(1rem, 4vw, 2em);
}

.main-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1em;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1em;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-image {
    width: 45px;
    height: 45px;
    margin-right: 10px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.logo a {
    color: #111;
    font-size: clamp(1.25rem, 4vw, 2.1875rem);
    font-weight: 700;
    text-decoration: none;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.main-nav.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.main-nav.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.main-nav.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero {
    background: linear-gradient(135deg, #007bff, #66d9ef);
    color: #fff;
    padding: clamp(2rem, 5vw, 3em) clamp(1rem, 4vw, 2em);
}

.hero-content {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2em;
}

.hero-text {
    flex: 1;
    min-width: 50%;
}

.hero-text h1 {
    font-size: clamp(1.6rem, 2.5vw + 1rem, 2.5em);
    margin-bottom: 1em;
    line-height: 1.2;
}

.text-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5em;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.text-box p {
    margin: 0;
    line-height: 1.6;
}

.main-image {
    flex: 1;
    min-width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.what-we-do {
    padding: 2em;
    background: #fff;
}

.what-we-do h2 {
    text-align: center;
    margin-bottom: 1em;
    color: #405e7f;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2em;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2em;
}

.features-grid .feature {
    grid-column: 1 / -1;
    max-width: 100%;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.1em;
    color: #444;
    text-align: justify;
    padding: 1em 0;
}

.users {
    background: #f1f1f1;
    padding: 2em;
}

.user-types {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    justify-content: center;
}

.user {
    background: #fff;
    padding: 1em;
    border: 1px solid #ccc;
    width: 200px;
    text-align: center;
}

.benefits {
    background: #001f4d;
    color: white;
    padding: 2em;
}

.benefits h2 {
    color: #fff;
}

.benefits .content-wrapper {
    flex-direction: column;
    align-items: stretch;
}

.benefits-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(420px, 1.1fr);
    gap: 2rem;
    align-items: flex-start;
}

.benefits-list {
    min-width: 0;
}

.benefits-reference {
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 1rem;
}

.benefits-reference h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #fff;
}

.benefits-reference p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.benefits-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.benefits-table th,
.benefits-table td {
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.6rem;
    text-align: left;
    vertical-align: top;
}

.benefits-table th {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.benefits-table a {
    color: #9fd3ff;
}

.benefits-table a:hover {
    color: #c9e8ff;
}

.center-image {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

footer {
    background: #111;
    color: #ccc;
    padding: 2em;
    text-align: center;
}

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

.footer-links li {
    display: inline;
    margin: 0 1em;
}

.footer-links a {
    word-break: break-word;
}

/* Alternating Sections */
.alternating-section {
    padding: 2rem 2rem;
    background-color: #fff;
}

.alternating-section:nth-child(even) {
    background-color: #f9f9f9;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
}

.image-container,
.text-container {
    flex: 1;
    min-width: 300px;
}

.image-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.text-container h2 {
    color: #405e7f;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.text-container p {
    color: #555;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Estilos para el selector de idioma */
.language-selector {
    position: relative;
    margin-left: 1.5em;
}

.language-selector select {
    background: transparent;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.3em 1.5em 0.3em 0.5em;
    font-size: 0.9em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5em top 50%;
    background-size: 0.65em auto;
}

.language-selector select:hover {
    border-color: #007bff;
}

.language-selector select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Language Selector Button */
.language-button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.language-button:hover {
    background-color: #e9ecef;
}

.flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

/* Language Modal */
.language-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.language-modal.show {
    display: block;
    opacity: 1;
}

.language-modal-content {
    position: fixed;
    top: 20%;
    right: 0;
    transform: translate(100%, -50%);
    width: 350px;
    max-height: 80vh;
    margin-top: 20px;
    margin-right: 0;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px 0 0 8px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.language-modal.show .language-modal-content {
    transform: translate(0, -50%);
}

.language-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #000;
}

.language-options {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.language-option:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.language-option img {
    width: 24px;
    height: 18px;
    border-radius: 2px;
}

.language-option span {
    font-size: 1rem;
    color: #333;
}

/* Features Section */
.features-section {
    padding: 4rem 2rem;
    background-color: #fff;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.feature-item {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    text-align: center;
    padding: 1rem;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    margin: 0 auto 1rem;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    max-width: 100%;
    height: auto;
}

.feature-text {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

/* Demo video — Verlo en acción */
.video-demo-section {
    padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem);
    background: #f5f7fa;
}

.video-demo-inner {
    max-width: 960px;
    margin: 0 auto;
}

.video-demo-section h2 {
    text-align: center;
    margin: 0 0 0.75rem;
    color: #405e7f;
    font-size: clamp(1.35rem, 2vw + 0.85rem, 1.85rem);
}

.video-demo-intro {
    text-align: center;
    margin: 0 0 1.75rem;
    color: #555;
    line-height: 1.5;
    font-size: 1.05rem;
}

.video-embed {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 31, 77, 0.12);
    background: #001f4d;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Reproductor nativo (vídeo local); sin ratio fijo 16:9 forzado por padding */
.video-embed--native {
    padding-bottom: 0;
    height: auto;
    overflow: visible;
    background: #0d1117;
}

.video-embed--native video {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.video-demo-placeholder {
    text-align: center;
    margin: 0;
    padding: 2rem 1.5rem;
    color: #666;
    line-height: 1.6;
    background: #fff;
    border-radius: 10px;
    border: 1px dashed #c5d0dc;
}

/* Documento PDF incrustado */
.pdf-doc-preview {
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2rem);
    background: #fff;
}

.pdf-doc-preview__inner {
    max-width: 960px;
    margin: 0 auto;
}

.pdf-doc-preview__frame {
    display: block;
    width: 100%;
    min-height: min(80vh, 900px);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 31, 77, 0.12);
    background: #e8ecf0;
}

/* Pricing page */
.pricing-section {
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem);
    background: #f9f9f9;
}

.pricing-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    padding: 1rem;
}

.pricing-plan {
    background: white;
    border-radius: 10px;
    padding: clamp(1.25rem, 3vw, 2rem);
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.pricing-plan:hover {
    transform: translateY(-5px);
}

.pricing-plan.featured {
    border: 2px solid #4caf50;
    position: relative;
}

.pricing-plan h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    margin-bottom: 1rem;
    color: #333;
}

.pricing-section .price {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    color: #4caf50;
    margin: 1rem 0;
}

.pricing-section .price span {
    font-size: 1rem;
    color: #666;
}

.pricing-section .features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
}

.pricing-section .features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.pricing-section .features li::before {
    content: "✓";
    color: #4caf50;
    margin-right: 8px;
}

.btn-pricing {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: #4caf50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
    min-height: 44px;
    line-height: 1.2;
    box-sizing: border-box;
}

.btn-pricing:hover {
    background: #45a049;
}

.featured-tag {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #4caf50;
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .features-container {
        justify-content: center;
    }

    .feature-item {
        flex: 0 1 calc(33.333% - 2rem);
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: relative;
        z-index: 100;
    }

    .main-nav {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .main-nav-inner {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }

    .main-nav .logo {
        flex: 1;
        min-width: 0;
    }

    .nav-toggle {
        display: flex;
        flex-shrink: 0;
        margin-left: auto;
    }

    .main-nav ul.nav-links {
        display: none;
        order: 3;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        margin: 0;
        padding: 0.5rem 0 0;
        list-style: none;
        border-top: 1px solid #eee;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
    }

    .main-nav.nav-open ul.nav-links {
        display: flex;
    }

    .main-nav ul.nav-links>li {
        border-bottom: 1px solid #eee;
        padding: 0.35rem 0;
    }

    .main-nav ul.nav-links>li:last-child {
        border-bottom: none;
        padding-top: 0.5rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .hero-text,
    .main-image {
        min-width: 0;
        width: 100%;
    }

    .features-section {
        padding: 2.5rem 1rem;
    }

    .feature-item {
        flex: 0 1 calc(50% - 2rem);
    }

    .what-we-do,
    .users,
    .benefits {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .alternating-section {
        padding: 1.5rem 1rem;
    }

    .content-wrapper {
        gap: 1.25rem;
    }

    .text-container h2 {
        font-size: clamp(1.35rem, 4vw, 2rem);
    }

    .text-container p {
        font-size: 1rem;
    }

    .benefits-layout {
        grid-template-columns: 1fr;
    }

    .benefits-table th,
    .benefits-table td {
        font-size: 0.85rem;
        padding: 0.45rem;
    }

    footer {
        padding: 1.5rem 1rem;
    }

    .footer-links li {
        display: block;
        margin: 0.5em 0;
    }

    .featured-tag {
        right: 12px;
    }

    .language-modal-content {
        width: min(100vw - 2rem, 340px);
        max-height: 85vh;
    }
}

@media (max-width: 560px) {
    .content-wrapper {
        flex-direction: column;
    }

    .image-container,
    .text-container {
        width: 100%;
        min-width: 0;
        text-align: center;
    }

    .alternating-section:nth-child(odd) .content-wrapper {
        flex-direction: column-reverse;
    }

    .features-grid {
        padding: 0 0.5rem;
    }

    .features-grid .feature {
        text-align: left;
        hyphens: auto;
    }
}

@media (max-width: 480px) {
    .features-container {
        flex-direction: column;
        align-items: center;
    }

    .feature-item {
        max-width: 100%;
        width: 100%;
    }

    .language-modal-content {
        width: min(100vw - 1rem, 300px);
    }

    .language-option {
        padding: 10px 12px;
    }

    .language-option img {
        width: 20px;
        height: 15px;
    }

    .language-option span {
        font-size: 0.9rem;
    }
}