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

:root {
    --primary: #1a3a5c;
    --primary-light: #2a5a8c;
    --secondary: #3A6E91;
    --accent: #e67e22;
    --accent-hover: #cf6d17;
    --light: #f8f9fa;
    --dark: #1a1a2e;
    --text: #333;
    --text-light: #666;
    --white: #fff;
    --shadow: 0 4px 20px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
    --radius: 12px;
    --transition: .3s cubic-bezier(.4,0,.2,1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

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

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

/* ---- Navbar ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,.06);
    transition: transform var(--transition), box-shadow var(--transition);
}



.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 72px;
}

.nav-logo img {
    height: 61px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    margin-left: auto;
    align-items: center;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary);
    background: rgba(58,110,145,.08);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    padding: 110px 24px 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--secondary) 100%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,.08) 0%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255,255,255,.8);
    margin-bottom: 40px;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

/* ---- Hero Carousel ---- */
.hero-carousel {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.12);
    height: 200px;
}

.carousel-track {
    display: flex;
    transition: transform .6s cubic-bezier(.4,0,.2,1);
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 32px;
    text-align: center;
    color: var(--white);
}

.carousel-icon {
    width: 48px;
    height: 48px;
    opacity: .85;
    flex-shrink: 0;
}

.carousel-slide h4 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .5px;
}

.carousel-slide p {
    font-size: 14px;
    opacity: .75;
    max-width: 360px;
    line-height: 1.4;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.5);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all .3s ease;
}

.carousel-dots button.active {
    background: var(--white);
    border-color: var(--white);
    transform: scale(1.2);
}

.carousel-dots button:hover {
    border-color: var(--white);
}

.hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 100px;
}

.hero-wave svg {
    width: 100%;
    height: 100%;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230,126,34,.35);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.5);
}

.btn-outline:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--white);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    padding: 16px;
    font-size: 17px;
}

/* ---- Sections ---- */
.section {
    padding: 100px 0;
    position: relative;
}

.section-dark {
    background: var(--light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-dark .section-header h2 { color: var(--primary); }

.section-desc {
    font-size: 18px;
    color: var(--text-light);
    max-width: 640px;
    margin: 0 auto;
}

.section-cta {
    text-align: center;
    margin-top: 60px;
}

/* ---- Product Showcase ---- */
.product-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.product-showcase.reverse {
    direction: rtl;
}

.product-showcase.reverse > * {
    direction: ltr;
}

.product-media {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-logo {
    width: 320px;
    height: auto;
    max-width: none;
}

.product-logo-wrap img {
    height: auto;
    width: 240px;
    max-width: none;
}

.product-logo-sm img {
    max-height: 60px;
    width: auto;
    margin-bottom: 16px;
}

.product-screenshot {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.screenshot-gallery {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.screenshot-gallery figure {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--white);
}

.screenshot-gallery figcaption {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    text-align: center;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-desc {
    font-size: 17px;
    color: var(--text-light);
    line-height: 1.7;
}

.version-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.version-tags span {
    padding: 6px 16px;
    background: rgba(58,110,145,.1);
    color: var(--secondary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.version-badge {
    display: inline-block;
    padding: 6px 20px;
    background: var(--accent);
    color: var(--white);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    align-self: flex-start;
}

/* ---- Feature Cards ---- */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.feature-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border: 1px solid rgba(0,0,0,.04);
}

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

.feature-icon {
    font-size: 28px;
    margin-bottom: 8px;
    line-height: 1;
}

.feature-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}

/* ---- Video Grid ---- */
.tutorials-section {
    margin-top: 80px;
    text-align: center;
}

.tutorials-section h3 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 32px;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.video-card {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--dark);
}

.video-card iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-thumb {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: var(--dark);
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .3s ease;
}

.video-thumb:hover .video-play-btn {
    transform: scale(1.15);
}

/* ---- Problem-Solution Table ---- */
.problem-solution {
    margin-top: 80px;
}

.problem-solution h3 {
    font-size: 28px;
    color: var(--primary);
    text-align: center;
    margin-bottom: 32px;
}

.ps-table {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,.06);
}

.ps-row {
    display: grid;
    grid-template-columns: 48px 1fr 1fr;
    gap: 0;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

.ps-row:last-child { border-bottom: none; }

.ps-header {
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
}

.ps-row:nth-child(even):not(.ps-header) {
    background: rgba(58,110,145,.04);
}

.ps-num {
    padding: 14px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--secondary);
    border-right: 1px solid rgba(0,0,0,.06);
}

.ps-header .ps-num {
    color: var(--white);
    border-right-color: rgba(255,255,255,.15);
}

.ps-problem,
.ps-solution {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
}

.ps-problem {
    color: var(--text);
    font-weight: 500;
    border-right: 1px solid rgba(0,0,0,.06);
}

.ps-header .ps-problem,
.ps-header .ps-solution {
    color: var(--white);
    font-weight: 600;
    border-right-color: rgba(255,255,255,.15);
}

.ps-solution { color: var(--text-light); }

/* ---- Versions Comparison ---- */
.versions-comparison {
    margin-top: 80px;
}

.versions-comparison h3 {
    font-size: 28px;
    color: var(--primary);
    text-align: center;
    margin-bottom: 32px;
}

.version-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}

.version-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,.04);
    transition: all var(--transition);
}

.version-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.version-card.featured {
    border-color: var(--accent);
    position: relative;
}

.version-card.featured::before {
    content: "Recomendado";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--white);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
}

.version-card-header {
    margin-bottom: 16px;
}

.version-card-header h4 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.version-type {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.version-card p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ---- About ---- */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.about-photo img {
    width: 100%;
    border-radius: var(--radius);
}

.about-text h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.about-role {
    display: block;
    font-size: 15px;
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 16px;
}

.about-text > p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.about-sectors h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.sector-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sector-tags span {
    padding: 5px 14px;
    background: rgba(58,110,145,.08);
    color: var(--secondary);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 800px;
    margin: 48px auto 0;
}

.mv-card {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--secondary);
}

.mv-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.mv-card p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ---- Contact ---- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    max-width: 960px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(0,0,0,.08);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(58,110,145,.1);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #e74c3c;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.captcha-group {
    background: rgba(255,255,255,.5);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(0,0,0,.06);
}

.captcha-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.captcha-group input {
    max-width: 160px;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

#captchaCanvas {
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,.1);
    cursor: pointer;
    flex-shrink: 0;
}

.captcha-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    color: var(--secondary);
    transition: all .3s ease;
    flex-shrink: 0;
}

.captcha-refresh:hover {
    background: rgba(58,110,145,.08);
    border-color: var(--secondary);
}

.form-status {
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(46,204,113,.12);
    color: #27ae60;
    border: 1px solid rgba(46,204,113,.3);
}

.form-status.error {
    display: block;
    background: rgba(231,76,60,.1);
    color: #c0392b;
    border: 1px solid rgba(231,76,60,.2);
}

.form-status.loading {
    display: block;
    background: rgba(58,110,145,.08);
    color: var(--secondary);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.info-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}

.info-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.info-card a {
    color: var(--secondary);
    font-weight: 500;
}

.map-container {
    margin-top: 12px;
    border-radius: 10px;
    overflow: hidden;
}

.map-container iframe {
    width: 100%;
    height: 180px;
    border: 0;
    display: block;
}

.directions-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
    transition: color .3s ease;
}

.directions-link:hover {
    color: var(--accent);
}

.info-card.social {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
}

.info-card.social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(58,110,145,.08);
    color: var(--secondary);
    transition: all var(--transition);
}

.info-card.social a:hover {
    background: var(--secondary);
    color: var(--white);
}

/* ---- Footer ---- */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,.8);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-brand img {
    height: 50px;
    width: auto;
    margin-bottom: 12px;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.6;
    max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

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

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

.footer-links a {
    color: rgba(255,255,255,.7);
    font-size: 14px;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-contact p {
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.5;
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    font-size: 13px;
    color: rgba(255,255,255,.5);
}

/* ---- Animations ---- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 968px) {
    .product-showcase {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-showcase.reverse {
        direction: ltr;
    }

    .about-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-photo {
        max-width: 200px;
        margin: 0 auto;
    }

    .mission-vision {
        grid-template-columns: 1fr;
    }

    .version-cards {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        margin: 0 auto;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .ps-row {
        grid-template-columns: 36px 1fr;
    }

    .ps-solution {
        grid-column: 1 / -1;
        padding-top: 0;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        transform: translateY(-120%);
        opacity: 0;
        transition: all var(--transition);
        border-bottom: 1px solid rgba(0,0,0,.06);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-link {
        padding: 12px 16px;
        font-size: 16px;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 90px 20px 50px;
    }

    .section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .about-card {
        padding: 24px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }

    .hero-carousel {
        height: 170px;
    }

    .carousel-slide {
        padding: 20px 24px;
        gap: 6px;
    }

    .carousel-icon {
        width: 40px;
        height: 40px;
    }

    .carousel-slide h4 {
        font-size: 16px;
    }

    .carousel-slide p {
        font-size: 13px;
    }
}

/* ---- Theme Toggle (inside nav-menu) ---- */
.nav-theme-item {
    display: flex;
    align-items: center;
}

.nav-theme-item + li {
    /* separator before theme toggle if needed */
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    transition: all var(--transition);
    line-height: 1;
    white-space: nowrap;
}

.theme-toggle:hover {
    color: var(--secondary);
    background: rgba(58,110,145,.08);
}

.theme-toggle .toggle-label {
    order: 1;
}

.theme-toggle svg {
    order: 2;
}

.theme-icon-light,
.theme-icon-dark {
    display: flex;
}

.theme-icon-dark {
    display: none;
}

.hero-wave svg path {
    fill: var(--light);
}

/* ---- Dark Mode ---- */
[data-theme="dark"] {
    --light: #0f1724;
    --dark: #020617;
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --white: #1e293b;
    --shadow: 0 4px 20px rgba(0,0,0,.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.4);
    --primary: #2a5a8c;
    --primary-light: #3A6E91;
    --secondary: #6b9fc0;
}

[data-theme="dark"] body {
    background: #0b1120;
}

[data-theme="dark"] .navbar {
    background: rgba(11,17,32,.95);
    border-bottom-color: rgba(255,255,255,.06);
}

[data-theme="dark"] .nav-menu {
    background: rgba(11,17,32,.98);
    border-bottom-color: rgba(255,255,255,.06);
}

[data-theme="dark"] .nav-toggle span {
    background: var(--text);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    background: rgba(107,159,192,.12);
}

[data-theme="dark"] .section-dark {
    background: var(--light);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
    background: #1e293b;
    border-color: rgba(255,255,255,.1);
    color: var(--text);
}

[data-theme="dark"] .captcha-group {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.08);
}

[data-theme="dark"] .captcha-refresh {
    background: #1e293b;
    border-color: rgba(255,255,255,.1);
    color: var(--secondary);
}

[data-theme="dark"] .captcha-label {
    color: var(--text);
}

[data-theme="dark"] #captchaCanvas {
    border-color: rgba(255,255,255,.1);
}

[data-theme="dark"] .ps-row:nth-child(even):not(.ps-header) {
    background: rgba(255,255,255,.03);
}

[data-theme="dark"] .version-tags span,
[data-theme="dark"] .sector-tags span {
    background: rgba(107,159,192,.12);
}

[data-theme="dark"] .info-card.social a {
    background: rgba(107,159,192,.12);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(107,159,192,.12);
}

[data-theme="dark"] .theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-icon-dark {
    display: flex;
}

/* make logo visible on dark bg */
[data-theme="dark"] .nav-logo img {
    filter: brightness(0) invert(0.8);
}

[data-theme="dark"] .section-header h2,
[data-theme="dark"] .tutorials-section h3,
[data-theme="dark"] .problem-solution h3,
[data-theme="dark"] .versions-comparison h3,
[data-theme="dark"] .version-card-header h4,
[data-theme="dark"] .about-text h3,
[data-theme="dark"] .mv-card h3 {
    color: var(--primary);
}

[data-theme="dark"] .section-desc {
    color: var(--text-light);
}

/* Responsive: nav menu mobile */
@media (max-width: 768px) {
    .nav-menu .theme-toggle {
        padding: 12px 16px;
        font-size: 16px;
        width: 100%;
        justify-content: flex-start;
    }

    .nav-menu .theme-toggle svg {
        width: 18px;
        height: 18px;
    }

    .nav-menu .theme-toggle .toggle-label {
        font-size: 16px;
    }
}
