/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: bold;
}

.logo-icon {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.logo-text {
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.nav-link:hover {
    opacity: 0.8;
}

.btn-signin {
    background: var(--white);
    color: var(--primary-green);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.btn-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--primary-dark);
    padding: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav .btn-signin {
    margin-top: 1rem;
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
    color: var(--white);
    padding: clamp(2rem, 8vw, 5rem) 0;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: clamp(0.9rem, 2vw, 1rem);
    opacity: 0.9;
}

/* Page Title */
.page-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin: 2rem 0 0.5rem;
    color: var(--text-dark);
    text-align: center;
}

.page-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Content Wrapper */
.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Sidebar Styles */
.sidebar {
    width: 100%;
}

.filter-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.filter-title {
    color: var(--primary-green);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-green);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.6rem;
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-green);
    flex-shrink: 0;
}

.checkbox-label span {
    line-height: 1.4;
}

.checkbox-label:hover {
    color: var(--text-dark);
}

/* Courses Section */
.courses-section {
    width: 100%;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
    width: 100%;
}

/* Course Card Styles */
.course-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.course-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.course-icon {
    font-size: clamp(3rem, 8vw, 4rem);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.course-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.course-badge {
    display: inline-block;
    background: var(--primary-green);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    align-self: flex-start;
}

.course-title {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.course-description {
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.5;
    flex: 1;
}

.course-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-gray);
    flex-wrap: wrap;
}

.btn-view {
    background: var(--primary-green);
    color: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s, transform 0.2s;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.btn-view:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 2001;
    animation: slideDown 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-gray);
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1;
    background: none;
    border: none;
    padding: 0.5rem;
    line-height: 1;
}

.close:hover {
    color: var(--text-dark);
}

.construction-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
}

.modal-content h2 {
    color: var(--text-dark);
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    margin-bottom: 1rem;
    text-align: center;
    padding-right: 2rem;
}

.modal-content > p {
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.btn-primary {
    background: var(--primary-green);
    color: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-green);
}

/* Auth Modal Styles */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.auth-tab.active {
    color: var(--primary-green);
    border-bottom-color: var(--primary-green);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.password-requirements {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: clamp(0.8rem, 2vw, 0.85rem);
}

.password-requirements h4 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.password-requirements ul {
    list-style: none;
    padding-left: 0;
}

.password-requirements li {
    color: var(--primary-dark);
    margin-bottom: 0.3rem;
    padding-left: 1.5rem;
    position: relative;
}

.password-requirements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-green);
}

.form-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: clamp(0.85rem, 2vw, 0.9rem);
}

.form-footer a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-green);
    flex-shrink: 0;
}

.checkbox-group label {
    font-weight: normal;
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    color: var(--text-gray);
    margin: 0;
}

.success-alert {
    background: #d1fae5;
    border: 2px solid var(--primary-green);
    color: #065f46;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

/* Certificate Result Styles */
.certificate-result {
    margin-top: 1.5rem;
}

.loading {
    text-align: center;
    color: var(--text-gray);
    padding: 2rem 1rem;
}

.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-message {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: left;
}

.success-message h3 {
    color: #15803d;
    margin-bottom: 1rem;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
}

.verified-info p {
    color: #166534;
    margin-bottom: 0.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.certificates-list {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #86efac;
}

.certificates-list h4 {
    color: #15803d;
    margin-bottom: 1rem;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.certificate-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 6px;
    margin-bottom: 0.8rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cert-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.certificate-item > div {
    flex: 1;
}

.certificate-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.certificate-item small {
    color: var(--text-gray);
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    display: block;
    margin-bottom: 0.5rem;
}

.btn-download {
    background: var(--primary-green);
    color: var(--white);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.note {
    margin-top: 1rem;
    padding: 0.8rem;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    color: #92400e;
}

/* About Section */
.about-section {
    background: var(--white);
    padding: clamp(2rem, 8vw, 4rem) 0;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: var(--primary-green);
    text-align: center;
    margin-bottom: 3rem;
    font-weight: bold;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 2rem;
}

.about-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    color: var(--text-dark);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--text-gray);
    line-height: 1.6;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--primary-light);
    margin-bottom: 1rem;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-bottom: 0.5rem;
    text-decoration: none;
    font-size: clamp(0.85rem, 2vw, 0.9rem);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: clamp(0.8rem, 2vw, 0.85rem);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 1.5rem;
        max-width: 95%;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem 1rem;
    }

    .modal-content h2 {
        padding-right: 2.5rem;
    }

    .certificate-item {
        flex-direction: column;
        text-align: center;
    }

    .cert-icon {
        font-size: 2.5rem;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .sidebar,
    .btn-view,
    .btn-primary {
        display: none;
    }

    .modal {
        position: static;
        display: block !important;
    }

    .modal-overlay {
        display: none;
    }
}