/* =====================================================
   ISLAMIC ECOSYSTEM PLATFORM - MAIN STYLESHEET
   Inspired by Apple, Stripe, Airbnb, Linear
   ===================================================== */

/* CSS Variables */
:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary: #6366f1;
    --secondary-dark: #4f46e5;
    --dark: #1f2937;
    --darker: #111827;
    --light: #f9fafb;
    --lighter: #ffffff;
    --gray: #6b7280;
    --gray-light: #9ca3af;
    --gray-lighter: #e5e7eb;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --success: #10b981;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--dark);
    background-color: var(--lighter);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--gray);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

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

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

.btn-light {
    background: white;
    color: var(--dark);
    border: 1px solid var(--gray-lighter);
}

.btn-light:hover {
    background: var(--light);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar-scrolled {
    padding: 0.75rem 0;
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary) !important;
}

.navbar-brand i {
    margin-right: 8px;
}

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
    color: var(--dark) !important;
}

.nav-link:hover {
    color: var(--primary) !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    overflow: hidden;
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, #fff, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2.5rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

/* Course Cards */
.course-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

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

.course-image {
    position: relative;
    overflow: hidden;
    height: 180px;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.course-badge.free {
    background: var(--success);
    color: white;
}

.course-badge.paid {
    background: var(--warning);
    color: white;
}

.course-content {
    padding: 1.5rem;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--gray);
}

.course-meta i {
    margin-right: 0.25rem;
}

.course-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.rating {
    color: var(--warning);
}

/* Mosque Cards */
.mosque-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.mosque-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Imam Cards */
.imam-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.imam-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Testimonial Cards */
.testimonial-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin: 1rem;
}

.quote-icon {
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.author-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/* Step Cards */
.step-card {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
}

.step-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 4rem 0;
}

.cta-wrapper {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 3rem;
    backdrop-filter: blur(10px);
}

/* Footer */
.footer {
    background: var(--darker);
    color: var(--gray-light);
    padding: 4rem 0 2rem;
}

.footer h3, .footer h4 {
    color: white;
    margin-bottom: 1.5rem;
}

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

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer ul li a {
    color: var(--gray-light);
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: 10px;
    background: var(--gray-lighter);
    overflow: hidden;
}

.progress-bar {
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--radius);
    border: 1px solid var(--gray-lighter);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    outline: none;
}

/* Alerts */
.alert {
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Modal */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--gray-lighter);
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-lighter);
    padding: 1.25rem 1.5rem;
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .hero-section h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .hero-section { padding: 100px 0 60px; }
    .hero-section h1 { font-size: 2rem; }
    .feature-card, .course-card, .imam-card { margin-bottom: 1rem; }
    .cta-wrapper { padding: 2rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    h1 { font-size: 1.75rem; }
    .btn-lg { padding: 0.5rem 1rem; font-size: 1rem; }
    .stats-grid { grid-template-columns: 1fr; }
}

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

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

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

.slide-in {
    animation: slideIn 0.5s ease forwards;
}

/* Utility Classes */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-danger { background: var(--danger); }
.bg-warning { background: var(--warning); }
.bg-info { background: var(--info); }

.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.cursor-pointer { cursor: pointer; }
.transition { transition: all 0.3s ease; }