/**
 * Layout Variant: Mosaic
 *
 * Flat, flush, block-built layout after the AFM 2026 KV composition:
 * a full-width masthead band, a tall hero, the event information set in
 * a wide two-column band, company and film grids as flush tiles with
 * hairline gaps of the page colour, square corners throughout and no
 * shadows.
 *
 * Changes shapes and positions only. Load AFTER common.css and the colour
 * theme CSS. Never overrides colours, fonts, or functionality.
 * Designed alongside projector.css; works with any theme.
 *
 * @version 1.1.0 - Home, lower half taken from the Busan (Collage) home page at the
 *                  client's request: spaced posters as rounded plates, the caption
 *                  as a pill beneath them (placed from the top, so it cannot ride
 *                  up over the posters), company logos on discs. The rest of the
 *                  layout stays flush and square.
 * @version 1.0.1 - Home logo tiles: logos fill more of the tile (84% x 78%)
 * @version 1.0.0
 * @created 2026-10-12
 */

/* ============================================================
   MASTHEAD
   ============================================================ */

body.layout-mosaic .nav-wrapper {
    max-width: none;
    padding: 0.9rem 2.5rem;
    gap: 2rem;
}

body.layout-mosaic .main-nav ul { gap: 0; }

body.layout-mosaic .main-nav a {
    display: inline-block;
    padding: 0.7rem 0.9rem;
}

body.layout-mosaic .btn-book-meeting {
    margin-left: 1rem;
    padding: 0.75rem 1.4rem;
    border-radius: 0;
}

/* ============================================================
   HOME
   ============================================================ */

/* Tall hero: the composition needs room; no image frame */
body.layout-mosaic .hero-banner {
    min-height: clamp(360px, 40vw, 600px);
    padding: 0;
}

body.layout-mosaic .banner-image {
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
}

/* Event information as a wide band: title left, details right */
body.layout-mosaic .event-info-section {
    max-width: none;
    padding: 3rem 2.5rem;
    text-align: left;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 4rem;
    align-items: center;
}

body.layout-mosaic .event-info-section h1 {
    grid-row: 1 / span 2;
    font-size: clamp(2.4rem, 4.4vw, 4.2rem);
    margin: 0;
}

body.layout-mosaic .event-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem 1.75rem;
    align-items: baseline;
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

body.layout-mosaic .event-description {
    max-width: 56ch;
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.65;
}

/* Home, lower half: taken from the Busan (Collage) home page at the client's
   request (2026-10-13). Spaced posters as rounded plates, the caption as a
   pill beneath them, company logos on discs. The caption is placed from the
   TOP (just below the enlarged centre poster), so it can never ride up over
   the posters whatever its own height. */
body.layout-mosaic {
    --mosaic-poster-h: 280px;
    --mosaic-caption-room: 170px;
}

/* top padding gives the enlarged centre poster room: the section clips */
body.layout-mosaic .carousel-section { padding: 4rem 0 1.5rem; }

body.layout-mosaic .carousel-container {
    height: calc(var(--mosaic-poster-h) * 1.1 + 1.75rem + var(--mosaic-caption-room));
}

body.layout-mosaic .carousel-track { gap: 2rem; top: 0; left: 0; }

body.layout-mosaic .carousel-poster {
    height: var(--mosaic-poster-h);
    max-width: 300px;
    border-radius: 28px;
}

body.layout-mosaic .center-info {
    top: calc(var(--mosaic-poster-h) * 1.1 + 1.75rem);
    bottom: auto;
    border-radius: 100px;
    padding: 1.1rem 2.5rem;
    max-width: min(92vw, 560px);
}

/* Company logos on discs */
body.layout-mosaic .company-logos-section { padding: 2rem 0 4rem; }
body.layout-mosaic .company-logos-container { padding: 0 2rem; }

body.layout-mosaic .company-logos-grid,
body.layout-mosaic .company-logos-row,
body.layout-mosaic .company-logos-grid.two-rows {
    gap: 1.25rem;
    flex-wrap: wrap;
}

body.layout-mosaic .company-logo-item,
body.layout-mosaic .company-logos-grid[data-logo-count] .company-logo-item {
    width: 108px;
    height: 108px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.layout-mosaic .company-logos-grid[data-logo-count="small"] .company-logo-item  { width: 96px; height: 96px; }
body.layout-mosaic .company-logos-grid[data-logo-count="medium"] .company-logo-item { width: 86px; height: 86px; }
body.layout-mosaic .company-logos-grid[data-logo-count="large"] .company-logo-item  { width: 76px; height: 76px; }
body.layout-mosaic .company-logos-grid[data-logo-count="xlarge"] .company-logo-item { width: 66px; height: 66px; }

body.layout-mosaic .company-logo-item:hover { transform: translateY(-4px) scale(1.04); }

body.layout-mosaic .company-logo-img,
body.layout-mosaic .company-logos-grid[data-logo-count] .company-logo-img {
    width: 68%;
    max-width: 68%;
    height: auto;
    max-height: 62%;
    object-fit: contain;
}

/* ============================================================
   GRIDS — flush tiles
   ============================================================ */

body.layout-mosaic .companies-page-container,
body.layout-mosaic .films-page-container {
    max-width: 1440px;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

body.layout-mosaic .page-header { margin: 1.5rem 0 2.25rem; }

body.layout-mosaic .content-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 3px;
}

body.layout-mosaic .controls-bar { margin-bottom: 3px; }

body.layout-mosaic .companies-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    margin: 0;
    align-items: stretch;
}

body.layout-mosaic .films-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    margin: 0;
    align-items: stretch;
}

@media (max-width: 1200px) {
    body.layout-mosaic .companies-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body.layout-mosaic .films-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

body.layout-mosaic .companies-grid .company-card,
body.layout-mosaic .films-grid .film-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

body.layout-mosaic .company-card-link,
body.layout-mosaic .film-card-link {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

body.layout-mosaic .company-card-info,
body.layout-mosaic .film-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1rem 1.1rem 1.1rem;
}

body.layout-mosaic .company-card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.7rem;
}

body.layout-mosaic .company-content-counts { margin-top: auto; padding-top: 0.8rem; }

/* Films: every poster tile the same shape, poster fills it */
body.layout-mosaic .film-poster {
    aspect-ratio: 2 / 3;
    align-items: stretch;
    overflow: hidden;
}

body.layout-mosaic .film-poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.layout-mosaic .film-card:hover { transform: none; }

/* ============================================================
   SHAPES — square, flat
   ============================================================ */

.company-card,
.content-card,
.company-result-card,
.rep-result-card,
.representative-card,
.film-card,
.film-result-card,
.series-result-card,
.quick-link-card,
.filter-sidebar-container,
.filter-bar,
.controls-bar,
.search-summary,
.search-tips,
.booking-container,
.booking-form,
.form-section,
.modal-content {
    border-radius: 0;
}

.company-card:hover { transform: none; }

.company-card-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    aspect-ratio: 4 / 3;
    padding: 1.5rem;
}

.company-card-logo img,
.company-logo-image {
    width: 64%;
    height: 72%;
    object-fit: contain;
    border-radius: 0;
}

.company-logo-placeholder,
.company-initial { width: 100%; height: 100%; border-radius: 0; }

.film-poster,
.film-result-poster,
.series-result-poster,
.film-poster-image,
.film-poster-placeholder,
.film-detail-poster img { border-radius: 0; }

.activity-badge,
.genre-badge,
.film-status-badge,
.status-badge,
.popular-search-tag,
.filter-checkbox + label { border-radius: 0; }

.btn-primary,
.btn-secondary,
.btn-submit,
.btn-cancel,
.btn-clear-search,
.filter-apply,
.filter-clear-all,
.filter-reset-button,
.search-submit,
.search-button,
.book-meeting-button { border-radius: 0 !important; }

.search-input,
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
select,
.search-type-select,
textarea { border-radius: 0; }

.pagination-link {
    border-radius: 0;
    min-width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tab-button { border-radius: 0; }
.social-icon, .back-to-top { border-radius: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    body.layout-mosaic .event-info-section {
        grid-template-columns: 1fr;
        row-gap: 1.25rem;
        padding: 2.25rem 1.25rem;
    }
    body.layout-mosaic .event-info-section h1 { grid-row: auto; }
}

@media (max-width: 768px) {
    body.layout-mosaic .nav-wrapper { padding: 0.8rem 1rem; }
    body.layout-mosaic.page-index .page-wrapper { padding-top: 82px; }
    /* header.php drops the phone menu at 60px; the lockup makes the bar taller */
    body.layout-mosaic .main-nav,
    body.layout-mosaic .main-nav.mobile-active { top: 82px !important; max-height: calc(100vh - 82px) !important; }
    body.layout-mosaic .main-nav .btn-book-meeting { border-radius: 0 !important; }
    body.layout-mosaic .hero-banner { min-height: 136vw; }
    body.layout-mosaic .content-layout { grid-template-columns: 1fr; gap: 3px; }
    body.layout-mosaic .companies-page-container,
    body.layout-mosaic .films-page-container { padding-left: 1rem; padding-right: 1rem; }
    body.layout-mosaic .companies-grid,
    body.layout-mosaic .films-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.layout-mosaic { --mosaic-poster-h: 210px; --mosaic-caption-room: 175px; }
    body.layout-mosaic .carousel-section { padding: 3rem 0 1rem; }
    body.layout-mosaic .carousel-poster { border-radius: 18px; }
    body.layout-mosaic .center-info { border-radius: 24px; padding: 0.9rem 1.5rem; }
    body.layout-mosaic .company-logos-container { padding: 0 1rem; }
    body.layout-mosaic .company-logo-item,
    body.layout-mosaic .company-logos-grid[data-logo-count] .company-logo-item { width: 64px; height: 64px; }
}

/* ============================================================
   COMPANY PAGE (company.php styles these inline: body class needed)
   ============================================================ */

body.layout-mosaic .company-info-column,
body.layout-mosaic .content-item,
body.layout-mosaic .event-banner-section,
body.layout-mosaic .company-selector-section,
body.layout-mosaic .representatives-section,
body.layout-mosaic .company-activities,
body.layout-mosaic .company-info-column .activity-badge,
body.layout-mosaic .book-meeting-button,
body.layout-mosaic .representative-card,
body.layout-mosaic .content-item-poster img,
body.layout-mosaic .event-banner-section img {
    border-radius: 0;
}

body.layout-mosaic .content-item:hover { transform: none; }

/* company.php sizes its three columns in percentages that add up to 100%
   before the gaps, so the right column overflows the page by the gap width.
   Fractions of the remaining space keep the same proportions without it. */
@media (min-width: 1201px) {
    body.layout-mosaic .company-detail-container {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    }
}


/* Phones: company cards one per row (activity labels are long) */
@media (max-width: 560px) {
    body.layout-mosaic .companies-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    body.layout-mosaic .companies-grid .company-card-logo { aspect-ratio: 5 / 2; padding: 1.25rem; }
    body.layout-mosaic .companies-grid .company-card-logo img { width: 42%; height: 80%; }
}
