
/* ==========================================================
   CDCC CONNECT LOGIN PAGE
   Existing login styles + organizational information section
   ========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    font-family: 'Albert Sans', sans-serif;
}

body {
    color: #253247;
    background: #ffffff;
}

.login-page {
    width: 100%;
    background: #ffffff;
}


/* ==========================================================
   EXISTING LOGIN HERO
   The original church image is retained.
   ========================================================== */

.login-hero {
    position: relative;
    isolation: isolate;

    background-image: url("../images/background.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/*
 * Fade the church image into white.
 * The overlay sits behind the login content.
 */

.login-hero::after {
    content: "";
    position: absolute;
    z-index: 0;
    right: 0;
    bottom: 0;
    left: 0;

    height: clamp(160px, 24vh, 280px);

    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.12) 20%,
        rgba(255, 255, 255, 0.42) 48%,
        rgba(255, 255, 255, 0.78) 76%,
        #ffffff 100%
    );

    pointer-events: none;
}

.login-hero > .container-fluid {
    position: relative;
    z-index: 1;
}


/* ==========================================================
   EXISTING BRANDING
   ========================================================== */

.branding {
    color: #ffffff;
    text-align: center;
}

.branding img {
    display: block;
    width: 180px;
    margin: 0 auto 15px;
}

.logo {
    width: 180px;
}

.branding h1 {
    display: inline-block;
    margin-bottom: 0;
    padding-bottom: 5px;

    border-bottom: 2px solid #ffffff;

    font-size: 4.5rem;
    font-weight: 400;
    letter-spacing: 2px;
}

.branding p {
    margin-top: 10px;

    font-size: 1.5rem;
    font-weight: 300;
}


/* ==========================================================
   EXISTING LOGIN CARD
   ========================================================== */

.Login-Card {
    padding: 1.5rem;

    border-radius: 20px;

    background-color: #ffffff;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.Login-Card .text-muted {
    padding-top: 15px;
    padding-bottom: 0;

    color: #6c757d !important;
    text-align: center;
}

.Login-Card .form-control,
.Login-Card .form-select {
    padding: 12px;
    border-radius: 10px;
}

.Login-Card .btn {
    padding: 12px;
    border-radius: 10px;
}


/* ==========================================================
   INFORMATION SECTION
   ========================================================== */

.cdcc-info-section {
    position: relative;
    z-index: 1;

    padding: 76px 0 38px;

    color: #253247;
    background: #ffffff;
}

.cdcc-info-section .container {
    max-width: 1180px;
}


/* ==========================================================
   SECTION HEADING
   ========================================================== */

.info-section-heading {
    max-width: 760px;
    margin: 0 auto 45px;

    text-align: center;
}

.info-eyebrow {
    display: inline-block;
    margin-bottom: 15px;

    color: #315f91;

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.info-section-heading h2 {
    max-width: 700px;
    margin: 0 auto;

    color: #172b49;

    font-size: clamp(1.8rem, 3.2vw, 2.65rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.8px;
}

.info-section-heading p {
    max-width: 640px;
    margin: 17px auto 0;

    color: #718096;

    font-size: 0.98rem;
    font-weight: 400;
    line-height: 1.9;
}


/* ==========================================================
   INFORMATION CARDS
   ========================================================== */

.info-cards-grid {
    align-items: stretch;
}

.info-cards-grid > div {
    display: flex;
}

.info-card {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    min-height: 100%;

    padding: 27px 25px 22px;

    border: 1px solid #e4e9f0;
    border-radius: 17px;

    background: #ffffff;

    box-shadow: 0 5px 22px rgba(23, 43, 73, 0.045);

    transition:
        border-color 250ms ease,
        box-shadow 250ms ease,
        transform 250ms ease;
}


/* Card top row */

.info-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 27px;
}

.info-card-number {
    color: #9aa8ba;

    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.info-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 49px;
    height: 49px;

    border: 1px solid #e0e9f5;
    border-radius: 14px;

    color: #315f91;
    background: #f0f5fb;

    font-size: 1.35rem;

    transition:
        color 250ms ease,
        background-color 250ms ease,
        border-color 250ms ease;
}


/* Card content */

.info-card h3 {
    margin: 0 0 14px;

    color: #172b49;

    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -0.3px;
}

.info-card p {
    flex-grow: 1;

    margin: 0 0 26px;

    color: #6d7b8f;

    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.9;
}


/* Card bottom label */

.info-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-top: auto;
    padding-top: 17px;

    border-top: 1px solid #edf0f5;

    color: #315f91;
}

.info-card-bottom span {
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1.6;
    letter-spacing: 0.9px;
}

.info-card-bottom i {
    flex-shrink: 0;
    font-size: 1rem;
    transition: transform 250ms ease;
}


/* Card hover feedback */

@media (hover: hover) {

    .info-card:hover {
        transform: translateY(-5px);

        border-color: #cbd9e9;

        box-shadow: 0 15px 35px rgba(23, 43, 73, 0.09);
    }

    .info-card:hover .info-card-icon {
        color: #ffffff;
        border-color: #315f91;
        background: #315f91;
    }

    .info-card:hover .info-card-bottom i {
        transform: translate(3px, -3px);
    }

}


/* ==========================================================
   SCROLL-TRIGGERED REVEAL ANIMATION
   Cards slide in from the right.
   ========================================================== */

/*
 * Cards remain visible by default.
 * The hidden state is enabled only after JavaScript
 * confirms that the animation observer is available.
 */

.cdcc-info-section.reveal-ready .info-card:not(.is-visible) {
    opacity: 0;
    transform: translateX(48px);
}

.cdcc-info-section.reveal-ready .info-card.is-visible {
    opacity: 1;
    transform: translateX(0);

    transition:
        opacity 650ms ease var(--card-delay, 0ms),
        transform 650ms cubic-bezier(0.22, 1, 0.36, 1)
            var(--card-delay, 0ms),
        border-color 250ms ease,
        box-shadow 250ms ease;
}


/* ==========================================================
   SECTION CLOSING
   ========================================================== */

.info-section-closing {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    margin-top: 54px;
    padding: 15px 0 0;

    text-align: center;
}

.info-section-closing p {
    margin: 0;

    color: #758399;

    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.8;
}

.closing-line {
    width: 42px;
    height: 1px;
    flex-shrink: 0;

    background: #dbe2eb;
}


/* ==========================================================
   TABLET / MOBILE
   ========================================================== */

@media (max-width: 768px) {

    .branding {
        margin-bottom: 25px;
    }

    .branding img {
        width: 120px;
    }

    .logo {
        width: 120px;
    }

    .branding h1 {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .branding p {
        margin-top: 8px;
        font-size: 1rem;
    }

    .Login-Card {
        max-width: 420px;
        margin: 0 auto;
        padding: 1.5rem;
    }

    .cdcc-info-section {
        padding: 58px 0 30px;
    }

    .info-section-heading {
        margin-bottom: 32px;
        padding: 0 12px;
    }

    .info-section-heading h2 {
        font-size: 2rem;
    }

    .info-section-heading p {
        font-size: 0.92rem;
    }

    .info-card {
        padding: 24px 22px 20px;
    }

    .info-card-top {
        margin-bottom: 21px;
    }

    .info-section-closing {
        margin-top: 35px;
    }

}


/* ==========================================================
   SMALL PHONES
   ========================================================== */

@media (max-width: 480px) {

    .branding {
        margin-bottom: 20px;
    }

    .branding img {
        width: 100px;
    }

    .logo {
        width: 100px;
    }

    .branding h1 {
        font-size: 1.8rem;
    }

    .branding p {
        font-size: 0.9rem;
    }

    .Login-Card {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .login-hero::after {
        height: 150px;
    }

    .cdcc-info-section {
        padding: 45px 0 25px;
    }

    .info-section-heading {
        margin-bottom: 27px;
    }

    .info-section-heading h2 {
        font-size: 1.75rem;
        letter-spacing: -0.5px;
    }

    .info-section-heading p {
        margin-top: 13px;
        font-size: 0.88rem;
        line-height: 1.8;
    }

    .info-card {
        padding: 22px 20px 19px;
        border-radius: 14px;
    }

    .info-card h3 {
        font-size: 1.12rem;
    }

    .info-card p {
        font-size: 0.87rem;
    }

    .info-section-closing {
        gap: 10px;
    }

    .info-section-closing p {
        font-size: 0.72rem;
    }

    .closing-line {
        width: 20px;
    }

}


/* ==========================================================
   ACCESSIBILITY: REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .cdcc-info-section.reveal-ready .info-card,
    .cdcc-info-section.reveal-ready .info-card:not(.is-visible),
    .cdcc-info-section.reveal-ready .info-card.is-visible {
        opacity: 1;
        transform: none;
    }

}

/* ==========================================================
   CDCC INFORMATION SECTION
   Bootstrap handles layout, spacing, and card styling.
   ========================================================== */

.login-hero {
    position: relative;
    isolation: isolate;
    background-image: url("../images/background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.login-hero::after {
    content: "";
    position: absolute;
    z-index: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: clamp(160px, 24vh, 280px);

    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.15) 25%,
        rgba(255, 255, 255, 0.55) 60%,
        #ffffff 100%
    );

    pointer-events: none;
}

.login-hero > .container-fluid,
.login-hero > .container-fluid > .row {
    position: relative;
    z-index: 1;
}

/* Heading width */

.cdcc-info-heading {
    max-width: 760px;
}

.cdcc-info-heading p {
    max-width: 650px;
    font-size: 1rem;
    line-height: 1.8;
}

/* Card hover effect */

.cdcc-info-card {
    border-radius: 1rem;
    overflow: hidden;

    transition:
        border-color 250ms ease,
        box-shadow 250ms ease,
        transform 250ms ease;
}

@media (hover: hover) {
    .cdcc-info-card:hover {
        transform: translateY(-5px);
        border-color: #b9cce3 !important;
        box-shadow: 0 1rem 2rem rgba(23, 43, 73, 0.10) !important;
    }
}

/* Scroll reveal: slide in from the right */

.cdcc-reveal-ready .cdcc-info-card:not(.cdcc-revealed) {
    opacity: 0;
    transform: translateX(42px);
}

.cdcc-reveal-ready .cdcc-info-card.cdcc-revealed {
    opacity: 1;
    transform: translateX(0);

    transition:
        opacity 600ms ease var(--cdcc-reveal-delay, 0ms),
        transform 600ms cubic-bezier(0.22, 1, 0.36, 1)
            var(--cdcc-reveal-delay, 0ms),
        border-color 250ms ease,
        box-shadow 250ms ease;
}

/* Reduced motion accessibility */

@media (prefers-reduced-motion: reduce) {
    .cdcc-reveal-ready .cdcc-info-card,
    .cdcc-reveal-ready .cdcc-info-card:not(.cdcc-revealed),
    .cdcc-reveal-ready .cdcc-info-card.cdcc-revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Mobile refinements */

@media (max-width: 767.98px) {
    .login-hero::after {
        height: 150px;
    }

    .cdcc-info-heading h2 {
        font-size: 1.8rem;
    }

    .cdcc-info-heading p {
        font-size: 0.92rem;
    }
}


/* ==========================================================
   LOGIN HERO FIX — HOSTINGER / CACHE-SAFE OVERRIDES
   Keep the hero at viewport height and restore the white fade.
   ========================================================== */

.login-hero {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    background-color: #172b49;
    background-image: url("../images/background.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.login-hero::after {
    content: "";
    position: absolute;
    z-index: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: clamp(190px, 32vh, 340px);
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 18%,
        rgba(255, 255, 255, 0.28) 38%,
        rgba(255, 255, 255, 0.62) 62%,
        rgba(255, 255, 255, 0.88) 82%,
        #ffffff 100%
    );
    pointer-events: none;
}

.login-hero > .container-fluid,
.login-hero > .container-fluid > .row {
    position: relative;
    z-index: 1;
}

/* Entrance transitions for the logo/branding and login form. */
@media (prefers-reduced-motion: no-preference) {
    .login-hero .branding {
        animation: cdccLoginFadeUp 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .login-hero .Login-Card {
        animation: cdccLoginFadeUp 700ms cubic-bezier(0.22, 1, 0.36, 1) 120ms both;
    }

    @keyframes cdccLoginFadeUp {
        from {
            opacity: 0;
            transform: translateY(18px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 767.98px) {
    .login-hero::after {
        height: clamp(150px, 24vh, 230px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-hero .branding,
    .login-hero .Login-Card {
        animation: none !important;
    }
}

/* Password visibility toggle */
.password-field-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 0.5rem;
}

.password-field-wrapper input {
    width: 100%;
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 2.5rem;
    height: 2.5rem;
    padding: 0;

    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #6c757d;

    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.password-toggle i {
    font-size: 1.15rem;
    line-height: 1;
}

.password-toggle:hover {
    color: #315f91;
}

.password-toggle:focus-visible {
    outline: 2px solid #315f91;
    outline-offset: 1px;
}

.password-toggle:active {
    background: rgba(49, 95, 145, 0.08);
}
