* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    width: 100%;
    overflow-x: hidden;
    background-color: #ffffff;
}

body {
    width: 100%;
    position: relative;
    background-image: url(../img/svg/home/home-bg.svg);
    background-repeat: no-repeat;
    background-position: center 100px;
    background-size: contain;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}
  
h1 {
    font-family: Graúna;
    color: #fff;
    font-size: 2em;
}

.wrapper {
    width: 1200px;  /* Fixed width for desktop */
    margin: 0 auto;  /* Center the wrapper */
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Shows ************************************/
#shows h1 {
    font-size: 10em;
}

#shows-title {
    margin-top: 80px;
}

#kids {
    position: absolute;
    width: 100%;
    text-align: right;
    margin-top: 30px;
    margin-left: 50px;
}

#kids img {
    width: 760px;
}

/* Latest episodes ************************************/
#all-episodes-button {
    position: absolute;
    margin-top: 230px;
    cursor: pointer;
    z-index: 10;
}

#all-episodes-button:active {
    opacity: .8;
}

#latest-episodes-title 
{
    margin-top: 80px;
    float: right;
    position: relative;
}

#bee {
    position: absolute;
    width: 100%;
    text-align: right;
    margin-top: 30px;
    margin-left: 50px;
}

#bee img {
    width: 500px;
    margin-right: 220px;
    margin-top: 70px;
}

/* Latest activitites ****************************************/
#latest-activities-header {
    margin-top: 130px;
}
#all-activities-button {
    margin-top: 112px;
    cursor: pointer;
    float: right;
}
#all-activities-button:active {
    opacity: .8;
}
#kid-n-owl {
    float:right;
}

/* Footer *****************************************************/
#footer {   
    background-color: #7A1BAA;
    text-align: center;
}
#footer .footer-divider {
    margin-top: 20px;
    background-color: #37AAF5;
    height: 15px;
    margin-bottom: 30px
}
#privacy-terms a {
    display: inline-block;
    margin: 10px;
}

#footer .logos  {
    display: inline-block;
    padding: 30px;
}

#footer .copyright {
    color: White;
    font-size: 14pt;
    padding: 20px;
}

@font-face {
    font-family: 'SegoeWP-Black';
    src: url('../fonts/SegoeWP-Black.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gra_250_na';
    src: url('../fonts/Gra_250_na.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}



@media screen and (min-width: 1200px) {
    body {
        background-size: 2870px auto;
    }
    #latest-activities-header {
        margin-top: 320px !important;
    }
}

/* Medium screens (laptops, tablets landscape, between 1024px and 1439px) */
@media screen and (min-width: 1024px) and (max-width: 1199px) {
    body {
        background-size: 2690px auto;
        background-position: center 72px;
    }

    .wrapper {
        max-width: 980px;
    }

    #kids img {
        width: 620px;
        position: relative;
        left: 50px;
    }


   

    #shows-title {   
        width: 490px;
        margin-left: -10px;
    }

    #shows-carousel-container {
        margin-top: 80px !important;
    }

    #latest-episodes {
        margin-top: 100px !important;
    }

    #latest-episodes-title {
        width: 440px;
    }

    #bee {
        margin-left: 20px !important;
    }

    #bee img {
        width: 370px;         
    }

    #all-episodes-button {
        margin-top: 190px;
    }

    #all-episodes-button img {        
        width: 240px;
        margin-left: 20px;
        margin-top: 10px;
    }

    #latest-activities-header {
        margin-top: 293px !important;
    }

    #all-activities-button img {
        width: 270px;
    }

    #latest-activities-title {
        width: 560px;
    }

    #kids {
        margin-left: 0px;
    }

    #activities-description {
        font-size: .98em !important;
    }

    #activitites-category {
        font-size: .80em !important;
    }
   
    #kid-n-owl img {
        width: 420px;
    }

    .carousel-slide {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Small screens (tablets, between 768px and 1023px) */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    html {
        overflow-x: hidden;
    }
    body {
        margin: 0;
        padding: 0;
        width: 100%;
        min-width: 100%;
        overflow-x: hidden;
        background-size: 2390px auto;
        background-image: url(../img/svg/home/home-bg-mobile.svg);        
        background-position: center 72px;
    }

    main {
        margin: 0;
        padding: 0;
        width: 100%;
        max-width: 100%;
    }

    .container {
        margin: 0;
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .wrapper {
        width: 100%;  /* Full width on mobile */
        max-width: 100vw;
        overflow-x: hidden;
        padding-left: max(env(safe-area-inset-left), 15px);
        padding-right: max(env(safe-area-inset-right), 15px);
        box-sizing: border-box;
        margin: 0;  /* Remove auto margins on mobile */
    }

    #kids img {
        width: 60%;
        position: relative;
        left: 50px;
    }

    #shows-title {   
        width: 60%;
        margin-left: -10px;
    }

    #shows-carousel-container {
        margin-top: 80px !important;
    }

    #latest-episodes {
        margin-top: 0 !important;
    }
    
    #latest-episodes-title {
        width: 440px;
    }

    #bee {
        margin-left: 20px !important;
    }

    #bee img {
        width: 260px;         
    }

    #all-episodes-button {
        margin-top: 136px;
    }

    #all-episodes-button img {        
        width: 240px;
        margin-left: 20px;
        margin-top: 10px;
    }

    .episode-card img {
        height: 235px !important;
    }

    #latest-activities-header {
        margin-top: 40px !important;
    }

    #all-activities-button img {
        width: 270px;
    }

    #latest-activities-title {
        width: 62%;
        margin-top: 50px;
    }

    #kids {
        margin-left: 0px;
    }

    #activities-description {
        font-size: .98em !important;
    }

    #activitites-category {
        font-size: .80em !important;
    }
   
    #kid-n-owl img {
        width: 420px;
    }

    .carousel-slide {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* Mobile styles */
@media screen and (max-width: 767px) {
    body {
        background-size: 2390px auto;
        background-image: url(../img/svg/home/home-bg-mobile.svg);        
        background-position: center 72px;
        
    }
    html {
        overflow-x: hidden;
    }

    body {
        overflow-x: hidden;
    }

    .wrapper {
        width: 100%;  /* Full width on mobile */
        max-width: 100vw;
        overflow-x: hidden;
        padding-left: max(env(safe-area-inset-left), 15px);
        padding-right: max(env(safe-area-inset-right), 15px);
        box-sizing: border-box;
        margin: 0;
        margin-top: 60px;
    }

    #kids {
        margin-left: 0px;
        margin-top: 120px;
        position: absolute !important;
    }
    #kids img {        
        width: 60%;
        text-align: right;
        margin-top: 0 !important;
        margin-left: 0 !important;
    }

    #shows-title {   
        width: 70%;
        margin-left: -10px;
        margin-top: 20px;
        margin-bottom: 0px;
    }

    #shows-carousel-container {
        margin-top: 80px !important;
    }

    #latest-episodes {
        margin-top: 0 !important;
    }
    
    #latest-episodes-title {
        width: 65%;
        margin-bottom: 50px;
    }

    #latest-episodes-carousel-container {
        top: 30px !important;
        padding-bottom: 0px !important;
    }
    .latest-carousel-navigation {
        bottom: 60px !important;
    }

    .episode-card img {
        height: 212px !important;
    }

    #bee {
        margin-left: 20px !important;
        margin-top: -40px;
    }

    #bee img {
        width: 260px;         
    }

    #all-episodes-button {
        margin-top: 190px;
    }

    #all-episodes-button img {        
        width: 240px;
        margin-left: 20px;
        margin-top: 20px;
    }

    #latest-activities-header {
        margin-top: 40px !important;
    }

    #all-activities-button img {
        width: 270px;
    }

    #latest-activities-title {
        width: 62%;
        margin-top: -160px;
        margin-bottom: 110px;
    }

    #activities-description {
        font-size: .98em !important;
    }

    #activitites-category {
        font-size: .80em !important;
    }
   
    #kid-n-owl img {
        width: 420px;
    }

    .episodes-grid {
        grid-template-columns: 1fr;
    }

    .carousel-slide {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Shows Carousel Section ****************************************/
#shows-carousel-container {
   position: relative;
   display: flex;
   align-items: center;
   width: 100%;
   padding: 20px 0;
   margin-top: 40px;
}

#shows-carousel {
   width: 100%;
   overflow: hidden;
   position: relative;
}

.carousel-track {
   display: flex;
   transition: transform 0.5s ease-in-out;
   list-style: none;
   margin: 0;
   padding: 0;
}

/* Base styles for all screen sizes */
.carousel-slide {
   flex: 0 0 25%;
   max-width: 25%;
   padding: 0;
}

.carousel-slide img {
   width: 100%;
   height: auto;
}

.carousel-button {
   background: none;
   border: none;
   cursor: pointer;
   padding: 10px;
   z-index: 1;
}

.carousel-button:hover {
   opacity: 0.8;
}

.carousel-button img {
   width: 64px;
   height: 64px;
}

.carousel-button.disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.carousel-button:disabled {
    pointer-events: none;
}

/* Latest Episodes Section ****************************************/
#latest-episodes {
  position: relative;
  width: 100%;
  margin-top: 20px;
}

#latest-episodes-carousel-panel {
  width: 100%;
  position: relative;
}

#latest-episodes-carousel-container {
  width: 100%;
  position: relative;
  overflow: hidden;
  padding-bottom: 60px;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 1rem;
  margin-bottom: 20px;
}

.episode-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.episode-card:hover {
  transform: translateY(-5px);
}

.episode-card img {
  width: 100%;
  height: 153px;
  object-fit: cover;
}

.episode-card h3 {
  padding: 5px 10px;
  margin: 0;
  font-size: .9em;
  color: #7825AF;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 3.8em;
  font-family: 'Segoe WP Black', 'Segoe WP', 'Segoe UI', sans-serif;
}

.latest-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    list-style: none;
    margin: 0;
    padding: 0;
}

.latest-carousel-slide {
    min-width: 100%;
    transition: transform 0.5s ease-in-out;
}

.latest-carousel-navigation {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    z-index: 2;
}

.latest-carousel-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.latest-carousel-button img {
    width: 34px;
    height: 34px;
}

.latest-carousel-dots {
    display: flex;
    justify-content: center;
    margin: 0 10px;
}

.latest-carousel-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 5px;
    cursor: pointer;
    border: none;
    padding: 0;
}

.latest-carousel-dot.current-slide {
    background-color: #c7e007;
}

/* Latest Activities Section ****************************************/
#latest-activities-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0 0 60px;
}

#latest-activities-list li {
    background-color: white;
    border-radius: 31px;
    margin: 7px;
    padding: 0;
    flex: 1;
    min-width: 200px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, .4);
}

#latest-activities-list li img {
    width: 100%;
    height: auto;
    display: block;
}

#latest-activities-list li h3 {
    padding: 15px 15px 10px 15px;
    margin: 0;
}

#latest-activities-list li p {
    padding: 0 15px 15px 15px;
    margin: 0;
}

#activities-title {
    padding: 15px;
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    font-family: 'Segoe WP Black', 'Segoe WP', 'Segoe UI', sans-serif;
    color: #7825AF;
}

#activities-description {
    padding: 0 13px 35px;
    color: #6B6B6B;
    font-size: 1.1em;
}

#activitites-category {
    background-color: #00B3FF;
    display: inline;
    float: left;
    margin: 0 10px 10px 17px;
    color: #fff;
    padding: 5px 10px;
    border-radius: 18px;
    text-transform: uppercase;
}

/* Media Queries ****************************************/
@media screen and (min-width: 1024px) and (max-width: 1199px) {
    #latest-activities-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin-top: 20px !important;
        min-width: 100px;
    }

    #latest-activities-list li {
        transform: scale(0.90);
        margin: 0;
    }

    .episodes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    #latest-activities-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    #latest-activities-list li {
        transform: scale(0.9);
        margin: 0;
    }

    .carousel-button img {
        width: 44px;
        height: 44px;
    }

    #latest-episodes {
        position: relative;
        width: 100%;
        margin-top: 25px !important;
    }

    #latest-episodes-title {
        margin-top: 50px !important;
        width: 52% !important;
    }

    .episodes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 767px) {
    .latest-carousel-track {
        height: 430px !important;
    }

    #latest-activities-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    #latest-activities-list li {
        margin: 0;
        transform: none;
        width: 100%;
    }

    .carousel-slide {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .carousel-button img {
        width: 44px;
        height: 44px;
    }

    .episodes-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
#video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    width: 800px;
    height: 500px;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
}

.close-button {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 30px;
    height: 30px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    line-height: 1;
}

.close-button:hover {
    background: #e0e0e0;
}

.modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive modal */
@media screen and (max-width: 850px) {
    .modal-content {
        width: 95%;
        height: 56.25vw; /* maintain 16:9 aspect ratio */
        max-height: 90vh;
    }
}