/*
 * Samraworld Students Footer — modern responsive layout
 * Brand color: #0e6630 (student green)
 */

.site-footer {
    /* Same layered gradient as the navbar (.nav.navbar) and the home page
       CTA banner: a soft brand-green radial highlight in the upper-right
       over the 135deg dark brand linear gradient. Keeps header / CTA /
       footer visually consistent across the page. */
    background:
        radial-gradient(ellipse 60% 180% at 85% -30%,
            rgba(74, 184, 110, 0.28) 0%,
            rgba(74, 184, 110, 0.10) 45%,
            transparent 75%),
        linear-gradient(135deg, #0e6630 0%, #084a22 100%);
    color: #fff;
    margin-top: 0;
}

.site-footer__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 36px 24px 24px;
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr;
    gap: 40px;
}

/* Brand column */

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.site-footer__logo {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.site-footer__logo img {
    height: 56px;
    width: auto;
    display: block;
    float: none !important;
    margin: 0 !important;
}

.site-footer__tagline {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.85rem;
    line-height: 1.55;
    max-width: 320px;
}

/* Column heading */

.site-footer__col {
    display: flex;
    flex-direction: column;
}

.site-footer__heading {
    margin: 0 0 16px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    padding-bottom: 8px;
}

/* Site map / nav grid — host for getNavbarForFooter() output */

.site-footer__nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px 24px;
}

/* getNavbarForFooter() emits floated Bootstrap col divs — neutralize */
.site-footer__nav-grid > div {
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    max-width: none !important;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.site-footer__nav-grid a.fnav,
.site-footer__nav-grid a.fnav:link,
.site-footer__nav-grid a.fnav:visited {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.82rem;
    text-transform: none;
    letter-spacing: 0;
    display: inline-block;
    padding: 1px 0;
    margin-left: 0;
    transition: color 0.18s;
}

.site-footer__nav-grid a.fnav:hover,
.site-footer__nav-grid a.fnav:active {
    color: #fff;
    text-decoration: underline;
}

/* Resources column */

.site-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-footer__links a,
.site-footer__links a:link,
.site-footer__links a:visited {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.18s;
}

.site-footer__links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Bottom bar (copyright) */

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px 24px;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
}

.site-footer__bottom p {
    margin: 0;
}

/* Hidden form fields */

.site-footer__hidden-fields {
    display: none;
}

/* Responsive */

@media (max-width: 900px) {
    .site-footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
    .site-footer__brand {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
    .site-footer__tagline {
        max-width: none;
    }
}

@media (max-width: 600px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
        padding: 28px 18px 20px;
        gap: 24px;
    }
    .site-footer__brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .site-footer__logo img {
        height: 48px;
    }
    .site-footer__nav-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px 18px;
    }
}

/* ======== Minimal variant (used on login / registration pages — no navbar) ======== */

.site-footer--minimal {
    margin-top: 0;
}

.site-footer__minimal-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.site-footer__minimal-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.85rem;
    flex: 1 1 240px;
}

.site-footer__minimal-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.site-footer__minimal-links a,
.site-footer__minimal-links a:link,
.site-footer__minimal-links a:visited {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.18s;
}

.site-footer__minimal-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer__minimal-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.78rem;
    flex: 1 1 100%;
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 600px) {
    .site-footer__minimal-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
    }
    /* When the inner flex stack flips to column, the row-layout
       flex-basis values (240px / 100%) on .minimal-text and
       .minimal-copy become MIN-HEIGHTS, stretching one-line text
       blocks to 240px tall and leaving a huge gap before the
       link row. Force content-sized vertical layout. */
    .site-footer__minimal-text,
    .site-footer__minimal-copy {
        flex: 0 0 auto;
    }
    .site-footer__minimal-copy {
        align-self: stretch;
        text-align: left;
    }
    .site-footer__minimal-links {
        gap: 12px 18px;
    }
}

/* ======== Legacy classes (preserved for shared MINI footer used by selc_viewPolicy etc.) ======== */

.footer {
    background: linear-gradient(180deg, #0e6630 0%, #084a22 100%);
    color: #fff;
    margin-top: 0;
    padding: 20px 16px;
}

.footer_important_center {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

.footer_important_center p {
    margin: 4px 0;
}

a.link_foot,
a.link_foot:link,
a.link_foot:visited {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 2px 4px;
    transition: color 0.18s;
}

a.link_foot:hover {
    color: #fff;
    text-decoration: underline;
}

/* Legacy NONAV/MINI footer — mobile responsive tweaks. (Mirrors teachers.) */
@media (max-width: 600px) {
    .footer {
        padding: 14px 12px;
    }
    .footer_important_center {
        font-size: 0.78rem;
        line-height: 1.4;
    }
    .footer_important_center h5 {
        font-size: 0.92rem;
        line-height: 1.35;
        margin: 0 0 8px;
    }
    .footer_important_center p {
        margin: 3px 0;
    }
    a.link_foot {
        font-size: 0.78rem;
    }
}

@media (max-width: 380px) {
    .footer_important_center {
        font-size: 0.72rem;
    }
    .footer_important_center h5 {
        font-size: 0.85rem;
    }
    a.link_foot {
        font-size: 0.72rem;
    }
}

/* ======== Modern mini footer (used by selc_viewPolicy / sec_confirmRegEmail / etc.) ========
   Inherits the brand gradient from .footer above; this just lays out the inner content
   in a centered, compact column with proper spacing and inline policy links. */
.site-mini-footer__inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.85rem;
    line-height: 1.45;
    padding: 4px 8px;
}

.site-mini-footer__brand {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.site-mini-footer__brand i {
    font-size: 0.78rem;
    opacity: 0.85;
}

.site-mini-footer__feedback {
    margin: 0;
}

.site-mini-footer__feedback a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none !important;
}

.site-mini-footer__feedback i {
    font-size: 0.85rem;
    opacity: 0.9;
}

.site-mini-footer__links {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 10px;
    font-size: 0.8rem;
}

.site-mini-footer__links a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background 0.15s, color 0.15s;
}

.site-mini-footer__links a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: underline;
}

.site-mini-footer__sep {
    color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 480px) {
    .site-mini-footer__inner { gap: 6px; }
    .site-mini-footer__brand { font-size: 0.72rem; }
    .site-mini-footer__feedback { font-size: 0.78rem; }
    .site-mini-footer__links { font-size: 0.75rem; }
}

/* ======== Modern main footer (logged-in students) =====================
   3-column layout at desktop, stacks at narrow widths. Brand identity on
   the left, contact in the middle, policies on the right, with a thin
   copyright bar at the very bottom. Uses the same brand gradient as the
   existing .footer class so nothing about the surrounding shell changes. */

.site-footer {
    background: linear-gradient(180deg, #0e6630 0%, #084a22 100%);
    color: #fff;
    padding: 0;
    margin-top: 0;
}

.site-footer__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 24px 22px 24px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
    align-items: start;
}

/* --- Brand column ------------------------------------------------- */

.site-footer__brand-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.site-footer__brand-name i {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    padding: 6px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.site-footer__tagline {
    margin: 0 0 10px 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.site-footer__location {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.site-footer__location i {
    font-size: 0.78rem;
    opacity: 0.85;
}

/* --- Section columns (Contact, Policies) -------------------------- */

.site-footer__col-title {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 12px 0;
    color: rgba(255, 255, 255, 0.65);
}

.site-footer__contact {
    margin: 0;
    font-size: 0.88rem;
}

.site-footer__contact a,
.site-footer__links a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-radius: 3px;
    transition: color 0.15s ease;
}

.site-footer__contact a:hover,
.site-footer__links a:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer__contact a i {
    font-size: 0.82rem;
    opacity: 0.85;
}

.site-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88rem;
}

/* --- Bottom copyright bar ----------------------------------------- */

.site-footer__bottom {
    background: rgba(0, 0, 0, 0.18);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 24px;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
}

.site-footer__bottom a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.site-footer__bottom a:hover {
    color: #fff;
    text-decoration: underline;
}

/* --- Responsive --------------------------------------------------- */

@media (max-width: 720px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 22px 20px 18px 20px;
    }
    .site-footer__col-title {
        margin-bottom: 8px;
    }
}
