:root {
    --bg-dark: #0a0a0f;
    --bg-section: #101018;
    --bg-section-alt: #0d0d14;
    --purple: #7b2ff7;
    --purple-light: #a259ff;
    --cyan: #00e5ff;
    --text: #ffffff;
    --text-muted: #a0a0b0;
}

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-dark);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 300 300'%3E%3Cg fill='none' stroke='%237b2ff7' stroke-width='1.2' stroke-linecap='round' opacity='0.18'%3E%3Cpath d='M10 30 L70 30 L110 70 L180 70 L220 30 L290 30'/%3E%3Cpath d='M30 10 L30 60 L60 90 L60 150'/%3E%3Cpath d='M250 20 L250 80 L200 130 L140 130 L100 170'/%3E%3Cpath d='M20 180 L80 180 L120 220 L120 280'/%3E%3Cpath d='M160 200 L220 200 L260 240 L260 290'/%3E%3Cpath d='M180 150 L240 150 L280 190'/%3E%3Cpath d='M40 220 L40 260 L90 290'/%3E%3Cpath d='M150 40 L190 40 L220 10'/%3E%3C/g%3E%3Cg fill='%2300e5ff' opacity='0.28'%3E%3Ccircle cx='10' cy='30' r='3'/%3E%3Ccircle cx='70' cy='30' r='3'/%3E%3Ccircle cx='110' cy='70' r='2.5'/%3E%3Ccircle cx='180' cy='70' r='2.5'/%3E%3Ccircle cx='220' cy='30' r='3'/%3E%3Ccircle cx='290' cy='30' r='3'/%3E%3Ccircle cx='30' cy='10' r='2.5'/%3E%3Ccircle cx='30' cy='60' r='2.5'/%3E%3Ccircle cx='60' cy='90' r='2.5'/%3E%3Ccircle cx='60' cy='150' r='3'/%3E%3Ccircle cx='250' cy='20' r='2.5'/%3E%3Ccircle cx='250' cy='80' r='2.5'/%3E%3Ccircle cx='200' cy='130' r='3'/%3E%3Ccircle cx='140' cy='130' r='2.5'/%3E%3Ccircle cx='100' cy='170' r='3'/%3E%3Ccircle cx='20' cy='180' r='2.5'/%3E%3Ccircle cx='80' cy='180' r='2.5'/%3E%3Ccircle cx='120' cy='220' r='3'/%3E%3Ccircle cx='120' cy='280' r='2.5'/%3E%3Ccircle cx='160' cy='200' r='2.5'/%3E%3Ccircle cx='220' cy='200' r='2.5'/%3E%3Ccircle cx='260' cy='240' r='3'/%3E%3Ccircle cx='260' cy='290' r='2.5'/%3E%3Ccircle cx='180' cy='150' r='2.5'/%3E%3Ccircle cx='240' cy='150' r='2.5'/%3E%3Ccircle cx='280' cy='190' r='3'/%3E%3Ccircle cx='40' cy='220' r='2.5'/%3E%3Ccircle cx='40' cy='260' r='2.5'/%3E%3Ccircle cx='90' cy='290' r='3'/%3E%3Ccircle cx='150' cy='40' r='2.5'/%3E%3Ccircle cx='190' cy='40' r='2.5'/%3E%3Ccircle cx='220' cy='10' r='3'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
}

/* Header */
header {
    background-color: #000000;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 2px solid var(--purple);
    box-shadow: 0 4px 20px rgba(123, 47, 247, 0.25);
}

.logo {
    height: 180px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 15px;
}

nav a {
    color: var(--text);
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.2s;
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
    transition: width 0.25s;
}

nav a:hover {
    color: var(--cyan);
}

nav a:hover::after {
    width: 100%;
}

/* Secciones alternadas, separadas visualmente, dejando ver el patrón de fondo */
section {
    padding: 70px 40px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

section:nth-of-type(odd) {
    background-color: rgba(16, 16, 24, 0.7);
}

section:nth-of-type(even) {
    background-color: rgba(13, 13, 20, 0.7);
}

section > * {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

section h2 {
    color: var(--purple-light);
    font-size: 2rem;
    margin-bottom: 10px;
    text-align: center;
}

section h2 i {
    color: var(--cyan);
    margin-right: 10px;
}

/* Línea decorativa tipo "circuito" bajo cada título */
section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
    margin: 14px auto 0;
    border-radius: 2px;
}

section > p {
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Botones */
a.boton {
    display: inline-block;
    background: linear-gradient(135deg, var(--purple), #6a1fd0);
    color: var(--text);
    padding: 12px 26px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(123, 47, 247, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

a.boton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.35);
}

.boton-secundario {
    background: transparent;
    border: 2px solid var(--purple);
    box-shadow: none;
    margin-left: 10px;
}

.boton-secundario:hover {
    background-color: var(--purple);
    box-shadow: 0 6px 20px rgba(123, 47, 247, 0.4);
}

/* Lista de servicios con iconos */
ul {
    list-style: none;
    padding: 0;
    text-align: left;
    max-width: 500px;
    margin: 20px auto 0;
}

ul li {
    background-color: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--cyan);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s, border-color 0.2s;
}

ul li:hover {
    background-color: rgba(123, 47, 247, 0.08);
    border-left-color: var(--purple-light);
}

ul li i {
    color: var(--cyan);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Tarjetas de condiciones */
.condiciones-caja {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(123, 47, 247, 0.25);
    border-left: 4px solid var(--purple);
    padding: 22px;
    margin-bottom: 15px;
    text-align: left;
    border-radius: 8px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    transition: border-color 0.2s, transform 0.2s;
}

.condiciones-caja:hover {
    border-color: var(--cyan);
    transform: translateX(4px);
}

.condiciones-caja h3 {
    color: var(--cyan);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Portada del libro */
.portada-libro {
    display: block;
    max-width: 350px;
    width: 100%;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.2);
}

/* Galería de imágenes */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 25px;
}

.galeria-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    border: 1px solid rgba(123, 47, 247, 0.4);
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.galeria-grid img:hover {
    transform: scale(1.03);
    border-color: var(--cyan);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.25);
}

/* Colaboradores */
.colaboradores-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.colaboradores-grid img {
    max-height: 140px;
    max-width: 240px;
    object-fit: contain;
    filter: grayscale(30%);
    opacity: 0.85;
    transition: filter 0.25s, opacity 0.25s, transform 0.25s;
}

.colaboradores-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Footer */
footer {
    background-color: #000000;
    text-align: center;
    padding: 30px 20px;
    border-top: 2px solid var(--purple);
}

.redes {
    margin-bottom: 15px;
}

.redes a {
    color: var(--text);
    font-size: 1.8rem;
    margin: 0 14px;
}

/* Formulario de agenda */
.form-agenda {
    max-width: 500px;
    margin: 20px auto 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-agenda label {
    color: var(--cyan);
    font-weight: bold;
    margin-top: 12px;
}

.form-agenda input,
.form-agenda textarea {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(123, 47, 247, 0.4);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
}

.form-agenda input:focus,
.form-agenda textarea:focus {
    outline: none;
    border-color: var(--cyan);
}

.form-agenda button {
    align-self: center;
    margin-top: 20px;
    cursor: pointer;
    border: none;
}

/* ===== Versión celular ===== */
@media (max-width: 768px) {
    header {
        padding: 15px 12px;
    }

    .logo {
        height: auto;
        width: 100%;
    }

    nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        width: 100%;
        margin-top: 5px;
    }

    nav a {
        margin: 0;
        padding: 12px 8px;
        text-align: center;
        font-size: 1rem;
        background-color: rgba(123, 47, 247, 0.1);
        border: 1px solid rgba(123, 47, 247, 0.5);
        border-radius: 8px;
        transition: background-color 0.2s, border-color 0.2s;
    }

    nav a:hover,
    nav a:active {
        background-color: rgba(123, 47, 247, 0.25);
        border-color: var(--cyan);
    }

    /* Se quita la línea animada, ya no hace falta con recuadros */
    nav a::after {
        display: none;
    }

    /* Si queda una opción suelta al final, ocupa todo el ancho */
    nav a:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    section {
        padding: 50px 20px;
    }

    section h2 {
        font-size: 1.7rem;
    }

    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .galeria-grid img {
        height: 150px;
    }

    .boton-secundario {
        margin-left: 0;
    }
}
