/**
 * Estilos para o Shortcode [cursos_secao]
 * Seção completa de cursos com introdução e cards
 */

/* Wrapper da seção */
.cursos-lms-section-wrapper {
    width: 100%;
    padding: 40px 0;
    background-color: transparent !important;
}

.cursos-section-access-actions .cursos-section-login-btn {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--clms-primary), var(--clms-primary-dark));
    color: #fff;
    text-decoration: none;
    border-radius: var(--clms-radius-md);
    font-weight: var(--clms-fw-semibold);
    font-size: var(--clms-text-base);
    border: none;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    transition: var(--clms-transition);
    letter-spacing: 0.3px;
    line-height: 1;
    min-height: 44px;
    overflow: visible;
}
.cursos-section-login-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--clms-primary-dark), #4338ca);
    color: #fff;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
    text-decoration: none;
}

.cursos-section-access-actions .cursos-section-login-btn.is-student,
.cursos-section-access-actions .cursos-section-login-btn.is-panel {
    background: #2563eb;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.cursos-section-access-actions .cursos-section-login-btn.is-student:hover,
.cursos-section-access-actions .cursos-section-login-btn.is-panel:hover {
    background: #1d4ed8;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.30);
}

.cursos-section-access-actions .cursos-section-login-btn.is-admin {
    background: #111827;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
}

.cursos-section-access-actions .cursos-section-login-btn.is-admin:hover {
    background: #020617;
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.24);
}

.cursos-section-logout-btn {
    appearance: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    padding: 12px 24px;
    min-height: 44px;
    border: 1px solid rgba(99, 102, 241, 0.28);
    border-radius: var(--clms-radius-md);
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    color: #475569;
    font-size: var(--clms-text-base);
    font-weight: var(--clms-fw-semibold);
    line-height: 1;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
    transition: var(--clms-transition);
}

.cursos-section-logout-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.45);
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    color: #1e293b;
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.16);
}

.cursos-section-logout-btn:active {
    transform: translateY(0);
}

.cursos-section-logout-btn:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.25);
    outline-offset: 2px;
}

.dark-mode .cursos-section-login-btn {
    background: #1f2937;
    color: #a78bfa;
    border-color: #a78bfa;
}

.dark-mode .cursos-section-login-btn:hover {
    background: #8b5cf6;
    color: white;
}

.dark-mode .cursos-section-access-actions .cursos-section-login-btn.is-student,
.dark-mode .cursos-section-access-actions .cursos-section-login-btn.is-panel {
    background: #2563eb;
    color: #ffffff;
}

.dark-mode .cursos-section-access-actions .cursos-section-login-btn.is-admin {
    background: #0f172a;
    color: #ffffff;
    border-color: rgba(148, 163, 184, 0.36);
}

.dark-mode .cursos-section-logout-btn {
    border-color: rgba(167, 139, 250, 0.5);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(51, 65, 85, 0.95));
    color: #e2e8f0;
}

.dark-mode .cursos-section-logout-btn:hover {
    border-color: #a78bfa;
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.95), rgba(71, 85, 105, 0.95));
    color: #f8fafc;
}

.dark-mode .cursos-section-user-pill {
    border-color: rgba(167, 139, 250, 0.45);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.24));
}

.dark-mode .cursos-section-user-label {
    color: #cbd5e1;
}

.dark-mode .cursos-section-user-name {
    color: #f8fafc;
}

.cursos-section-login-btn svg {
    display: inline-block;
    flex-shrink: 0;
    flex-grow: 0;
    width: 20px;
    height: 20px;
    min-width: 20px;
    max-width: 20px;
    vertical-align: middle;
    line-height: 1;
    margin: 0;
    padding: 0;
    text-rendering: optimizeLegibility;
}

.cursos-section-access-actions {
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    justify-content: end;
    column-gap: 8px;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-bottom: var(--clms-space-lg);
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.66);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.cursos-section-access-actions > * {
    margin: 0 !important;
    grid-row: 1;
}

.cursos-section-user-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    min-height: 42px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.18);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
}

.cursos-section-user-label {
    font-size: 10px;
    line-height: 1;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.25px;
    text-transform: uppercase;
}

.cursos-section-user-name {
    font-size: 14px;
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
}

.cursos-section-access-actions .cursos-section-login-btn,
.cursos-section-access-actions .cursos-section-logout-btn {
    min-width: 112px;
    padding-left: 14px;
    padding-right: 14px;
    min-height: 40px;
}

.cursos-section-access-actions .cursos-section-logout-btn {
    width: auto;
    display: inline-flex;
}

.dark-mode .cursos-section-access-actions {
    border-color: rgba(99, 102, 241, 0.25);
    background: rgba(15, 23, 42, 0.52);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.35);
}

.cursos-section-header {
    display: flex;
    flex-direction: column;
    gap: var(--clms-space-lg);
    margin-bottom: var(--clms-space-4xl);
    padding-bottom: var(--clms-space-lg);
    border-bottom: 1px solid var(--clms-border);
}

@media (max-width: 768px) {
    .cursos-section-login-btn {
        padding: 10px 20px;
        font-size: var(--clms-text-sm);
    }

    .cursos-section-access-actions {
        position: static;
        justify-content: end;
        width: fit-content;
        max-width: 100%;
        margin-left: auto;
        margin-bottom: var(--clms-space-lg);
        grid-template-columns: auto auto auto;
        column-gap: 8px;
        padding: 8px;
    }

    .cursos-section-user-pill {
        width: auto;
        align-items: flex-end;
    }

    .cursos-section-access-actions .cursos-section-login-btn,
    .cursos-section-access-actions .cursos-section-logout-btn {
        min-width: 0;
    }

    .cursos-section-logout-btn {
        padding: 10px 20px;
        font-size: var(--clms-text-sm);
    }
}

/* Tela de login da home (fixa, sem modal) */
.cursos-lms-section-wrapper.cursos-login-only {
    background-color: #fdfbf7 !important;
    padding: 0 !important;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    min-height: 100dvh;
    box-sizing: border-box;
    width: 100%;
    margin: 0 !important;
    overflow: hidden;
}

.cursos-lms-section-wrapper.cursos-login-only::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    transform: none;
    background: #fdfbf7;
    z-index: -1;
}

body.cursos-login-only-active {
    overflow: hidden;
}

html.cursos-login-only-active,
body.cursos-login-only-active {
    height: 100%;
    overflow: hidden !important;
    overscroll-behavior: none;
}

.cursos-lms-section-wrapper.cursos-login-only,
.cursos-lms-section-wrapper.cursos-login-only .cursos-lms-section-container,
.cursos-lms-section-wrapper.cursos-login-only .cursos-home-login-screen {
    background: #fdfbf7 !important;
    border: 0 !important;
    box-shadow: none !important;
}

.cursos-lms-section-wrapper.cursos-login-only .cursos-lms-section-container,
.cursos-lms-section-wrapper.cursos-login-only .cursos-home-login-screen {
    min-height: auto;
}

.cursos-lms-section-wrapper.cursos-login-only .cursos-lms-section-container {
    max-width: none;
    width: 100%;
    min-height: 100dvh;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cursos-lms-section-wrapper.cursos-login-only p.has-text-align-center {
    display: none !important;
}

.cursos-lms-section-wrapper.cursos-login-only + p.has-text-align-center,
.cursos-lms-section-wrapper.cursos-login-only ~ p.has-text-align-center {
    display: none !important;
}

.cursos-lms-section-wrapper.cursos-login-only + hr,
.cursos-lms-section-wrapper.cursos-login-only ~ hr,
.cursos-lms-section-wrapper.cursos-login-only + br,
.cursos-lms-section-wrapper.cursos-login-only ~ br {
    display: none !important;
}

.cursos-home-login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    background: #fdfbf7;
    max-width: 780px;
    margin: 0 auto;
}

.cursos-home-login-card {
    width: min(680px, 100%);
    min-height: 280px;
    background: linear-gradient(90deg, #ffffff 0 58%, #2563eb 58% 100%);
    border-radius: 14px;
    overflow: hidden;
    border: 0;
    box-shadow: 0 8px 22px rgba(30, 42, 68, 0.08);
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    align-content: stretch;
}

.cursos-home-login-left {
    padding: 24px 20px 20px 24px;
    height: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.cursos-home-login-left h3 {
    margin: 0;
    font-size: 30px;
    line-height: 1.12;
    color: #1e2a44;
    font-weight: 700;
}

.cursos-home-login-left > p {
    margin: 8px 0 0;
    color: #475569;
    font-size: 14px;
}

.cursos-home-login-tabs {
    margin-top: 12px;
    display: flex;
    gap: 0;
    background: #f4f6fb;
    border: 1px solid #d6deea;
    border-radius: 10px;
    padding: 3px;
    max-width: 100%;
    box-sizing: border-box;
}

.cursos-home-login-tab {
    flex: 1;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #3a4a66;
    font-weight: 600;
    font-size: 11px;
    padding: 8px 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

.cursos-home-login-tab[data-tab="associado"]::before,
.cursos-home-login-tab[data-tab="nao-associado"]::before {
    display: none;
}

.cursos-home-login-tab.is-active {
    border-color: transparent;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.28);
}

.cursos-home-login-panel {
    display: none;
    margin-top: 14px;
}

.cursos-home-login-panel.is-active {
    display: block;
}

.cursos-home-login-screen .cursos-lms-form {
    margin: 0;
}

/* Old form styles removed - using new standard form styles */


.form-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 1.4;
}

.form-field input[type="text"],
.form-field input[type="password"] {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #1f2937;
    background-color: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-field input[type="text"]:focus,
.form-field input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-field input::placeholder {
    color: #9ca3af;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.checkmark {
    display: none;
}

.form-error {
    margin-bottom: 16px;
    padding: 8px 12px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #dc2626;
    font-size: 13px;
}

.form-submit {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    background-color: #3b82f6;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    box-sizing: border-box;
}

.form-submit:hover {
    background-color: #2563eb;
}

.form-submit:active {
    background-color: #1d4ed8;
    justify-content: center;
}

.cursos-home-login-brand {
    width: 100%;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.cursos-home-login-brand img {
    max-width: 44% !important;
    width: 44% !important;
    height: auto;
    display: block;
    filter: none;
}

.cursos-home-login-brand-text {
    display: inline-block;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #ffffff;
}

.cursos-home-login-screen #cursos-lms-login-error {
    margin: 6px 0 10px;
    font-size: 12px;
}

/* Old WP form styles removed - using new standard form styles */

.cursos-home-login-right {
    background: linear-gradient(160deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    padding: 34px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    align-self: stretch;
    height: 100%;
}

.cursos-home-login-right h3 {
    margin: 0;
    font-size: 50px;
    line-height: 1;
    font-weight: 500;
}

.cursos-home-login-right p {
    margin: 12px 0 0;
    font-size: 16px;
    line-height: 1.35;
    max-width: 290px;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 900px) {
    .cursos-home-login-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .cursos-home-login-right {
        padding: 28px 28px 30px;
        order: -1;
    }

    .cursos-home-login-right h3 {
        font-size: 38px;
    }

    .cursos-home-login-right p {
        font-size: 17px;
        margin: 10px 0 16px;
    }

    .cursos-home-login-brand img {
        max-width: 50% !important;
        width: 50% !important;
    }

    .cursos-home-login-left {
        padding: 32px 28px 30px;
    }

    .cursos-home-login-left h3 {
        font-size: 26px;
    }
}

.cursos-section-title {
    font-size: var(--clms-text-5xl);
    font-weight: var(--clms-fw-bold);
    color: var(--clms-text);
    margin: 0 0 var(--clms-space-md) 0;
    line-height: 1.2;
    text-align: center;
}

.dark-mode .cursos-section-title {
    color: #f9fafb;
}

.cursos-section-subtitle {
    font-size: var(--clms-text-2xl);
    font-weight: var(--clms-fw-medium);
    color: var(--clms-primary);
    margin: 0 0 var(--clms-space-lg) 0;
    line-height: 1.4;
    text-align: center;
}

.dark-mode .cursos-section-subtitle {
    color: #a78bfa;
}

.cursos-section-description {
    max-width: 800px;
    margin: 0 auto var(--clms-space-2xl);
    font-size: var(--clms-text-base);
    line-height: 1.8;
    color: var(--clms-text-muted);
    text-align: center;
}

.dark-mode .cursos-section-description {
    color: #d1d5db;
}

.cursos-section-description p {
    margin: 0 0 16px 0;
}

.cursos-section-description p:last-child {
    margin-bottom: 0;
}

/* Estatísticas */
.cursos-section-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: #8b5cf6;
    line-height: 1;
}

.dark-mode .stat-number {
    color: #a78bfa;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dark-mode .stat-label {
    color: #9ca3af;
}

/* Grid de cursos (reutiliza estilos do course-grid.css) */
.cursos-lms-section-wrapper .cursos-lms-course-grid {
    display: grid;
    gap: 24px;
    margin: 0;
    justify-content: center;
}

.cursos-lms-section-wrapper .cursos-lms-course-grid.columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 400px));
    max-width: 850px;
    margin: 0 auto;
}

.cursos-lms-section-wrapper .cursos-lms-course-grid.columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 380px));
    max-width: 1200px;
    margin: 0 auto;
}

.cursos-lms-section-wrapper .cursos-lms-course-grid.columns-4 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 300px));
    max-width: 1400px;
    margin: 0 auto;
}

/* Responsivo */
@media (max-width: 1024px) {
    .cursos-section-title {
        font-size: var(--clms-text-4xl);
    }
    
    .cursos-section-subtitle {
        font-size: 18px;
    }
    
    .cursos-lms-section-wrapper .cursos-lms-course-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .cursos-section-stats {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .cursos-lms-section-wrapper {
        padding: 60px 0;
    }
    
    .cursos-section-header {
        margin-bottom: 40px;
    }
    
    .cursos-section-title {
        font-size: 32px;
    }
    
    .cursos-section-subtitle {
        font-size: 16px;
    }
    
    .cursos-section-description {
        font-size: 15px;
    }
    
    .cursos-lms-section-wrapper .cursos-lms-course-grid.columns-3,
    .cursos-lms-section-wrapper .cursos-lms-course-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .stat-label {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .cursos-lms-section-wrapper {
        padding: 40px 0;
    }
    
    .cursos-section-header {
        margin-bottom: var(--clms-space-lg);
        padding-bottom: var(--clms-space-lg);
    }
    
    .cursos-section-access-actions {
        flex-direction: column;
        gap: var(--clms-space-md);
        width: 100%;
        margin-left: 0;
        align-items: stretch;
    }

    .cursos-section-user-pill {
        width: 100%;
        align-items: center;
    }
    
    .cursos-section-login-btn,
    .cursos-section-logout-btn {
        width: 100%;
    }
    
    .cursos-section-title {
        font-size: var(--clms-text-4xl);
    }
    
    .cursos-section-subtitle {
        font-size: 16px;
    }
    
    .cursos-lms-section-wrapper .cursos-lms-course-grid {
        grid-template-columns: 1fr;
    }
    
    .cursos-section-stats {
        gap: 30px;
    }

    .cursos-home-login-tabs {
        grid-template-columns: 1fr;
    }
}

/* Variações de cor de fundo */
.cursos-lms-section-wrapper.bg-white {
    background-color: #ffffff;
}

.cursos-lms-section-wrapper.bg-gray {
    background-color: #f9fafb;
}

.cursos-lms-section-wrapper.bg-purple-light {
    background-color: #faf5ff;
}

.dark-mode .cursos-lms-section-wrapper.bg-white {
    background-color: #111827;
}

.dark-mode .cursos-lms-section-wrapper.bg-gray {
    background-color: #1f2937;
}

.dark-mode .cursos-lms-section-wrapper.bg-purple-light {
    background-color: #1e1b4b;
}

/* Override final: barra da conta compacta em linha */
.cursos-lms-section-wrapper {
    padding-top: 10px !important;
}

.cursos-lms-section-wrapper .cursos-section-header {
    gap: 8px !important;
    margin-bottom: 18px !important;
    padding-bottom: 12px !important;
}

.cursos-lms-section-wrapper .cursos-section-header .cursos-section-access-actions {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    width: auto !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-bottom: 4px !important;
    padding: 7px 8px !important;
    border-radius: 12px !important;
}

.cursos-lms-section-wrapper .cursos-section-header .cursos-section-user-inline {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
    padding: 0 10px !important;
    border-radius: 9px !important;
    background: rgba(99, 102, 241, 0.1) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    color: #334155 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

.cursos-lms-section-wrapper .cursos-section-header .cursos-section-access-actions .cursos-section-login-btn,
.cursos-lms-section-wrapper .cursos-section-header .cursos-section-access-actions .cursos-section-logout-btn {
    width: auto !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

@media (max-width: 480px) {
    .cursos-lms-section-wrapper {
        padding-top: 6px !important;
    }

    .cursos-lms-section-wrapper .cursos-section-header {
        margin-bottom: 12px !important;
        padding-bottom: 10px !important;
    }

    .cursos-lms-section-wrapper .cursos-section-header .cursos-section-access-actions {
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
}







