/* Font Face Definition */
@font-face {
    font-family: 'Comfortaa Regular';
    src: url('comfortaa/Comfortaa-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Comfortaa';
    src: url('comfortaa/Comfortaa-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Comfortaa Light';
    src: url('comfortaa/Comfortaa-Light.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'Titillium Web';
    src: url('Fuente/TitilliumWeb-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* Variables */
:root {
    --primary-color: #004e92;
    /* Deep Blue based on typical corporate colors */
    --secondary-color: #4ca1af;
    /* Cyan/Teal accent */
    --text-color: #333;
    --light-text: #ffffff;
    --bg-light: #ffffff;
    --transition-speed: 0.3s;
    --font-main: 'Comfortaa', sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background: #f1f1f1;
    min-height: 100vh;
    /* Allow scrolling if content overflows */
    display: flex;
    flex-direction: column;
    /* overflow: hidden; Removed to allow scrolling */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Header */
/* Header Removed */

/* Hero Section */
.hero {
    background: white;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: row;
    /* Horizontal split */
    align-items: stretch;
    /* Full height */
    justify-content: flex-start;
    text-align: center;
    color: var(--light-text);
    /* overflow: hidden; Removed to allow content to push footer */
    padding: 0;
}

.hero-left {
    position: relative;
    width: 60%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    padding-left: clamp(1.5rem, 3.5vw, 4rem);
    padding-bottom: clamp(1rem, 1.5vh, 2rem);
    padding-right: clamp(1rem, 1.5vw, 2rem);
    padding-top: clamp(1rem, 1.5vh, 2rem);
}

.hero-right {
    width: 40%;
    background-image: url('assets/svg/RecursoFondo.svg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: clamp(2rem, 3.5vw, 4rem) clamp(1rem, 2vw, 2rem) 0.75rem;
    overflow: hidden;
    position: relative;
}

.logo-container {
    display: flex;
    justify-content: center;
    width: auto;
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: clamp(200px, 20vw, 325px);
    height: auto;
}

/* ── Contacto ── */
.contact-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(4px, 0.6vh, 8px);
    font-size: clamp(0.65rem, 0.85vw, 1.1rem);
    font-family: 'Titillium Web', sans-serif;
    color: #088dbb;
    position: relative;
    z-index: 1;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.7vw, 13px);
}

.contact-icon {
    width: clamp(20px, 2.3vw, 36px);
    height: clamp(20px, 2.3vw, 36px);
    object-fit: contain;
    flex-shrink: 0;
}

.contact-info span,
.contact-info a {
    color: #088dbb;
    font-family: 'Titillium Web', sans-serif;
    text-decoration: none;
    font-size: clamp(0.65rem, 0.85vw, 1.1rem);
}

.contact-info a:hover {
    text-decoration: underline;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #088dbb;
    /* Reverted to main background */
}

.hero-content {
    max-width: 800px;
    padding: 1rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
    text-align: left;
    margin-bottom: 50px;
}

.hero-content2 {
    max-width: 420px;
    padding: 1rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
    text-align: left;
}

.hero h1 {
    font-size: clamp(1.4rem, 2vw, 3rem);
    margin-bottom: 0.5rem;
    font-family: 'Comfortaa Light', sans-serif;
}

.hero h2 {
    font-size: clamp(1rem, 1.3vw, 1.8rem);
    font-weight: 400;
    font-family: 'Comfortaa Light', sans-serif;
}

.hero p {
    font-size: 1rem;
    font-weight: 300;
}

.hero h3.hero-footer-text {
    position: absolute;
    bottom: 20px;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 400;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 10;
    text-align: left;
    width: auto;
}


/* Floating Elements (Parallax/Decor) */
.floating-element {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    /* Slight increase for visibility */
}

.coin-1 {
    bottom: 3%;
    right: 10%;
    width: 50px;
    animation: float 6s infinite ease-in-out 1s;
    z-index: 999;
}

.coin-2 {
    bottom: 55%;
    right: 1%;
    width: 50px;
    animation: float 6s infinite ease-in-out 1s;
}

.key-container {
    position: absolute;
    top: 30%;
    left: 72%;
    width: clamp(90px, 10vw, 160px);
    animation: float 6s infinite ease-in-out 1s;
    z-index: 2;
}

.key-icon {
    position: relative;
    z-index: 2;
    width: 100%;
}

.key-backlight {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    max-width: none;
    z-index: 1;
    opacity: 0.6;
    animation: pulse 4s infinite ease-in-out;
}

.watermark-icon {
    top: 20px;
    right: 20px;
    width: clamp(90px, 9vw, 150px);
    z-index: 0;
    pointer-events: none;
}

.watermark-icon-bottom {
    bottom: 80px;
    /* Above footer */
    left: 20px;
    width: 150px;
    opacity: 0.15;
    /* Watermark effect */
    z-index: 0;
    pointer-events: none;
}

/* House Container */
.house-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    margin: 0;
    z-index: 10;
}

.house-main {
    position: relative;
    z-index: 2;
    width: clamp(150px, 18vw, 340px);
    max-width: 80vw;
    animation: float 6s infinite ease-in-out 1s;
}

.house-backlight {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Larger than house to glow around */
    max-width: none;
    z-index: 1;
    opacity: 0.8;
    animation: pulse 4s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ── Login Form Card ── */
.login-form {
    width: auto;
    margin: clamp(0.5rem, 0.8vh, 1rem) 0;
    background: #edf1f7;
    backdrop-filter: none;
    border-radius: clamp(14px, 1.5vw, 24px);
    box-shadow: 0 6px 36px rgba(0, 78, 146, 0.12), 0 2px 8px rgba(0, 0, 0, 0.07);
    padding: clamp(10px, 1.5vh, 26px) clamp(10px, 1.5vw, 26px) clamp(12px, 1.7vh, 29px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(5px, 0.9vh, 11px);
    position: relative;
    z-index: 1;
}

/* Ícono usuario */
.login-user-icon {
    width: clamp(46px, 4.5vw, 70px);
    height: clamp(46px, 4.5vw, 70px);
    object-fit: contain;
    margin-bottom: 0.1rem;
}

/* SVG "Paga aquí" */
.login-paga-title {
    width: 65%;
    max-width: clamp(120px, 13vw, 210px);
    height: auto;
}

/* SVG "Clientes Leasing y Mutuos" */
.login-clientes-text {
    width: 80%;
    max-width: clamp(160px, 18vw, 290px);
    height: auto;
    margin-bottom: clamp(2px, 0.3vh, 5px);
}

/* Grupo RUT: label + input */
.login-rut-group {
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* SVG etiqueta "RUT" */
.login-rut-label-img {
    width: clamp(28px, 3vw, 46px);
    height: auto;
}

/* Wrapper: SVG visual encima del input real */
.login-input-wrapper {
    position: relative;
    width: 100%;
}

.login-rut-visual {
    display: block;
    width: 100%;
    height: auto;
}

/* Input real superpuesto al SVG — coincide con el rect interior:
   viewBox 630×170, rect x=32 y=32 w=558 h=97 */
.rut-input {
    position: absolute;
    top: 18.8%;
    left: 5.1%;
    width: 88.6%;
    height: 57.1%;
    background: transparent;
    border: none;
    outline: none;
    padding: 0 16px;
    font-family: 'Titillium Web', sans-serif;
    font-size: 0.9rem;
    color: #444;
}

.rut-input::placeholder {
    color: #bbb;
}

/* Botón INGRESAR */
.login-btn {
    width: 90%;
    aspect-ratio: 630 / 170;
    background: url('assets/svg/ingresar-bg.svg') center / 100% 100% no-repeat;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.3rem;
    transition: opacity 0.2s, transform 0.15s;
}

.login-btn:hover {
    opacity: 0.88;
    transform: scale(1.02);
}

.login-btn-text {
    height: 25%;
    width: auto;
    pointer-events: none;
}

/* Footer */
footer {
    background: #bddff0;
    color: #333;
    padding: 0.5rem 1rem;
    /* Very slim padding */
    position: relative;
    flex: 0 0 auto;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    /*max-width: 1400px;*/
    /* Wide container */
    margin: 0 auto;
    display: flex;
    flex-wrap: nowrap;
    /* Prevent wrapping on desktop */
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-logo img {
    height: clamp(24px, 2.5vw, 35px);
    margin: 0;
}

.footer-info {
    font-size: clamp(0.7rem, 0.85vw, 1rem);
    flex: 1;
    text-align: center;
    color: #088dbb;
    padding: 0 1rem;
    font-family: 'Titillium Web', sans-serif;
}

.footer-info p {
    margin: 0;
    line-height: 1.3;
}

.footer-links {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    white-space: nowrap;
    font-family: 'Titillium Web', sans-serif;
}

.footer-links a {
    color: var(--primary-color);
    font-weight: bold;
}

.bg-decoration-bottom {
    display: none;
    /* Removed to make footer cleaner/thinner */
}

.desktop-br { display: block; }

/* Responsive */
@media (max-width: 900px) {
    .desktop-br { display: none; }
    /* Header styles removed */

    .login-form {
        width: 80%;
        margin: 2.5rem 0;
        text-align: center;
        font-family: 'Comfortaa Regular', sans-serif;
    }

    .hero {
        flex-direction: column;
    }

    .hero-left {
        display: none;
        /* Hide left section on mobile */
    }

    .hero-right {
        display: flex;
        width: 100%;
        flex: 1;
        min-height: 100vh;
        padding: 2rem 1rem 0.75rem;
        background-size: cover;
        background-position: center top;
        justify-content: flex-start;
        gap: 2rem;
    }

    .login-form {
        width: 88%;
    }

    .logo-container {
        width: fit-content;
    }

    .login-paga-title  { max-width: 180px; }
    .login-clientes-text { max-width: 260px; }

    .contact-info {
        width: 88%;
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    .contact-row { gap: 0.6rem; }
    .contact-icon { width: 28px; height: 28px; }
    .contact-info span,
    .contact-info a { font-size: 0.85rem; }

    /* .header-container, .menu-toggle, nav styles removed */

    .hero h1 {
        font-size: 1.4rem;
        /* Reduced from 2rem */
        /*text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);*/
        margin-bottom: 0.5rem;
    }

    .hero h2 {
        font-size: 1.1rem;
        /*text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);*/
        font-weight: 400;
    }

    .hero p {
        font-size: 0.9rem;
    }

    /* Overlay to improve text contrast on mobile */
    .hero::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.0);
        /* Dark overlay */
        z-index: 0;
        pointer-events: none;
    }

    /* Ensure content is above overlay */
    .hero-content {
        z-index: 2;
    }

    .hero-content2 {
        z-index: 2;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Footer Responsive */
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem 0;
    }

    .footer-info {
        padding: 0;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 1366px) {
    .hero-content {
        max-width: 500px;
    }

    .key-backlight {
        width: 140%;
    }

    .key-icon {
        width: 60%;
    }

    .footer-info {
        font-size: clamp(0.65rem, 0.75vw, 0.8rem);
        color: #088dbb;
    }
}

/* @media (max-width: 1280px) — house-main controlled by clamp() in base */

@media (max-width: 1024px) {
    .hero h3.hero-footer-text {
        font-size: 0.75rem;
    }
}