:root {
    --bg-color: #f8f9fa;
    --text-color: #2b2b2b;
    --nav-bg: #ffffff;
    --accent: #0056b3;
    --accent-hover: #004494;
    --glow: none;
    --card-bg: #ffffff;
    --border: #e0e0e0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --neon-color: #0052d4;
    --neon-glow: 0 0 5px rgba(0, 82, 212, 0.3)
}

body.dark-mode {
    --bg-color: #080c16;
    --text-color: #e2e8f0;
    --nav-bg: #0d1322;
    --accent: #00ffff;
    --accent-hover: #5cffff;
    --glow: 0 0 10px rgba(0, 255, 255, 0.4), 0 0 20px rgba(0, 255, 255, 0.2);
    --card-bg: #111827;
    --border: #1f2937;
    --shadow: 0 10px 30px rgba(0, 255, 255, 0.05)
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    overflow-x: hidden
}

/* FIX: salvaguarda contra micro-desbordamientos horizontales residuales
   (p. ej. el carrusel de marcas o paneles deslizantes fuera de pantalla) */
body {
    overflow-x: hidden
}

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

/* FIX 1: Transición global limitada solo a elementos que la necesitan,
   evita destellos en imágenes, inputs y otros elementos */
body,
a,
button,
.product-card,
.why-card,
.btn,
.card-cta,
.navbar ul li a,
.slider,
.slider:before,
.navbar-logo {
    transition: background-color 0.3s ease, color 0.3s ease
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6
}

a {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600
}

i {
    margin-right: 6px;
    font-size: 1.1em
}

.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background-color: var(--nav-bg);
    padding: 1.35rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border)
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: 1px;
    justify-self: start
}

/* FIX 2: navbar-brand hereda color del logo en lugar de forzar inherit */
.navbar-brand {
    text-decoration: none;
    color: inherit;
    font-weight: inherit
}

.logo-icon {
    height: 1.2em;
    width: auto;
    object-fit: contain
}

body.dark-mode .logo-icon {
    filter: drop-shadow(0 0 5px rgb(0 255 255 / .5))
}

body.dark-mode .navbar-logo {
    color: var(--accent);
    text-shadow: var(--glow)
}

/* ── Navbar Right (theme + hamburger) ── */
.navbar-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 18px
}

/* ── Hamburger button ── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 36px;
    height: 36px
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg)
}

.hamburger.open span:nth-child(2) {
    opacity: 0
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg)
}

.navbar ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    justify-self: center;
    margin: 0;
    padding: 0
}

.navbar ul li a {
    color: var(--text-color);
    opacity: .65;
    font-weight: 500;
    font-size: .95rem;
    transition: color 0.2s, opacity 0.2s
}

.navbar ul li a:hover {
    opacity: 1;
    color: var(--accent)
}

.navbar ul li a.nav-active {
    opacity: 1;
    color: var(--accent);
    font-weight: 600
}

/* ── CTA de la navbar ── */
.navbar-cta {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .02em;
    padding: .65rem 1.4rem;
    border-radius: 8px;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease
}

.navbar-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgb(0 86 179 / .3)
}

body.dark-mode .navbar-cta {
    color: #000
}

body.dark-mode .navbar-cta:hover {
    box-shadow: 0 6px 16px rgb(0 255 255 / .25)
}

@media (min-width: 769px) {
    .nav-item-tienda {
        display: none
    }
}

@media (max-width: 768px) {
    .navbar-cta {
        display: none
    }
}

.theme-switch-wrapper {
    display: flex;
    align-items: center
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 64px;
    height: 32px
}

.theme-switch input {
    display: none
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px
}

.icon {
    font-size: 14px;
    z-index: 1;
    margin-right: 0
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: #fff;
    transition: .4s;
    border-radius: 50%;
    z-index: 2
}

input:checked+.slider {
    background-color: #1f2937
}

input:checked+.slider:before {
    transform: translateX(32px);
    background-color: var(--accent);
    box-shadow: 0 0 10px rgb(0 255 255 / .5)
}

section {
    max-width: 1100px;
    margin: 5rem auto;
    padding: 0 2rem
}

.text-center {
    text-align: center
}

h1,
h2,
h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color)
}

header.hero {
    position: relative;
    text-align: center;
    padding: 10rem 2rem;
    background-image: url(../assets/Banner.webp);
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border)
}

header.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgb(255 255 255 / .35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
    z-index: 1
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto
}

header.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1rem, 6vw, 4rem);
    font-weight: 700;
    text-transform: none;
    line-height: 1.1;
    margin: 10px 0;
    width: 100%;
    /* FIX 4: Eliminado white-space: nowrap del default para evitar overflow
       en tabletas. Se aplica solo en pantallas anchas vía media query */
    color: var(--neon-color);
    text-shadow: var(--neon-glow);
    animation: flicker 1.5s infinite alternate
}

/* FIX 4 cont.: nowrap solo en pantallas >= 769px donde hay espacio suficiente */
@media (min-width: 769px) {
    header.hero h1 {
        white-space: normal;
    }
}

@keyframes flicker {
    0% {
        color: var(--neon-color);
        text-shadow: var(--neon-glow)
    }

    50% {
        color: #1061bc;
        text-shadow: 0 0 10px rgb(0 119 255 / .6), 0 0 20px rgb(0 119 255 / .3)
    }

    100% {
        color: #475569;
        text-shadow: 0 0 15px rgb(255 255 255 / .8), 0 0 30px rgb(255 255 255 / .4)
    }
}

body.dark-mode header.hero h1 {
    color: var(--accent);
    text-shadow: var(--glow);
    animation: none;
    text-transform: none
}

body.dark-mode header.hero::before {
    background-color: rgb(6 7 9 / .46);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(8px)
}

body.dark-mode header.hero p {
    color: #e0e0e0
}

.features-list,
.steps-list {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border)
}

.features-list ul {
    margin-left: 2rem;
    font-size: 1.1rem
}

.features-list li {
    margin-bottom: .8rem
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center
}

.steps-info h2 {
    margin-bottom: 1.5rem
}

.steps-info ol {
    margin-left: 1.5rem;
    font-size: 1.1rem
}

.steps-info li {
    margin-bottom: .8rem
}

.steps-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border)
}

.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 2.5rem;
    flex-wrap: wrap
}

.btn {
    display: inline-block;
    padding: .8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    color: #ffffff !important;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s
}

.btn:hover {
    transform: translateY(-3px);
    opacity: .9
}

.btn-whatsapp {
    background-color: #25D366;
    box-shadow: 0 4px 10px rgb(37 211 102 / .3)
}

body.dark-mode .btn-whatsapp {
    box-shadow: 0 4px 10px rgb(37 211 102 / .5);
    border: 1px solid #1f2937
}

.btn-tiktok {
    background-color: #000;
    box-shadow: 0 4px 10px rgb(0 0 0 / .3)
}

body.dark-mode .btn-tiktok {
    box-shadow: 0 4px 10px rgb(0 255 255 / .3);
    border: 1px solid #333
}

.btn-youtube {
    background-color: red;
    box-shadow: 0 4px 10px rgb(255 0 0 / .3)
}

body.dark-mode .btn-youtube {
    box-shadow: 0 4px 10px rgb(255 0 0 / .5);
    border: 1px solid #1f2937
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: left
}

.product-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 15px 30px rgb(0 255 255 / .1)
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background-color: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem
}

.product-info {
    padding: 1.5rem
}

.product-info h3 {
    margin-bottom: .5rem;
    font-size: 1.3rem;
    color: var(--text-color)
}

body.dark-mode .product-info h3 {
    color: var(--accent)
}

.product-info p {
    font-size: .95rem;
    color: #666;
    line-height: 1.5
}

body.dark-mode .product-info p {
    color: #aaa
}

/* ══════════════════════════════════════════
   BANNER: PROYECTOS Y DISEÑOS (link a proyectos.html)
══════════════════════════════════════════ */
.proyectos-banner {
    max-width: 700px;
    margin: 4rem auto 0;
    padding: 2.5rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow)
}

.proyectos-banner-icono {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 86, 179, 0.08);
    color: var(--accent);
    font-size: 1.4rem
}

body.dark-mode .proyectos-banner-icono {
    background: rgba(0, 255, 255, 0.08)
}

.proyectos-banner h2 {
    margin-bottom: .5rem
}

.proyectos-banner p {
    color: #666;
    max-width: 480px;
    margin: 0 auto 1.5rem
}

body.dark-mode .proyectos-banner p {
    color: #94a3b8
}

.btn-proyectos {
    background-color: var(--accent);
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.3);
    display: inline-flex;
    align-items: center;
    gap: .5rem
}

body.dark-mode .btn-proyectos {
    color: #000 !important;
    box-shadow: 0 4px 10px rgba(0, 255, 255, 0.3)
}

.contacto-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2rem;
    align-items: stretch
}

.contacto-alt {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center
}

.contacto-alt .btn {
    margin-top: 1.5rem
}

form {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: grid;
    gap: 1.5rem
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem
}

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

input,
textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem
}

textarea {
    resize: vertical
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgb(0 255 255 / .2)
}

.consent-toggle {
    position: relative;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    gap: .7rem;
    padding: .9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s
}

.consent-toggle:hover {
    border-color: var(--accent)
}

.consent-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none
}

.consent-toggle-box {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: .75rem;
    transition: background-color .2s, border-color .2s, color .2s
}

.consent-toggle-input:checked~.consent-toggle-box {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff
}

body.dark-mode .consent-toggle-input:checked~.consent-toggle-box {
    color: #000
}

.consent-toggle-input:focus-visible~.consent-toggle-box {
    outline: 2px solid var(--accent);
    outline-offset: 2px
}

.consent-toggle-text {
    min-width: 0;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--text-color)
}

.consent-toggle-text a {
    color: var(--accent);
    font-weight: 600
}

.buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap
}

button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s
}

/* FIX 5: Reglas de submit consolidadas para evitar conflictos de especificidad */
button[type="submit"] {
    background-color: var(--accent);
    color: #fff
}

body.dark-mode button[type="submit"] {
    color: #000
}

button[type="submit"]:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px)
}

button[type="reset"] {
    background-color: #fff0;
    border: 1px solid var(--border);
    color: var(--text-color)
}

/* ── Why Us Section ── */
.why-us-section {
    text-align: center
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem
}

.why-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    text-align: center
}

.why-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 12px 28px rgb(0 86 179 / .1)
}

body.dark-mode .why-card:hover {
    box-shadow: 0 12px 28px rgb(0 255 255 / .07)
}

.why-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 1rem
}

.why-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color)
}

body.dark-mode .why-card h3 {
    color: var(--accent)
}

.why-card p {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.5
}

body.dark-mode .why-card p {
    color: #aaa
}

/* ══════════════════════════════════════════
   MODAL (chrome genérico: overlay + caja + botón de cerrar.
   Lo específico de cada modal vive en su propio CSS)
══════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeInOverlay 0.2s ease
}

@keyframes fadeInOverlay {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.modal-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    animation: slideUpModal 0.25s ease
}

.reel-modal-box {
    max-width: 340px;
    background: transparent;
    border: none;
    box-shadow: none
}

.reel-modal-box #reel-modal-content {
    display: flex;
    justify-content: center
}

.reel-fallback-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: .75rem;
    padding: .7rem 1rem;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-color);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600
}

.reel-fallback-link:hover {
    border-color: var(--accent);
    color: var(--accent)
}

@keyframes slideUpModal {
    from {
        transform: translateY(30px);
        opacity: 0
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
    padding: 0
}

.modal-close:hover {
    background: var(--border)
}

/* ══════════════════════════════════════════
   REELS DE TIKTOK (compartido por index.html y tienda.html)
══════════════════════════════════════════ */
.reels-section {
    max-width: 1100px;
    margin: 1.5rem auto 0;
    padding: 0 5%
}

.reels-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem
}

.reels-header h2 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0
}

.reels-ver-mas {
    font-size: .9rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap
}

.reels-ver-mas:hover {
    text-decoration: underline
}

.reels-slider {
    display: flex;
    align-items: center;
    gap: .5rem
}

.reels-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none
}

.reels-track::-webkit-scrollbar {
    display: none
}

.reel-nav {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    padding: 0;
    line-height: 1;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: .95rem;
    box-shadow: 0 6px 16px rgba(0, 86, 179, .25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease
}

body.dark-mode .reel-nav {
    color: #000;
    box-shadow: 0 6px 16px rgba(0, 255, 255, .2)
}

.reel-nav:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 22px rgba(0, 86, 179, .35)
}

body.dark-mode .reel-nav:hover {
    box-shadow: 0 10px 22px rgba(0, 255, 255, .3)
}

.reel-nav:active {
    transform: scale(.94)
}

.reel-nav:disabled {
    opacity: .3;
    cursor: default;
    transform: none;
    box-shadow: none;
    background: var(--border);
    color: var(--text-color)
}

@media (max-width: 480px) {
    .reel-nav {
        width: 34px;
        height: 34px;
        font-size: .8rem
    }
}

.reel-card {
    position: relative;
    flex: 0 0 130px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    scroll-snap-align: start;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--border);
    transition: transform .2s, border-color .2s
}

.reel-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent)
}

.reel-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease
}

.reel-card:hover img {
    transform: scale(1.08)
}

.reel-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55) 100%);
    transition: background .25s ease
}

.reel-play i {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .92);
    color: #111;
    font-size: .95rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
    transition: transform .25s ease
}

.reel-card:hover .reel-play {
    background: linear-gradient(180deg, rgba(0, 0, 0, .05) 40%, rgba(0, 0, 0, .6) 100%)
}

.reel-card:hover .reel-play i {
    transform: scale(1.15);
    animation: reel-pulse 1.4s ease-in-out infinite
}

.reel-titulo {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 6px 8px;
    font-size: .68rem;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    pointer-events: none;
    z-index: 2
}

@keyframes reel-pulse {

    0%,
    100% {
        box-shadow: 0 4px 14px rgba(0, 0, 0, .35), 0 0 0 0 rgba(255, 255, 255, .45)
    }

    50% {
        box-shadow: 0 4px 14px rgba(0, 0, 0, .35), 0 0 0 9px rgba(255, 255, 255, 0)
    }
}

@media (max-width: 480px) {
    .reel-card {
        flex-basis: 105px
    }
}

footer {
    padding: 2.5rem 2rem 0;
    background-color: var(--nav-bg);
    border-top: 1px solid var(--border);
    margin-top: 5rem
}

.footer-top {
    display: grid;
    grid-template-columns: 1.2fr .9fr 1fr .9fr 1fr;
    gap: 1.75rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 2rem;
    text-align: left
}

.footer-col h3 {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .75rem;
    color: var(--text-color);
    opacity: .8
}

.footer-col p,
.footer-col a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    margin-bottom: .5rem;
    font-size: .85rem;
    line-height: 1.4;
    opacity: .8
}

.footer-col a:hover {
    color: var(--accent);
    opacity: 1
}

.footer-brand .navbar-logo {
    font-size: 1.1rem
}

.footer-brand p {
    margin-top: .6rem
}

.footer-map {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border)
}

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

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border);
    padding: 1.25rem 1rem;
    color: #888;
    font-size: .82rem;
    margin: 0
}

.footer-bottom a {
    color: #888;
    text-decoration: none
}

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


/* =========================================
   CALCULADORA DE RESISTENCIAS PRO (3D)
   ========================================= */
.resistor-calculator {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    max-width: 1000px;
    margin: 2rem auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Configuraciones Superiores */
.calculator-settings {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    text-align: left;
}

.setting-group label {
    font-weight: 600;
    color: var(--text-color);
}

/* Toggle de Bandas (Estilo Píldora) */
.band-toggle {
    display: inline-flex;
    background-color: var(--bg-color);
    border: 2px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
}

.band-toggle input[type="radio"] {
    display: none;
}

.band-toggle label {
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    border-right: 2px solid var(--border);
}

.band-toggle label:last-of-type {
    border-right: none;
}

.band-toggle input[type="radio"]:checked+label {
    background-color: var(--accent);
    color: #fff;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

body.dark-mode .band-toggle input[type="radio"]:checked+label {
    color: #000;
}

/* Gráfico de la resistencia */
.resistor-graphic {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3.5rem;
    padding: 2.5rem 0;
    min-height: 160px;
}

/* Patas metálicas (alambres) independientes */
.resistor-wire {
    width: 80px;
    height: 8px;
    background: linear-gradient(to bottom, #999 0%, #eee 30%, #bbb 50%, #666 100%);
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.wire-left {
    border-radius: 4px 0 0 4px;
}

.wire-right {
    border-radius: 0 4px 4px 0;
}

/* Cuerpo principal (ahora es el centro delgado de la resistencia) */
.resistor-body {
    width: 250px;
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 20px;
    z-index: 2;
    box-shadow:
        0 15px 25px rgba(0, 0, 0, 0.15),
        inset 0 -8px 15px rgba(0, 0, 0, 0.2),
        inset 0 4px 10px rgba(255, 255, 255, 0.5);
    transition: height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.4s ease, border-radius 0.4s ease;
}

/* ── MAGIA: CAPUCHONES ABULTADOS (El efecto Dogbone) ── */
.resistor-body::before,
.resistor-body::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 125%;
    /* Sobresale un 25% haciéndola más gorda en los extremos */
    top: -12.5%;
    /* La centra verticalmente */
    background: inherit;
    /* Hereda mágicamente si es Carbón o Metal */
    border-radius: 20px;
    z-index: -1;
    /* Pasa por detrás de las bandas de colores */
    box-shadow:
        0 15px 25px rgba(0, 0, 0, 0.15),
        inset 0 -8px 15px rgba(0, 0, 0, 0.2),
        inset 0 4px 10px rgba(255, 255, 255, 0.5);
    transition: height 0.4s, top 0.4s, opacity 0.4s, border-radius 0.4s;
}

.resistor-body::before {
    left: -15px;
}

.resistor-body::after {
    right: -15px;
}

/* Sombras en modo oscuro */
body.dark-mode .resistor-body,
body.dark-mode .resistor-body::before,
body.dark-mode .resistor-body::after {
    box-shadow:
        0 15px 25px rgba(0, 255, 255, 0.05),
        inset 0 -8px 15px rgba(0, 0, 0, 0.4),
        inset 0 4px 10px rgba(255, 255, 255, 0.2);
}

/* 1. Película de Carbón */
.body-carbon {
    background: linear-gradient(to bottom, #d6b894 0%, #fdf8f2 25%, #e0cda7 50%, #b89c7a 80%, #8a7359 100%);
    border-radius: 8px;
    /* Centro ligeramente recto, los capuchones lo redondean */
}

body.dark-mode .body-carbon {
    background: linear-gradient(to bottom, #c2a785 0%, #e6dccf 25%, #d1bfae 50%, #a38c70 80%, #6e5c47 100%);
}

/* 2. Película Metálica */
.body-metal {
    background: linear-gradient(to bottom, #9ab7c8 0%, #e0f2fe 25%, #a5c3d4 50%, #769cb3 80%, #527a91 100%);
    border-radius: 8px;
}

body.dark-mode .body-metal {
    background: linear-gradient(to bottom, #6a889c 0%, #bad5e6 25%, #85a4b5 50%, #5c8196 80%, #405e70 100%);
}

/* 3. Cerámica / Cemento (Las cerámicas son bloques sin capuchones) */
.body-ceramic {
    background: linear-gradient(to bottom, #e2e8f0 0%, #ffffff 25%, #f1f5f9 50%, #cbd5e1 80%, #94a3b8 100%);
    border-radius: 6px;
    /* Bloque rectangular cuadrado */
}

body.dark-mode .body-ceramic {
    background: linear-gradient(to bottom, #b0b0b0 0%, #e0e0e0 25%, #cccccc 50%, #999999 80%, #707070 100%);
}

.body-ceramic::before,
.body-ceramic::after {
    opacity: 0;
    /* Oculta los capuchones abultados al ser cerámica */
}

/* Bandas Pintadas sobre el cilindro central */
.band {
    width: 14px;
    height: 100%;
    margin-right: 18px;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    /* Efecto para que parezcan pintadas abrazando el cilindro */
    box-shadow: inset 2px 0 5px rgba(255, 255, 255, 0.4), inset -3px 0 5px rgba(0, 0, 0, 0.4);
    opacity: 0.9;
}

.band-spacer {
    flex-grow: 1;
}

#color-tolerance {
    margin-right: 0;
}

#color-tcr {
    margin-left: 18px;
    margin-right: 0;
}

/* Controles de Selección */
.calculator-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.control-col label {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 8px;
    display: block;
    font-weight: 600;
}

.color-select {
    width: 100%;
    /* FIX: padding derecho ampliado para dejar espacio a la flecha del
       ícono; antes el padding uniforme (0.9rem) era muy justo y el texto
       se solapaba con la flecha, sobre todo en #potencia que usa
       width: auto y calcula su ancho pegado al contenido */
    padding: 0.9rem 2.6rem 0.9rem 0.9rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

body.dark-mode .color-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

.color-select:hover {
    border-color: #888;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.color-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.15);
}

body.dark-mode .color-select:focus {
    box-shadow: 0 0 0 4px rgba(0, 255, 255, 0.15);
}

/* Resultados y Botones */
.calculator-result {
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-color), var(--card-bg));
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1.2rem;
    text-align: center;
}

.calculator-result h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.calculator-result p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #666;
}

body.dark-mode .calculator-result p {
    color: #aaa;
}

/* FIX: .calculator-buttons no tenía ninguna regla, por lo que los botones
   (inline-block) quedaban pegados entre sí sin espacio ni alineación */
.calculator-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

@media (max-width:1024px) {
    section {
        margin: 4rem auto
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .steps-grid {
        gap: 2rem
    }

    .steps-image img {
        height: 300px
    }

    .resistor-calculator {
        padding: 2rem
    }
}

@media (max-width:768px) {
    .navbar {
        grid-template-columns: 1fr auto;
        padding: 1rem 4%
    }

    .hamburger {
        display: flex
    }

    .navbar ul {
        display: none;
        position: absolute;
        justify-self: stretch;
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
        background-color: var(--nav-bg);
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem;
        gap: 0;
        border-bottom: 1px solid var(--border);
        /* FIX 6: z-index del menú desplegable menor que el navbar para evitar
           que tape elementos que estén sobre el navbar */
        z-index: 998;
        box-shadow: 0 8px 20px rgb(0 0 0 / .1)
    }

    .navbar ul.open {
        display: flex
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 1.75rem 1.5rem
    }

    .footer-col-map {
        grid-column: 1 / -1
    }

    .footer-map iframe {
        height: 150px
    }

    .navbar ul li a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
        font-size: 1rem
    }

    .navbar ul li:last-child a {
        border-bottom: none
    }

    .navbar-logo {
        font-size: 1.4rem
    }

    header.hero {
        padding: 6rem 1.5rem
    }

    header.hero h1 {
        font-size: clamp(1.5rem, 7vw, 2.5rem);
        white-space: normal
    }

    header.hero p {
        font-size: 1rem
    }

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

    .steps-image img {
        height: 250px;
        object-fit: cover
    }

    .products-grid {
        grid-template-columns: 1fr
    }

    form {
        padding: 1.5rem
    }

    .contacto-grid {
        grid-template-columns: 1fr
    }

    .form-row {
        grid-template-columns: 1fr
    }

    section {
        margin: 3rem auto;
        padding: 0 1rem
    }

    .features-list,
    .steps-list {
        padding: 1.5rem
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch
    }

    .btn {
        text-align: center
    }

    .buttons {
        flex-direction: column
    }

    .buttons button {
        width: 100%
    }

    .why-us-grid {
        grid-template-columns: 1fr 1fr
    }

    /* Calculadora de resistencias: en pantallas medianas los ajustes
       (bandas/potencia) se apilan en vez de ir en fila, y el gráfico
       de la resistencia se reduce para que las patas + el cuerpo no
       se desborden del contenedor */
    .resistor-calculator {
        padding: 1.5rem
    }

    .calculator-settings {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem
    }

    .setting-group {
        align-items: center;
        text-align: center
    }

    .calculator-controls {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr))
    }

    .resistor-graphic {
        padding: 1.5rem 0;
        margin-bottom: 2.5rem
    }

    .resistor-wire {
        width: 50px
    }

    .resistor-body {
        width: 190px;
        padding: 0 14px
    }

    .band {
        width: 10px;
        margin-right: 12px
    }

    #color-tcr {
        margin-left: 12px
    }

    .calculator-buttons {
        flex-direction: column;
        align-items: stretch
    }

    .calculator-buttons .btn {
        text-align: center
    }
}

@media (max-width:480px) {

    /* FIX: en anchos muy pequeños (~320px) el navbar se desbordaba porque
       el logo (palabra no separable) y los controles de la derecha no se
       reducían lo suficiente, empujando el hamburguesa fuera de pantalla */
    .navbar {
        padding: 1rem 3%
    }

    .navbar-right {
        gap: 8px
    }

    .theme-switch {
        width: 50px;
        height: 26px
    }

    .slider:before {
        height: 18px;
        width: 18px
    }

    input:checked+.slider:before {
        transform: translateX(24px)
    }

    .hamburger {
        width: 30px;
        height: 30px
    }

    .navbar-logo {
        font-size: 1.05rem;
        gap: 6px
    }

    header.hero {
        padding: 4rem 1rem
    }

    header.hero h1 {
        font-size: clamp(1.2rem, 8vw, 2rem)
    }

    .product-card img {
        height: 180px
    }

    .steps-image img {
        height: 200px
    }

    footer {
        padding: 2rem 1rem 0
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        padding-bottom: 2rem
    }

    .footer-map iframe {
        height: 160px
    }

    .why-us-grid {
        grid-template-columns: 1fr
    }

    /* Calculadora de resistencias en móviles pequeños: se reduce aún más
       el ancho de las patas, el cuerpo y las bandas de color para que
       todo el gráfico quepa sin desbordar ni provocar scroll horizontal */
    .resistor-calculator {
        padding: 1.25rem 1rem
    }

    .band-toggle label {
        padding: 0.6rem 0.9rem;
        font-size: 0.85rem
    }

    .calculator-controls {
        grid-template-columns: 1fr
    }

    .resistor-wire {
        width: 30px
    }

    .resistor-body {
        width: 150px;
        padding: 0 8px
    }

    .resistor-body::before,
    .resistor-body::after {
        width: 24px
    }

    .resistor-body::before {
        left: -8px
    }

    .resistor-body::after {
        right: -8px
    }

    .band {
        width: 7px;
        margin-right: 7px
    }

    #color-tcr {
        margin-left: 7px
    }

    .calculator-result {
        padding: 1.5rem 1rem
    }

    .calculator-result h3 {
        font-size: 1.8rem
    }
}

/* ── Product Card Links ── */
a.product-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative
}

a.product-card-link:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 15px 30px rgb(0 86 179 / .15)
}

body.dark-mode a.product-card-link:hover {
    box-shadow: 0 15px 30px rgb(0 255 255 / .12)
}

.card-cta {
    display: block;
    margin: 0 1.5rem 1.5rem;
    padding: .6rem 1.2rem;
    background-color: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.2s, transform 0.2s;
    letter-spacing: .3px
}

body.dark-mode .card-cta {
    color: #000
}

a.product-card-link:hover .card-cta {
    background-color: var(--accent-hover);
    transform: scale(1.02)
}

/* ── Brand Logo Slider (Marcas) ── */
.brand-slider {
    background-color: var(--card-bg);
    height: 100px;
    width: 100%;
    margin: 2rem auto 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
}

/* Efecto de difuminado en los bordes */
.brand-slider::before,
.brand-slider::after {
    content: "";
    position: absolute;
    top: 0;
    width: 50px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.brand-slider::before {
    left: 0;
    background: linear-gradient(to right, var(--card-bg) 0%, transparent 100%);
}

.brand-slider::after {
    right: 0;
    background: linear-gradient(to left, var(--card-bg) 0%, transparent 100%);
}

.brand-slide-track {
    display: flex;
    width: calc(250px * 14);
    animation: scroll-brands 40s linear infinite;
}

.brand-slider:hover .brand-slide-track {
    animation-play-state: paused;
}

@keyframes scroll-brands {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-250px * 7));
    }
}

.brand-logo-box {
    height: 100px;
    width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.brand-logo-box img {
    max-width: 80%;
    max-height: 70px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.brand-logo-box:hover img {
    transform: scale(1.1);
}

/* ── SOLUCIÓN AL MODO OSCURO ── */
body.dark-mode .brand-logo-box img {
    /* En lugar de intentar aclarar el negro (que no funciona), 
       le damos a la imagen un sutil fondo blanco tipo "pastilla" 
       para que destaquen sin importar si son negros o de colores, 
       y añadimos el brillo neón característico de tu página */
    background-color: rgba(255, 255, 255, 0.85);
    padding: 5px 15px;
    border-radius: 8px;
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.3));
}

/* Nota: Eliminamos el "background-color: #1a2234;" que tenías aquí
   para que los degradados de los bordes coincidan a la perfección
   con la variable --card-bg y el fondo no se vea parchado. */

/* ══════════════════════════════════════════
   CENTRO DE AYUDA (WHATSAPP)
══════════════════════════════════════════ */
#btn-ayuda-flotante {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2499;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s, opacity .25s ease;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#btn-ayuda-flotante:hover {
    transform: scale(1.1);
}

body.ocultar-ayuda-footer #btn-ayuda-flotante {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ══════════════════════════════════════════
   VOLVER ARRIBA
══════════════════════════════════════════ */
#btn-volver-arriba {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    min-width: 48px;
    padding: 0;
    line-height: 1;
    font-size: 1.15rem;
    cursor: pointer;
    z-index: 2498;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
}

body.dark-mode #btn-volver-arriba {
    color: #000;
}

#btn-volver-arriba.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#btn-volver-arriba:hover {
    transform: scale(1.1);
}

#btn-volver-arriba.visible:hover {
    transform: translateY(0) scale(1.1);
}

@media (max-width: 480px) {
    #btn-volver-arriba {
        width: 42px;
        height: 42px;
        font-size: 1rem;
        bottom: 20px;
        right: 20px;
    }
}

#panel-ayuda {
    position: fixed;
    top: 0;
    left: -380px;
    width: 350px;
    max-width: 100vw;
    height: 100vh;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
}

#panel-ayuda.ayuda-visible {
    left: 0;
}

.ayuda-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ayuda-header h2 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.ayuda-header h2 i {
    color: #25D366;
}

.btn-cerrar-ayuda {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.btn-cerrar-ayuda:hover {
    color: #ff4444;
}

.ayuda-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ayuda-intro {
    color: var(--text-color);
    opacity: .8;
    font-size: .9rem;
    margin: 0;
}

.ayuda-temas {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.ayuda-tema {
    background: var(--bg-color);
    border: 1px solid var(--border);
    color: var(--text-color);
    border-radius: 20px;
    padding: .4rem .9rem;
    font-size: .8rem;
    cursor: pointer;
    transition: .2s;
    font-family: 'Poppins', sans-serif;
}

.ayuda-tema:hover,
.ayuda-tema.activo {
    border-color: #25D366;
    color: #25D366;
}

.form-group-ayuda label {
    display: block;
    margin-bottom: .4rem;
    color: var(--text-color);
    font-size: .85rem;
}

.form-group-ayuda input,
.form-group-ayuda textarea {
    width: 100%;
    padding: .6rem .8rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    resize: vertical;
}

.ayuda-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-color);
}

.btn-wa-ayuda {
    width: 100%;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 1rem;
    font-weight: bold;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.btn-wa-ayuda:hover {
    opacity: .9;
}

@media (max-width: 480px) {
    #panel-ayuda {
        width: 100vw;
        left: -100vw;
    }
}

/* ══════════════════════════════════════════
   ANUNCIO: CURSOS VACACIONALES (solo index.html)
══════════════════════════════════════════ */
.anuncio-cursos-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.anuncio-cursos-overlay.anuncio-visible {
    opacity: 1;
    visibility: visible;
}

.anuncio-cursos-box {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    max-width: 420px;
    width: calc(100% - 2.5rem);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    transform: translateY(20px) scale(.97);
    transition: transform 0.3s ease;
}

.anuncio-cursos-overlay.anuncio-visible .anuncio-cursos-box {
    transform: translateY(0) scale(1);
}

.anuncio-cursos-cerrar {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #999;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.anuncio-cursos-cerrar:hover {
    color: #ff4444;
}

.anuncio-cursos-icono {
    font-size: 2.8rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.anuncio-cursos-box h2 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.anuncio-cursos-box p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

body.dark-mode .anuncio-cursos-box p {
    color: #aaa;
}

.anuncio-cursos-botones {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.btn-anuncio-cursos {
    background-color: var(--accent);
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.3);
}

body.dark-mode .btn-anuncio-cursos {
    color: #000 !important;
    box-shadow: 0 4px 10px rgba(0, 255, 255, 0.3);
}

.btn-anuncio-cerrar-texto {
    background: none;
    border: none;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.4rem;
}

.btn-anuncio-cerrar-texto:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .anuncio-cursos-box {
        padding: 2rem 1.5rem 1.5rem;
    }
}