@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cloudFloat {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(20px) translateY(-10px);
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes starsAppear {
    0% {
        opacity: 1;
    }
    25% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    75% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(-45deg, #E40046, #a30033, #1a1a2e, #0f3460);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(228, 0, 70, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(228, 0, 70, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* Estrellas parpadeantes */
.stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    /* Crear una máscara para excluir el área del login */
    -webkit-mask-image: radial-gradient(
        ellipse 300px 400px at center,
        transparent 50%,
        black 70%
    );
    mask-image: radial-gradient(
        ellipse 300px 400px at center,
        transparent 50%,
        black 70%
    );
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 
        0 0 6px var(--primary-color),
        0 0 12px var(--primary-color),
        0 0 18px rgba(228, 0, 70, 0.5);
    animation: 
        twinkle 3s ease-in-out infinite,
        starsAppear 15s ease-in-out infinite;
    pointer-events: none;
}

.star:nth-child(2n) {
    animation: 
        twinkle 2.5s ease-in-out infinite 0.5s,
        starsAppear 15s ease-in-out infinite;
}

.star:nth-child(3n) {
    animation: 
        twinkle 3.5s ease-in-out infinite 1s,
        starsAppear 15s ease-in-out infinite;
}

.star:nth-child(4n) {
    animation: 
        twinkle 2.8s ease-in-out infinite 1.5s,
        starsAppear 15s ease-in-out infinite;
}

.star:nth-child(5n) {
    width: 2px;
    height: 2px;
    animation: 
        twinkle 3.2s ease-in-out infinite 0.8s,
        starsAppear 15s ease-in-out infinite;
}

.star:nth-child(7n) {
    width: 4px;
    height: 4px;
    animation: 
        twinkle 4s ease-in-out infinite,
        starsAppear 15s ease-in-out infinite;
}

/* Elementos decorativos de nubes */
.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    pointer-events: none;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
}

.cloud-1 {
    width: 100px;
    height: 40px;
    top: 20%;
    left: 10%;
    animation: cloudFloat 20s ease-in-out infinite;
}

.cloud-2 {
    width: 120px;
    height: 45px;
    top: 60%;
    right: 15%;
    animation: cloudFloat 25s ease-in-out infinite;
    animation-delay: 5s;
}

.cloud-3 {
    width: 90px;
    height: 35px;
    top: 40%;
    right: 25%;
    animation: cloudFloat 18s ease-in-out infinite;
    animation-delay: 10s;
}

.cloud-4 {
    width: 110px;
    height: 42px;
    top: 30%;
    left: 35%;
    animation: cloudFloat 22s ease-in-out infinite;
    animation-delay: 3s;
}

.cloud-5 {
    width: 95px;
    height: 38px;
    top: 50%;
    left: 5%;
    animation: cloudFloat 19s ease-in-out infinite;
    animation-delay: 7s;
}

.cloud-6 {
    width: 105px;
    height: 40px;
    top: 70%;
    left: 60%;
    animation: cloudFloat 24s ease-in-out infinite;
    animation-delay: 12s;
}

.cloud-7 {
    width: 85px;
    height: 33px;
    top: 15%;
    right: 30%;
    animation: cloudFloat 21s ease-in-out infinite;
    animation-delay: 2s;
}

.cloud-8 {
    width: 100px;
    height: 39px;
    top: 85%;
    left: 25%;
    animation: cloudFloat 23s ease-in-out infinite;
    animation-delay: 15s;
}



* {
	box-sizing: border-box;
	transition: .25s all ease;
}

:root {
    --primary-color: #E40046;
    --primary-dark: #a30033;
    --primary-light: #ff1a5e;
    --accent-color: #0f3460;
    --text-white: #ffffff;
}

.login-container {
	display: block;
	position: relative;
	z-index: 0;
	margin: 1rem auto 0;
	padding: 3rem 3rem 0 3rem;
	width: 100%;
	max-width: 480px;
	min-height: 620px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	border-radius: 24px;
	box-shadow: 
		0 20px 60px rgba(228, 0, 70, 0.3),
		0 0 100px rgba(228, 0, 70, 0.1),
		inset 0 0 0 1px rgba(255, 255, 255, 0.2);
	animation: fadeIn 0.8s ease-out;
	overflow: hidden;
}

.login-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 6px;
	background: linear-gradient(90deg, 
		var(--primary-color) 0%, 
		var(--primary-light) 50%, 
		var(--primary-color) 100%);
	background-size: 200% 100%;
	animation: gradient 3s ease infinite;
	z-index: 2;
}

/* Logo de la compañía como estampa */
.company-logo {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 80px;
	height: 80px;
	transform: rotate(15deg);
	z-index: 10;
	transition: all 0.3s ease;
	opacity: 0.9;
	filter: drop-shadow(0 4px 8px rgba(228, 0, 70, 0.2));
}

.company-logo:hover {
	transform: rotate(15deg) scale(1.05);
	opacity: 1;
	filter: drop-shadow(0 6px 12px rgba(228, 0, 70, 0.3));
}

.company-logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.login-container:after {
	content: '';
	display: inline-block;
	position: absolute;
	z-index: 0;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: linear-gradient(135deg, 
		rgba(228, 0, 70, 0.03) 0%,
		rgba(255, 255, 255, 0.05) 100%);
	pointer-events: none;
}

.form-login {
	position: relative;
	z-index: 1;
	padding-bottom: 3rem;
	border-bottom: 2px solid rgba(228, 0, 70, 0.1);
}

.login-nav {
	position: relative;
	padding: 0;
	margin: 0 0 3em 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}

.login-nav__item {
	list-style: none;
	display: inline-block;
}

.login-nav__item + .login-nav__item {
	margin-left: 2.25rem;
}

.login-nav__item a {
	position: relative;
	color: var(--primary-color);
	text-decoration: none;
	text-transform: uppercase;
	font-weight: 700;
	font-size: 1.5rem;
	padding-bottom: .5rem;
	transition: .20s all ease;
	letter-spacing: 2px;
}

.login-nav__item.active a,
.login-nav__item a:hover {
	color: var(--primary-dark);
	transition: .15s all ease;
}

.login-nav__item a:after {
	content: '';
	display: inline-block;
	height: 3px;
	background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
	position: absolute;
	right: 100%;
	bottom: -1px;
	left: 0;
	border-radius: 2px;
	transition: .15s all ease;
}

.login-nav__item a:hover:after,
.login-nav__item.active a:after {
	background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
	height: 3px;
	right: 0;
	bottom: 0px;
	border-radius: 2px;
	transition: .20s all ease;
}

.login__welcome-message {
    color: #555;
    font-weight: 400;
    font-size: 1rem;
    margin-top: 1rem;
    letter-spacing: 0.5px;
}
.login__label {
	display: block;
	padding-left: 0.5rem;
	color: #555;
	font-weight: 600;
	text-transform: uppercase;
	font-size: .75rem;
	margin-bottom: 0.5rem;
	letter-spacing: 1px;
}

.login__label,
.login__label--checkbox {
	color: #555;
	text-transform: uppercase;
	font-size: .75rem;
	margin-bottom: 1rem;
}

.login__label--checkbox {
	display: inline-block;
	position: relative;
	padding-left: 1.5rem;
	margin-top: 2rem;
	margin-left: 1rem;
	color: #333;
	font-size: .75rem;
	text-transform: inherit;
}

.login__input {
	color: #333;
	font-size: 1rem;
	width: 100%;
	padding: 0.875rem 1.25rem;
	border: 2px solid rgba(228, 0, 70, 0.2);
	outline: none;
	border-radius: 12px;
	background-color: #ffffff;
	letter-spacing: 0.5px;
	transition: all 0.3s ease;
	font-family: 'Montserrat', sans-serif;
}

.login__input:hover {
	border: 2px solid rgba(228, 0, 70, 0.4);
	background-color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(228, 0, 70, 0.1);
}

.login__input:focus {
	color: #333;
	border: 2px solid var(--primary-color);
	background-color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(228, 0, 70, 0.15);
}

.login__input::placeholder {
	color: #999;
}

.login__input + .login__label {
	margin-top: 1.5rem;
}

.login__input--checkbox {
	position: absolute;
	top: .1rem;
	left: 0;
	margin: 0;
	accent-color: var(--primary-color);
}

.login__submit {
	color: #ffffff;
	font-size: 1rem;
	font-family: 'Montserrat', sans-serif;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-weight: 700;
	margin-top: 2rem;
	padding: 1rem;
	border-radius: 12px;
	display: block;
	width: 100%;
	background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
	background-size: 200% 200%;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(228, 0, 70, 0.3);
	position: relative;
	overflow: hidden;
}

.login__submit::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
	transition: left 0.5s;
}

.login__submit:hover {
	background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(228, 0, 70, 0.4);
}

.login__submit:hover::before {
	left: 100%;
}

.login__submit:active {
	transform: translateY(-1px);
	box-shadow: 0 4px 15px rgba(228, 0, 70, 0.3);
}

.login__forgot {
	display: block;
	margin-top: 2rem;
	margin-bottom: 1.5rem;
	text-align: center;
	color: #666;
	font-size: .85rem;
	text-decoration: none;
	position: relative;
	z-index: 1;
	font-weight: 500;
	transition: all 0.3s ease;
}

.login__forgot:hover {
	color: var(--primary-color);
	transform: translateY(-2px);
}

/* Mio */ 

.error-message {
	color: var(--primary-color);
	font-size: 0.85rem;
	margin-top: 0.5rem;
	margin-left: 0.5rem;
	font-weight: 500;
	background-color: rgba(228, 0, 70, 0.05);
	padding: 0.5rem 0.75rem;
	border-radius: 8px;
	border-left: 3px solid var(--primary-color);
	animation: fadeIn 0.3s ease-out;
}

.input-error {
	border: 2px solid var(--primary-color) !important;
	background-color: rgba(228, 0, 70, 0.02) !important;
	animation: shake 0.3s ease-in-out;
}

.input-error-na {
	border: 2px solid var(--primary-light) !important;
	background-color: rgba(255, 26, 94, 0.02) !important;
	animation: shake 0.3s ease-in-out;
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-5px); }
	75% { transform: translateX(5px); }
}

.login__welcome-message {
    color: #666;
    font-weight: 400;
    font-size: 0.95rem;
    margin-top: 0.75rem;
    letter-spacing: 0.5px;
}


/* Línea gráfica de campaña - "Clic al corazón de Colombia!" */
@keyframes drawLine {
    from {
        stroke-dashoffset: 4500;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.campaign-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

.campaign-line svg {
    width: 100%;
    height: 100%;
}

.campaign-line path {
    fill: none;
    stroke: #ffffff;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 4500;
    stroke-dashoffset: 4500;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    animation: drawLine 4s ease-out forwards;
}

/* Media query para móviles */
@media (max-width: 480px) {
    .login-container {
        margin: 1rem auto;
        padding: 2rem 1.5rem 0 1.5rem;
        min-height: 540px;
        max-width: 92%;
        border-radius: 20px;
    }
    
    .company-logo {
        width: 60px;
        height: 60px;
        top: 10px;
        right: 10px;
    }
    
    .login-nav__item a {
        font-size: 1.25rem;
    }
    
    .login__welcome-message {
        font-size: 0.85rem;
    }
    
    .login__input {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
    
    .login__submit {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    .campaign-line {
        opacity: 0.25;
    }
    
    .campaign-line path {
        stroke-width: 4;
    }
}

/* Media query para tablets */
@media (max-width: 768px) {
    .login-container {
        padding: 2.5rem 2rem 0 2rem;
        min-height: 580px;
        max-width: 90%;
    }
    
    .company-logo {
        width: 70px;
        height: 70px;
        top: 12px;
        right: 12px;
    }
    
    .login__input {
        font-size: 0.98rem;
    }
    
    .campaign-line {
        opacity: 0.28;
    }
    
    .campaign-line path {
        stroke-width: 4;
    }
}

/* Media query para pantallas un poco más grandes */
@media (max-width: 1080px) {
    .login-container {
        padding: 3rem 2.5rem 0 2.5rem;
        min-height: 600px;
    }
}

/* Animación adicional para el avión */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
