/* Home page (Components/Pages/Home.razor).
   Global file: everything is scoped under .home-page so it only affects the home page.
   (Shared group-photo / social-link styles live in PageLayout.css.)

   Below the banner + tagline the page is stacked full-width sections:
   1. Team.
      Mobile: logo, photo, follow-us (intro text hidden).
      768px+: left 40% = photo; right 60% = "Dreams -Team" logo, intro text and follow-us, centred
      horizontally and vertically centred to the photo. The logo is rendered twice (mobile copy
      in its own grid item above the photo, tablet/desktop copy in the text column).
   2. Latest news: the three newest items as cards. Mobile: stacked. 768px+: three in a row. */

/* ── Follow-us (heading + Instagram/Facebook in one translucent white pill, links side by side) ──
   Rendered twice: .home-social--mobile below the group photo (<768px),
   .home-social--desktop under the team text next to the photo (768px+). */
.home-page .home-social { width: auto; gap: 0.5rem; }
.home-page .home-social .group-photo-social-heading { color: var(--color-secondary-dark); }
.home-page .home-social .group-photo-social-links {
    flex-direction: row;
    width: auto;
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0px 4px 15px 2px rgba(0,0,0,0.12);
    backdrop-filter: blur(3px);
}
.home-page .home-social .group-photo-social-link { padding: 0.5rem 1.1rem; font-size: 1rem; gap: 0.5rem; }
.home-page .home-social .group-photo-social-link svg { width: 1.35rem; height: 1.35rem; }
.home-page .home-social .group-photo-social-link + .group-photo-social-link {
    border-left: 1px solid var(--color-secondary);
}
.home-page .home-social--mobile { margin-top: 2rem; }
.home-page .home-social--desktop { display: none; margin-top: 0.5rem; }
@media (min-width: 768px) {
    .home-page .home-social--mobile { display: none; }
    .home-page .home-social--desktop { display: flex; }
}

/* ── Campaigns (between the hero tagline and the team section) ──
   Several campaigns rotate in a fixed-height carousel (banners use Clamp so the text fits). */
.home-page .home-campaign-section { padding: 2.5rem 1.25rem 0; max-width: 68rem; margin: 0 auto; }
.home-page .home-campaign-link { display: block; height: 100%; color: inherit; text-decoration: none; }
.home-page .home-campaign-link:hover .campaign-banner { filter: brightness(1.03); }
.home-page .home-campaign-carousel { height: 25rem; overflow: visible; }
.home-page .home-campaign-carousel .mud-carousel-item { padding-bottom: 2.25rem; }   /* room for the bullets */
.home-page .home-campaign-carousel .mud-carousel-bullets { bottom: 0; }
.home-page .home-campaign-carousel .mud-carousel-bullets .mud-icon-button { color: var(--color-secondary-dark); }
@media (min-width: 768px) {
    .home-page .home-campaign-section { padding: 3.5rem 2.5rem 0; }
    .home-page .home-campaign-carousel { height: 21rem; }
}

.home-page .home-team-section,
.home-page .home-news-section { padding: 3rem 1.25rem; }
.home-page .home-news-section { background-color: var(--color-background); }

/* ── Team section ── */
.home-page .home-team-grid { max-width: 68rem; margin: 0 auto; }

.home-page .home-team-logo-col { display: flex; justify-content: center; }
/* The logo wrap shrink-wraps its content, so give it a real width for the masked logo to fill */
.home-page .home-team-logo { width: min(100%, 15rem); margin-bottom: 1.25rem; }
.home-page .home-team-logo .group-photo-logo-tinted { width: 100%; }

.home-page .home-team-photo-col { display: flex; flex-direction: column; align-items: center; }
.home-page .home-team-photo-col .group-photo-oval-wrapper { width: 80%; max-width: 26rem; margin: 0; }
.home-page .group-photo-frame { border-radius: 3.5rem; }

/* Text column (logo + intro + follow-us) is tablet/desktop only: on mobile the intro is too much
   text and the logo / follow-us are shown above / below the photo, so the whole column is hidden. */
.home-page .home-team-text-col {
    display: none;
    flex-direction: column;
    align-items: center;       /* logo and follow-us centred over / under the text */
}
.home-page .home-team-intro {
    color: var(--color-secondary-dark);
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .home-page .home-team-section,
    .home-page .home-news-section { padding: 4.5rem 2.5rem; }

    .home-page .home-team-grid { align-items: center; }
    /* MudItem xs="12" sets width with 2-class selectors; these 3-class rules win */
    /* Logo moves from above the photo to the top of the text column (desktop copy there) */
    .home-page .mud-grid.home-team-grid > .mud-grid-item.home-team-logo-col { display: none; }
    .home-page .mud-grid.home-team-grid > .mud-grid-item.home-team-photo-col {
        flex: 0 0 40%;
        max-width: 40%;
        padding-right: 1.5rem;
    }
    .home-page .home-team-photo-col .group-photo-oval-wrapper { width: 100%; }
    .home-page .mud-grid.home-team-grid > .mud-grid-item.home-team-text-col {
        flex: 0 0 60%;
        max-width: 60%;
        display: flex;
        padding: 0 0 0 2.5rem;
    }
    .home-page .home-team-intro { max-width: 36rem; }
}

/* ── Latest news ── */
.home-page .home-news-divider { margin: 0.75rem auto 2rem; width: 6rem; }
.home-page .home-news-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 64rem;
    margin: 0 auto;
}
.home-page .home-news-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0px 4px 15px 2px rgba(0,0,0,0.08);
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.15s;
}
.home-page .home-news-card:hover { box-shadow: 0px 6px 20px 4px rgba(0,0,0,0.13); transform: translateY(-2px); }
.home-page .home-news-card-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;   /* full title in the tooltip */
}
.home-page .home-news-card-date { display: block; margin: 0.25rem 0 0.75rem; opacity: 0.8; }
.home-page .home-news-card-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    flex-grow: 1;              /* pushes "read more" to the bottom so cards line up */
}
.home-page .home-news-card-more { margin-top: 1rem; color: var(--color-main); }
.home-page .home-news-all { text-align: center; margin-top: 2rem; }
.home-page .home-news-all-link { color: var(--color-main); text-decoration: none; font-size: 1.05rem; }
.home-page .home-news-all-link:hover { text-decoration: underline; }

@media (min-width: 768px) {
    .home-page .home-news-cards { flex-direction: row; align-items: stretch; justify-content: center; }
    /* Always a third of the row, so one or two items stay card-sized and centred */
    .home-page .home-news-card { flex: 0 1 calc((100% - 2.5rem) / 3); }
}
