:root {
    --primary-green: #00B050;
    --primary-green-dark: #008a3e;
    --primary-green-light: #4CD964;
    --primary-blue: #1A288B;
    --primary-blue-light: #2A3CC7;
    --gray-50: #F9FAFB;
    --gray-100: #F4F6F8;
    --gray-200: #DFE3E8;
    --gray-300: #C4CDD5;
    --gray-400: #919EAB;
    --gray-500: #637381;
    --gray-600: #454F5B;
    --gray-700: #2D3748;
    --gray-800: #1A202C;
    --gray-900: #0D121C;
    --success: #00B050;
    --warning: #FFC107;
    --error: #FF3B30;
    --info: #0066CC;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-logo: 'Anton', 'Impact', sans-serif;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-green: 0 10px 20px rgba(0, 176, 80, 0.15);
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-modal: 30;
    --z-popover: 40;
    --z-toast: 50;
}

.dark-mode {
    --primary-green: #00E676;
    --primary-green-dark: #00C853;
    --primary-green-light: #69F0AE;
    --primary-blue: #3D5AFE;
    --primary-blue-light: #536DFE;
    --gray-50: #0D121C;
    --gray-100: #1A202C;
    --gray-200: #2D3748;
    --gray-300: #4A5568;
    --gray-400: #718096;
    --gray-500: #A0AEC0;
    --gray-600: #CBD5E0;
    --gray-700: #E2E8F0;
    --gray-800: #EDF2F7;
    --gray-900: #F7FAFC;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-green: 0 10px 20px rgba(0, 230, 118, 0.2);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
}

.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    background-color: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.dark-mode .main-header {
    background-color: var(--gray-100);
    border-bottom-color: var(--gray-300);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-sm) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.site-title {
    font-family: var(--font-logo);
    font-size: 1.8em;
    font-weight: 400;
    color: var(--gray-800);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dark-mode .site-title {
    color: var(--gray-800);
}

.site-subtitle {
    font-family: var(--font-logo);
    font-size: 0.65em;
    font-weight: 400;
    color: var(--gray-800);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dark-mode .site-subtitle {
    color: var(--gray-600);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--gray-800);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
}

.nav-link:hover {
    color: var(--primary-green);
    background: transparent;
}

.dark-mode .nav-link {
    color: var(--gray-300);
}

.dark-mode .nav-link:hover {
    color: var(--primary-green);
    background: transparent;
}

.nav-link i {
    font-size: 26px;
    margin-bottom: 4px;
    color: inherit;
}

.nav-text {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: inherit;
}

.theme-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 10px;
    border-left: 1px solid var(--gray-300);
    margin-left: 10px;
}

.icon-tema {
    cursor: pointer;
    width: 28px;
    height: 28px;
    vertical-align: middle;
}

main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-xl);
    width: 100%;
}

.page-title {
    font-family: var(--font-secondary);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.dark-mode .page-title {
    color: var(--gray-800);
}

.filters-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--gray-200);
}

.dark-mode .filters-section {
    border-bottom-color: var(--gray-300);
}

.filter-tags {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.filter-tag {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-full);
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
}

.filter-tag:hover {
    background: var(--gray-200);
}

.filter-tag.active {
    background: var(--primary-green);
    border-color: var(--primary-green-dark);
    color: white;
    box-shadow: var(--shadow-green);
}

.dark-mode .filter-tag {
    background: var(--gray-200);
    border-color: var(--gray-400);
    color: var(--gray-500);
}

.dark-mode .filter-tag.active {
    background: var(--primary-green);
    color: var(--gray-900);
}

.search-container {
    position: relative;
    min-width: 280px;
}

.search-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg) var(--space-md) 44px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--gray-800);
    font-family: var(--font-primary);
    font-size: 0.875rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-green);
    background: var(--gray-50);
    box-shadow: 0 0 0 3px rgba(0, 176, 80, 0.1);
}

.dark-mode .search-input {
    background: var(--gray-200);
    border-color: var(--gray-400);
    color: var(--gray-600);
}

.search-icon {
    position: absolute;
    left: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 1rem;
}

.cursos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-3xl);
}

.curso-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.curso-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-green);
}

.dark-mode .curso-card {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.card-badge {
    position: absolute;
    top: var(--space-lg);
    left: var(--space-lg);
    background: var(--primary-green);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    z-index: 1;
    box-shadow: var(--shadow-md);
}

.curso-img {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.curso-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-overlay, .quick-view {
    display: none !important;
}

.curso-info {
    padding: var(--space-xl);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.curso-header {
    margin-bottom: var(--space-lg);
}

.curso-title {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-md);
    line-height: 1.4;
}

.dark-mode .curso-title {
    color: var(--gray-800);
}

.curso-meta {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.dark-mode .meta-item {
    color: var(--gray-500);
}

.meta-item i {
    color: var(--primary-green);
    font-size: 0.875rem;
}

.curso-content {
    margin-bottom: var(--space-xl);
    flex: 1;
}

.curso-desc {
    color: var(--gray-700);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.dark-mode .curso-desc {
    color: var(--gray-600);
}

.curso-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.dark-mode .feature {
    color: var(--gray-500);
}

.feature i {
    color: var(--primary-green);
    font-size: 0.875rem;
}

.curso-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--gray-200);
}

.dark-mode .curso-footer {
    border-top-color: var(--gray-300);
}

stripe-buy-button {
    margin: 0 auto;
    display: block;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    border-radius: var(--radius-2xl);
    padding: var(--space-3xl) var(--space-2xl);
    margin-bottom: var(--space-3xl);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-secondary);
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-md);
}

.cta-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
}

.cta-button {
    background: white;
    color: var(--primary-blue);
    border: none;
    border-radius: var(--radius-full);
    padding: var(--space-lg) var(--space-2xl);
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    box-shadow: var(--shadow-lg);
}

.main-footer {
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    margin-top: auto;
}

.dark-mode .main-footer {
    background: var(--gray-200);
    border-top-color: var(--gray-300);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 24px;
    filter: drop-shadow(var(--shadow-sm));
    object-fit: contain;
    align-self: flex-start;
}

.footer-text {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.6;
}

.dark-mode .footer-text {
    color: var(--gray-500);
}

.footer-title {
    font-family: var(--font-secondary);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 24px;
}

.dark-mode .footer-title {
    color: var(--gray-800);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links li a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-links li a:hover {
    color: var(--primary-green);
    padding-left: 4px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.dark-mode .contact-info p {
    color: var(--gray-500);
}

.contact-info i {
    color: var(--primary-green);
    width: 20px;
    text-align: center;
}

.footer-bottom {
    background: var(--gray-200);
    padding: 24px 20px;
    text-align: center;
    border-top: 1px solid var(--gray-300);
}

.dark-mode .footer-bottom {
    background: var(--gray-300);
    border-top-color: var(--gray-400);
}

.footer-bottom p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

@media (max-width: 1024px) {
    .header-content {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .logo-container, .header-nav {
        width: 100%;
        justify-content: center;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        width: 100%;
    }

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

@media (max-width: 768px) {
    .cursos-grid {
        grid-template-columns: 1fr;
    }
    
    main {
        padding: var(--space-xl) var(--space-lg);
    }
    
    .header-content {
        padding: var(--space-md);
    }
    
    .curso-footer {
        flex-direction: column;
        gap: var(--space-lg);
        align-items: center;
    }
}

@media (max-width: 480px) {
    .header-nav {
        gap: var(--space-md);
    }
    
    .nav-text {
        display: none;
    }
    
    .filter-tags {
        justify-content: center;
    }
}

*:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

.load-more-container {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: #1e88e5;
    color: white;
}

.load-more-btn:hover {
    background: #1565c0;
}

.footer-link {
    color: inherit;
    text-decoration: none;
    cursor: default;
}