/* =============================================================================
   CATÁLOGO PÚBLICO — Imagic Films
   Valores hardcoded para evitar dependencias de variables de otros archivos
============================================================================= */

/* ── RESET BUDDYX: full-width para page-catalogo ── */
.page-template-page-catalogo-php #page,
.page-template-page-catalogo-php .site {
    display: block !important;
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}

.page-template-page-catalogo-php #page > .container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    margin: 0 !important;
}

.page-template-page-catalogo-php #primary,
.page-template-page-catalogo-php .site-main,
.page-template-page-catalogo-php main,
.page-template-page-catalogo-php .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.page-template-page-catalogo-php #secondary { display: none !important; }

/* ── PADDING TOP: compensar header fijo ── */
main#catalogo-main.imagic-catalogo {
    padding-top: 112px !important;
}
body.admin-bar main#catalogo-main.imagic-catalogo {
    padding-top: 128px !important;
}
@media screen and (max-width: 782px) {
    body.admin-bar main#catalogo-main.imagic-catalogo {
        padding-top: 142px !important;
    }
}

/* ── CONTENEDOR BASE ── */
.imagic-catalogo .ih-container {
    width: 90% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

/* =============================================================================
   S1 — BLANCO: Tagline
============================================================================= */

.cat-s1 {
    background: #fff;
    padding: 80px 0 0;
}

.cat-s1__tagline {
    font-family: 'Poppins', -apple-system, sans-serif !important;
    font-size: clamp(1.8rem, 4vw, 3rem) !important;
    font-weight: 700 !important;
    color: #1d1d1f !important;
    margin: 0 0 40px !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em !important;
    text-align: center !important;
}

/* =============================================================================
   S1b — FILTROS STICKY
============================================================================= */

.cat-filters {
    background: #fff;
    padding: 20px 0;
    position: sticky;
    top: 112px;
    z-index: 10;
    border-bottom: 1px solid #e5e7eb;
}

body.admin-bar .cat-filters {
    top: 144px;
}

.cat-filters__wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Buscador texto */
.cat-search-wrap {
    flex: 0 0 240px;
}

.cat-search {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.9rem;
    font-family: 'Inter', -apple-system, sans-serif;
    color: #1d1d1f;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}
.cat-search:focus { border-color: #CC8E03; }
.cat-search::placeholder { color: #aaa; }

/* Select año — oculto por defecto.
   Para activarlo: elimina la regla display:none de .cat-filter-year--hidden */
.cat-filter-year--hidden {
    display: none;
}

/* El input de año reutiliza .cat-search — solo ajustamos el ancho */
.cat-filter-year .cat-search {
    min-width: 110px;
    max-width: 110px;
}

/* =============================================================================
   S2 — NEGRO: Grid
============================================================================= */

.cat-s2 {
    background: #000;
    padding: 64px 0 80px;
}

.catalogo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
@media (max-width: 1024px) {
    .catalogo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .catalogo-grid { grid-template-columns: 1fr; }
}

/* Card */
.cat-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    cursor: pointer;
}
.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.35);
}

/* Thumbnail 16:9 */
.cat-card__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    overflow: hidden;
}

.cat-card__poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cat-card__player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.cat-card__player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.cat-card__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    border: none;
    cursor: pointer;
    color: #fff;
    transition: background 0.18s ease;
}
.cat-card__play:hover { background: rgba(0,0,0,0.55); }
.cat-card__play svg {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
    width: 48px;
    height: 48px;
}

/* Cuerpo */
.cat-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    gap: 8px;
}

.cat-card__title {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
    line-height: 1.25;
}

.cat-card__director {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}
.cat-card__director a {
    color: #CC8E03;
    text-decoration: none;
    font-weight: 500;
}
.cat-card__director a:hover { text-decoration: underline; }

.cat-card__synopsis {
    font-family: 'Inter', -apple-system, sans-serif !important;
    font-size: 12px !important;
    color: #4b5563 !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    max-height: calc(12px * 1.5 * 3);
}

/* Meta: año · duración (izq) / géneros (der) */
.cat-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.cat-card__duration {
    font-family: 'Inter', -apple-system, sans-serif !important;
    font-size: 12px !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
}

/* Géneros */
.cat-card__genres {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    align-items: center !important;
    justify-content: flex-end !important;
    max-width: 65% !important;
}

.cat-card__genre {
    font-family: 'Inter', -apple-system, sans-serif !important;
    font-size: 11px !important;
    color: #CC8E03 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    transition: color 0.18s ease !important;
    display: inline !important;
}
.cat-card__genre:hover {
    color: #D9A41A !important;
    text-decoration: underline !important;
}
.cat-card__genre + .cat-card__genre::before {
    content: ' · ';
    color: #d1d5db !important;
    font-weight: 400 !important;
}

/* Botones */
.cat-card__actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.cat-card__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 9px 12px;
    border-radius: 100px;
    text-decoration: none;
    text-align: center;
    transition: all 0.18s ease;
    line-height: 1;
}

.cat-card__btn--outline {
    background: transparent;
    color: #1d1d1f;
    border: 1.5px solid #d1d5db;
}
.cat-card__btn--outline:hover {
    border-color: #1d1d1f;
    background: #f9fafb;
}

.cat-card__btn--solid {
    background: #CC8E03;
    color: #fff;
    border: 1.5px solid #CC8E03;
}
.cat-card__btn--solid:hover {
    background: #D9A41A;
    border-color: #D9A41A;
}

/* Sin resultados */
.catalogo-empty,
.catalogo-no-results {
    text-align: center !important;
    padding: 80px 20px;
    color: #fff !important;
    font-family: 'Inter', -apple-system, sans-serif;
}

/* fuerza el <p> interior */
.catalogo-no-results p,
.catalogo-empty p {
    color: #fff !important;
    text-align: center !important;
    margin: 0;
}

/* =============================================================================
   S3 — BLANCO: CTA videollamada
============================================================================= */

.cat-s3 {
     background: #fff;
    padding: clamp(48px, 6vw, 72px) 0;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.cat-s3__eyebrow {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #CC8E03;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 16px;
}

.cat-s3__titulo {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 15px !important;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-align: center;
}

.cat-s3__texto {
      font-family: 'Inter', -apple-system, sans-serif;
    font-size: 16px;
    color: #6b7280;
    line-height: 1.8;
    margin: 0 auto 44px;
    text-align: center !important;
    max-width: 780px;
}

.cat-s3__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #CC8E03;
    color: #fff;
    padding: 14px 32px;
    border-radius: 100px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid #CC8E03;
    line-height: 1;
}
.cat-s3__btn:hover {
    background: #D9A41A;
    border-color: #D9A41A;
    transform: translateY(-1px);
    color: #fff;
}

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

@media (max-width: 768px) {
    .cat-filters__wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .cat-search-wrap {
        flex: 1 1 auto;
    }
    .cat-filter-year .cat-search {
        max-width: 100%;
    }
    .cat-card__actions {
        flex-direction: column;
    }
}