/*
 * Developer: Muhammad Owais Aamir
 * Contact: owaisaamir140@gmail.com
 * Phone: 03445926200
 * Custom Styles for German Language Centre
 */

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

body {
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color, #DC2626);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color, #B91C1C);
    filter: brightness(0.9);
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Button Styles */
.btn-primary {
    background: var(--primary-color, #DC2626);
    color: var(--text-color, white);
    padding: 12px 32px;
    border-radius: var(--button-radius, 8px);
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-color, #B91C1C);
    filter: brightness(0.9);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
    background: var(--secondary-color, #FBBF24);
    color: var(--background-color, #000);
    padding: 12px 32px;
    border-radius: var(--button-radius, 8px);
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--secondary-color, #F59E0B);
    filter: brightness(0.9);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color, #DC2626);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color, #DC2626);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

/* Alert Styles */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #6EE7B7;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FCD34D;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* Courses Section */
.section {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.courses-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.course-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.course-header {
    padding: 20px;
    color: #fff;
}

.course-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.course-level {
    margin-top: 8px;
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border-radius: 9999px;
    padding: 4px 10px;
    font-size: 0.85rem;
}

.course-body {
    padding: 20px;
}

.course-description p {
    color: #374151;
    line-height: 1.6;
}

.course-features h4 {
    margin-top: 16px;
    margin-bottom: 8px;
    color: #111827;
}

.course-features ul {
    list-style: none;
    padding-left: 0;
}

.course-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #111827;
    margin-bottom: 8px;
}

.course-features li i {
    color: #16a34a; /* green check */
    margin-top: 2px;
}

.course-details {
    margin-top: 16px;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
}

.detail-item i {
    color: #ef4444; /* accent icon color */
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 16px;
}

.fade-in {
    animation: fadeIn 0.6s ease-out both;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #DC2626 0%, #FBBF24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-pattern {
    background-image: 
        linear-gradient(45deg, #f3f4f6 25%, transparent 25%),
        linear-gradient(-45deg, #f3f4f6 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f3f4f6 75%),
        linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color, #DC2626), var(--secondary-color, #FBBF24));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Theme Utility Classes (mapped to dynamic_theme.php variables) */
.bg-primary { background-color: var(--primary-color, #DC2626); }
.text-primary { color: var(--primary-color, #DC2626); }
.border-primary { border-color: var(--primary-color, #DC2626); }

.bg-secondary { background-color: var(--secondary-color, #FBBF24); }
.text-secondary { color: var(--secondary-color, #FBBF24); }
.border-secondary { border-color: var(--secondary-color, #FBBF24); }

.bg-dark { background-color: var(--dark-color, #000000); }
.text-dark { color: var(--dark-color, #000000); }
.border-dark { border-color: var(--dark-color, #000000); }

.bg-light { background-color: var(--light-color, #FFFFFF); }
.text-light { color: var(--light-color, #FFFFFF); }
.border-light { border-color: var(--light-color, #FFFFFF); }

/* Hover helpers for primary/secondary (optional usage) */
.hover-primary:hover { color: var(--primary-color, #DC2626); }
.hover-bg-primary:hover { background-color: var(--primary-color, #DC2626); }
.hover-secondary:hover { color: var(--secondary-color, #FBBF24); }
.hover-bg-secondary:hover { background-color: var(--secondary-color, #FBBF24); }




/* ========================================
   ADMIN PANEL STYLES
   ======================================== */

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f9fafb;
}

.admin-sidebar {
    width: 260px;
    background: #1a1a1a;
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: #dc2626;
    text-align: center;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #ddd;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover {
    background: #2d2d2d;
    color: #fff;
    padding-left: 30px;
}

.sidebar-nav a.active {
    background: #dc2626;
    color: #fff;
    border-left: 4px solid #fff;
}

.admin-main {
    margin-left: 260px;
    flex: 1;
    padding: 20px;
}

.admin-header {
    background: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.admin-header h1 {
    font-size: 1.8rem;
    color: #1a1a1a;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.admin-user i {
    font-size: 1.5rem;
}

.admin-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-card h3 {
    margin-bottom: 20px;
    color: #1a1a1a;
}

/* Activity Section */
.activity-section {
    margin-bottom: 30px;
}

.activity-section h3 {
    margin-bottom: 20px;
    color: #1a1a1a;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #dc2626;
}

.activity-item i {
    font-size: 1.5rem;
    color: #dc2626;
}

.activity-item p {
    margin: 0;
    color: #1a1a1a;
}

.activity-item span {
    color: #666;
    font-size: 0.85rem;
}

/* Quick Actions */
.quick-actions h3 {
    margin-bottom: 20px;
    color: #1a1a1a;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Data Table */
.data-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.data-table thead {
    background: #1a1a1a;
    color: #fff;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table .text-center {
    text-align: center;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-a1 {
    background: #fee2e2;
    color: #dc2626;
}

.badge-a2 {
    background: #ffedd5;
    color: #ea580c;
}

.badge-b1 {
    background: #fef3c7;
    color: #ca8a04;
}

.badge-b2 {
    background: #d1fae5;
    color: #16a34a;
}

.badge-active {
    background: #d1fae5;
    color: #16a34a;
}

.badge-inactive {
    background: #fee2e2;
    color: #dc2626;
}

.badge-published {
    background: #d1fae5;
    color: #16a34a;
}

.badge-draft {
    background: #e5e7eb;
    color: #666;
}

.badge-new {
    background: #dc2626;
    color: #fff;
}

/* Buttons */
.btn-icon {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

.btn-icon.btn-danger:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background: #fff;
    margin: 50px auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-content.modal-large {
    max-width: 800px;
}

.modal-header {
    padding: 20px 30px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #dc2626;
}

.modal form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #1a1a1a;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #dc2626;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Filter Section */
.filter-section {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-section .form-control {
    padding: 10px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    font-size: 1rem;
}

/* Course Cards */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.course-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.course-header {
    padding: 30px;
    color: #fff;
    text-align: center;
}

.course-header h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.course-level {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.9rem;
}

.course-body {
    padding: 30px;
}

.course-description {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

.course-features h4 {
    color: #1a1a1a;
    margin-bottom: 15px;
}

.course-features ul {
    list-style: none;
    padding: 0;
}

.course-features li {
    padding: 8px 0;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-features li i {
    color: #16a34a;
}

.course-details {
    margin: 20px 0;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    color: #666;
}

.detail-item i {
    color: #dc2626;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
}

.feature-card h3 {
    color: #1a1a1a;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.resource-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.resource-card:hover {
    transform: translateY(-5px);
}

.resource-icon {
    font-size: 3rem;
    color: #dc2626;
    margin-bottom: 15px;
}

.resource-card h4 {
    color: #1a1a1a;
    margin-bottom: 10px;
}

.resource-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.resource-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #666;
}

.resource-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Messaging Layout */
.messaging-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    min-height: 600px;
}

.message-list {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.message-tabs {
    display: flex;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.tab-btn.active {
    background: #fff;
    color: #dc2626;
    border-bottom: 3px solid #dc2626;
}

.messages-container {
    max-height: 550px;
    overflow-y: auto;
}

.message-item {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.3s;
}

.message-item:hover {
    background: #f9fafb;
}

.message-item.unread {
    background: #fef3c7;
}

.message-sender {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.message-subject {
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.message-preview {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.message-date {
    color: #999;
    font-size: 0.75rem;
}

.message-view {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
}

.message-header h3 {
    color: #1a1a1a;
    margin-bottom: 15px;
}

.message-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    color: #666;
    font-size: 0.9rem;
}

.message-body {
    color: #1a1a1a;
    line-height: 1.8;
    margin-bottom: 30px;
}

.message-actions {
    display: flex;
    gap: 15px;
}

/* Question Block */
.question-block {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #dc2626;
}

.question-block h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #1a1a1a;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 220px;
    }
    
    .admin-main {
        margin-left: 220px;
    }
    
    .messaging-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}
