/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #17171A;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header e Navigation - Reutilizando o design */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background-color: rgba(23, 23, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(118, 65, 230, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    padding-top: 5px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #7641E6;
}

.nav-logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover {
    color: #7641E6;
    background-color: rgba(118, 65, 230, 0.1);
}

.nav-link.active {
    color: #7641E6;
    background-color: rgba(118, 65, 230, 0.15);
}

.play-button .play-link {
    background: linear-gradient(135deg, #7641E6, #9f5ff2);
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(118, 65, 230, 0.3);
}

.play-button .play-link:hover {
    background: linear-gradient(135deg, #8b52eb, #b670f7);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(118, 65, 230, 0.4);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 5px;
}

/* Hero Section */
.hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #17171A 0%, #1a1a1f 50%, #17171A 100%);
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(118, 65, 230, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(118, 65, 230, 0.05) 0%, transparent 50%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #7641E6, #a855f7, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: #b3b3b3;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #7641E6;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #b3b3b3;
    margin-top: 0.5rem;
}

/* Courses Section */
.courses {
    padding: 6rem 0;
    background: #17171A;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #b3b3b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #b3b3b3;
    max-width: 600px;
    margin: 0 auto;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Course Cards - Altura uniforme */
.course-card {
    background: #1a1a1f;
    border-radius: 16px;
    border: 1px solid rgba(118, 65, 230, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 520px; /* Altura aumentada para garantir visibilidade do botão */
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(118, 65, 230, 0.05), transparent);
    transition: 0.5s;
    pointer-events: none;
}

.course-card:hover::before {
    left: 100%;
}

.course-card:hover {
    transform: translateY(-10px);
    border-color: #7641E6;
    box-shadow: 0 20px 40px rgba(118, 65, 230, 0.2);
}

.course-image {
    height: 200px;
    background: linear-gradient(135deg, #7641E6, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.course-image-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 3;
}

.course-image img {
    width: 100%;
    height: 100%;
    z-index: 2;
}

.course-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 2;
}

.course-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
}

.course-level {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(10px);
}

.course-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
}

.course-description {
    color: #b3b3b3;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-grow: 1;
    /* Limita a descrição para evitar quebra de layout */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #7641E6;
    margin-top: auto;
}

.course-duration,
.course-lessons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn {
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    width: 100%;
    justify-content: center;
    margin-top: auto;
}

.btn-primary {
    background: linear-gradient(135deg, #7641E6, #9f5ff2);
    color: white;
    box-shadow: 0 4px 15px rgba(118, 65, 230, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #8b52eb, #b670f7);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(118, 65, 230, 0.4);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #1a1a1f;
    border-radius: 20px;
    border: 1px solid rgba(118, 65, 230, 0.2);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(118, 65, 230, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(118, 65, 230, 0.1);
    color: #7641E6;
}

.modal-body {
    padding: 2rem;
}

.course-info {
    margin-bottom: 2rem;
}

.course-description-full {
    color: #b3b3b3;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.course-details {
    display: flex;
    gap: 2rem;
    color: #7641E6;
    font-size: 0.95rem;
}

.course-curriculum h3 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.lessons-list {
    background: #17171A;
    border-radius: 12px;
    border: 1px solid rgba(118, 65, 230, 0.1);
    margin-bottom: 2rem;
}

.lesson-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(118, 65, 230, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.lesson-item:last-child {
    border-bottom: none;
}

.lesson-item:hover {
    background: rgba(118, 65, 230, 0.05);
}

.lesson-number {
    background: linear-gradient(135deg, #7641E6, #a855f7);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.lesson-title {
    color: #ffffff;
    font-weight: 500;
    flex: 1;
}

.lesson-duration {
    color: #b3b3b3;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(118, 65, 230, 0.1);
}

.access-course {
    min-width: 200px;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/* Footer */
.footer {
    background: #1a1a1f;
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(118, 65, 230, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #7641E6;
}

.footer-logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #b3b3b3;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #7641E6;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(118, 65, 230, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7641E6;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: #7641E6;
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(118, 65, 230, 0.1);
    color: #b3b3b3;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .courses-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(23, 23, 26, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        backdrop-filter: blur(10px);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.2rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .stat-item {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .course-card {
        height: auto; /* Remove altura fixa no mobile */
        min-height: 480px; /* Altura mínima maior no mobile */
    }

    .modal-content {
        width: 95%;
        margin: 2rem;
    }

    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }

    .course-details {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .course-card {
        margin-bottom: 1rem;
        height: auto;
        min-height: 450px; /* Altura mínima adequada no mobile */
    }

    .course-content {
        padding: 1.5rem;
    }

    .modal-content {
        max-height: 95vh;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Scroll animations */
.scroll-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

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