/* ============================================
   ESOMERO - ESTILOS
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #222;
    background: #f8f8f8;
    line-height: 1.6;
}

/* ===== ENCABEZADO ===== */
.encabezado {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.contenedor-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    color: #6a1b9a;
    letter-spacing: 1px;
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    color: #444;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: #6a1b9a;
}

.btn-admin {
    background: #6a1b9a;
    color: #fff !important;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.btn-admin:hover {
    background: #4a148c;
    color: #fff !important;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    color: #fff;
    padding: 8rem 2rem;
    text-align: center;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video {
    background: #4a148c; /* color de respaldo si el video no carga */
}

.video-fondo {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

.capa-oscura {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(74, 20, 140, 0.55); /* morado oscuro semitransparente */
    z-index: 1;
}

.hero-contenido {
    position: relative;
    z-index: 2;
    max-width: 800px;
}
.hero-contenido h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.hero-contenido p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn-principal {
    display: inline-block;
    background: #fff;
    color: #6a1b9a;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-principal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* ===== SECCIONES ===== */
.seccion {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.seccion-alt {
    background: #fff;
    max-width: 100%;
    padding-left: calc(50% - 600px + 2rem);
    padding-right: calc(50% - 600px + 2rem);
}

@media (max-width: 1250px) {
    .seccion-alt {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.titulo-seccion {
    font-size: 2rem;
    color: #6a1b9a;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.titulo-seccion::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #ab47bc;
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

.mensaje-vacio {
    text-align: center;
    color: #888;
    font-style: italic;
}

/* ===== GALERÍA ===== */
.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.tarjeta-diseno {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.tarjeta-diseno:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(106,27,154,0.15);
}

.tarjeta-diseno img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #eee;
}

.info-diseno {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.info-diseno h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.info-diseno p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.btn-cotizar {
    background: #6a1b9a;
    color: #fff;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-cotizar:hover {
    background: #4a148c;
}

/* ===== SERVICIOS ===== */
.lista-servicios {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.tarjeta-servicio {
    background: #faf5fc;
    border-left: 4px solid #ab47bc;
    padding: 1.5rem;
    border-radius: 8px;
}

.tarjeta-servicio h3 {
    color: #6a1b9a;
    margin-bottom: 0.5rem;
}

.tarjeta-servicio p {
    color: #555;
    font-size: 0.95rem;
}

/* ===== CONTACTO ===== */
.texto-contacto {
    text-align: center;
    color: #555;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.btn-whatsapp {
    display: block;
    width: fit-content;
    margin: 0 auto;
    background: #25D366;
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,211,102,0.4);
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal.oculto {
    display: none;
}

.modal-contenido {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.cerrar-modal {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.cerrar-modal:hover {
    color: #6a1b9a;
}

.modal-subtitulo {
    color: #6a1b9a;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal input,
.modal textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

.modal input:focus,
.modal textarea:focus {
    outline: none;
    border-color: #6a1b9a;
}

.mensaje-exito {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    margin-top: 1rem;
}

.oculto {
    display: none !important;
}

/* ===== PIE ===== */
.pie {
    background: #2a2a2a;
    color: #ccc;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .hero-contenido h2 {
        font-size: 2rem;
    }
    .contenedor-header {
        justify-content: center;
    }
    nav {
        gap: 1rem;
    }
}
/* ===== PÁGINA DE LOGIN ===== */
.pagina-login {
    background: linear-gradient(135deg, #6a1b9a 0%, #ab47bc 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.caja-login {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.logo-login {
    color: #6a1b9a;
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.subtitulo-login {
    color: #888;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.caja-login form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.caja-login input {
    padding: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    text-align: center;
}

.caja-login input:focus {
    outline: none;
    border-color: #6a1b9a;
    box-shadow: 0 0 0 3px rgba(106,27,154,0.15);
}

.caja-login .btn-principal {
    background: #6a1b9a;
    color: #fff;
    padding: 0.9rem;
    font-size: 1rem;
}

.caja-login .btn-principal:hover {
    background: #4a148c;
    box-shadow: none;
    transform: none;
}

.volver-inicio {
    display: block;
    margin-top: 1.5rem;
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
}

.volver-inicio:hover {
    color: #6a1b9a;
}

.mensaje-error {
    background: #ffebee;
    color: #c62828;
    padding: 0.8rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
/* ===== PANEL DE ADMIN ===== */
.pagina-admin {
    background: #f0f2f5;
    min-height: 100vh;
}

.encabezado-admin {
    background: #4a148c;
    color: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.encabezado-admin .contenedor-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-admin {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
}

.encabezado-admin nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.95rem;
}

.encabezado-admin nav a:hover {
    text-decoration: underline;
}

.btn-salir {
    background: rgba(255,255,255,0.15);
    padding: 0.4rem 1rem;
    border-radius: 6px;
}

.contenedor-admin {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.bloque-admin {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.bloque-admin h2 {
    color: #4a148c;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.ayuda {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.form-admin {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.form-admin input[type="text"],
.form-admin input[type="file"] {
    flex: 1;
    min-width: 180px;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
}

.form-admin input:focus {
    outline: none;
    border-color: #6a1b9a;
}

.btn-agregar {
    background: #6a1b9a;
    color: #fff;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-agregar:hover {
    background: #4a148c;
}

.lista-admin {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.lista-admin li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1rem;
    background: #faf5fc;
    border-left: 4px solid #ab47bc;
    border-radius: 6px;
    gap: 1rem;
}

.lista-admin li strong {
    display: block;
    color: #333;
    margin-bottom: 0.2rem;
}

.descripcion {
    color: #777;
    font-size: 0.88rem;
    display: block;
}

.mensaje-cotizacion {
    color: #555;
    margin-top: 0.5rem;
    font-size: 0.92rem;
    font-style: italic;
}

.btn-borrar {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-borrar:hover {
    background: #ffcdd2;
}

/* ===== GALERÍA EN ADMIN ===== */
.galeria-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.tarjeta-admin {
    background: #faf5fc;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tarjeta-admin img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #eee;
}

.info-tarjeta-admin {
    padding: 0.7rem;
    flex-grow: 1;
}

.info-tarjeta-admin strong {
    display: block;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.tarjeta-admin form {
    padding: 0.7rem;
    padding-top: 0;
}

.tarjeta-admin .btn-borrar {
    width: 100%;
}
/* ===== BOTÓN DE TEMA ===== */
.btn-tema {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.15);
    color: inherit;
    font-size: 1.1rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-tema:hover {
    background: rgba(106,27,154,0.1);
}

/* ===== TEMA OSCURO ===== */
body.tema-oscuro {
    background: #121212;
    color: #e0e0e0;
}

body.tema-oscuro .encabezado {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

body.tema-oscuro .logo {
    color: #ce93d8;
}

body.tema-oscuro nav a {
    color: #ccc;
}

body.tema-oscuro nav a:hover {
    color: #ce93d8;
}

body.tema-oscuro .seccion-alt {
    background: #1a1a1a;
}

body.tema-oscuro .titulo-seccion {
    color: #ce93d8;
}

body.tema-oscuro .tarjeta-diseno {
    background: #1e1e1e;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

body.tema-oscuro .info-diseno h3 {
    color: #f0f0f0;
}

body.tema-oscuro .info-diseno p {
    color: #aaa;
}

body.tema-oscuro .tarjeta-servicio {
    background: #1e1e1e;
    border-left-color: #ce93d8;
}

body.tema-oscuro .tarjeta-servicio h3 {
    color: #ce93d8;
}

body.tema-oscuro .tarjeta-servicio p {
    color: #bbb;
}

body.tema-oscuro .texto-contacto {
    color: #bbb;
}

body.tema-oscuro .pie {
    background: #0a0a0a;
    color: #888;
}

body.tema-oscuro .mensaje-vacio {
    color: #777;
}

body.tema-oscuro .modal-contenido {
    background: #1e1e1e;
    color: #e0e0e0;
}

body.tema-oscuro .modal-subtitulo {
    color: #ce93d8;
}

body.tema-oscuro .modal input,
body.tema-oscuro .modal textarea {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

body.tema-oscuro .modal input:focus,
body.tema-oscuro .modal textarea:focus {
    border-color: #ce93d8;
}

body.tema-oscuro .cerrar-modal {
    color: #aaa;
}

body.tema-oscuro .cerrar-modal:hover {
    color: #ce93d8;
}

body.tema-oscuro .btn-tema {
    border-color: rgba(255,255,255,0.15);
}

body.tema-oscuro .btn-tema:hover {
    background: rgba(206,147,216,0.15);
}
/* ===== VISTA PREVIA DE DISEÑOS ===== */
.vista-previa-contenedor {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    background: #faf5fc;
    border-radius: 8px;
    text-align: center;
}

.texto-vista-previa {
    color: #6a1b9a;
    font-size: 0.9rem;
    margin-bottom: 0.7rem;
    font-weight: 500;
}

.vista-previa-imagen {
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: contain;
}

/* ===== BOTÓN CANCELAR IMAGEN ===== */
.btn-cancelar-imagen {
    display: block;
    margin: 1rem auto 0;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-cancelar-imagen:hover {
    background: #ffcdd2;
}
/* ===== LOGO ===== */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.logo-oscuro {
    display: none;
}

body.tema-oscuro .logo-claro {
    display: none;
}

body.tema-oscuro .logo-oscuro {
    display: block;
}

.etiqueta-admin {
    font-size: 1rem;
    font-weight: 400;
    color: #888;
    padding-left: 0.8rem;
    border-left: 2px solid #ddd;
}

body.tema-oscuro .etiqueta-admin {
    color: #aaa;
    border-left-color: #444;
}
/* ===== BOTÓN WHATSAPP EN DISEÑOS ===== */
.btn-whatsapp-diseno {
    display: block;
    background: #25D366;
    color: #fff;
    text-align: center;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: background 0.2s, transform 0.2s;
}

.btn-whatsapp-diseno:hover {
    background: #1da851;
    transform: translateY(-1px);
}