@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --color-primary: #0d6bb0;      /* Blue from logo */
    --color-secondary: #6dbdae;    /* Teal from logo */
    --color-accent: #1f67a6;       /* Darker Blue */
    --color-text-dark: #1e293b;    /* Slate 800 */
    --color-text-muted: #64748b;   /* Slate 500 */
    --font-family: 'Outfit', sans-serif;
}

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

html, body {
    font-family: var(--font-family);
    background: 
        radial-gradient(circle at 15% 90%, rgba(255,255,255, 0.9) 0%, rgba(255,255,255, 0) 50%),
        radial-gradient(circle at 15% 90%, rgba(168, 214, 219, 0.9) 0%, rgba(168, 214, 219, 0) 50%),
        radial-gradient(circle at 85% 90%, rgba(197, 228, 233, 0.8) 0%, rgba(197, 228, 233, 0) 50%),
        linear-gradient(145deg, #ffffff 0%, #d2ebf8 60%, #eef7fc 100%);
    
    
    color: var(--color-text-dark);
    padding: 0;
    margin: 0;

}

/* Background Clouds Scene */
.clouds-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.cloud-svg {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 65vh; /* 65% of viewport height */
    min-height: 400px;
    z-index: 1;
}

/* Cloud Styling */
.cloud-group {
    filter: drop-shadow(0 12px 16px rgba(15, 52, 92, 0.08));
    transform-origin: center bottom;
}

.cloud-fill {
    stroke: none;
}

.cloud-outline {
    stroke: #ffffff;
    stroke-width: 8px;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    filter: drop-shadow(0px 2px 4px rgba(255, 255, 255, 0.8));
}

/* Animation classes for individual clouds */
.float-b1 { animation: float-b1 28s ease-in-out infinite; }
.float-b2 { animation: float-b2 24s ease-in-out infinite; }
.float-b3 { animation: float-b3 26s ease-in-out infinite; }
.float-b4 { animation: float-b4 22s ease-in-out infinite; }

.float-m1 { animation: float-m1 20s ease-in-out infinite; }
.float-m2 { animation: float-m2 18s ease-in-out infinite; }
.float-m3 { animation: float-m3 22s ease-in-out infinite; }

.float-f1 { animation: float-f1 15s ease-in-out infinite; }
.float-f2 { animation: float-f2 13s ease-in-out infinite; }
.float-f3 { animation: float-f3 14s ease-in-out infinite; }

@keyframes float-b1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15px, -10px) scale(1.02); }
}
@keyframes float-b2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-12px, -8px) scale(0.99); }
}
@keyframes float-b3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10px, -12px) scale(1.01); }
}
@keyframes float-b4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-15px, -7px) scale(1.03); }
}

@keyframes float-m1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(8px, -6px) scale(1.01); }
}
@keyframes float-m2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-10px, -9px) scale(0.98); }
}
@keyframes float-m3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(12px, -5px) scale(1.02); }
}

@keyframes float-f1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(6px, -4px) scale(1.01); }
}
@keyframes float-f2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-6px, -5px) scale(0.99); }
}
@keyframes float-f3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(8px, -3px) scale(1.01); }
}

/* Page Layout Container */
.main-wrapper {
    position: relative;
    z-index: 2;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    
}

.login-grid {
    width: 100%;
    max-width: 1140px;
    display: flex;
    flex-flow: row nowrap;
    align-items: stretch;
    gap: 40px;
}

/* Left Panel - Info & Carousel */
.info-panel {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 10px;
}

.info-header {
    margin-bottom: 5px;
}

.brand-logo-container {
    margin-bottom: 5px;
}

.brand-logo-wrapper {
    position: relative;
    display: inline-block;
    line-height: 0;
    overflow: hidden;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.04));
    
    /* Elegant masking effect to clip the glare sweep to the logo pixels only */
    -webkit-mask-image: url("../img/logo-cloudyfact-2026.svg");
    mask-image: url("../img/logo-cloudyfact-2026.svg");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.brand-logo-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60px;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
    animation: logo-glare 3s ease-in-out infinite;
}

.brand-logo {
    height: 85px;
    width: auto;
    max-width: 100%;
    margin: 0;
    display: block;
}

.brand-description {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    font-weight: 400;
    max-width: 520px;
}

/* Carousel Section Styles */
.rubros-section {
    margin-top: 0px;
    margin-bottom: 10px;
}

.rubros-title {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.carousel-container {
    position: relative;
    border-radius: 24px;
    background: rgba(168, 214, 219, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(168, 214, 219, 0.5);
    box-shadow: 0 10px 30px rgba(13, 107, 176, 0.04);
    padding: 5px 40px 5px 50px;
}

.carousel-inner-custom {
    min-height: 100px;
}

.rubro-card {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
    min-height: 100px;
    padding: 5px 10px;
}

.rubro-icon-wrapper {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(13, 107, 176, 0.1) 0%, rgba(109, 189, 174, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.rubro-icon {
    width: 34px;
    height: 34px;
    fill: var(--color-primary);
}

.rubro-content {
    flex: 1;
}

.rubro-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 4px;
}

.rubro-desc {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* Custom Carousel Controls */
.carousel-control-prev, .carousel-control-next {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control-prev { left: -35px; }
.carousel-control-next { right: -25px; }

.carousel-control-prev:hover, .carousel-control-next:hover {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    opacity: 1;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    filter: brightness(0) invert(1);
}

.carousel-control-prev-icon, .carousel-control-next-icon {
    width: 16px;
    height: 16px;
    background-size: 100% 100%;
}

.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='%230d6bb0' d='M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z'/%3E%3C/svg%3E");
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='%230d6bb0' d='M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z'/%3E%3C/svg%3E");
}

/* Custom Carousel Indicators */
.carousel-indicators-custom {
    position: absolute;
    bottom: -35px;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.carousel-indicators-custom li {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(13, 107, 176, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicators-custom li.active {
    width: 22px;
    border-radius: 4px;
    background-color: var(--color-primary);
}

/* Contact Footer Section */
.info-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--color-text-dark);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.contact-pill:hover {
    transform: translateY(-2px);
    background: #ffffff;
    box-shadow: 0 6px 15px rgba(13, 107, 176, 0.08);
    color: var(--color-primary);
    text-decoration: none;
}

.contact-pill .icon-svg {
    width: 18px;
    height: 18px;
    fill: var(--color-primary);
    transition: fill 0.3s ease;
}

.web-link-container {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.web-link {
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    position: relative;
}

.web-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.web-link:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.web-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}


/* Right Panel - Login Form Card */
.form-panel {
    flex: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(13, 107, 176, 0.07);
    padding: 45px 35px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    animation: slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-up {
    0% { transform: translateY(40px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.card-header-mobile {
    display: none;
    text-align: center;
    margin-bottom: 5px;
}

.mobile-logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 0px;
    line-height: 0;
    overflow: hidden;
    
    /* Elegant masking effect to clip the glare sweep to the logo pixels only */
    -webkit-mask-image: url("../img/logo_2026.svg");
    mask-image: url("../img/logo_2026.svg");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.mobile-logo {
    width: auto;
    margin: 0;
    display: block;
}

.mobile-logo-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60px;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
    animation: logo-glare 3s ease-in-out infinite;
}

@keyframes logo-glare {
    0% {
        left: -150%;
    }
    30% {
        left: 150%;
    }
    100% {
        left: 150%;
    }
}

.card-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-accent);
    text-align: center;
    letter-spacing: -0.5px;
}

/* Custom Styled Inputs */
.form-group-custom {
    position: relative;
    margin-bottom: 20px;
}

.input-cloudyfact {
    width: 100%;
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1.5px solid rgba(13, 107, 176, 0.15) !important;
    border-radius: 14px !important;
    padding: 14px 18px 14px 46px !important;
    font-size: 0.98rem !important;
    font-family: var(--font-family) !important;
    color: var(--color-text-dark) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    height: auto !important;
}

.input-cloudyfact::placeholder {
    color: #94a3b8;
}

.input-cloudyfact:focus {
    background: #ffffff !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 4px rgba(13, 107, 176, 0.12) !important;
    outline: none !important;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: var(--color-text-muted);
    pointer-events: none;
    transition: fill 0.3s ease;
}

.input-cloudyfact:focus + .input-icon {
    fill: var(--color-primary);
}

/* Access Button */
.cf-btn-secondary {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border: none;
    border-radius: 14px;
    padding: 14px 24px;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(13, 107, 176, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    margin-top: 10px;
}

.cf-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 107, 176, 0.35);
    filter: brightness(1.05);
}

.cf-btn-secondary:active {
    transform: translateY(0);
}

/* Alert styles overrides */
.alert-secondary {
    background-color: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #b91c1c !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    padding: 12px 16px !important;
    margin-bottom: 20px !important;
}

/* Bottom Registration link */
.register-section {
    text-align: center;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-top: 5px;
}

.register-link {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.register-link:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* Responsive Rules */
@media (max-width: 991px) {
    .main-wrapper {
         padding: 0px 20px; 
    }

    .login-grid {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .info-panel {
        display: none;
    }

    .brand-logo-container {
        display: none; /* Hide brand logo in left panel, show in card header instead */
    }

    .brand-description {
        margin: 0 auto;
    }

    .card-header-mobile {
        display: block;
    }

    .mobile-logo {
        height: 120px;
    }

    .login-card {
        background: transparent;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        gap: 10px;
        padding: 0px 20px;
    }

    .card-title {
        font-weight: 500;
        font-size:1.3em;
    }

    .form-panel {
        width: 100%;
        max-width: 440px;
    }

    .info-footer {
        justify-content: center;
        margin-top: 25px;
    }

    .rubros-section {
        width: 100%;
        max-width: 600px;
    }
}

@media (max-width: 576px) {
    .login-card {
        border-radius: 20px;
    }

    .carousel-container {
        padding: 20px 35px;
        border-radius: 18px;
    }
    
    .carousel-control-prev { left: 2px; }
    .carousel-control-next { right: 2px; }

    .rubro-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .info-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
