/* ==========================================================================
   Lições da Amazônia - Estilos Principais
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base e Tipografia
   -------------------------------------------------------------------------- */
body {
    background-color: #f8f7f2;
    font-family: 'Lexend Deca', sans-serif;
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.navbar {
    background-color: #f8f7f2;
    padding: 1.3rem 2rem;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
    background-color: #2e344e;
    color: white;
    padding: 3rem 0;
    position: relative;
    overflow: visible;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.titleHero {
    font-weight: 800;
    line-height: 80px;
}

.underline {
    position: relative;
    padding-bottom: 0.5rem;
    display: inline-block;
    border-bottom: none;
}

.underline:after {
    content: '';
    position: absolute;
    left: -130px;
    right: 0;
    bottom: 0;
    height: 4px;
    background-color: #e8de4d;
}

/* --------------------------------------------------------------------------
   Seção de Episódios
   -------------------------------------------------------------------------- */
.sectionEpisodios {
    margin: 3rem 0;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #2e344e;
    position: relative;
    margin-bottom: 0;
    padding-bottom: 1rem;
}

.titleEpisodios {
    font-size: 26px;
    font-size: 1.6rem;
    font-weight: 300;
}

.titleGaleria p {
    line-height: 1.2;
}

.centered-row {
    justify-content: center;
}

/* Cards de Episódios */
.episode-card {
    background-color: white;
    border-radius: 0;
    border: none;
    margin-bottom: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 5;
}

.episode-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
    min-height: 330px;
}

.episode-number {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.episode-title {
    font-weight: bold;
    color: #2e344e;
    margin-bottom: 0.5rem;
}

.episode-description {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1rem;
}

/* Botão Assistir */
.btn-watch {
    background-color: #8ab83c;
    color: white;
    /*background-color: white;*/
    /*color: #8ab83c;*/
    border: 2px solid #8ab83c;
    border-radius: 30px;
    padding: 0.5rem 2rem;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    float: right;
}

.btn-watch:hover {
    /*background-color: #8ab83c;*/
    /*color: white;*/
    background-color: white;
    color: #8ab83c;
}

.btn-watch svg {
    margin-right: 8px;
}

/* Miniaturas de Vídeo */
.video-thumbnail {
    position: relative;
}

.play-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: #517f6c;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.play-button i {
    color: white;
    font-size: 24px;
    margin-left: 4px;
}

.episode-card:hover .play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* --------------------------------------------------------------------------
   Elementos Decorativos
   -------------------------------------------------------------------------- */
/* Shapes */
.shape {
    position: absolute;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.shape--1 {
    top: -300px;
    left: 0;
    width: 400px;
    height: 400px;
    background-image: url('/licoes/educacao/shapeTodos1.svg');
    z-index: 1;
}

.shape--2 {
    top: 300px;
    left: -20px;
    width: 350px;
    height: 350px;
    background-image: url('/licoes/educacao/shapeTodos2.svg');
    z-index: 1;
}

.shape--3 {
    top: 700px;
    right: 0;
    width: 250px;
    height: 250px;
    background-image: url('/licoes/educacao/shapeTodos3.svg');
    z-index: -1;
    background-position: right;
    background-size: contain;
}

/* Transições entre seções */
.transitionEpisodiosGaleria {
    position: relative;
    height: 60px;
    background-image: linear-gradient(to bottom, #f8f7f2, #f8f9fa);
    margin-top: -50px;
    z-index: 2;
}

.transitionGaleriaQuemFaz {
    position: relative;
    height: 60px;
    background-image: linear-gradient(to bottom, #f8f7f2, #f1efe8);
    margin-top: -50px;
    z-index: 2;
}

/* --------------------------------------------------------------------------
   Galeria
   -------------------------------------------------------------------------- */
#galeriaEpisodios {
    position: relative;
    background-color: #f8f9fa;
    padding-top: 50px;
    margin-top: -30px;
    z-index: 1;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
}

/* Carousel Principal */
#episodioCarousel .carousel-inner {
    height: 600px;
    overflow: hidden;
}

#episodioCarousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Controles do Carousel */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 20px;
}

/* Container para Miniaturas */
.thumbnail-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto 40px;
    overflow: hidden;
    height: 120px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.thumbnail-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    padding: 0 50px;
}

.thumbnail-carousel {
    display: flex;
    transition: transform 0.3s ease;
    gap: 10px;
    height: 100%;
    align-items: center;
    padding: 10px 0;
}

/* Items de Miniaturas */
.thumbnail-item {
    flex: 0 0 auto;
    width: 150px;
    height: 120px;
    opacity: 0.7;
    transition: all 0.3s ease;
    transform-origin: center;
}

.thumbnail-item.active {
    opacity: 1;
    transform: scale(1.05);
    z-index: 2;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid transparent;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.thumbnail-item:hover img {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.7;
    border-color: #ffc107;
}

.thumbnail-item.active img {
    border-color: #ffc107;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Botões de Navegação */
.thumbnail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.thumbnail-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.thumbnail-prev {
    left: 8px;
}

.thumbnail-next {
    right: 8px;
}

/* --------------------------------------------------------------------------
   Seção Quem Faz
   -------------------------------------------------------------------------- */
.quem-faz {
    background-color: #f1efe8;
    position: relative;
    padding: 3rem 0;
    margin-top: 0;
}

.quemFaz {
    padding-top: 10px;
    margin-bottom: 0;
}

.quemFaz h2, .titleEpisodios h2 {
    font-size: 2rem;
    color: #39424e;
}

.quemFaz h5 {
    font-family: 'Poppins', 'Helvetica Neue', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.quemFaz p {
    color: #657280;
}

/* Equipe */
.team-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.team-member {
    flex: 0 0 20%;
    max-width: 20%;
    padding: 10px;
}

.avatar2 {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.avatar2:hover {
    transform: scale(1.05);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.sectionFooter {
    color: #fff;
    font-family: 'Poppins', 'Helvetica Neue', sans-serif !important;
}

.footer-wrapper {
    position: relative;
    z-index: 1;
    margin-top: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.footer {
    padding: 3rem 0;
}

.footer hr,
.footer-wrapper hr {
    opacity: 0.2;
    margin: 0 !important;
}

.newstitle {
    font-size: 20px;
    padding-bottom: 10px;
    display: block;
}

/* Links e Ícones */
.sectionFooter i {
    color: #CCCF5E;
    font-size: 36px;
    transition: color 0.3s ease;
}

.sectionFooter i:hover {
    color: #fff;
}

.sectionFooter .links a {
    color: #CCCF5E;
    text-decoration: none;
    font-size: 18px;
    display: block;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.sectionFooter .links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Copyright */
.copyright {
    padding: .5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #bdbdbd;
}

.copyright a {
    margin-right: 1rem;
    text-decoration: none;
    transition: color 0.3s;
    color: #bdbdbd;
}

.copyright a:hover {
    text-decoration: underline;
    color: #CCCF5E;
}

/* --------------------------------------------------------------------------
   Media Queries
   -------------------------------------------------------------------------- */

/* Dispositivos grandes e médios (desktop e tablets) */
@media (max-width: 1199px) {
    .team-member {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (max-width: 991px) {
    .team-member {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }

    .shape--1 {
        width: 300px;
        height: 300px;
        top: -235px;
        left: 0;
    }

    .sectionEpisodios {
        line-height: 1.2;
    }

    .titleEpisodios p {
        font-size: 1.4rem;
        font-weight: 500;
    }

    .rsoc {
        flex-direction: column;
    }

    .footer img {
        width: 120px;
    }
}

/* Dispositivos pequenos (tablets e smartphones) */
@media (max-width: 767px) {
    .team-member {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Ajustes do Footer */
    .footer .row {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer .col-md-3 {
        margin-bottom: 2rem;
        align-items: center !important;
    }

    .sectionFooter .links {
        align-items: center;
    }

    .copyright {
        flex-direction: column;
        text-align: center;
    }

    .copyright div:first-child {
        margin-bottom: 10px;
    }

    /* Ajustes do Carousel */
    #episodioCarousel .carousel-inner {
        height: 300px;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        padding: 15px;
    }

    .thumbnail-container {
        height: 80px;
        margin-bottom: 20px;
    }

    .thumbnail-item {
        width: 100px;
        height: 60px;
    }

    .thumbnail-wrapper {
        padding: 0 35px;
    }

    .thumbnail-nav {
        width: 30px;
        height: 30px;
    }

    #galeriaEpisodios {
        padding-top: 40px;
        padding-bottom: 20px;
    }

    .container {
        padding-bottom: 0;
    }

    #galeriaEpisodios + section {
        margin-top: 0;
    }

    .newstitle {
        padding: 20px 0;
    }

    .links {
        text-align: center;
    }

    .rsoc {
        flex-direction: row;
    }
}

/* Dispositivos muito pequenos (smartphones) */
@media (max-width: 576px) {
    .team-member {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .shape--1 {
        width: 200px;
        height: 200px;
        top: -170px;
        left: 0;
    }

    .display-4 {
        font-size: 3rem;
    }

    .titleEpisodios p {
        font-size: 1.4rem;
    }

    .quemFaz h2, .titleEpisodios h2 {
        font-size: 1.2rem;
        font-weight: bold;
    }

    .p-4 {
        padding: 0 !important;
    }
}

@media (max-width: 480px) {
    #episodioCarousel .carousel-inner {
        height: 220px;
    }

    .thumbnail-item {
        width: 80px;
        height: 50px;
    }
}