/* ========================================
   REGISTRO PARA PUBLICAR - Viive
   Celular: 0-420px | Tablet: 421-917px | Desktop: 918+
   ======================================== */

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

body {
    font-family: 'Poppins', sans-serif;
    background: #f0f4f8;
    color: #333;
    line-height: 1.6;
}

.pagina-publicar {
    min-height: 100vh;
    width: 100%;
}

.encabezado-publicar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.contenedor-header {
    width: 100%;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-publicar .logo-img {
    height: 48px;
    width: auto;
}

.menu-publicar {
    display: flex;
    gap: 1rem;
}

/* Nav: /frontend/estilos.css (enlace-menu) */

/* MENÚ HAMBURGUESA - oculto en desktop */
.menu-hamburguesa {
    display: none;
}

.contenido-publicar {
    width: 100%;
    padding: 2rem 1rem 4rem;
}

.formulario-publicar {
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 2rem;
}

.cabecera-formulario h1 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.cabecera-formulario h1 i {
    color: #4caf50;
    margin-right: 0.5rem;
}

.subtitulo {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.mensaje-oculto {
    display: none;
}

.mensaje-error,
.mensaje-exito {
    margin-bottom: 1rem;
}

.mensaje-error {
    background: #ffebee;
    color: #c62828;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.mensaje-exito {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.form-registro-publicar {
    width: 100%;
}

.form-registro-publicar .campo {
    margin-bottom: 1rem;
}

.form-registro-publicar label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.form-registro-publicar input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

.form-registro-publicar input:focus {
    outline: none;
    border-color: #4caf50;
}

.btn-enviar,
.btn-registro {
    width: 100%;
    padding: 0.9rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-enviar:hover,
.btn-registro:hover {
    opacity: 0.95;
}

.enlace-login {
    text-align: center;
    margin-top: 1rem;
}

.enlace-login a {
    color: #4caf50;
    text-decoration: none;
}

.enlace-login a:hover {
    text-decoration: underline;
}

/* ========== CELULAR: 0 - 420px ========== */
@media (min-width: 0px) and (max-width: 440px) {
    .contenedor-header {
        padding: 0.75rem 1rem;
    }

    .menu-hamburguesa {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 6px;
        z-index: 1001;
        border-radius: 6px;
        transition: background-color 0.3s ease;
    }
    .menu-hamburguesa:hover {
        background-color: rgba(76, 175, 80, 0.1);
    }
    .linea-hamburguesa {
        width: 28px;
        height: 3px;
        background: #4caf50;
        border-radius: 2px;
        transition: all 0.3s ease;
        transform-origin: center;
        display: block;
    }
    .menu-hamburguesa.menu-activo .linea-hamburguesa:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    .menu-hamburguesa.menu-activo .linea-hamburguesa:nth-child(2) {
        opacity: 0;
    }
    .menu-hamburguesa.menu-activo .linea-hamburguesa:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    .menu-publicar {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 1.5rem;
        gap: 1rem;
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    .menu-publicar.menu-abierto {
        left: 0;
    }

    .contenido-publicar {
        padding: 1.5rem 0.75rem 3rem;
    }

    .formulario-publicar {
        padding: 1.25rem;
    }

    .cabecera-formulario h1 {
        font-size: 1.25rem;
    }

    .subtitulo {
        font-size: 0.9rem;
    }

    .form-registro-publicar input {
        padding: 0.65rem;
    }

    .btn-registro {
        padding: 0.75rem;
    }
}

/* ========== TABLET: 421px - 917px ========== */
@media (min-width: 441px) and (max-width: 917px) {
    .contenedor-header {
        padding: 1rem 1.25rem;
    }
    .menu-hamburguesa {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 6px;
        z-index: 1001;
        border-radius: 6px;
        transition: background-color 0.3s ease;
    }
    .menu-hamburguesa:hover {
        background-color: rgba(76, 175, 80, 0.1);
    }
    .linea-hamburguesa {
        width: 28px;
        height: 3px;
        background: #4caf50;
        border-radius: 2px;
        transition: all 0.3s ease;
        transform-origin: center;
        display: block;
    }
    .menu-hamburguesa.menu-activo .linea-hamburguesa:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    .menu-hamburguesa.menu-activo .linea-hamburguesa:nth-child(2) {
        opacity: 0;
    }
    .menu-hamburguesa.menu-activo .linea-hamburguesa:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    .menu-publicar {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 1.5rem;
        gap: 1rem;
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    .menu-publicar.menu-abierto {
        left: 0;
    }

    .contenido-publicar {
        display: flex;
        justify-content: center;
        padding: 2rem 1.5rem 4rem;
    }

    .formulario-publicar {
        width: 80%;
        padding: 1.75rem;
    }

    .cabecera-formulario h1 {
        font-size: 1.4rem;
    }
}

/* ========== DESKTOP: 918px+ ========== */
@media (min-width: 918px) {
    .menu-hamburguesa {
        display: none !important;
    }
    .contenedor-header {
        padding: 1rem 1.5rem;
    }

    .contenido-publicar {
        display: flex;
        justify-content: center;
        padding: 2rem 2rem 4rem;
    }

    .formulario-publicar {
        width: 80%;
        padding: 2.5rem;
    }

    .cabecera-formulario h1 {
        font-size: 1.75rem;
    }

    .form-registro-publicar {
        width: 100%;
    }
}
