/* =========================================
   🔄 RESET LOCAL (mínimo)
========================================= */
* {
    box-sizing: border-box;
}

/* =========================================
   🧍 BODY (solo lo necesario)
========================================= */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: url('../Imagenes_y_Archivos/FondodepantallaP2.png');
}

/* =========================================
   🧢 HEADER (ajuste leve)
========================================= */
header {
    margin-bottom: 70px;
}

/* =========================================
   📦 MAIN
========================================= */
main {
    flex: 1;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

/* =========================================
   📐 CONTENEDOR PRINCIPAL
========================================= */
.container {
    width: 80%;
    max-width: 900px;
    background: rgba(255,255,255,0.97);
    padding: 40px;
    border-radius: 14px;
    box-shadow: var(--sombra-hover);
    padding-bottom: 80px;
}

/* =========================================
   🏷️ TITULOS
========================================= */
h1 {
    text-align: center;
    letter-spacing: 1px;
    margin-bottom: 30px;
}

/* =========================================
   🔘 BOTONES TIPO
========================================= */
.bloque-tipos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.btn-tipo {
    padding: 14px;
    border-radius: 10px;
    border: none;
    background-color: var(--azul-oscuro);
    color: var(--blanco);
    font-size: 15px;
    cursor: pointer;
    transition: 0.25s ease;
    font-weight: 600;
    box-shadow: var(--sombra-suave);
}

.btn-tipo:hover {
    background-color: var(--azul-hover);
    transform: translateY(-2px);
    box-shadow: var(--sombra-hover);
}

.btn-tipo.activo,
.grid-botones button.activo {
    background-color: var(--azul-activo);
    box-shadow: 0 0 0 2px rgba(35,102,196,0.3);
}

/* =========================================
   🧩 BLOQUES SECUNDARIOS
========================================= */
.bloque-secundario {
    margin-top: 25px;
}

.oculto {
    display: none;
}

.grid-botones {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.grid-botones button {
    padding: 12px;
    border-radius: 8px;
    border: none;
    background-color: var(--azul-medio);
    color: var(--blanco);
    font-size: 14px;
    cursor: pointer;
    transition: 0.25s ease;
    font-weight: 500;
    box-shadow: var(--sombra-suave);
    text-align: left;
}

.grid-botones button:hover {
    background-color: var(--azul-oscuro);
    transform: translateY(-2px);
    box-shadow: var(--sombra-hover);
}

.grid-botones button.activo {
    background-color: var(--azul-activo);
}

/* =========================================
   ✍️ EDITOR
========================================= */
#editorPlantilla {
    margin-top: 25px;
    min-height: 220px;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid var(--gris-borde);
    background-color: var(--gris-fondo);
    font-size: 14px;
    line-height: 1.5;
}

#editorPlantilla:focus {
    outline: none;
    border: 1px solid var(--azul-activo);
    box-shadow: 0 0 0 3px rgba(44,123,229,0.2);
}

/* =========================================
   📏 SEPARADORES
========================================= */
#bloquePlantillas {
    margin-bottom: 35px;
}

.label-editor {
    margin-top: 10px;
}

.separador-seccion {
    height: 1px;
    background-color: var(--gris-borde);
    margin: 35px 0 20px 0;
}

/* =========================================
   🎛️ BOTONES ACCION
========================================= */
.botones-container {
    display: flex;
    gap: 20px;
    margin-top: 25px;
    margin-bottom: 25px;

}

.botones-container button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background-color: var(--azul-oscuro);
    color: var(--blanco);
    cursor: pointer;
    font-size: 15px;
    transition: 0.25s ease;
    box-shadow: var(--sombra-suave);
}

/* =========================================
   📱 RESPONSIVE
========================================= */
@media (max-width: 600px) {

    .container {
        width: 95%;
        padding: 25px;
    }

    .bloque-tipos,
    .grid-botones {
        grid-template-columns: 1fr;
        margin-bottom: 20px;
    }

    .botones-container {
        flex-direction: column;
    }
}