/**
 * Iqra Learn - Main Stylesheet
 * Professional landing page styles with modern design patterns
 */

/* ============================================
   CSS Variables (Design Tokens)
   ============================================ */
:root {
    /* Colors */
    --color-primary: #2563eb;
    --color-primary-dark: #1e40af;
    --color-secondary: #667eea;
    --color-secondary-dark: #764ba2;
    --color-text: #333;
    --color-text-light: #64748b;
    --color-text-dark: #1e293b;
    --color-bg: #fff;
    --color-bg-light: #f8f9fa;
    --color-bg-dark: #1e293b;
    
    /* Typography */
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.6;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Layout */
    --container-max-width: 1200px;
    --container-padding: 20px;
    
    /* Transitions */
    --transition-base: 0.3s ease;
    --transition-fast: 0.2s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 10px 25px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 50px;
    
    /* Z-index */
    --z-header: 1000;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Layout Components
   ============================================ */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

/* ============================================
   Header & Navigation
   ============================================ */
header {
    background: var(--color-bg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    transition: box-shadow var(--transition-base);
}

header.scrolled {
    box-shadow: var(--shadow-md);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: color var(--transition-base);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    color: var(--color-bg);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.95;
    font-weight: 300;
    animation: fadeInUp 1s ease;
}

/* ============================================
   Buttons
   ============================================ */
.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--color-bg);
    color: var(--color-secondary);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform var(--transition-base), 
                box-shadow var(--transition-base),
                background var(--transition-base);
    animation: fadeInUp 1.2s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.cta-button:active {
    transform: translateY(-1px);
}

.cta-button--primary {
    background: var(--color-bg);
    color: var(--color-secondary);
}

.cta-button--secondary {
    background: var(--color-bg);
    color: var(--color-primary);
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: 80px 0;
    background: var(--color-bg-light);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-dark);
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.feature-card {
    background: var(--color-bg);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), 
                box-shadow var(--transition-base);
    text-align: left;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
    font-weight: 600;
}

.feature-card p {
    color: var(--color-text-light);
    line-height: 1.8;
}

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

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
    font-weight: 300;
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: var(--color-bg-dark);
    color: var(--color-bg);
    padding: 40px 0;
    text-align: center;
}

footer p {
    opacity: 0.8;
    margin-bottom: var(--spacing-xs);
}

footer p:last-child {
    margin-bottom: 0;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --container-padding: 15px;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .features {
        padding: 60px 0;
    }
    
    .features h2 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    .cta-section {
        padding: 60px 0;
    }
    
    .cta-section h2 {
        font-size: 2rem;
    }
    
    .cta-section p {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .features h2,
    .cta-section h2 {
        font-size: 1.75rem;
    }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    header,
    footer,
    .cta-section {
        display: none;
    }
    
    .hero {
        background: none;
        color: var(--color-text);
    }
}

