:root {
    --background-nacrisferi: #506580;
    --gia-nacrisferi: #9ca0ab;
    --gia-teqsti: #e0dfe6;
    --muqi-lurji: #111827;
    --gia-lurji: #2563eb;
    --plastic: rgba(80, 101, 128, 0.84);
}       

body {
  background-color: #091a2c;
}


/* main first section */

.main {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5em 10em 5em 10em;
}

.slider-container {
    width: 100%;
    background: linear-gradient(90deg, rgba(158, 42, 42, 0) 0%, rgba(80, 101, 128, 0.84) 50%, rgba(158, 42, 42, 0) 100%);
    border-radius: 10px;
    overflow: hidden; /* Crucial for animation clipping */
    position: relative;
    box-shadow: 0 0 40px 15px rgba(0, 0, 0, 0.16);
}

.slider-content {
    display: flex;
    align-items: center;
    padding: 40px;
}

.text-content {
    flex: 1;
    padding-right: 40px;
    color: white;
    position: relative;
    overflow: hidden; /* Important to clip content that slides from outside */
    /* No direct opacity/transform on text-content here */
}

/* Ensure these elements are styled for the animation */
.text-content h2,
.text-content p,
#actionButton {
    /* Initial state: off-screen and invisible */
    opacity: 0;
    transform: translateY(80px); /* Start 50px below its final position */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out; /* Animation duration */
    display: block; /* Ensure transform applies correctly */
    box-sizing: border-box; /* Good practice for consistent sizing */
    width: 100%; /* Ensure they take full width for consistent positioning */
}

/* Specific margins for p and h2 */
.text-content h2 {
    font-size: 2.2em;
    margin-bottom: 15px;
}

.text-content p {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 30px;
}

#actionButton {
    background-color: var(--gia-teqsti, orange);
    color: var(--muqi-lurji, darkblue);
    font-weight: bold;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 0;
    text-align: center; /* Center text if button content allows */
    display: inline-block; /* Or block, depending on desired width behavior. If block, remove width:100% from above general rule */
    /* If you want button to not take full width, use this: */
    width: auto;
    max-width: 100%;
}

#actionButton:hover {
    background-color: #e09400;
}

.image-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#cardImage {
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    opacity: 1;
    transition: opacity 0.8s ease-in-out;
}

/* Class to apply for the "in" animation for individual text elements */
.text-content.animate-active h2,
.text-content.animate-active p,
.text-content.animate-active #actionButton {
    opacity: 1;
    transform: translateY(0); /* Animate to their final position */
}

/* Add delays for staggered animation */
.text-content.animate-active h2 {
    transition-delay: 0.3s;
    transition: 0.5s ease;
}
.text-content.animate-active p {
    transition-delay: 0.4s;
    transition: 0.5s ease;
}
.text-content.animate-active #actionButton {
    transition-delay: 0.5s;
    transition: 0.5s ease;
}

/* Image fade animations */
.image-content.fade-out img {
    opacity: 0;
}

.image-content.fade-in img {
    opacity: 1;
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5em;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
}

.control-btn:nth-child(3) {
    rotate: 180deg;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.dots-container {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: white;
}




/* course-s */
.course-s {
    width: 100%;
    max-width: 1550px;
    margin: 0 auto;
    height: auto;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 2em;
}

.course-s .main-title {
    color: var(--gia-teqsti);
    text-align: start;
    font-size: 2em;
    font-weight: bold;
    margin-top: 2em;
}

.course-s .course-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2em;
}

.course-s .course-wrapper .card {
    width: 490px;
    height: auto;
    background-color: var(--muqi-lurji);
    padding: 1.5em;
    border-radius: 10px;
    box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.045);
}

.course-s .course-wrapper .card h3 {
    color: var(--gia-teqsti);
    font-size: 1.2em;
    font-weight: bold;
    height: auto;
}

.course-s .course-wrapper .card p {
    color: var(--gia-nacrisferi);
    font-weight: 500;
    font-size: .9em;
    padding: .5em 0 1.5em 0;
}

.course-s .course-wrapper .card img {
    height: 400px;
    width: 100%;
    object-fit: cover;
    margin: 2.5em 0 0 0;
    border-radius: 8px;
}

.course-s .course-wrapper .card a {
    font-size: 16px;
    padding: .5em 1em;
    color: white;
    font-weight: 500;
    background-color: var(--plastic);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 1s ease;
}
.course-s .course-wrapper .card a:hover {
    background-color: #7a8da5;
}

/* video-content */
.video-int {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4rem 2rem;
  gap: 2rem;
  background-color: var(--accent);
  flex-wrap: wrap;
}

/* Text Section */
.textinfo {
  flex: 1 1 400px;
  max-width: 600px;
}

.textinfo h2 {
  font-size: 2rem;
  color: var(--bluegray);
  margin-bottom: 0.5rem;
}

.textinfo h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.textinfo p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.learn-more {
  display: inline-block;
  background-color: var(--button);
  color: #fff;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s;
}

.learn-more:hover {
  background-color: #222f3e;
}

/* Video Section */

.video-intro {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 7em;
    gap: 5em;
}


.video-text {
    width: 850px;
}

.video-text h2 {
    font-size: 3.5em;
    color: white;
    font-weight: bold;
}

.video-text p {
    padding: 1.5em 0 0 0;
    color: var(--gia-nacrisferi);
    font-weight: 550;
}

.video-text p:nth-child(6) {
    padding-bottom: 4em;
}

.video-text a {
    background-color: var(--background-nacrisferi);
    padding: 1em 2.5em;
    color: var(--gia-teqsti);
    font-weight: bold;
    transition: background-color 0.3s ease;
    border-radius: 5px;
}

.video-text a:hover {
    background-color: #e09400;
}

video {
    width: 450px;
    border-radius: 5px;
    box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.171);
}



/* review */
.reviews-section {
  padding: 4rem 2rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-top: 2em;
  margin-bottom: 5rem;
  color: var(--gia-teqsti);
  font-weight: bold;
}

.reviews-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.review-card {
  background-color: var(--muqi-lurji);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 0 15px 10px rgba(205, 205, 205, 0.05);
  transition: transform 0.3s ease;
  color: var(--gia-teqsti);
}

.review-card:hover {
  transform: translateY(-5px);
}

.stars {
  color: gold;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.review-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.author {
  font-weight: bold;
  color: var(--background-nacrisferi);
}



/* responsive */
@media(max-width: 1800px) {
    .course-s {
        padding: 0 10em;
    }
    .course-s .course-wrapper .card {
        width: 380px;
    }
    .course-s .course-wrapper .card img {
        height: 300px;
    }
    video {
        width: 370px;
    }
    .video-text h2 {
        font-size: 3em;
    }
}


@media(max-width: 1550px) {
    .course-s .course-wrapper .card {
        width: 320px;
    }
    .course-s .course-wrapper .card h3 {
        height: 72px;
    }
    .video-text h2 {
        font-size: 2.5em;
    }
    .video-intro, .reviews-section {
        padding: 0 10em;
    }
}

@media(max-width: 1400px) {
    .video-text h2 {
        font-size: 2em;
    }
    .video-text a {
        padding: .8em 2.3em;
    }
    video {
        width: 350px;
    }
}

@media(max-width: 1380px) {
    .main {
        padding: 5em 3em 5em 3em;
    }
    .course-s, .video-intro, .reviews-section {
        padding: 0 3em;
    }
    .course-s .course-wrapper .card {
        width: 370px;
    }
}





/* mobile version */
@media(max-width: 900px) {
    /* slider */
    .slider-content {
        flex-direction: column;
        justify-content: center;
    }
    .text-content {
        justify-content: center;
        align-items: center;
        display: flex;
        flex-direction: column;
        padding-right: 0;
    }
    #actionButton {
        width: 250px;
        padding: 12px 25px;
    }
    .text-content.animate-active h2 {
        text-align: center;
    }
    .text-content h2 {
        font-size: 1.7em;
    }
    .text-content p {
        font-size: 1em;
        text-align: center;
    }
    /* course */
    .course-s .course-wrapper .card {
        width: 100%;
    }
    /* video */
    .video-intro {
        flex-direction: column;
    }
    .video-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
    }
    .course-s .course-wrapper .card img {
        height: auto;
    }
    /* padding */
    .main {
        padding: 5em 2em 5em 2em;
    }
    .course-s, .video-intro, .reviews-section {
        padding: 0 2em;
    }
    .course-s .course-wrapper .card h3 {
        height: auto;
    }
    #cardImage {
        height: auto;
    }
}

@media(max-width: 600px) {
    /* text */
    .video-text h2 {
        font-size: 2em;
    }
    .slider-content {
        padding: 30px 30px;
    }
    .course-s .main-title, .section-title {
        font-size: 2em;
    }
    .section-title {
        margin-top: 4em;
    }
}