/* CSS para Plataforma de Cursos QAS */

/* Variables */
:root {
    --primary-color: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #66BB6A;
    --secondary-color: #FF8F00;
    --accent-color: #FF6F00;
    --text-color: #212529;
    --text-light: #6C757D;
    --background-light: #F8F9FA;
    --white: #FFFFFF;
    --border-color: #E9ECEF;
    --success-color: #28A745;
    --warning-color: #FFC107;
    --error-color: #DC3545;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Hero Section para Cursos */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../assets/image/pattern.png') repeat;
    opacity: 0.1;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero__tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.hero__title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero__title .highlight {
    color: var(--secondary-color);
}

.hero__description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero__actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero__image {
    text-align: center;
}

.hero__image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
}

/* How It Works Section */
.how-it-works {
    padding: 100px 0;
    background: var(--white);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.step-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: var(--border-radius);
    background: var(--background-light);
    position: relative;
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.step-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
}

.step-card p {
    color: var(--text-light);
    line-height: 1.5;
}

/* Courses Section */
.courses-section {
    padding: 100px 0;
    background: var(--background-light);
}

.courses-filters {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.course-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.course-card__image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.course-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-card__content {
    padding: 25px;
}

.course-card__badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.course-card__category {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.course-card__title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
    line-height: 1.3;
}

.course-card__description {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.course-card__meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-card__actions {
    display: flex;
    gap: 15px;
}

.course-card__btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    font-size: 0.9rem;
}

.course-card__btn--primary {
    background: var(--primary-color);
    color: var(--white);
}

.course-card__btn--primary:hover {
    background: var(--primary-dark);
}

.course-card__btn--outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.course-card__btn--outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.course-card__enrolled {
    background: var(--success-color);
    color: var(--white);
}

/* Loading States */
.courses-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.courses-loading i {
    font-size: 2rem;
    animation: spin 1.5s linear infinite;
    margin-bottom: 15px;
    display: block;
}

.courses-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-card {
    text-align: center;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    background: var(--background-light);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.5;
}

/* Navigation User Menu */
.nav__user {
    position: relative;
}

.nav__login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav__login-btn:hover {
    background: var(--primary-dark);
}

.nav__user-logged {
    position: relative;
}

.nav__user-info {
    position: relative;
}

.nav__user-name {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 25px;
    cursor: pointer;
}

.nav__user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    min-width: 200px;
    z-index: 1000;
    display: none;
    padding: 10px 0;
}

.nav__user-info:hover .nav__user-dropdown {
    display: block;
}

.nav__user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.nav__user-link:hover {
    background: var(--background-light);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-hover);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-light);
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 1;
}

.modal-close:hover {
    color: var(--text-color);
}

.auth-form {
    padding: 40px;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.btn-full {
    width: 100%;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-light);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero__title {
        font-size: 2.2rem;
    }
    
    .courses-filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .course-card__actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 80px 0 60px;
    }
    
    .hero__title {
        font-size: 1.8rem;
    }
    
    .hero__actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .auth-form {
        padding: 30px 20px;
    }
}