/* =========================================================
   KCGF WEBSITE
   FILE: assets/css/footer.css
   VERSION: 1.0

   RESPONSIBILITIES:
   01. Footer design
   02. Footer background decorations
   03. Footer branding
   04. Footer navigation links
   05. Footer social media
   06. Footer bottom and developer credit
   07. Floating utility toolbar
   08. Toolbar hover labels
   09. Toast notifications
   10. Dark theme
   11. Responsive layout
   12. Accessibility

   CSS OWNERSHIP:
   style.css       = Global design system
   header.css      = Header and navigation
   language.css    = Language switcher
   animations.css  = Shared animations
   responsive.css  = Additional responsive components
   infographics.css= Infographics

   Do not duplicate global styles here.
========================================================= */


/* =========================================================
   01. FOOTER VARIABLES
========================================================= */

:root {
    --kcgf-footer-bg: #102C40;
    --kcgf-footer-bg-deep: #0B2233;
    --kcgf-footer-text: #D5E0E8;
    --kcgf-footer-muted: #A7B7C4;
    --kcgf-footer-heading: #FFFFFF;
    --kcgf-footer-border: rgba(255, 255, 255, 0.12);

    --kcgf-footer-accent: #FF8A24;
    --kcgf-footer-accent-light: #FFB66E;

    --kcgf-footer-width: 1240px;

    --kcgf-toolbar-size: 46px;
    --kcgf-toolbar-gap: 9px;
}


/* =========================================================
   02. FOOTER BASE
========================================================= */

.kcgf-footer {
    position: relative;
    width: 100%;

    color: var(--kcgf-footer-text);
    background: var(--kcgf-footer-bg);

    overflow: hidden;
    isolation: isolate;
}

.kcgf-footer,
.kcgf-footer * {
    box-sizing: border-box;
}

.kcgf-footer a {
    text-decoration: none;
}

.kcgf-footer-container {
    position: relative;
    z-index: 2;

    width: min(
        var(--kcgf-footer-width),
        calc(100% - 48px)
    );

    margin: 0 auto;
}


/* =========================================================
   03. FOOTER BACKGROUND DECORATIONS
========================================================= */

.kcgf-footer-decoration {
    position: absolute;
    inset: 0;

    overflow: hidden;
    pointer-events: none;

    z-index: 0;
}

.kcgf-footer-pattern {
    position: absolute;

    display: flex;
    align-items: center;
    justify-content: center;

    color: rgba(255, 255, 255, 0.035);

    user-select: none;
    pointer-events: none;
}

.kcgf-footer-pattern.pattern-one {
    top: 45px;
    right: 8%;

    font-size: 130px;
    font-weight: 800;

    transform: rotate(10deg);
}

.kcgf-footer-pattern.pattern-two {
    bottom: 55px;
    left: 3%;

    font-size: 90px;
    transform: rotate(-12deg);
}

.kcgf-footer-pattern.pattern-three {
    top: 48%;
    right: 35%;

    font-size: 60px;
}


/* =========================================================
   04. FOOTER MAIN AREA
========================================================= */

.kcgf-footer-main {
    position: relative;
    z-index: 1;

    padding: 78px 0 65px;
}

.kcgf-footer-grid {
    display: grid;

    grid-template-columns:
        minmax(250px, 1.7fr)
        repeat(3, minmax(145px, 1fr));

    gap: 45px;
    align-items: start;
}


/* =========================================================
   05. FOOTER BRAND
========================================================= */

.kcgf-footer-about {
    max-width: 350px;
}

.kcgf-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 22px;

    color: var(--kcgf-white);

    transition: transform var(--kcgf-transition);
}

.kcgf-footer-brand:hover {
    color: var(--kcgf-white);
    transform: translateY(-2px);
}

.kcgf-footer-logo-wrap {
    width: 68px;
    height: 68px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 5px;

    background: var(--kcgf-white);

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 17px;

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.15);

    transition: transform var(--kcgf-transition);
}

.kcgf-footer-brand:hover .kcgf-footer-logo-wrap {
    transform: rotate(-4deg);
}

.kcgf-footer-logo {
    width: 100%;
    height: 100%;

    display: block;
    object-fit: contain;
}

.kcgf-footer-brand-name {
    max-width: 235px;

    color: var(--kcgf-white);

    font-family: var(--kcgf-font-heading);
    font-size: 17px;
    font-weight: 800;

    line-height: 1.45;
}


/* Footer description */

.kcgf-footer-description {
    max-width: 350px;

    margin: 0 0 20px;

    color: var(--kcgf-footer-text);

    font-family: var(--kcgf-font-primary);
    font-size: 12px;

    line-height: 2;
}


/* Parent organization */

.kcgf-footer-parent {
    display: flex;
    flex-direction: column;

    gap: 5px;

    margin-bottom: 23px;
    padding: 13px 15px;

    background: rgba(255, 255, 255, 0.055);

    border: 1px solid var(--kcgf-footer-border);
    border-left: 3px solid var(--kcgf-footer-accent);

    border-radius: 0 10px 10px 0;
}

.kcgf-footer-parent-label {
    color: var(--kcgf-footer-accent-light);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1px;
    text-transform: uppercase;
}

.kcgf-footer-parent strong {
    color: var(--kcgf-white);

    font-size: 11px;
    font-weight: 600;

    line-height: 1.7;
}


/* =========================================================
   06. FOOTER SOCIAL LINKS
========================================================= */

.kcgf-footer-social {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 9px;
}

.kcgf-social-link {
    width: 36px;
    height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--kcgf-footer-text);
    background: rgba(255, 255, 255, 0.08);

    border: 1px solid var(--kcgf-footer-border);
    border-radius: 50%;

    font-size: 13px;

    transition: all var(--kcgf-transition);
}

.kcgf-social-link:hover {
    color: var(--kcgf-white);
    background: var(--kcgf-orange);

    border-color: var(--kcgf-orange);

    transform: translateY(-4px);
}


/* =========================================================
   07. FOOTER COLUMN HEADINGS
========================================================= */

.kcgf-footer-column {
    min-width: 0;
}

.kcgf-footer-heading {
    position: relative;

    display: inline-block;

    margin: 0 0 27px;
    padding-bottom: 12px;

    color: var(--kcgf-footer-heading);

    font-family: var(--kcgf-font-heading);
    font-size: 15px;
    font-weight: 700;

    letter-spacing: 0.1px;
}

.kcgf-footer-heading::after {
    content: "";

    position: absolute;
    bottom: 0;
    left: 0;

    width: 38px;
    height: 3px;

    background: var(--kcgf-footer-accent);

    border-radius: 5px;
}


/* =========================================================
   08. FOOTER NAVIGATION LINKS
========================================================= */

.kcgf-footer-links {
    display: flex;
    flex-direction: column;

    gap: 14px;

    padding: 0;
    margin: 0;

    list-style: none;
}

.kcgf-footer-links li {
    margin: 0;
    padding: 0;
}

.kcgf-footer-links a {
    display: inline-flex;
    align-items: center;

    gap: 9px;

    color: var(--kcgf-footer-muted);

    font-size: 12px;
    font-weight: 500;

    line-height: 1.7;

    transition:
        color var(--kcgf-transition),
        transform var(--kcgf-transition);
}

.kcgf-footer-links a i {
    flex-shrink: 0;

    color: var(--kcgf-footer-accent);

    font-size: 10px;

    transition: transform var(--kcgf-transition);
}

.kcgf-footer-links a:hover {
    color: var(--kcgf-white);
    transform: translateX(4px);
}

.kcgf-footer-links a:hover i {
    transform: translateX(3px);
}


/* =========================================================
   09. FOOTER BOTTOM
========================================================= */

.kcgf-footer-bottom {
    position: relative;
    z-index: 2;

    width: 100%;

    background: var(--kcgf-footer-bg-deep);

    border-top: 1px solid var(--kcgf-footer-border);
}

.kcgf-footer-bottom-inner {
    width: min(
        var(--kcgf-footer-width),
        calc(100% - 48px)
    );

    min-height: 65px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.kcgf-footer-copyright {
    color: var(--kcgf-footer-muted);

    font-size: 11px;
    line-height: 1.7;
}

.kcgf-footer-copyright strong {
    color: var(--kcgf-white);
    font-weight: 700;
}

.kcgf-footer-credit {
    color: var(--kcgf-footer-muted);

    font-size: 11px;
    text-align: right;
}

.kcgf-footer-credit a {
    color: var(--kcgf-footer-accent-light);

    font-weight: 700;

    transition: color var(--kcgf-transition-fast);
}

.kcgf-footer-credit a:hover {
    color: var(--kcgf-white);
}


/* =========================================================
   10. FLOATING TOOLBAR
========================================================= */

.kcgf-floating-toolbar {
    position: fixed;

    right: 22px;
    bottom: 25px;

    z-index: 900;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: var(--kcgf-toolbar-gap);

    padding: 9px;

    background: rgba(255, 255, 255, 0.94);

    border: 1px solid rgba(35, 52, 65, 0.08);
    border-radius: 50px;

    box-shadow:
        0 10px 35px rgba(18, 39, 54, 0.16);

    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);

    transition:
        background var(--kcgf-transition),
        box-shadow var(--kcgf-transition);
}


/* =========================================================
   11. TOOLBAR BUTTONS
========================================================= */

.kcgf-tool-button {
    position: relative;

    width: var(--kcgf-toolbar-size);
    height: var(--kcgf-toolbar-size);

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    color: var(--kcgf-blue-dark);
    background: transparent;

    border: 1px solid transparent;
    border-radius: 50%;

    font-size: 15px;

    cursor: pointer;

    transition:
        color var(--kcgf-transition),
        background var(--kcgf-transition),
        border-color var(--kcgf-transition),
        transform var(--kcgf-transition),
        box-shadow var(--kcgf-transition);
}

.kcgf-tool-button:hover {
    color: var(--kcgf-white);
    background: var(--kcgf-orange);

    border-color: var(--kcgf-orange);

    transform: scale(1.09);

    box-shadow:
        0 5px 14px rgba(255, 107, 0, 0.22);
}

.kcgf-tool-button:active {
    transform: scale(0.95);
}

.kcgf-tool-button:focus-visible {
    outline: 3px solid var(--kcgf-teal);
    outline-offset: 3px;
}


/* Saved page state */

.kcgf-tool-button.is-saved {
    color: var(--kcgf-white);
    background: var(--kcgf-green);

    border-color: var(--kcgf-green);
}

.kcgf-tool-button.is-saved:hover {
    background: #064B3F;
    border-color: #064B3F;
}


/* Facebook button */

.kcgf-tool-facebook {
    color: #1877F2;
}

.kcgf-tool-facebook:hover {
    color: var(--kcgf-white);
    background: #1877F2;
    border-color: #1877F2;

    box-shadow:
        0 5px 14px rgba(24, 119, 242, 0.23);
}


/* =========================================================
   12. TOOLBAR TOOLTIP
========================================================= */

.kcgf-tool-button::after {
    content: attr(title);

    position: absolute;
    right: calc(100% + 12px);
    top: 50%;

    width: max-content;
    max-width: 190px;

    padding: 7px 11px;

    color: var(--kcgf-white);
    background: var(--kcgf-blue-dark);

    border-radius: 7px;

    font-family: var(--kcgf-font-primary);
    font-size: 10px;
    font-weight: 600;

    white-space: nowrap;

    opacity: 0;
    visibility: hidden;

    transform: translate(5px, -50%);

    pointer-events: none;

    transition: all var(--kcgf-transition-fast);
}

.kcgf-tool-button:hover::after,
.kcgf-tool-button:focus-visible::after {
    opacity: 1;
    visibility: visible;

    transform: translate(0, -50%);
}


/* =========================================================
   13. TOAST NOTIFICATION CONTAINER
========================================================= */

.kcgf-toast-container {
    position: fixed;

    top: 25px;
    right: 25px;

    z-index: 10000;

    width: min(350px, calc(100% - 40px));

    display: flex;
    flex-direction: column;

    gap: 10px;

    pointer-events: none;
}


/* Toast item: created by main.js */

.kcgf-toast {
    position: relative;

    display: flex;
    align-items: flex-start;

    gap: 12px;

    padding: 15px 17px;

    color: var(--kcgf-text);
    background: var(--kcgf-white);

    border: 1px solid var(--kcgf-border);
    border-left: 4px solid var(--kcgf-teal);

    border-radius: var(--kcgf-radius-md);

    box-shadow: var(--kcgf-shadow-lg);

    font-size: 12px;
    line-height: 1.7;

    pointer-events: auto;

    animation: kcgf-toast-in 0.3s ease both;
}

.kcgf-toast.toast-success {
    border-left-color: var(--kcgf-success);
}

.kcgf-toast.toast-error {
    border-left-color: var(--kcgf-danger);
}

.kcgf-toast.toast-warning {
    border-left-color: var(--kcgf-warning);
}

.kcgf-toast.toast-info {
    border-left-color: var(--kcgf-info);
}

.kcgf-toast.is-leaving {
    animation: kcgf-toast-out 0.25s ease both;
}


/* =========================================================
   14. TOAST ANIMATIONS
========================================================= */

@keyframes kcgf-toast-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes kcgf-toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(20px);
    }
}


/* =========================================================
   15. DARK THEME
========================================================= */

html[data-theme="dark"] {

    --kcgf-footer-bg: #0D1B25;
    --kcgf-footer-bg-deep: #08151E;

}

html[data-theme="dark"] .kcgf-floating-toolbar {
    background: rgba(25, 42, 54, 0.96);

    border-color: rgba(255, 255, 255, 0.10);

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .kcgf-tool-button {
    color: #E7EEF4;
}

html[data-theme="dark"] .kcgf-tool-button:hover {
    color: var(--kcgf-white);
    background: var(--kcgf-orange);
}

html[data-theme="dark"] .kcgf-tool-facebook {
    color: #6BA5FF;
}

html[data-theme="dark"] .kcgf-tool-facebook:hover {
    color: var(--kcgf-white);
    background: #1877F2;
}

html[data-theme="dark"] .kcgf-tool-button.is-saved {
    color: var(--kcgf-white);
    background: var(--kcgf-green);
}

html[data-theme="dark"] .kcgf-toast {
    color: #EAF1F7;
    background: #1C2C38;
    border-color: #354653;
}


/* =========================================================
   16. TABLET RESPONSIVE
========================================================= */

@media (max-width: 1024px) {

    .kcgf-footer-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 40px 35px;
    }

    .kcgf-footer-about {
        max-width: 100%;
    }

}


/* =========================================================
   17. MOBILE RESPONSIVE
========================================================= */

@media (max-width: 767px) {

    .kcgf-footer-main {
        padding: 55px 0 45px;
    }

    .kcgf-footer-container,
    .kcgf-footer-bottom-inner {
        width: calc(100% - 34px);
    }

    .kcgf-footer-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 35px 22px;
    }

    .kcgf-footer-about {
        grid-column: 1 / -1;
    }

    .kcgf-footer-heading {
        margin-bottom: 20px;
        font-size: 14px;
    }

    .kcgf-footer-links {
        gap: 11px;
    }

    .kcgf-footer-links a {
        font-size: 11px;
    }

    .kcgf-footer-bottom-inner {
        min-height: auto;

        flex-direction: column;
        align-items: flex-start;

        gap: 8px;

        padding: 17px 0;
    }

    .kcgf-footer-credit {
        text-align: left;
    }


    /* Floating toolbar */

    .kcgf-floating-toolbar {
        right: 10px;
        bottom: 14px;

        gap: 6px;
        padding: 7px;
    }

    .kcgf-tool-button {
        width: 39px;
        height: 39px;

        font-size: 14px;
    }

    .kcgf-tool-button::after {
        display: none;
    }

    .kcgf-toast-container {
        top: 12px;
        right: 12px;

        width: min(330px, calc(100% - 24px));
    }

}


/* =========================================================
   18. SMALL MOBILE DEVICES
========================================================= */

@media (max-width: 420px) {

    .kcgf-footer-grid {
        gap: 30px 16px;
    }

    .kcgf-footer-brand-name {
        font-size: 15px;
    }

    .kcgf-footer-logo-wrap {
        width: 58px;
        height: 58px;
    }

    .kcgf-footer-description {
        font-size: 11px;
    }

    .kcgf-floating-toolbar {
        right: 8px;
        bottom: 10px;

        gap: 5px;
        padding: 6px;
    }

    .kcgf-tool-button {
        width: 36px;
        height: 36px;

        font-size: 13px;
    }

}


/* =========================================================
   19. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .kcgf-footer *,
    .kcgf-footer *::before,
    .kcgf-footer *::after,
    .kcgf-floating-toolbar *,
    .kcgf-toast-container * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

}


/* =========================================================
   END OF FOOTER STYLESHEET
========================================================= */
