/* ==========================================================
   LITTLE EXPLORERS LEARNING HUB
   FAMILY ENGAGEMENT LIBRARY

   File:
   styles/family-engagement-library.css

   Page:
   library/family-engagement/index.html

   Theme:
   Family Partnerships • Home Learning • Connection
   ========================================================== */


/* ==========================================================
   1. COLOR SYSTEM
========================================================== */

:root {

    --family-navy: #304b63;
    --family-navy-dark: #243a4d;

    --family-teal: #4f8b87;
    --family-teal-light: #e5f1ef;

    --family-gold: #d9aa43;
    --family-gold-light: #fff4d4;

    --family-coral: #d77b61;
    --family-coral-light: #f8e5df;

    --family-sage: #7e9b79;
    --family-sage-light: #e8f0e5;

    --family-purple: #81759b;
    --family-purple-light: #eeeaf4;

    --family-cream: #faf7ef;
    --family-paper: #fffdf9;
    --family-white: #ffffff;

    --family-text: #34414b;
    --family-muted: #68747c;

    --family-border: #dce4e2;
    --family-border-dark: #c6d4d1;

    --family-shadow:
        0 10px 28px rgba(48, 75, 99, 0.09);

    --family-shadow-hover:
        0 18px 42px rgba(48, 75, 99, 0.16);

    --family-radius: 20px;

    --family-transition: 0.28s ease;

    --family-width: 1240px;
}


/* ==========================================================
   2. RESET
========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    min-width: 320px;

    font-family: "Inter", sans-serif;

    font-size: 16px;

    line-height: 1.65;

    color: var(--family-text);

    background:
        linear-gradient(
            180deg,
            var(--family-paper) 0%,
            #ffffff 55%,
            var(--family-cream) 100%
        );

    -webkit-font-smoothing: antialiased;

    text-rendering: optimizeLegibility;
}


/* ==========================================================
   3. GENERAL ELEMENTS
========================================================== */

img {
    display: block;

    max-width: 100%;
}

a {
    color: inherit;

    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

h1,
h2,
h3,
h4 {
    margin-top: 0;

    font-family: "Nunito", sans-serif;
}

.container {
    width: min(92%, var(--family-width));

    margin-inline: auto;
}


/* ==========================================================
   4. HEADER
========================================================== */

body > header {
    position: sticky;

    top: 0;

    z-index: 1000;

    background:
        rgba(255, 253, 249, 0.97);

    border-bottom:
        1px solid var(--family-border);

    box-shadow:
        0 3px 16px rgba(48, 75, 99, 0.08);

    backdrop-filter: blur(12px);

    -webkit-backdrop-filter: blur(12px);
}

.nav-container {
    position: relative;

    min-height: 86px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 2rem;
}


/* ==========================================================
   5. HEADER LOGO
========================================================== */

.logo {
    display: inline-flex;

    align-items: center;

    gap: 12px;

    flex-shrink: 0;

    color: var(--family-navy);
}

.logo img {
    width: 58px;

    height: 58px;

    object-fit: contain;
}

.logo > div {
    display: flex;

    flex-direction: column;
}

.logo h1 {
    margin: 0;

    color: var(--family-navy);

    font-size: 1.4rem;

    font-weight: 800;

    line-height: 1.05;
}

.logo span {
    margin-top: 4px;

    color: var(--family-coral);

    font-size: 0.75rem;

    font-weight: 800;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


/* ==========================================================
   6. NAVIGATION
========================================================== */

nav {
    margin-left: auto;
}

nav ul {
    display: flex;

    align-items: center;

    gap: 1.45rem;

    margin: 0;

    padding: 0;

    list-style: none;
}

nav a {
    position: relative;

    display: inline-flex;

    padding: 0.5rem 0;

    color: var(--family-navy);

    font-size: 0.94rem;

    font-weight: 700;

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

nav a::after {
    content: "";

    position: absolute;

    left: 0;

    bottom: 0;

    width: 0;

    height: 3px;

    border-radius: 999px;

    background: var(--family-coral);

    transition:
        width var(--family-transition);
}

nav a:hover,
nav a.active {
    color: var(--family-coral);
}

nav a:hover {
    transform: translateY(-1px);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}


/* ==========================================================
   7. MOBILE MENU
========================================================== */

.mobile-menu {
    display: none;

    width: 46px;

    height: 46px;

    align-items: center;

    justify-content: center;

    border: 0;

    border-radius: 12px;

    background: var(--family-navy);

    color: #ffffff;

    font-size: 1.35rem;

    line-height: 1;

    transition:
        background var(--family-transition),
        transform var(--family-transition);
}

.mobile-menu:hover {
    background: var(--family-navy-dark);

    transform: translateY(-2px);
}


/* ==========================================================
   8. HERO
========================================================== */

.family-hero {
    position: relative;

    overflow: hidden;

    padding: 6rem 0 5.8rem;

    background:
        radial-gradient(
            circle at 8% 18%,
            rgba(79, 139, 135, 0.19),
            transparent 25%
        ),

        radial-gradient(
            circle at 92% 15%,
            rgba(217, 170, 67, 0.20),
            transparent 25%
        ),

        radial-gradient(
            circle at 78% 110%,
            rgba(215, 123, 97, 0.16),
            transparent 30%
        ),

        linear-gradient(
            135deg,
            #edf5f3 0%,
            #faf7ef 52%,
            #f8e8e2 100%
        );

    border-bottom:
        1px solid var(--family-border);
}

.family-hero::before {
    content: "👨‍👩‍👧";

    position: absolute;

    left: 3%;

    top: 17%;

    font-size:
        clamp(3rem, 6vw, 5.5rem);

    opacity: 0.08;

    transform: rotate(-7deg);

    pointer-events: none;
}

.family-hero::after {
    content: "❤️";

    position: absolute;

    right: 5%;

    bottom: 10%;

    font-size:
        clamp(3rem, 6vw, 5rem);

    opacity: 0.08;

    transform: rotate(8deg);

    pointer-events: none;
}

.family-hero .container {
    position: relative;

    z-index: 2;
}


/* ==========================================================
   9. BREADCRUMB
========================================================== */

.breadcrumb {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 0.45rem;

    margin-bottom: 1.5rem;

    color: var(--family-muted);

    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--family-navy);

    font-weight: 700;

    transition:
        color var(--family-transition);
}

.breadcrumb a:hover {
    color: var(--family-coral);
}


/* ==========================================================
   10. HERO LABEL
========================================================== */

.family-hero-label {
    display: inline-block;

    margin-bottom: 0.85rem;

    color: var(--family-coral);

    font-size: 0.76rem;

    font-weight: 800;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}


/* ==========================================================
   11. HERO TYPOGRAPHY
========================================================== */

.family-hero h1 {
    max-width: 950px;

    margin: 0 0 1.2rem;

    color: var(--family-navy);

    font-size:
        clamp(2.7rem, 6vw, 4.8rem);

    font-weight: 800;

    line-height: 1.04;

    letter-spacing: -0.045em;
}

.family-hero p {
    max-width: 900px;

    margin: 0 0 2.3rem;

    color: var(--family-text);

    font-size:
        clamp(1.05rem, 1.8vw, 1.22rem);

    line-height: 1.75;
}


/* ==========================================================
   12. BUTTONS
========================================================== */

.hero-buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 0.9rem;
}

.btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 50px;

    padding: 0.78rem 1.45rem;

    border-radius: 999px;

    font-size: 0.95rem;

    font-weight: 800;

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

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background: var(--family-navy);

    color: #ffffff;

    box-shadow:
        0 8px 20px rgba(48, 75, 99, 0.22);
}

.btn-primary:hover {
    background: var(--family-navy-dark);

    box-shadow:
        0 12px 28px rgba(48, 75, 99, 0.28);
}

.btn-secondary {
    background:
        rgba(255, 255, 255, 0.9);

    color: var(--family-navy);

    border:
        1px solid var(--family-border-dark);
}

.btn-secondary:hover {
    color: var(--family-coral);

    border-color: var(--family-coral);
}


/* ==========================================================
   13. SECTION HEADERS
========================================================== */

.section-header {
    max-width: 850px;

    margin:
        0 auto 3.2rem;

    text-align: center;
}

.section-label {
    display: inline-block;

    margin-bottom: 0.8rem;

    color: var(--family-coral);

    font-size: 0.76rem;

    font-weight: 800;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}

.section-header h2 {
    margin: 0 0 1rem;

    color: var(--family-navy);

    font-size:
        clamp(2rem, 4vw, 3rem);

    font-weight: 800;

    line-height: 1.1;
}

.section-header p {
    margin: 0;

    color: var(--family-muted);

    font-size: 1.04rem;

    line-height: 1.75;
}


/* ==========================================================
   14. INTRODUCTION
========================================================== */

.family-introduction {
    padding: 5.8rem 0;

    background: var(--family-paper);
}

.family-introduction-card {
    position: relative;

    overflow: hidden;

    padding:
        clamp(2rem, 5vw, 4rem);

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f7fbfa 55%,
            #fff8e4 100%
        );

    border:
        1px solid var(--family-border);

    border-radius: 24px;

    box-shadow: var(--family-shadow);
}

.family-introduction-card::after {
    content: "🏡";

    position: absolute;

    right: 5%;

    bottom: 5%;

    font-size: clamp(4rem, 8vw, 7rem);

    opacity: 0.07;

    pointer-events: none;
}

.family-introduction-content {
    position: relative;

    z-index: 1;

    max-width: 950px;

    margin: 0 auto;

    text-align: center;
}

.family-introduction-content h2 {
    margin: 0 0 1rem;

    color: var(--family-navy);

    font-size:
        clamp(2rem, 4vw, 3.1rem);

    line-height: 1.12;
}

.family-introduction-content > p {
    max-width: 850px;

    margin:
        0 auto 1.8rem;

    color: var(--family-muted);

    line-height: 1.8;
}


/* ==========================================================
   15. FAMILY HIGHLIGHTS
========================================================== */

.family-highlights {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 0.7rem;

    max-width: 850px;

    margin-inline: auto;
}

.family-highlights div {
    padding:
        0.75rem 0.8rem;

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

    border:
        1px solid var(--family-border);

    border-radius: 10px;

    color: var(--family-navy);

    font-size: 0.87rem;

    font-weight: 700;

    text-align: center;
}


/* ==========================================================
   16. FAMILY CATEGORIES
========================================================== */

.family-categories {
    padding: 5.8rem 0;

    background: #ffffff;
}


/* ==========================================================
   17. RESOURCE GRID
========================================================== */

.family-resource-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 1.6rem;

    align-items: stretch;
}


/* ==========================================================
   18. RESOURCE CARD
========================================================== */

.family-resource-card {
    display: flex;

    flex-direction: column;

    min-width: 0;

    overflow: hidden;

    background: var(--family-white);

    border:
        1px solid var(--family-border);

    border-radius: var(--family-radius);

    box-shadow:
        0 8px 24px rgba(48, 75, 99, 0.07);

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

.family-resource-card:hover {
    transform: translateY(-7px);

    border-color: var(--family-border-dark);

    box-shadow:
        var(--family-shadow-hover);
}


/* ==========================================================
   19. RESOURCE CARD IMAGE
========================================================== */

.family-card-image {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 10;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            var(--family-teal-light),
            var(--family-gold-light)
        );

    border-bottom:
        1px solid var(--family-border);
}

.family-card-image img {
    width: 100%;

    height: 100%;

    object-fit: cover;

    object-position: center;

    transition:
        transform 0.4s ease;
}

.family-resource-card:hover
.family-card-image img {
    transform: scale(1.035);
}


/* ==========================================================
   20. RESOURCE CARD CONTENT
========================================================== */

.family-card-content {
    display: flex;

    flex-direction: column;

    flex: 1;

    padding:
        1.5rem 1.55rem 1.6rem;
}

.family-card-icon {
    display: block;

    margin-bottom: 0.45rem;

    font-size: 1.5rem;

    line-height: 1;
}

.family-card-content h3 {
    margin: 0 0 0.65rem;

    color: var(--family-navy);

    font-size: 1.25rem;

    line-height: 1.3;
}

.family-card-content p {
    flex: 1;

    margin: 0 0 1.2rem;

    color: var(--family-muted);

    font-size: 0.94rem;

    line-height: 1.7;
}

.family-card-content a {
    display: inline-flex;

    align-items: center;

    width: fit-content;

    padding-top: 0.9rem;

    border-top:
        1px solid var(--family-border);

    color: var(--family-navy);

    font-size: 0.91rem;

    font-weight: 800;

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

.family-card-content a:hover {
    color: var(--family-coral);

    transform: translateX(4px);
}


/* ==========================================================
   21. CARD ACCENTS
========================================================== */

.family-resource-card:nth-child(1) {
    border-top: 5px solid var(--family-sage);
}

.family-resource-card:nth-child(2) {
    border-top: 5px solid var(--family-teal);
}

.family-resource-card:nth-child(3) {
    border-top: 5px solid var(--family-navy);
}

.family-resource-card:nth-child(4) {
    border-top: 5px solid var(--family-gold);
}

.family-resource-card:nth-child(5) {
    border-top: 5px solid var(--family-coral);
}

.family-resource-card:nth-child(6) {
    border-top: 5px solid var(--family-purple);
}


/* ==========================================================
   22. FAMILY MESSAGE
========================================================== */

.family-message {
    padding: 5.8rem 0;

    background:
        linear-gradient(
            135deg,
            #edf5f3 0%,
            #faf7ef 55%,
            #f8e8e2 100%
        );
}

.family-message-card {
    position: relative;

    overflow: hidden;

    padding:
        clamp(2.2rem, 5vw, 4.2rem);

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

    border:
        1px solid var(--family-border);

    border-radius: 24px;

    box-shadow: var(--family-shadow);

    text-align: center;
}

.family-message-card::before {
    content: "❤️";

    position: absolute;

    left: 5%;

    top: 10%;

    font-size: 4rem;

    opacity: 0.07;

    pointer-events: none;
}

.family-message-card::after {
    content: "🏡";

    position: absolute;

    right: 5%;

    bottom: 8%;

    font-size: 4rem;

    opacity: 0.07;

    pointer-events: none;
}

.family-message-card > * {
    position: relative;

    z-index: 1;
}

.family-message-card h2 {
    max-width: 800px;

    margin:
        0 auto 1rem;

    color: var(--family-navy);

    font-size:
        clamp(2rem, 4vw, 3rem);

    line-height: 1.1;
}

.family-message-card > p {
    max-width: 800px;

    margin:
        0 auto 1.8rem;

    color: var(--family-muted);

    line-height: 1.8;
}

.family-message-card .hero-buttons {
    justify-content: center;
}


/* ==========================================================
   23. FOOTER
========================================================== */

footer {
    background:
        linear-gradient(
            135deg,
            #243a4d 0%,
            #304b63 52%,
            #416679 100%
        );

    color: #ffffff;
}


/* ==========================================================
   24. FOOTER GRID
========================================================== */

.footer-grid {
    display: grid;

    grid-template-columns:
        1.35fr repeat(3, 1fr);

    gap: 2.8rem;

    padding-top: 4rem;

    padding-bottom: 3.5rem;
}


/* ==========================================================
   25. FOOTER BRAND
   No logo.
========================================================== */

.footer-brand {
    min-width: 0;
}

.footer-site-name {
    display: inline-block;

    margin-bottom: 1rem;

    color: #ffffff;

    font-family: "Nunito", sans-serif;

    font-size: 1.35rem;

    font-weight: 800;

    line-height: 1.2;

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

.footer-site-name:hover {
    color: var(--family-gold);

    transform: translateY(-2px);
}

.footer-brand p {
    max-width: 340px;

    margin: 0;

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

    line-height: 1.7;
}


/* ==========================================================
   26. FOOTER COLUMNS
========================================================== */

.footer-column {
    display: flex;

    flex-direction: column;

    gap: 0.45rem;
}

.footer-column h4 {
    margin: 0 0 0.7rem;

    color: #ffffff;

    font-size: 1.05rem;

    font-weight: 800;
}

.footer-column a {
    color:
        rgba(255, 255, 255, 0.82);

    font-size: 0.92rem;

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

.footer-column a:hover {
    color: var(--family-gold);

    transform: translateX(3px);
}


/* ==========================================================
   27. FOOTER BOTTOM
========================================================== */

.footer-bottom {
    padding: 1.2rem 0;

    border-top:
        1px solid rgba(255, 255, 255, 0.18);

    text-align: center;
}

.footer-bottom p {
    margin: 0.15rem 0;

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

    font-size: 0.85rem;
}


/* ==========================================================
   28. ACCESSIBILITY
========================================================== */

a:focus-visible,
button:focus-visible {
    outline:
        3px solid var(--family-gold);

    outline-offset: 4px;
}


/* ==========================================================
   29. TABLET
========================================================== */

@media (max-width: 1100px) {

    nav ul {
        gap: 0.9rem;
    }

    .family-resource-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

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

}


/* ==========================================================
   30. MOBILE
========================================================== */

@media (max-width: 768px) {

    .nav-container {
        min-height: 76px;
    }

    nav {
        display: none;
    }

    .mobile-menu {
        display: flex;
    }


    /* Mobile navigation opened by JS */

    nav.mobile-nav-open {
        display: block;

        position: absolute;

        top: 76px;

        left: 0;

        right: 0;

        padding: 1rem;

        background: var(--family-paper);

        border-bottom:
            1px solid var(--family-border);

        box-shadow:
            0 12px 28px rgba(48, 75, 99, 0.12);
    }

    nav.mobile-nav-open ul {
        flex-direction: column;

        align-items: stretch;

        gap: 0.25rem;
    }

    nav.mobile-nav-open a {
        display: block;

        padding: 0.85rem 1rem;

        border-radius: 10px;
    }

    nav.mobile-nav-open a:hover {
        background:
            var(--family-teal-light);
    }

    nav.mobile-nav-open a::after {
        display: none;
    }


    /* Hero */

    .family-hero {
        padding: 4.8rem 0 5rem;
    }

    .family-hero h1 {
        font-size:
            clamp(2.3rem, 10vw, 3.5rem);
    }

    .family-hero p {
        font-size: 1rem;
    }


    /* Buttons */

    .hero-buttons {
        flex-direction: column;

        align-items: stretch;
    }

    .btn {
        width: 100%;
    }


    /* Introduction */

    .family-introduction {
        padding: 4.5rem 0;
    }

    .family-introduction-card {
        padding: 2rem 1.35rem;
    }

    .family-highlights {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    /* Categories */

    .family-categories,
    .family-message {
        padding: 4.5rem 0;
    }

    .family-resource-grid {
        grid-template-columns: 1fr;

        gap: 1.25rem;
    }


    /* Mobile cards */

    .family-resource-card {
        border-radius: 18px;
    }

    .family-card-image {
        aspect-ratio: 16 / 9;
    }

    .family-card-content {
        padding:
            1.35rem 1.3rem 1.4rem;
    }

    .family-card-content h3 {
        font-size: 1.2rem;
    }


    /* Message */

    .family-message-card {
        padding:
            2rem 1.3rem 2.2rem;
    }

    .family-message-card .hero-buttons {
        align-items: stretch;
    }


    /* Footer */

    .footer-grid {
        grid-template-columns: 1fr;

        gap: 2rem;

        padding-top: 3.3rem;

        padding-bottom: 3rem;
    }

    .footer-brand p {
        max-width: 100%;
    }

}


/* ==========================================================
   31. SMALL PHONES
========================================================== */

@media (max-width: 480px) {

    .container {
        width: min(91%, var(--family-width));
    }

    .logo > div {
        display: none;
    }

    .family-hero {
        padding:
            4rem 0 4.3rem;
    }

    .family-hero h1 {
        font-size:
            clamp(2.15rem, 11vw, 3rem);
    }

    .breadcrumb {
        font-size: 0.82rem;
    }

    .family-highlights {
        grid-template-columns: 1fr;
    }

    .family-card-image {
        aspect-ratio: 16 / 10;
    }

    .family-card-content {
        padding:
            1.25rem;
    }

    .family-card-content p {
        font-size: 0.92rem;
    }

    .family-message-card h2 {
        font-size: 1.9rem;
    }

    .footer-site-name {
        font-size: 1.2rem;
    }

}


/* ==========================================================
   32. REDUCED MOTION
========================================================== */

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

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration:
            0.01ms !important;

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;
    }

}