/* assets/homepage.css */

/* Playful page background for kids: soft gradient + decorative shapes */
:root {
    --kid-bg-1: #fff6e9; /* warm cream */
    --kid-bg-2: #ffe6f0; /* pale pink */
    --kid-bg-3: #e6f7ff; /* pale blue */
    --kid-accent-1: #ffd66b; /* sunny yellow */
    --kid-accent-2: #ff9ab0; /* soft coral */
}

/* Page background: layered radial gradients to feel playful but not busy */
body {
    background-image: radial-gradient(1200px 600px at 10% 20%, var(--kid-bg-1) 0%, transparent 30%),
                      radial-gradient(900px 500px at 85% 80%, var(--kid-bg-2) 0%, transparent 30%),
                      linear-gradient(180deg, var(--kid-bg-3) 0%, var(--kid-bg-1) 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

/* Playful header for kids: colorful gradient, rounded bottom and floating shapes */
.site-header {
    background: linear-gradient(90deg, #ffecd2 0%, #ffd1e0 35%, #cfe9ff 100%);
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.06);
    position: relative;
    overflow: visible;
}
.site-header .container {
    position: relative;
    z-index: 3;
}
.site-header .brand img { 
    height: 64px; /* slightly larger logo for kids */
}
.site-header .brand .sublogo {
    height: 36px;
}
.header-badge {
    background: #fff3e6;
    color: #c94d3f;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    margin-left: 8px;
    font-size: 0.76rem;
    box-shadow: 0 3px 8px rgba(201,77,63,0.12);
}

.header-actions a {
    color: #2b1a14;
    text-decoration: none;
    font-weight: 600;
}
.header-actions .btn-login {
    background: #ff9a76;
    color: #2b1a14;
    box-shadow: 0 6px 18px rgba(255,154,118,0.18);
}

/* Decorative floating shapes */
.header-decor {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -22px;
    pointer-events: none;
    z-index: 1;
    height: 60px;
}
.header-decor .shape {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    opacity: 0.95;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.08));
}

/* float keyframes removed — shapes are now static decorative elements */

/* Make header playful on small screens while preserving layout */
@media (max-width: 575.98px) {
    .site-header .brand img { height: 52px; }
    .header-decor { height: 46px; bottom: -16px; }
    .header-decor .shape { width: 44px; height: 44px; }
}


.card {
    border: none;
    box-shadow: 0 6px 12px rgba(0,0,0,0.04);
    border-radius: 8px;
}

.icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-box {
    height: 180px;
    background: linear-gradient(180deg, #f9f0e7 0%, #fdeedf 100%);
    border: 2px solid #e6e6e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-inner {
    width: 80%;
    height: 70%;
    background: #ffecec;
    border: 6px solid #e0e8f0;
    border-radius: 6px;
}

.large-banner {
    height: 220px;
    background: #efcaa7;
    border-radius: 8px;
}

/* Cartoonish large banner for kid-friendly intro text */
.large-banner {
    position: relative;
    padding: 22px 26px;
    box-sizing: border-box;
    border-radius: 18px; /* more rounded */
    background: linear-gradient(180deg, #ffe6c9 0%, #ffd1b6 45%, #ffd7e6 100%);
    border: 6px solid rgba(255,255,255,0.65);
    box-shadow: 0 18px 36px rgba(14,20,40,0.36), inset 0 -6px 14px rgba(0,0,0,0.03);
    font-family: 'Baloo 2', 'Fredoka One', 'Comic Neue', system-ui, -apple-system, "Segoe UI", Roboto, Arial;
    color: #2b1a14;
    font-size: 1.1rem;
    line-height: 1.6;
    text-shadow: 0 1px 0 rgba(255,255,255,0.6);
    text-align: center;
}

/* Hand-drawn dashed outline for cartoon effect */
.large-banner::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 14px;
    pointer-events: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.04) inset;
    border: 3px dashed rgba(43,26,20,0.12);
}

/* Soft confetti dots */
.large-banner::before {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 120px;
    height: 40px;
    background-image: radial-gradient(circle at 8% 20%, #ffd66b 6px, transparent 7px),
                      radial-gradient(circle at 30% 80%, #ff9ab0 5px, transparent 6px),
                      radial-gradient(circle at 70% 20%, #bfeafc 6px, transparent 7px);
    opacity: 0.95;
    pointer-events: none;
}

/* Make text inside more readable: give it a semi-opaque backdrop */
.large-banner { padding-bottom: 28px; }
.large-banner { color: #2c1f15; }
.large-banner .lead-text {
    display: inline-block;
    background: rgba(255,255,255,0.66);
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(7,10,30,0.12);
    max-width: 92%;
    text-align: center; /* ensure multiline text is centered */
}

/* Cartoon smiley corner decorative sticker */
.large-banner .sticker {
    position: absolute;
    left: 14px;
    top: 14px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #fff9e6, #ffd66b 40%, #ff9ab0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(7,10,30,0.18);
    font-size: 1.25rem;
}

@media (max-width: 575.98px) {
    .large-banner { padding: 14px 16px; border-radius: 12px; }
    .large-banner .sticker { width: 40px; height: 40px; left: 10px; top: 10px; }
}

/* Hero banner image (moved from body background) */
.hero-banner {
    max-height: 420px; /* allow tall banner but keep reasonable limit */
    overflow: hidden;
}
.hero-banner img {
    display: block;
    width: 100%;
    height: auto; /* maintain aspect ratio */
    object-fit: cover;
}

footer i {
    font-size: 1.25rem;
}

/* Slightly larger footer for more breathing room */
footer {
    padding-top: 1.25rem; /* small increase */
    padding-bottom: 1.25rem;
}


/* Footer icon link styles */
.footer-icons {
    align-items: center;
    gap: 0.5rem !important; /* override bootstrap gap-3 and tighten spacing */
}
.footer-icon {
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.18s, transform 0.08s;
}
.footer-icon:focus,
.footer-icon:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
    outline: none;
}
.footer-icon:focus {
    box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
}
.footer-icon i {
    font-size: 1.35rem;
}

/* Small text next to icon for location; icon vertically centered */
.footer-icon.location {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0; /* remove extra padding so text doesn't create large blocks */
    max-width: 220px; /* constrain so it doesn't stretch across footer */
}
.footer-icon.location .footer-icon-text {
    font-size: 0.78rem;
    line-height: 1.08;
    display: block;
    white-space: normal;
    text-align: right; /* align the address text to the right side */
    color: #ffffff;
    max-width: 200px;
}

/* Ensure the location text doesn't create a background-colored block */
.footer-icon.location, .footer-icon.location .footer-icon-text {
    background: transparent;
}

/* Ensure icon-only links remain centered */
.footer-icon.icon-only {
    padding: 0.25rem;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Flip card styles - size driven by inner content (images) */
.flip-card {
    background: transparent;
    perspective: 1000px;
    cursor: pointer;
    /* allow the card to size to its content (image) */
    min-height: unset;
    display: block;
}
.flip-card:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(13,110,253,0.15);
}
.flip-card-inner {
    /* Use grid so front and back occupy same area and share height */
    display: grid;
    position: relative;
    width: 100%;
    height: 100%; /* allow the inner grid to be sized by outer aspect-ratio */
    transition: transform 0.6s;
    transform-style: preserve-3d;
}
.flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}
/* Front remains in the document flow so it defines the height; back overlays it */
.flip-card-front,
.flip-card-back {
    /* both faces occupy the same grid cell so heights match exactly */
    grid-area: 1 / 1;
    position: relative;
    backface-visibility: hidden;
    border-radius: 8px;
    /* ensure both sides fill the available height */
    height: 100%;
}
.flip-card-back {
    transform: rotateY(180deg);
}
.flip-card {
    /* clip overflow so rounded corners apply to images */
    overflow: hidden;
}

.flip-card .card {
    min-height: unset;
    box-sizing: border-box;
}

/* make sure the back card content fills the same height and centers its content */
.flip-card-back .card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Ensure images inside flip-cards size the card correctly */
.flip-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Make flip-cards square: use aspect-ratio when supported, fallback uses padding-top.
   We apply the sizing to the inner card so front/back share the same square area. */
/* Use a wide card aspect (16:9) so cards don't take excessive vertical space.
   Also cap height on very large screens. */
.flip-card .flip-card-inner {
    aspect-ratio: 16 / 9;
    max-height: 360px; /* prevents the card from growing too tall on large viewports */
}

/* Fallback for browsers without aspect-ratio: make the front image use padding trick */
@supports not (aspect-ratio: 16/9) {
    .flip-card .flip-card-inner {
        width: 100%;
        position: relative;
        /* create 16:9 by using padding-top = 56.25% */
        padding-top: 56.25%;
        display: block;
    }
    .flip-card .flip-card-front,
    .flip-card .flip-card-back {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
}

/* Ensure the card element that contains images fills available area and clips overflow */
.flip-card .card-image-front,
.flip-card .card-image-front img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* cover so image crops cleanly */
}

/* Image-top + text-bottom layout for flip-card fronts */
.flip-card-front {
    /* keep front positioned so we can overlay text on top of the image */
    position: relative;
}
.card {
    position: relative; /* allow children to be positioned over images */
}
.card-image-top {
    /* image area fills the card; body will be overlaid */
    height: 100%;
    overflow: hidden;
}
.card-image-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ensure front shows image and back is colorful for kids */
.flip-card-front .card {
    /* let the image show through; overlay panels handle text */
    background: transparent;
}
.flip-card-back .card {
    /* colorful gradient back face with subtle confetti accents */
    background: linear-gradient(135deg, rgba(255,214,107,0.98) 0%, rgba(255,154,176,0.95) 35%, rgba(191,234,252,0.95) 70%);
    color: #071028;
    border-radius: 8px;
    position: relative; /* for decorative pseudo-elements */
    overflow: hidden;
}
.flip-card-back .card::after {
    content: '';
    position: absolute;
    inset: 8px auto auto 12px;
    width: 64px;
    height: 40px;
    background-image: radial-gradient(circle at 10% 20%, #ffd66b 6px, transparent 7px),
                      radial-gradient(circle at 60% 70%, #ff9ab0 5px, transparent 6px),
                      radial-gradient(circle at 88% 40%, #bfeafc 6px, transparent 7px);
    opacity: 0.85;
    pointer-events: none;
}
.flip-card-back .card h5,
.flip-card-back .card p {
    color: #071028; /* dark text for contrast on colorful background */
}

.card-body-bottom {
    position: absolute;
    left: 12px; /* small inset to match card padding visually */
    right: 12px;
    /* move slightly upward so overlay is fully visible and not clipped */
    bottom: 100px;
    padding: 0.8rem 1rem;
    /* playful multi-color gradient that stays slightly translucent so
       the image shows through; colors chosen to be warm and kid-friendly */
    background: linear-gradient(135deg, rgba(255,197,197,0.96) 0%, rgba(255,238,180,0.94) 30%, rgba(191,234,252,0.92) 65%, rgba(203,217,255,0.94) 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(7,10,30,0.32);
    border: 1px solid rgba(255,255,255,0.28);
    backdrop-filter: blur(6px) saturate(122%);
    -webkit-backdrop-filter: blur(6px) saturate(122%);
    transition: transform 0.18s cubic-bezier(.2,.9,.2,1), box-shadow 0.18s;
    overflow: visible;
    position: relative;
    z-index: 10; /* bring overlay above images */
    box-sizing: border-box;
}

/* vertical rainbow accent on the left to add color and playfulness */
.card-body-bottom::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    border-radius: 8px 0 0 8px;
    background: linear-gradient(180deg, #ffd66b 0%, #ff9ab0 33%, #bfeafc 66%, #c9cbff 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) inset;
}

/* tiny confetti dots using layered radial-gradients for subtle decoration */
.card-body-bottom::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 8px;
    width: 56px;
    height: 36px;
    background-image: radial-gradient(circle at 8% 20%, #ffd66b 6px, transparent 7px),
                      radial-gradient(circle at 40% 70%, #ff9ab0 5px, transparent 6px),
                      radial-gradient(circle at 78% 40%, #bfeafc 6px, transparent 7px);
    background-repeat: no-repeat;
    opacity: 0.95;
    pointer-events: none;
}

.card-body-bottom h5 {
    margin-bottom: 0.45rem;
    color: #071028; /* deep navy for good contrast on colorful backgrounds */
    font-weight: 800;
    letter-spacing: 0.2px;
}
.card-body-bottom p {
    margin-bottom: 0;
    color: rgba(7,16,36,0.88);
    font-size: 0.95rem;
}

/* Subtle interactive lift with a bit more vibrancy on hover/focus */
.flip-card:hover .card-body-bottom,
.flip-card:focus .card-body-bottom,
.flip-card.is-flipped .card-body-bottom {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 36px rgba(7,10,30,0.42);
}

/* Slightly more compact on small screens */
@media (max-width: 575.98px) {
    .card-body-bottom { left: 8px; right: 8px; bottom: 8px; padding: 0.72rem 0.9rem; border-radius: 10px; }
    .card-body-bottom h5 { font-size: 1rem; }
    .card-body-bottom p { font-size: 0.85rem; }
}

/* Subtle hover/focus lift so the info feels interactive */
.flip-card:hover .card-body-bottom,
.flip-card:focus .card-body-bottom,
.flip-card.is-flipped .card-body-bottom {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(3,8,23,0.56);
}

/* Make the overlay slightly more compact on small screens */
@media (max-width: 575.98px) {
    .card-body-bottom { left: 8px; right: 8px; bottom: 8px; padding: 0.75rem 0.9rem; border-radius: 8px; }
    .card-body-bottom h5 { font-size: 0.98rem; }
    .card-body-bottom p { font-size: 0.86rem; }
}

.navbar .nav-link {
    color: #3c2b23;
}
.navbar .nav-link:hover {
    color: #000;
}
.btn-login {
    background: #e08b6f;
    color: #2b1a14;
    border: none;
    box-shadow: none;

}
.btn-login:hover,
.btn-login:focus {
    background: #cf7a5f;
    color: #2b1a14;
}

/* Keep navbar content vertically centered and avoid extra spacing when logo is tall */
.navbar {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}
.navbar .container-fluid {
    display: flex;
    align-items: center; /* vertically center logo and controls */
}
.navbar-brand, .size_logo {
    margin-right: 0.5rem;
}
/* Ensure nav links stay vertically centered alongside the large logo */
.navbar-nav {
    align-items: center;
}

@media (max-width: 991.98px) {
    /* Reduce logo a bit on medium screens so it doesn't crowd the toggler */
    .size_logo img {
        height: 80px;
    }
}

/* mobile-view */

/* Login modal custom styles (match second screenshot) */
.modal-content.login-modal {
    border-radius: 8px;
    overflow: hidden;
}

/* Header area: pale yellow background with rounded top corners */
.modal-content.login-modal .modal-header {
    background: #fff5d9; /* pale yellow from screenshot */
    color: #3b2b20; /* darker brown text */
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* Header title color and weight */
.modal-content.login-modal .modal-title {
    color: #3b2b20; /* match header text color */
    font-weight: 600;
}

/* Close button: small square on the right matching screenshot */
.modal-content.login-modal .btn-close {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 4px;
    width: 28px;
    height: 28px;
    padding: 0.15rem;
}

/* visible square close button variant used in modal header */
.btn-close-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.85);
    color: #3b2b20; /* dark brown X color */
    font-size: 16px;
    line-height: 1;
}
.btn-close-square:hover,
.btn-close-square:focus {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    outline: none;
}

/* Constrain login modal width so it isn't too wide on large screens */
.modal-content.login-modal {
    max-width: 520px;
    width: 100%;
}

/* Center modal dialog and limit its max width on larger viewports */
.modal-dialog {
    max-width: 520px;
}

@media (max-width: 576px) {
    .modal-dialog {
        max-width: 92%;
        margin: 1.5rem auto;
    }
    .modal-content.login-modal .modal-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Modal body form spacing */
.modal-content.login-modal .modal-body {
    padding: 1.25rem 1.5rem;
    color: #2b1a14;
}

/* Input styles: rounded with light border and generous padding */
.modal-content.login-modal .form-control {
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    padding: 0.9rem 1rem;
}

/* Salmon / terracotta login button (large pill) */
.modal-content.login-modal .btn-salmon {
    background: #c96d60; /* terracotta/salmon from screenshot */
    color: #fff;
    border: none;
    border-radius: 36px;
    padding: 0.9rem 1.25rem;
    font-size: 1.05rem;
    box-shadow: none;
}
.modal-content.login-modal .btn-salmon:hover,
.modal-content.login-modal .btn-salmon:focus {
    background: #b85d52;
    color: #fff;
}

/* Small link color for Forgot Password */
.modal-content.login-modal a.small {
    color: #1a73e8;
}

/* Decorative floating shapes that are purely visual (non-interactive) */
.header-decor .shape.circle { background: radial-gradient(circle at 30% 30%, #fff7d9 0%, var(--kid-accent-1) 60%); width: 72px; height: 72px; left: 6%; bottom: -26px; transform: rotate(-10deg); }
.header-decor .shape.star { background: linear-gradient(135deg, #ffd7e6, #ff9ab0); width: 56px; height: 56px; left: 28%; bottom: -18px; border-radius: 20%; transform: rotate(12deg); }
.header-decor .shape.blob { background: radial-gradient(circle at 40% 40%, #e8f7ff 0%, #bfeafc 60%); width: 86px; height: 86px; right: 6%; bottom: -32px; border-radius: 40%; transform: rotate(-6deg); }

/* Gentle bob animation for shapes when reduced-motion is not requested */
@media (prefers-reduced-motion: no-preference) {
    @keyframes float-gentle {
        0% { transform: translateY(0) rotate(0deg); }
        50% { transform: translateY(-6px) rotate(2deg); }
        100% { transform: translateY(0) rotate(0deg); }
    }
    .header-decor .shape { animation: float-gentle 6s ease-in-out infinite; }
}

/* Ensure high-contrast text over the background where needed */
.intro-box, .card { background-color: rgba(255,255,255,0.95); }

/* Decorative intro-full panel Spraklab ito yung sa baba ng image slidshow*/
.intro-full {
    position: relative;
    overflow: visible;
    z-index: 2;
    /* kid-friendly colorful panel: soft rounded card with subtle pattern */
    padding: 18px 22px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,247,237,0.95) 0%, rgba(255,238,245,0.94) 50%, rgba(235,249,255,0.92) 100%);
    box-shadow: 0 18px 40px rgba(3,8,23,0.45);
    border: 1px solid rgba(255,255,255,0.06);
}
.intro-full::before,
.intro-full::after {
    display: none !important; /* remove decorative shapes per request */
}

.intro-full .intro-box {
    position: relative;
    z-index: 3;
    /* colorful, non-white panel tailored for kids */
    background: linear-gradient(135deg, #fff6e8 0%, #ffe6f0 40%, #e6f7ff 100%);
    border: 1px solid rgba(255,255,255,0.55);
    padding: 14px;
    box-shadow: 0 14px 30px rgba(14,20,40,0.14);
    border-radius: 14px;
}

/* Kid-friendly headline and paragraph styles inside intro-full */
.intro-full h3,
.intro-full .intro-title {
    /* Cartoonish headline */
    font-family: 'Baloo 2', 'Fredoka One', 'Comic Neue', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color: #1c2b4a; /* deep playful navy */
    font-size: 2.25rem;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 4px 0 rgba(255,255,255,0.5);
}

.intro-full p,
.intro-full .intro-text {
    font-family: 'Nunito', 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color: #2b1a14; /* warm chocolate for readability */
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    padding: 6px 0;
}

/* Accent colored words / chips inside the intro paragraph */
.intro-full .accent {
    color: #c94d3f; /* warm coral accent */
    font-weight: 700;
}

/* Decorative rounded icon cluster on the left for visual interest (pure CSS) */
.intro-full .kid-icons {
    position: absolute;
    left: -18px;
    top: -22px;
    display: flex;
    gap: 6px;
    z-index: 1;
}
.intro-full .kid-icons span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 6px 12px rgba(7,10,30,0.18);
}
.intro-full .kid-icons .icon-1 { background: linear-gradient(135deg,#ffd66b,#ff9ab0); }
.intro-full .kid-icons .icon-2 { background: linear-gradient(135deg,#bfeafc,#c9cbff); }
.intro-full .kid-icons .icon-3 { background: linear-gradient(135deg,#ffdfa6,#ffd1d1); }

/* Responsive: reduce paddings on small screens to avoid overflow */
@media (max-width: 575.98px) {
    .intro-full { padding: 12px 14px; border-radius: 10px; }
    .intro-full h3 { font-size: 1.25rem; }
    .intro-full p { font-size: 0.95rem; }
}

@media (prefers-color-scheme: dark) {
    /* still ensure shapes are not visible */
    .intro-full::before, .intro-full::after { display: none !important; }
    .intro-full .intro-box { background: rgba(255,255,255,0.96); border: 1px solid rgba(0,0,0,0.06); color: #000; }
}

@media (prefers-reduced-motion: reduce) {
    .intro-full::before, .intro-full::after { animation: none; transform: none; }
}

/* Accent confetti dots sprinkled near the footer for extra playfulness */
.footer::before {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    top: -18px;
    height: 12px;
    background-image: radial-gradient(circle at 2% 50%, #ffd66b 6px, transparent 7px),
                      radial-gradient(circle at 20% 40%, #ff9ab0 5px, transparent 6px),
                      radial-gradient(circle at 40% 70%, #bfeafc 6px, transparent 7px),
                      radial-gradient(circle at 60% 30%, #ffd66b 5px, transparent 6px),
                      radial-gradient(circle at 80% 60%, #ff9ab0 6px, transparent 7px);
    background-repeat: no-repeat;
    opacity: 0.9;
    pointer-events: none;
}

/* Slightly increase contrast for links/buttons on top of the playful background */
a, .btn, .nav-link { text-shadow: 0 0 0 rgba(255,255,255,0); }

/* Outer-space themed background (nebula + starfield) */
:root {
    --space-deep-1: #040617; /* near-black navy */
    --space-deep-2: #0b1a3a; /* deep space blue */
    --nebula-1: rgba(83, 60, 153, 0.12); /* soft purple nebula */
    --nebula-2: rgba(35, 160, 210, 0.08); /* soft teal nebula */
    --star-color: rgba(255,255,255,0.95);
}

/* Main page background: layered nebula gradients over a dark sky */
body {
    background-color: var(--space-deep-1);
    background-image: radial-gradient(800px 320px at 15% 22%, var(--nebula-1), transparent 30%),
                      radial-gradient(700px 280px at 82% 72%, var(--nebula-2), transparent 28%),
                      linear-gradient(180deg, var(--space-deep-2) 0%, var(--space-deep-1) 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    color: #e6eef8; /* slightly brighter default text for readability on dark bg */
}

/* Moving starfield layer using a fixed pseudo-element so content remains interactive */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, var(--star-color) 1px, transparent 1px),
                      radial-gradient(circle, rgba(255,255,255,0.6) 1px, transparent 1px);
    background-size: 140px 140px, 220px 220px; /* two layers of stars */
    opacity: 0.92;
    mix-blend-mode: screen; /* makes stars pop on dark backgrounds */
    transform: translateZ(0);
    /* animate background-position to create a very slow parallax effect */
    animation: starScroll 180s linear infinite;
}

@keyframes starScroll {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 0 -1600px, 0 -900px; }
}

/* Hide decorative header shapes and related planet-style visuals */
.header-decor .shape,
.header-decor .shape.circle,
.header-decor .shape.star,
.header-decor .shape.blob {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: none !important;
    box-shadow: none !important;
}

/* Also remove header-decor container to avoid occupying space */
.header-decor { display: none !important; height: 0 !important; }

/* If any shapes were positioned absolutely, ensure they don't interfere */
.header-decor .shape { position: static !important; }


/* Slight adjustments for modal and interactive elements to keep them readable */
.intro-box, .card { background-color: rgba(10,12,25,0.92); color: #f3f7ff; }
/* Note: `.card-body-bottom` intentionally styled earlier to be colorful. Removed the
   late override that forced a white background so the colorful variant applies. */

/* Force intro text to black */
.intro-full, .intro-full .intro-box, .intro-full h3, .intro-full p, .intro-full .intro-box * {
    color: #000 !important;
}

/* High-contrast accent for call-to-action buttons on dark background */
.btn-salmon {
    background: #ffb86b; /* warm contrast */
    color: #111;
}

/* Reduced motion preference: stop star animation and lower opacity */
@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; opacity: 0.8; }
}

/* Ensure the star layer does not affect printing or assistive technologies */
@media print {
    body::before { display: none; }
}

/* End of outer-space theme */

/* High-specificity fallback to ensure Edge applies the colorful card styles */
html body .flip-card-front .card { background: transparent !important; }
html body .flip-card-back .card { background: linear-gradient(135deg, #ffd66b 0%, #ff9ab0 45%, #bfeafc 85%) !important; color: #071028 !important; }
html body .card-body-bottom { background: linear-gradient(135deg, rgba(255,197,197,0.96) 0%, rgba(255,238,180,0.94) 30%, rgba(191,234,252,0.92) 65%, rgba(203,217,255,0.94) 100%) !important; border-radius: 12px !important; }
