/* ============================================================
   TP HERO SLIDER  ·  Slider de Títulos Propios (ancho completo)
   Cada slide es una banda de color UNIFORME que ocupa todo el
   ancho y alto del div (sin bordes redondeados, sin fondo
   blanco y sin que se vean los slides adyacentes). El contenido
   (texto + imagen) va centrado al ancho de los contenidos de la
   página y las flechas solo aparecen al pasar el ratón por
   encima, como en el modelo.
   Compatible con Bootstrap 3 / tema Unify (CFP-UPV).
   ============================================================ */

/* El slider debe colocarse FUERA de cualquier .container (como el
   Banner-fluido): así ocupa el ancho natural de la página sin usar
   100vw, que en navegadores con barra de scroll vertical provocaba
   unos píxeles de desplazamiento horizontal. */
.tp-hero {
    position: relative;
    width: 100%;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
}

/* ---------- viewport y pista ---------- */
.tp-hero-viewport {
    overflow: hidden;
    width: 100%;
    cursor: -webkit-grab;
    cursor: grab;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.tp-hero-viewport:active {
    cursor: -webkit-grabbing;
    cursor: grabbing;
}
.tp-hero-media img {
    -webkit-user-drag: none;
}
.tp-hero-track {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-transition: -webkit-transform .55s cubic-bezier(.45,0,.25,1);
    transition: transform .55s cubic-bezier(.45,0,.25,1);
    will-change: transform;
}
.tp-hero-track.tp-no-anim {
    -webkit-transition: none;
    transition: none;
}

/* ---------- slide = banda de color a sangre ---------- */
.tp-hero-slide {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 100%;                      /* banda uniforme: no se ven los slides adyacentes */
    margin: 0;
    border-radius: 0;                 /* sin bordes redondeados */
    box-sizing: border-box;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;          /* centra el bloque texto+imagen en la banda */
    padding: 38px 30px 48px;          /* menos aire arriba y abajo, como el modelo */
    min-height: 0;
    background-color: #6b6470;        /* color por defecto hasta que el JS calcule el de la imagen */
    transition: background-color .7s ease;
    overflow: hidden;
}

/* ---------- columna de texto (centrada al ancho de contenidos) ---------- */
.tp-hero-content {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 38%;
    max-width: 440px;
    padding-right: 50px;
    box-sizing: border-box;
    color: #fff;
}
.tp-hero-slide.tp-slide--dark-text .tp-hero-content { color: #222; }
.tp-hero-title {
    margin: 0 0 14px;
    font-size: 25px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.3px;
    color: #fff;
}
/* en slides de fondo claro, el título toma el mismo color oscuro
   que el resto de los textos */
.tp-hero-slide.tp-slide--dark-text .tp-hero-title {
    color: #222;
}
.tp-hero-title a {
    color: inherit;
    text-decoration: none;
}
.tp-hero-title a:hover,
.tp-hero-title a:focus {
    color: inherit;
    text-decoration: none;
    opacity: .85;
}
/* Fila con el tipo de curso y las fechas, una al lado de la otra */
.tp-hero-subrow {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;                /* siempre en una sola línea */
    -webkit-box-align: baseline;
    -ms-flex-align: baseline;
    align-items: baseline;
    margin: 0 0 18px;
}
.tp-hero-desc {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    opacity: .85;
    white-space: nowrap;
}
.tp-hero-meta {
    margin: 0 0 0 14px;
    padding-left: 14px;
    border-left: 1px solid rgba(255,255,255,.35);
    font-size: 14px;
    opacity: .9;
    white-space: nowrap;
}
.tp-hero-slide.tp-slide--dark-text .tp-hero-meta {
    border-left-color: rgba(0,0,0,.25);
}
.tp-hero-meta .fa {
    margin-right: 6px;
}
/* Etiqueta de modalidad: un tono más oscuro que el fondo del slide
   (lo calcula el JS), sin relieve y con bordes cuadrados */
.tp-hero-badge {
    display: inline-block;
    padding: 5px 12px;
    margin-bottom: 20px;
    border-radius: 0;
    background: rgba(0,0,0,.25);      /* provisional; el JS pone el tono oscuro del fondo */
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.tp-hero-badge .fa {
    margin-right: 6px;
}

/* Fila de datos: curso académico, ECTS y horas */
.tp-hero-stats {
    margin: 0 0 22px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.tp-hero-stat {
    padding-right: 12px;
    margin-right: 12px;
    margin-top: 6px;
    border-right: 1px solid rgba(255,255,255,.35);
    white-space: nowrap;
}
.tp-hero-stat:last-child {
    border-right: 0;
    margin-right: 0;
    padding-right: 0;
}
.tp-hero-stat small {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
    opacity: .75;
    margin-bottom: 2px;
    line-height: 1.2;
}
.tp-hero-stat-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}
.tp-hero-slide.tp-slide--dark-text .tp-hero-stat {
    border-right-color: rgba(0,0,0,.25);
}

/* Botón + INFO: rojo plano del tema, bordes cuadrados */
.tp-hero-btn,
.tp-hero-btn:visited {
    display: inline-block;
    padding: 10px 26px;
    border-radius: 0;
    background: #d05348;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s ease;
}
.tp-hero-btn:hover,
.tp-hero-btn:focus {
    background: #c0392b;
    color: #fff;
    text-decoration: none;
}
.tp-hero-btn .fa {
    margin-right: 8px;
}

/* Hashtag de campaña: misma línea que el tipo, separado 25px */
.tp-hero-hashtag {
    margin: 0 0 0 25px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    color: #fff;
    opacity: .85;
    white-space: nowrap;
}
.tp-hero-slide.tp-slide--dark-text .tp-hero-hashtag {
    color: #222;
}

/* ---------- columna de imagen (más contenida, junto al texto) ---------- */
.tp-hero-media {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 46%;
    max-width: 540px;
    box-sizing: border-box;
}
.tp-hero-media a {
    display: block;
}
.tp-hero-media img {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 0;                 /* bordes cuadrados también en la imagen */
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

/* ---------- flechas (solo visibles al pasar el ratón) ----------
   Cuadrado blanco con flecha gris, sin sombra; crece un poco al hover */
.tp-hero-arrow {
    position: absolute;
    top: 50%;
    margin-top: -18px;
    z-index: 5;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #333;
    font-size: 22px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease, transform .2s ease;
}
.tp-hero:hover .tp-hero-arrow,
.tp-hero-arrow:focus {
    opacity: 1;
    visibility: visible;
}
.tp-hero-arrow:hover,
.tp-hero-arrow:focus {
    -webkit-transform: scale(1.08);
    transform: scale(1.08);
    outline: none;
}
/* la flecha se dibuja con CSS (chevron), independiente de la fuente
   de iconos, para que nunca quede el cuadrado vacío */
.tp-hero-arrow .fa {
    display: none;
}
.tp-hero-arrow:before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-left: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    vertical-align: middle;
    margin-top: -2px;
}
.tp-hero-prev:before {
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    margin-left: 5px;
}
.tp-hero-next:before {
    -webkit-transform: rotate(-135deg);
    transform: rotate(-135deg);
    margin-right: 5px;
}
.tp-hero-prev { left: 22px; }
.tp-hero-next { right: 22px; }

/* ---------- puntos de navegación ---------- */
.tp-hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    z-index: 5;
    text-align: center;
    line-height: 0;
}
.tp-hero-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 4px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: rgba(255,255,255,.45);
    cursor: pointer;
    vertical-align: middle;
    transition: background .25s ease, width .25s ease;
}
.tp-hero-dot:hover { background: rgba(255,255,255,.75); }
.tp-hero-dot.is-active {
    background: #fff;
    width: 22px;                      /* píldora alargada que marca la posición */
}
.tp-hero--dark-text .tp-hero-dot { background: rgba(0,0,0,.25); }
.tp-hero--dark-text .tp-hero-dot:hover { background: rgba(0,0,0,.45); }
.tp-hero--dark-text .tp-hero-dot.is-active { background: #333; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .tp-hero-slide { padding: 30px 25px 45px; min-height: 0; }
    .tp-hero-title { font-size: 23px; }
    .tp-hero-content { width: 44%; padding-right: 30px; }
    .tp-hero-media { width: 50%; }
    .tp-hero-media img { height: 240px; }
}
@media (max-width: 767px) {
    .tp-hero-slide {
        width: 100%;
        -webkit-box-orient: vertical;
        -webkit-box-direction: reverse;
        -ms-flex-direction: column-reverse;
        flex-direction: column-reverse;
        padding: 20px 22px 48px;
        min-height: 0;
        text-align: left;
    }
    .tp-hero-content,
    .tp-hero-media {
        width: 100%;
        max-width: 480px;
        padding-right: 0;
    }
    .tp-hero-media { margin-bottom: 18px; }
    .tp-hero-media img { height: 210px; border-radius: 0; }
    .tp-hero-title { font-size: 20px; }
    .tp-hero-desc { font-size: 14px; }
    /* en móvil las fechas bajan a su propia línea, sin separador */
    .tp-hero-subrow {
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    }
    .tp-hero-desc { white-space: normal; }
    .tp-hero-meta,
    .tp-hero-hashtag {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
        width: 100%;
        margin-top: 4px;
        white-space: normal;
    }
    .tp-hero-btn { display: block; text-align: center; }
    .tp-hero-arrow { display: none; } /* en móvil se navega con el dedo, como el modelo */
    .tp-hero-dots { bottom: 14px; }
}

