/* Bright Future Kids – Rwanda Sunshine Theme
   Rwanda blue:   #00A1DE
   Sunshine:      #FCD116
   Rwanda green:  #1C8D3C
   Heart pink:    #FF4B8A
*/

/* Base wrapper */
.bf-showcase-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Simple headings */
.bf-showcase-wrap h2,
.bf-showcase-wrap h3,
.bf-showcase-wrap h4 {
    margin: 0 0 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

/* Top bar with filters */
.bf-top-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0 1.5rem;
}

.bf-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bf-filter-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 2px solid #00A1DE;
    background: #ffffff;
    color: #005a7f;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.1s;
}

.bf-filter-btn.bf-filter-active {
    background: #00A1DE;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 161, 222, 0.35);
}

.bf-filter-btn:hover {
    transform: translateY(-1px);
}

.bf-top-note {
    font-size: 0.85rem;
    color: #374151;
}

/* Slider wrapper (now banner for Star of the Month) */
.bf-slider {
    position: relative;
    overflow: hidden;
    border-radius: 1.1rem;
    margin-bottom: 1.5rem;
    background: radial-gradient(circle at top left, #FCD116 0, #00A1DE 45%, #1C8D3C 100%);
}

/* Triple-frame wrapper for images (slider, cards, KOTM, profile) */
.bf-card-header,
.bf-kotm-image,
.bf-profile-image,
.bf-slide {
    padding: 0.4rem;
    background: #ffffff;
    border-radius: 1rem;
}

/* Slider slide */
.bf-slide {
    position: relative;
}

.bf-slide img,
.bf-slide iframe {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.9rem;
}

/* Triple Rwanda-flag frame on all main images */
.bf-card-header img,
.bf-kotm-image img,
.bf-profile-image img,
.bf-slide img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.9rem;
    box-shadow:
        0 0 0 3px #00A1DE,   /* Rwanda blue */
        0 0 0 7px #1C8D3C,   /* Rwanda green */
        0 0 0 11px #FCD116;  /* Sunshine yellow */
}

/* Star of the Month block */
.bf-kotm {
    display: grid;
    grid-template-columns: 1.2fr 1.3fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 1.1rem;
    border-radius: 1.1rem;
    background: linear-gradient(135deg, #ffffff, #f0fbff);
    border: 2px solid #00A1DE;
    box-shadow: 0 10px 22px rgba(0,0,0,0.06);
}

.bf-kotm-placeholder {
    width: 100%;
    min-height: 160px;
    border-radius: 1rem;
    background: #e0e0e0;
}

/* Star of the Month badge */
.bf-kotm-badge {
    display: inline-block;
    padding: 0.2rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(90deg, #FF9800, #FFB74D);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow:
        0 0 0 2px #ffffff,
        0 4px 10px rgba(0, 0, 0, 0.25);
    margin-bottom: 0.5rem;
}

/* Name: Talent line under the badge */
.bf-kotm-title-line {
    margin: 0.1rem 0 0.4rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.bf-kotm-info h3 {
    margin-top: 0.2rem;
    margin-bottom: 0.4rem;
}

.bf-kotm-likes a {
    font-size: 0.85rem;
    color: #374151;
    text-decoration: none;
}

.bf-kotm-actions {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Generic card */
.bf-card {
    border-radius: 1.1rem;
    background: linear-gradient(135deg, #ffffff, #fff7ff);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
}

.bf-card-placeholder {
    width: 100%;
    min-height: 160px;
    background: #e0e0e0;
}

/* Name + talent pill */
.bf-kid-name {
    margin: 0;
    font-size: 1.02rem;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.bf-kid-name-text {
    font-weight: 800;
    letter-spacing: 0.02em;
    vertical-align: middle;
}

/* Talent pill to the right of the name */
.bf-card-talent-pill {
    display: inline-block;
    margin-left: 0.3rem;
    padding: 0.18rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(90deg, #FF9800, #FFB74D);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: middle;
    box-shadow:
        0 0 0 1px #ffffff,
        0 3px 8px rgba(0, 0, 0, 0.25);
}

/* Short bio under name */
.bf-card-bio {
    margin: 0.15rem 0 0.3rem;
    font-size: 0.86rem;
    color: #4b5563;
}

/* Card content */
.bf-card-body {
    padding: 0.8rem 0.95rem 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Card actions */
.bf-card-actions {
    margin-top: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Buttons */
.bf-btn {
    border-radius: 999px;
    border: 2px solid transparent;
    padding: 0.45rem 1rem;
    font-size: 0.86rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    white-space: nowrap;
    font-weight: 600;
    transition: transform 0.1s, box-shadow 0.1s, background 0.1s, color 0.1s, border-color 0.1s;
}

.bf-btn-primary {
    background: #00A1DE;
    border-color: #00A1DE;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 161, 222, 0.35);
}

.bf-btn-like {
    background: #FF4B8A;
    border-color: #FF4B8A;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(255, 75, 138, 0.35);
}

/* Add heart emoji automatically before like buttons */
.bf-btn-like::before,
.bf-profile-vote-button::before {
    content: "❤️ ";
}

.bf-btn-outline {
    background: #ffffff;
    color: #005a7f;
    border-color: #00A1DE;
}

.bf-btn:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

/* Back to all stars */
.bf-back-bar {
    margin-bottom: 0.75rem;
}

.bf-back-link {
    font-size: 0.85rem;
}

/* NEW: 4×4 grid of kids */
.bf-grid-16 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.bf-grid-card .bf-card-body {
    align-items: center;
    text-align: center;
}

.bf-grid-name {
    margin: 0.2rem 0 0.4rem;
    font-size: 0.95rem;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
}

.bf-grid-actions {
    justify-content: center;
}

/* Pagination for grid */
.bf-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin: 0.75rem 0 1.5rem;
}

.bf-page-link {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 0.85rem;
    text-decoration: none;
    color: #111827;
    background: #ffffff;
}

.bf-page-link-current {
    background: #00A1DE;
    color: #ffffff;
    border-color: #00A1DE;
}

/* Ticker */
.bf-talent-ticker {
    margin: 1.5rem 0;
    padding: 0.4rem 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #00A1DE, #FCD116, #1C8D3C);
    overflow: hidden;
}

.bf-ticker-track {
    display: inline-flex;
    gap: 1.5rem;
    white-space: nowrap;
    animation: bfTickerScroll 35s linear infinite;
}

.bf-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    padding: 0 0.4rem;
    color: #111827;
}

.bf-ticker-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #ffffff;
}

.bf-ticker-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #e5e7eb;
    display: inline-block;
}

@keyframes bfTickerScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Application form block */
.bf-application-form {
    margin-top: 2rem;
    padding: 1.25rem 1.05rem 1.5rem;
    border-radius: 1.1rem;
    background: linear-gradient(135deg, #ffffff, #f0fff6);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    border: 1px solid #d1fae5;
}

.bf-application-form h3 {
    color: #1C8D3C;
}

.bf-application-form .description {
    font-size: 0.9rem;
    color: #4b5563;
}

.bf-form-row {
    margin-bottom: 0.8rem;
}

.bf-form-row label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.bf-form-row input[type="text"],
.bf-form-row input[type="email"],
.bf-form-row input[type="url"],
.bf-form-row textarea {
    width: 100%;
    padding: 0.45rem 0.55rem;
    font-size: 0.9rem;
    border-radius: 0.55rem;
    border: 1px solid #d1d5db;
    box-sizing: border-box;
}

.bf-form-row textarea {
    resize: vertical;
    min-height: 90px;
}

/* Profile hero block */
.bf-profile-block {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.1rem;
    border-radius: 1.1rem;
    background: linear-gradient(135deg, #ffffff, #f0f7ff);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

/* Profile layout: image + CTA on left, description on right */
.bf-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); /* smaller left, larger right for bio/videos */
    gap: 1.5rem;
    align-items: stretch;
}

.bf-profile-left {
    display: flex;
    flex-direction: column;
}

/* Center and constrain profile image */
.bf-profile-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.bf-profile-image img {
    max-width: 100%;
    height: auto;
}

/* Vote bar under the image – slightly lighter */
.bf-profile-cta {
    margin-top: 0.5rem;
    border: 1px solid #111827;
    border-radius: 0 0 0.9rem 0.9rem;
    overflow: hidden;
    background: #ffffff;
}

.bf-profile-vote-button {
    width: 100%;
    border-radius: 0;
    border: none;
    background: #ffffff;
    color: #111827;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
}

.bf-profile-votes {
    padding: 0.35rem 0.8rem 0.45rem;
    font-size: 0.8rem;
    border-top: 1px solid #111827;
    background: #f9fafb;
}

.bf-profile-votes .bf-like-count {
    font-weight: 500;
}

/* Right side: heading + full description */
.bf-profile-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.bf-profile-heading {
    margin: 0 0 0.75rem;
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bf-profile-text {
    font-size: 0.96rem;
    line-height: 1.65;
    color: #111827;
}

/* Section title (e.g. "Appearances") */
.bf-section-title {
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Horizontal scrollable video gallery */
.bf-video-gallery {
    margin-top: 0.4rem;
}

.bf-video-gallery-inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    -webkit-overflow-scrolling: touch;
}

/* Show about 2 cards at a time on desktop/tablet */
.bf-video-card {
    flex: 0 0 48%;
    max-width: 48%;
    border-radius: 0.8rem;
    background: #000;
    overflow: hidden;
}

/* Video thumbnail */
.bf-video-thumb {
    border-radius: 0.8rem;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    position: relative;
}

.bf-video-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.bf-video-fallback {
    padding: 1rem;
    color: #fff;
    font-size: 0.85rem;
}

/* Encouragement block */
.bf-encouragement-block {
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.bf-encouragement-intro {
    font-size: 0.9rem;
    color: #4b5563;
}

.bf-encouragement-form {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

.bf-encouragement-notice {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.4rem;
}

/* Success/error messages */
.bf-app-success,
.bf-app-error {
    margin: 0.75rem 0;
    padding: 0.6rem 0.8rem;
    border-radius: 0.7rem;
    font-size: 0.85rem;
}

.bf-app-success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.bf-app-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Encouragement list (latest one) */
.bf-encouragement-subtitle {
    font-size: 0.9rem;
    margin-top: 0.3rem;
    margin-bottom: 0.35rem;
    color: #4b5563;
}

.bf-encouragement-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.bf-encouragement-item {
    padding: 0.6rem 0.7rem;
    border-radius: 0.7rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.bf-encouragement-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.bf-encouragement-date {
    color: #6b7280;
    font-size: 0.75rem;
}

.bf-encouragement-content {
    font-size: 0.9rem;
    color: #374151;
}

.bf-encouragement-empty {
    font-size: 0.85rem;
    color: #6b7280;
}

/* --- RESPONSIVE --- */

@media (max-width: 1024px) {
    .bf-grid-16 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {

    .bf-showcase-wrap {
        padding: 0.75rem;
    }

    .bf-kotm {
        grid-template-columns: 1fr;
    }

    .bf-profile-layout {
        grid-template-columns: 1fr;
    }

    .bf-application-form {
        padding: 1rem 0.75rem 1.25rem;
    }

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

    .bf-profile-image img {
        max-width: 260px;
    }

    /* On smaller screens, show one video card at a time */
    .bf-video-card {
        flex: 0 0 75%;
        max-width: 75%;
    }
}

@media (max-width: 480px) {

    .bf-btn {
        width: 100%;
    }

    .bf-card-actions,
    .bf-kotm-actions {
        flex-direction: column;
        gap: 0.35rem;
    }

    .bf-grid-16 {
        grid-template-columns: 1fr;
    }

    .bf-profile-image img {
        max-width: 220px;
    }

    .bf-video-card {
        flex: 0 0 85%;
        max-width: 85%;
    }
}
