/* FILE PURPOSE: SHARED FOOTER STYLES FOR THE OAKOKHO SUBDOMAINS.
                 THE "SHARED" SECTION BELOW IS BYTE-IDENTICAL ACROSS
                 learn, school, books AND swargam — COPY THAT SECTION
                 AS-IS. THE PER-SUBDOMAIN OVERRIDE SECTION AT THE
                 BOTTOM IS DELIBERATELY *NOT* IDENTICAL: EACH SITE
                 KEEPS ITS OWN TAIL. SEE THE NOTE ON LITERAL COLOURS.
   LOCATION: /var/www/school/css/footer.css
   LAST REVIEWED: 2026-08-20 */

/* ============================================================
   SHARED — DO NOT EDIT PER-SUBDOMAIN

   COLOURS ARE DELIBERATELY LITERAL, NOT var() TOKENS. swargam's
   style.css defines --dark-bg/--white/--transition; learn's does
   NOT. A var() that resolves nowhere makes the whole declaration
   compute to its initial value, so `background: var(--dark-bg)`
   would render learn's footer TRANSPARENT — white text on white.
   The literals below are the values both sites already computed.
   ============================================================ */

.main-footer {
    background: #1e293b;
    color: #ffffff;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* ALL FOOTER HEADINGS — BASE. color/font-weight ARE STATED EXPLICITLY EVEN
   THOUGH THEY MATCH WHAT h3 WOULD INHERIT/DEFAULT TO, SO THE COLUMN HEADINGS
   DO NOT SILENTLY CHANGE IF A SITE RESTYLES h3 GLOBALLY. */
.footer-section h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* ASSAMESE HEADING — FIRST COLUMN ONLY. THIS IS WHAT RENDERS THE SITE NAME IN
   NOTO SERIF BENGALI INSTEAD OF THE SYSTEM SANS STACK THAT header.css ASSIGNS
   TO .main-footer. DO NOT PUT .footer-as ON THE <h3> — THAT CLASS IS 15px AND
   WOULD SHRINK THE HEADING RATHER THAN ENLARGE IT. */
.footer-section:first-child h3 {
    font-family: 'Noto Serif Bengali', serif;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a,
.footer-section ul li {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.footer-section ul li a:hover {
    opacity: 1;
    padding-left: 5px;
}

/* FOOTER LINK ICONS — FIXED WIDTH SO EVERY LABEL STARTS AT THE SAME INDENT.
   COVERS BOTH THE LINKED COLUMNS (QUICK LINKS / OAKOKHO PROJECTS, WHERE THE
   <i> SITS INSIDE THE <a>) AND THE PLAIN CONTACT COLUMN (WHERE IT SITS
   DIRECTLY IN THE <li>). ANY MORE-SPECIFIC PER-SITE RULE THAT ALSO SETS width
   ON THESE ICONS WILL SILENTLY OVERRIDE THE 1.2em — KEEP SPACING/TONE ONLY IN
   THOSE RULES, NEVER width/display/text-align. */
.footer-section ul li a i,
.footer-section ul li i {
    display: inline-block;
    width: 1.2em;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #6366f1;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* ASSAMESE SUBHEADING / TAGLINE — THE <p class="footer-as"> IN COLUMN 1. */
.footer-as {
    font-family: 'Noto Serif Bengali', serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin-bottom: 4px;
}

/* ============================================================
   SCHOOL OVERRIDES
   EVERYTHING BELOW THIS LINE IS SCHOOL-ONLY. DO NOT COPY IT TO
   ANOTHER SUBDOMAIN — EACH SITE WRITES ITS OWN TAIL.
   ============================================================ */

/* SCHOOL SCROLL-TO-TOP — MATCHES SWARGAM PATTERN.
   var(--primary) IS NOT DEFINED IN school's style.css (IT DEFINES --primary-color),
   SO THE #6366f1 FALLBACK IS WHAT ACTUALLY RENDERS — THAT IS DELIBERATE AND MATCHES
   --accent-color. THE !important FLAGS AND max-width/flex/padding RESETS EXIST
   BECAUSE style.css STYLES BARE `button` AND `.btn` GENEROUSLY; WITHOUT THEM THE
   CIRCLE GETS STRETCHED INTO A PILL. */
#scrollToTopBtn {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: calc(24px + env(safe-area-inset-right, 0px));
    width: 46px !important;
    height: 46px !important;
    min-width: 0 !important;
    max-width: 46px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    flex: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary, #6366f1);
    color: #fff;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s ease;
    z-index: 1000;
}

#scrollToTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollToTopBtn:hover {
    background: #4f46e5;
}

/* SCHOOL ENGLISH TAGLINE — SMALLER THAN ASSAMESE.
   THE :not() PAIR KEEPS THIS OFF THE ASSAMESE TAGLINE AND THE HIT COUNTER, BOTH OF
   WHICH ARE ALSO <p> IN COLUMN 1. WITHOUT AN EXPLICIT font-size THE ENGLISH LINE
   INHERITS 1rem AND ENDS UP THE SAME SIZE AS THE ASSAMESE LINE ABOVE IT. */
.footer-section p:not(.footer-as):not(.footer-hits) {
    font-size: 0.82rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* ASSAMESE TAGLINE — p.footer-as (0,2,1) OUTRANKS BOTH THE :not() RULE ABOVE AND
   BARE .footer-as IN THE SHARED SECTION. THE SHARED SECTION STILL OWNS ITS FAMILY
   AND COLOUR; ONLY SIZE/OPACITY ARE RESTORED HERE. */
.footer-section p.footer-as {
    font-size: 1rem;
    opacity: 1;
}

/* SITE HIT COUNTER — .footer-hits, NOT #siteHitCounter. SCHOOL FOLLOWS books' CLASS
   NAMING HERE, NOT swargam's ID. #hitCountValue INSIDE IT IS THE JS FETCH TARGET. */
.footer-hits {
    font-size: 0.85rem;
    opacity: 0.9;
    /* SPACING + NO WRAP. margin-top LIFTS IT OFF THE SOCIAL ICONS ABOVE (THE * RESET IN
       style.css ZEROES ALL <p> MARGINS, SO WITHOUT THIS IT SITS FLUSH). nowrap KEEPS
       "Visits: 1,234" ON ONE LINE ONCE THE NUMBER GROWS. MATCHES swargam's
       #siteHitCounter. */
    margin-top: 1rem;
    white-space: nowrap;
}

/* FOUR COLUMNS — PREVENT 2x2 WRAP ON DESKTOP. TIGHTER TRACK MINIMUM THAN THE SHARED
   250px SO ALL FOUR COLUMNS SURVIVE ON ONE ROW AT DESKTOP WIDTHS. THE .main-footer
   PREFIX (0,2,0) IS WHAT OUTRANKS THE SHARED `.footer-content` RULE (0,1,0). SAME
   OVERRIDE swargam CARRIES. */
.main-footer .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
