@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Open Sans", sans-serif;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    width: 100%;
    background: url("https://tu-hosting.cl/herramientas_sistcalprom/assets/img/img_login/backgroundImg.jpg") center/cover no-repeat;
    position: relative;
    padding-bottom: 180px;
}

/* Fondo oscuro MUCHO más claro para que se vea la imagen */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.12);
    z-index: 0;
    pointer-events: none;
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 30;
    padding: 0 10px;
}

.navbar {
    display: flex;
    padding: 22px 0;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: space-between;
    gap: 12px;
}

.navbar .hamburger-btn {
    display: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.5rem;
}

.navbar .logo {
    gap: 10px;
    display: flex;
    align-items: center;
    text-decoration: none;
    min-width: 0;
}

.navbar .logo img {
    width: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.navbar .logo h2 {
    color: #fff;
    font-weight: 600;
    font-size: 1.7rem;
    white-space: nowrap;
}

.navbar .links {
    display: flex;
    gap: 35px;
    list-style: none;
    align-items: center;
}

.navbar .close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    display: none;
    color: white;
    cursor: pointer;
}

.navbar .links a {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 500;
    text-decoration: none;
    transition: 0.1s ease;
}

.navbar .links a:hover {
    color: #19e8ff;
}

.navbar .login-btn {
    border: none;
    outline: none;
    background: #fff;
    color: #275360;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.15s ease;
}

.navbar .login-btn:hover {
    background: #ddd;
}

.navbar .signup-btn {
    border: none;
    outline: none;
    background: #ff4081;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 18px;
    margin-left: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s ease;
}

.navbar .signup-btn:hover {
    background: #e73370;
}

.form-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 20;
    width: calc(100% - 24px);
    opacity: 0;
    pointer-events: none;
    max-width: 720px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 12px;
    overflow: hidden;
    transform: translate(-50%, -70%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.show-popup .form-popup {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, opacity 0.15s ease;
}

.form-popup .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #878484;
    cursor: pointer;
    z-index: 5;
}

.blur-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 15;
    height: 100%;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: 0.1s ease;
    background: rgba(255, 255, 255, 0.06);
}

.show-popup .blur-bg-overlay {
    opacity: 1;
    pointer-events: auto;
}

.form-popup .form-box {
    min-height: 520px;
}

/* SOLO LOGIN POR DEFECTO */
.form-popup .login {
    display: flex;
}

/* OCULTAR REGISTRO POR DEFECTO */
.form-popup .signup {
    display: none;
}

/* MOSTRAR REGISTRO SOLO CUANDO CORRESPONDA */
.form-popup.show-signup .login {
    display: none;
}

.form-popup.show-signup .signup {
    display: flex;
}

.form-box .form-details {
    width: 100%;
    color: #fff;
    max-width: 330px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 24px;
}

.form-box .form-details::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.22);
}

.form-box .form-details > * {
    position: relative;
    z-index: 1;
}

.login .form-details {
    padding: 0 40px;
    background: url("https://tu-hosting.cl/herramientas_sistcalprom/assets/img/img_login/backgroundImg.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.signup .form-details {
    padding: 0 20px;
    background: url("https://tu-hosting.cl/herramientas_sistcalprom/assets/img/img_login/signup.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.form-box .form-content {
    width: 100%;
    padding: 35px;
    background: rgba(255, 255, 255, 0.97);
}

.form-box h2 {
    text-align: center;
    margin-bottom: 29px;
}

form .input-field {
    position: relative;
    height: 50px;
    width: 100%;
    margin-top: 20px;
}

.input-field input {
    height: 100%;
    width: 100%;
    background: none;
    outline: none;
    font-size: 0.95rem;
    padding: 0 15px;
    border: 1px solid #717171;
    border-radius: 6px;
}

.input-field input:focus {
    border: 1px solid aqua;
}

.input-field label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #4a4646;
    pointer-events: none;
    transition: 0.2s ease;
}

.input-field input:is(:focus, :valid) {
    padding: 16px 15px 0;
}

.input-field input:is(:focus, :valid) ~ label {
    transform: translateY(-120%);
    color: #00bcd4;
    font-size: 0.75rem;
}

.form-box a {
    color: #00bcd4;
    text-decoration: none;
}

.form-box a:hover {
    text-decoration: underline;
}

form :where(.forgot-pass-link, .policy-text) {
    display: inline-flex;
    margin-top: 13px;
    font-size: 0.95rem;
}

form button {
    width: 100%;
    color: #fff;
    border: none;
    outline: none;
    padding: 14px 0;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    margin: 25px 0;
    background: #00bcd4;
    transition: 0.2s ease;
}

form button:hover {
    background: #0097a7;
}

.form-content .bottom-link {
    text-align: center;
}

.signup .policy-text {
    display: flex;
    margin-top: 14px;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.signup .policy-text input {
    width: 14px;
    height: 14px;
    margin-right: 0;
}

/* FRANJA INFERIOR */
.ia-premium-strip {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 12;
    padding: 14px 18px 18px;
    background: rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ia-premium-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

.ia-premium-title {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1.2;
}

.ia-premium-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.ia-card {
    position: relative;
    height: 95px;
    border-radius: 18px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.ia-card video,
.ia-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ia-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    background: linear-gradient(to top, rgba(0,0,0,.42), rgba(0,0,0,.06));
}

.ia-card-overlay span {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

/* TABLET */
@media (max-width: 1100px) {
    body {
        padding-bottom: 210px;
    }

    .ia-premium-title {
        font-size: 20px;
    }

    .ia-premium-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* MENÚ Y FORM */
@media (max-width: 950px) {
    .navbar :is(.hamburger-btn, .close-btn) {
        display: block;
    }

    .navbar {
        padding: 15px 0;
    }

    .navbar .logo img {
        display: none;
    }

    .navbar .logo h2 {
        font-size: 1.4rem;
    }

.navbar .links {
    position: fixed;
    top: 0;
    z-index: 40;
    left: -100%;
    display: block;
    height: 100vh;
    width: 100%;
    padding-top: 60px;
    text-align: center;
    background: url("https://tu-hosting.cl/herramientas_sistcalprom/assets/img/img_login/backgroundImg.jpg") center/cover no-repeat !important;
    transition: 0.2s ease;
}



    .navbar .links.show-menu {
        left: 0;
    }

    .navbar .links a {
        display: inline-flex;
        margin: 20px 0;
        font-size: 1.2rem;
        color: white;
    }

    .navbar .links a:hover {
        color: #00BCD4;
    }

    .navbar .login-btn,
    .navbar .signup-btn {
        font-size: 0.9rem;
        padding: 7px 10px;
    }
}

/* MÓVIL */
@media (max-width: 760px) {
    body {
        padding-bottom: 0;
    }

    .form-popup {
        width: 95%;
        max-width: 420px;
    }

    .form-box .form-details {
        display: none;
    }

    .form-box .form-content {
        padding: 28px 18px;
    }

    .form-popup .form-box {
        min-height: auto;
    }

    .ia-premium-strip {
        position: static;
        margin-top: 20px;
        padding: 14px;
        background: rgba(0, 0, 0, 0.24);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .ia-premium-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .ia-premium-grid {
        grid-template-columns: 1fr;
    }

    .ia-card {
        height: 120px;
    }

    .ia-card-overlay span {
        font-size: 15px;
    }
}

/* MÓVIL PEQUEÑO */
@media (max-width: 480px) {
    .navbar .logo h2 {
        font-size: 1.15rem;
    }

    .navbar .login-btn,
    .navbar .signup-btn {
        font-size: 0.82rem;
        padding: 7px 9px;
    }

    .ia-premium-title {
        font-size: 17px;
    }

    .ia-card {
        height: 105px;
        border-radius: 14px;
    }

    .ia-card-overlay {
        padding: 10px;
    }

    .ia-card-overlay span {
        font-size: 14px;
    }
}

/* Video de fondo */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: -1; /* detrás del contenido */
}

/* Contenido encima */
.content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
    padding-top: 150px;
}
