/*
Theme Name: Politic - Child
Template: politicem
Version: 1.0.0
*/



/*---------------------------------
      write your css from here
------------------------------------*/

/*poner como azul el color del menu steaky*/
.primary-nav-wrap nav ul li a, .hader_st_2 .primary-nav-wrap nav>ul>li>a, .hader_st_4 .default-style-one nav>ul>li>a, .mean-nav>ul>li>a, .mean-nav ul li li a, .mean-nav a.mean-expand, .mean-nav .sub-menu li:hover>a, a.meanmenu-reveal {
    color: #1E4A90;
}


/* ════════════════════════════════════════════
   style.css — Vídeos PP Catalunya
   ════════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --azul:        #015294;
  --azul-dark:   #013a6e;
  --rojo:        #e30613;
  --blanco:      #ffffff;
  --gris-claro:  #f4f7fb;
  --gris-borde:  #dde4ef;
  --texto:       #1a1a2e;
  --texto-suave: #5a6478;
}

.py-sm { padding-top: 16px; padding-bottom: 16px; }
.py-md { padding-top: 32px; padding-bottom: 32px; }
.py-lg { padding-top: 64px; padding-bottom: 64px; }

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  background: var(--gris-claro);
  color: var(--texto);
  min-height: 100vh;
}

/*-------------
 * menu movil 
 * ------------*/
.mean-nav ul li a,
.mean-nav ul li li a,
.mean-nav a.mean-expand {
  color: #7e7e7e !important;
}

/* ══════════════════════════════════════════
   BARRA DE CONTROLES
══════════════════════════════════════════ */
.controls-bar {
  background: white;
  border-bottom: 1px solid var(--gris-borde);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.controls-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buscador */
.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--texto-suave);
  stroke-width: 2;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 9px 12px 9px 38px;
  border: 1.5px solid var(--gris-borde);
  border-radius: 8px;
  font-size: .88rem;
  font-family: 'Roboto', sans-serif;
  outline: none;
  transition: border-color .2s;
}

.search-box input:focus {
  border-color: var(--azul);
}

/* Selector de orden */
.sort-select {
  padding: 9px 14px;
  border: 1.5px solid var(--gris-borde);
  border-radius: 8px;
  font-size: .88rem;
  font-family: 'Roboto', sans-serif;
  outline: none;
  cursor: pointer;
  background: white;
  color: var(--texto);
  transition: border-color .2s;
}

.sort-select:focus {
  border-color: var(--azul);
}

/* Botones de vista */
.view-toggle {
  display: flex;
  gap: 4px;
}

.view-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--gris-borde);
  border-radius: 7px;
  background: white;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all .15s;
}

.view-btn svg {
  width: 16px;
  height: 16px;
  fill: var(--texto-suave);
}

.view-btn.active {
  background: var(--azul);
  border-color: var(--azul);
}

.view-btn.active svg {
  fill: white;
}

/* Contador de vídeos */
.videos-count {
  font-size: .82rem;
  color: var(--texto-suave);
  white-space: nowrap;
  margin-left: auto;
}


/* ══════════════════════════════════════════
   CONTENIDO PRINCIPAL
══════════════════════════════════════════ */
.main-content {
  max-width: 1280px;
  margin: 32px auto;
  padding: 0 24px 60px;
}

/* ── Grid de vídeos ── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  transition: all .3s;
}

.video-grid.list-view {
  grid-template-columns: 1fr;
}


/* ══════════════════════════════════════════
   TARJETA DE VÍDEO
══════════════════════════════════════════ */
.video-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  animation: fadeUp .4s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(1, 82, 148, .15);
}

/* Thumbnail */
.card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: white;
  overflow: hidden;
}

.card-thumb img {
  width: 101%;     /* Un 1% extra para que desborde un poco el contenedor */
  height: 101%;    /* Lo mismo para el alto */
  object-fit: cover;
  display: block;
  transition: transform .4s;
  /* Centramos la imagen para que ese 1% extra se reparta */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.01); 
}

/* Y ajustamos el hover para que la animación sea suave */
.video-card:hover .card-thumb img {
  transform: translate(-50%, -50%) scale(1.05); /* Escala un poco más en el hover */
}

/* Overlay de play */
.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0);
  transition: background .2s;
}

.video-card:hover .play-overlay {
  background: rgba(0, 0, 0, .25);
}

.play-btn {
  width: 52px;
  height: 52px;
  background: rgba(227, 6, 19, .9);
  border-radius: 50%;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.8);
  transition: opacity .2s, transform .2s;
}

.play-btn svg {
  width: 22px;
  height: 22px;
  fill: white;
  margin-left: 3px;
}

.video-card:hover .play-btn {
  opacity: 1;
  transform: scale(1);
}

/* Info de la tarjeta */
.card-info {
  padding: 14px 16px 16px;
}

.card-info h3 {
  font-family: 'Noto Sans', sans-serif;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--texto);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .76rem;
  color: var(--texto-suave);
}

.card-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-date svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Vista lista */
.list-view .video-card {
  display: grid;
  grid-template-columns: 280px 1fr;
}

.list-view .card-thumb {
  aspect-ratio: unset;
  height: 100%;
  min-height: 158px;
}

.list-view .card-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.list-view .card-info h3 {
  font-size: 1rem;
  -webkit-line-clamp: 3;
}


/* ══════════════════════════════════════════
   ESTADOS (loading / error / sin resultados)
══════════════════════════════════════════ */
.state-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

.state-box .state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  opacity: .3;
}

.state-box p       { color: var(--texto-suave); font-size: .95rem; }
.state-box strong  { display: block; font-size: 1.1rem; color: var(--texto); margin-bottom: 6px; }

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gris-borde);
  border-top-color: var(--azul);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }


/* ══════════════════════════════════════════
   PAGINACIÓN
══════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

#page-info {
  font-size: .85rem;
  color: var(--texto-suave);
}

.page-btn {
  padding: 8px 14px;
  border: 1.5px solid var(--gris-borde);
  border-radius: 8px;
  background: white;
  font-size: .85rem;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  transition: all .15s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--azul);
  color: var(--azul);
}

.page-btn:disabled {
  opacity: .4;
  cursor: default;
}

.page-btn.active {
  background: var(--azul);
  border-color: var(--azul);
  color: white;
}


/* ══════════════════════════════════════════
   MODAL
══════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .85);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #0d0d1a;
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .6);
  animation: scaleIn .25s ease;
}

@keyframes scaleIn {
  from { transform: scale(.95); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.modal-video {
  aspect-ratio: 16 / 9;
}

.modal-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.modal-footer {
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-title {
  font-family: 'Noto Sans', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: white;
  line-height: 1.4;
}

.modal-close {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, .1);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s;
}

.modal-close:hover { background: var(--rojo); }

.modal-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: white;
  stroke-width: 2;
}

.video-banner-container {
  max-width: 1280px;
  margin: 40px auto;
  padding: 0 24px;
}

.banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.banner-header h2 {
  font-family: 'Noto Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--azul); /* Variable tuya */
}


}

/* Ajuste para que en el banner siempre sean 3 columnas */
@media (min-width: 901px) {
  #video-home-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 900px) {
  .video-grid                          { grid-template-columns: repeat(2, 1fr); }
  .list-view .video-card               { grid-template-columns: 200px 1fr; }
}

@media (max-width: 580px) {
  .video-grid,
  .video-grid.list-view                { grid-template-columns: 1fr; }
  .list-view .video-card               { grid-template-columns: 1fr; }
  .list-view .card-thumb               { min-height: unset; }
  .controls-inner                      { gap: 8px; }
  .videos-count                        { display: none; }
}

/* ══════════════════════════════════════════
   GALERÍA FLICKR
══════════════════════════════════════════ */
.fgal {
  display: grid!important;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

#fgal-home {
  grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 900px) {
  .fgal                { grid-template-columns: repeat(3, 1fr) !important; }
  #fgal-home           { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 580px) {
  .fgal                { grid-template-columns: repeat(2, 1fr) !important; }
  #fgal-home           { grid-template-columns: repeat(1, 1fr) !important; }
}

.fgal-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background: var(--gris-claro);
  aspect-ratio: 1;
}

.fgal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
  display: block;
}

.fgal-item:hover img { transform: scale(1.07); }

.fgal-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 8px;
}

.fgal-item:hover .overlay { background: rgba(0,0,0,0.35); }

.fgal-item .overlay span {
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s;
  line-height: 1.3;
}

.fgal-item:hover .overlay span { opacity: 1; }

.fgal-skel {
  background: var(--gris-borde);
  border-radius: 8px;
  aspect-ratio: 1;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.fgal-error {
  padding: 1.5rem;
  text-align: center;
  color: var(--texto-suave);
  font-size: 14px;
}

.fgal-footer {
  text-align: center;
  margin-top: 16px;
}

/* Reutiliza el estilo de botón existente */
.fgal-btn {
  display: inline-block;
  padding: 8px 24px;
  border: 1.5px solid var(--gris-borde);
  border-radius: 8px;
  color: var(--azul);
  text-decoration: none;
  font-size: .88rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  transition: border-color .2s, color .2s;
}

.fgal-btn:hover {
  border-color: var(--azul);
  color: var(--azul-dark);
}

/* Lightbox */
.flb {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.flb.open { display: flex; }

.flb img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
}

.flb-close {
  position: absolute;
  top: 16px;
  right: 20px;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.flb-prev, .flb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  opacity: .7;
  padding: 12px;
  user-select: none;
}

.flb-prev:hover, .flb-next:hover { opacity: 1; }
.flb-prev { left: 12px; }
.flb-next { right: 12px; }

.flb-link {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 12px;
  opacity: .6;
  text-decoration: none;
}

.flb-link:hover { opacity: 1; }

/* Responsive */
@media (max-width: 900px) {
  .fgal { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 580px) {
  .fgal { grid-template-columns: repeat(2, 1fr); }
}