/* ================== Global Styles ================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-radius: 16px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #ffffff;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

.main-content {
    min-height: 60vh;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #111827;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    z-index: 9999;
    text-decoration: none;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
}

/* ================== Buttons ================== */
.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    min-height: 44px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.dropdown-link:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
}

.btn-secondary:hover {
    background-color: var(--text-dark);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-lg {
    padding: 14px 40px;
    font-size: 16px;
}

/* ================== Messages ================== */
.messages-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

/* ================== Card & Dashboard Styles ================== */
.card {
    background-color: white;
    border-radius: 24px;
    border: 1px solid #eef2ff;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header {
    background-color: #f8fbff;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.card-body {
    padding: 24px;
}

.analytics-panel {
    border-radius: 24px;
}

.analytics-panel-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.analytics-filter-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.filter-label {
    color: var(--text-dark);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.select-inline {
    min-width: 180px;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 14px;
}

.form-control {
    width: 100%;
    min-width: 190px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #d4d4d8;
    font-size: 1rem;
    background-color: #fafafa;
    color: var(--text-dark);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.analytics-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.analytics-summary-card {
    min-height: 150px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 0.75rem;
}

.metric-meta {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.analytics-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.analytics-main-card,
.analytics-side-card {
    display: grid;
}

.analytics-table-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.table th,
.table td {
    padding: 16px 14px;
    border-bottom: 1px solid #f3f4f6;
    text-align: left;
    color: var(--text-dark);
}

.table thead th {
    font-weight: 700;
    color: var(--text-dark);
    background-color: #f8fbff;
}

.table-striped tbody tr:nth-child(odd) {
    background-color: #f9fafb;
}

.table-responsive {
    overflow-x: auto;
}

.page-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.section-header {
    margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
    .analytics-card-grid,
    .analytics-table-grid {
        grid-template-columns: 1fr;
    }

    .analytics-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .analytics-panel-body {
        justify-content: flex-start;
    }

    .card-body {
        padding: 20px;
    }
}

/* ================== Header */

.message {
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid;
}

.message-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left-color: var(--success-color);
}

.message-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left-color: var(--danger-color);
}

.message-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left-color: var(--warning-color);
}

.message-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left-color: var(--primary-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ================== Header ================== */
.header {
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 82px;
    gap: 18px;
}

.logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 220px;
    padding-right: 18px;
    border-right: 1px solid #e5e7eb;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    --branding-logo-size: 44px;
    --branding-brand-font-family: 'Poppins', sans-serif;
    --branding-brand-font-size: 30px;
    --branding-brand-font-weight: 800;
    --branding-brand-color-start: var(--primary-color);
    --branding-brand-color-end: var(--secondary-color);
    --branding-tagline-font-family: 'Poppins', sans-serif;
    --branding-tagline-font-size: 13px;
    --branding-tagline-font-weight: 600;
    --branding-tagline-color: #4b5563;
}

.logo-mark {
    width: var(--branding-logo-size);
    height: var(--branding-logo-size);
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    flex: 0 0 var(--branding-logo-size);
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo h1 {
    font-size: var(--branding-brand-font-size);
    font-family: var(--branding-brand-font-family);
    font-weight: var(--branding-brand-font-weight);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--branding-brand-color-start) 0%, var(--branding-brand-color-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: var(--branding-tagline-font-size);
    color: var(--branding-tagline-color);
    font-family: var(--branding-tagline-font-family);
    font-weight: var(--branding-tagline-font-weight);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.navbar {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.mobile-menu-toggle {
    display: none;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    padding: 8px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.mobile-menu-toggle-bar {
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--text-dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
}

.auth-buttons {
    display: flex;
    gap: 12px;
    flex: 0 0 auto;
}

/* ================== Hero Section ================== */
.hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    padding: 100px 20px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ================== Panels Section ================== */
.panels-section {
    padding: 80px 20px;
    background-color: var(--bg-light);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-dark);
}

.panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.cert-ad-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 30px auto 0;
}

.advert-panel {
    align-items: stretch;
}

.advert-caption {
    width: 100%;
    text-align: center;
}

.advert-media-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.advert-media {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    max-height: 240px;
    object-fit: cover;
}

/* ================== Panel Component (ROUNDED) ================== */
.panel {
    background-color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.panel:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.panel-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: inline-block;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
}

.panel-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.panel-description {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.8;
    flex-grow: 1;
}

.panel-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    align-self: center;
}

.panel-btn:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

/* ================== Featured Courses Section ================== */
.featured-courses {
    padding: 80px 20px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
}

.course-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.course-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.course-image {
    font-size: 48px;
}

.course-body {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.course-level {
    margin-bottom: 16px;
}

.badge {
    background-color: #e0e7ff;
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.course-students {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
    flex-grow: 1;
}

/* ================== Admin Card Section ================== */
.admin-card-section {
    padding: 60px 20px;
    background-color: #ffffff;
}

.admin-card {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, #f3f4ff 0%, #fff0f6 100%);
    border-radius: var(--border-radius);
    padding: 36px 40px;
    box-shadow: var(--shadow-md);
}

.admin-card-content {
    max-width: 720px;
}

.admin-label {
    color: var(--secondary-color);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.admin-title {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.admin-description {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 16px;
}

.admin-card .btn-primary {
    min-width: 180px;
    padding: 16px 24px;
}

.admin-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ================== CTA Section ================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 80px 20px;
    text-align: center;
    color: white;
}

.cta-section h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.cta-section .btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.cta-section .btn-primary:hover {
    background-color: #f3f4f6;
}

/* ================== Footer ================== */
.footer {
    background-color: #1f2937;
    color: #d1d5db;
    padding: 60px 20px 20px;
}

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

.footer-section h3 {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

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

.footer-heading-link:hover {
    color: inherit;
    text-decoration: underline;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer .social-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer .social-links .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: max-content;
    min-height: 40px;
    padding: 10px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    transition: all 0.3s ease;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: visible;
}

.footer .social-links .social-icon:hover {
    background-color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #9ca3af;
}

/* ================== Responsive Design ================== */
@media (max-width: 768px) {
    .header-container {
        min-height: 70px;
        padding: 12px 16px;
    }

    .logo {
        min-width: 0;
        padding-right: 0;
        border-right: none;
        max-width: calc(100% - 58px);
    }

    .logo-mark {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
    }

    .logo h1 {
        font-size: 28px;
    }

    .tagline {
        font-size: 11px;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .header-right {
        display: none;
        order: 3;
        width: 100%;
        margin-top: 12px;
        padding: 12px;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        background-color: #ffffff;
        box-shadow: var(--shadow-sm);
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .header-right.is-open {
        display: flex;
    }

    .navbar {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-menu {
        width: 100%;
        gap: 8px;
        justify-content: flex-start;
        flex-direction: column;
    }

    .nav-link {
        display: block;
        padding: 12px;
        border-radius: 10px;
        background-color: #f8fafc;
        min-height: 44px;
    }

    .nav-link.active::after {
        display: none;
    }

    .auth-buttons {
        width: 100%;
        margin-left: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .auth-buttons .btn {
        width: 100%;
    }

    .nav-item.dropdown {
        width: 100%;
    }

    .nav-item.dropdown .dropdown-toggle {
        display: block;
        width: 100%;
    }

    .nav-item.dropdown .dropdown-menu {
        margin-top: 8px;
        border-radius: 10px;
        padding: 6px;
        background-color: #f8fafc;
    }

    .nav-item.dropdown.open .dropdown-menu {
        display: block;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .panels-grid {
        grid-template-columns: 1fr;
    }

    .cert-ad-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .cta-section h2 {
        font-size: 28px;
    }

    .cta-section p {
        font-size: 16px;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 10px 12px;
    }

    .logo h1 {
        font-size: 22px;
    }

    .auth-buttons {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 24px;
    }

    .panel {
        padding: 28px 20px;
    }

    .panel-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* ================== Instructors Section ================== */
.instructors-hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    padding: 60px 20px;
    text-align: center;
}

.instructors-hero h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.instructors-hero p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.instructors-grid {
    padding: 60px 20px;
    background-color: var(--bg-light);
}

.instructor-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.instructor-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.instructor-avatar {
    margin-bottom: 20px;
}

.avatar-emoji {
    font-size: 48px;
    display: inline-block;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.instructor-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.specialization {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 16px;
}

.instructor-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.stat i {
    color: var(--primary-color);
}

.instructor-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.no-instructors {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-instructors h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

/* ================== Instructor Detail ================== */
.instructor-detail {
    padding: 60px 20px;
}

.instructor-profile {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

.instructor-avatar-large {
    display: flex;
    justify-content: center;
    align-items: center;
}

.instructor-avatar-large .avatar-emoji {
    width: 120px;
    height: 120px;
    font-size: 60px;
}

.profile-info h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.profile-info .specialization {
    font-size: 16px;
    margin-bottom: 24px;
}

.instructor-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat {
    text-align: center;
    padding: 16px;
    background-color: var(--bg-light);
    border-radius: 12px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.bio-section p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 32px;
}

.contact-section h2 {
    margin-bottom: 20px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: var(--bg-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background-color: white;
    box-shadow: var(--shadow-sm);
}

.contact-item i {
    color: var(--primary-color);
    width: 20px;
}

.contact-item a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    color: var(--primary-color);
}

/* ================== Admin Styles for Instructors ================== */
.admin-section {
    padding: 60px 20px;
    background-color: var(--bg-light);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.admin-table-container {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background-color: var(--bg-light);
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 1px solid #e5e7eb;
}

.admin-table td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.admin-table tr:hover {
    background-color: var(--bg-light);
}

.instructor-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-emoji-small {
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
}

.admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.no-data {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.admin-form-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    max-width: 800px;
    margin: 0 auto;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.form-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input,
.form-textarea {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-errors {
    color: var(--danger-color);
    font-size: 12px;
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.admin-delete-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.delete-header {
    margin-bottom: 32px;
}

.delete-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.delete-warning {
    color: var(--danger-color);
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.instructor-summary {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding: 24px;
    background-color: var(--bg-light);
    border-radius: 12px;
}

.instructor-details h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.instructor-details .specialization {
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.instructor-details .instructor-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.delete-form .form-actions {
    justify-content: center;
}

/* ================== Responsive Design for Instructors ================== */
@media (max-width: 768px) {
    .instructors-hero h1 {
        font-size: 28px;
    }

    .instructor-card {
        padding: 24px;
    }

    .profile-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }

    .instructor-avatar-large .avatar-emoji {
        width: 100px;
        height: 100px;
        font-size: 50px;
    }

    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-table {
        font-size: 14px;
    }

    .admin-table th,
    .admin-table td {
        padding: 12px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .instructor-summary {
        flex-direction: column;
        text-align: center;
    }
}

/* ================== Cookie Consent Banner ================== */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    padding: 20px;
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-text h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.cookie-consent-text p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.cookie-consent-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-consent-text a:hover {
    color: var(--secondary-color);
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-consent-buttons .btn {
    white-space: nowrap;
}

/* Cookie Policy Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    padding: 20px;
}

.cookie-modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.cookie-modal-body {
    padding: 24px 32px;
}

.cookie-modal-body h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 20px 0 12px 0;
}

.cookie-modal-body h4:first-child {
    margin-top: 0;
}

.cookie-modal-body p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Responsive Cookie Banner */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .cookie-consent-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .cookie-consent-buttons .btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 16px;
    }

    .cookie-modal-content {
        margin: 10px;
        max-height: 90vh;
    }

    .cookie-modal-header,
    .cookie-modal-body {
        padding: 16px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
