/* ============================================
   MEKTEB.NET - Početna stranica
   Design: Moderan Islamski Minimalizam
   ============================================ */

/* CSS Variables - Design Tokens */
:root {
    --primary: oklch(0.5 0.15 170);
    --primary-light: oklch(0.65 0.12 170);
    --primary-dark: oklch(0.35 0.18 170);
    --background: oklch(1 0 0);
    --foreground: oklch(0.235 0.015 65);
    --card: oklch(1 0 0);
    --border: oklch(0.92 0.004 286.32);
    --muted: oklch(0.967 0.001 286.375);
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    --radius: 0.65rem;
    --radius-lg: 1rem;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.2);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    font-size: 16px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
}

p {
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

@media (min-width: 640px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    padding: var(--spacing-md) var(--spacing-sm);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.3) 100%);
    pointer-events: none;
}

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

.logo-container {
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: center;
}

.logo {
    height: 120px;
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

.hero-content h1 {
    color: var(--foreground);
    margin-bottom: var(--spacing-md);
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--foreground);
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in-delayed {
    animation: fadeIn 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out var(--delay, 0ms) forwards;
    opacity: 0;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

.projects {
    padding: var(--spacing-2xl) var(--spacing-sm);
    background: linear-gradient(to bottom, var(--background) 0%, rgba(0, 0, 0, 0.02) 100%);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xl);
    }
}

/* ============================================
   PROJECT CARD
   ============================================ */

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.project-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

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

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, var(--card) 100%);
    opacity: 0.3;
}

.project-content {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.project-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    display: inline-block;
}

.project-card h3 {
    color: var(--foreground);
    margin-bottom: var(--spacing-sm);
    transition: color 0.3s ease;
}

.project-card:hover h3 {
    color: var(--primary);
}

.project-card p {
    font-size: 0.95rem;
    color: var(--foreground);
    opacity: 0.75;
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.project-cta {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.project-card:hover .project-cta {
    gap: var(--spacing-sm);
}

.project-cta svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.project-card:hover .project-cta svg {
    transform: translateX(4px);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    padding: var(--spacing-md) var(--spacing-sm);
    border-top: 1px solid var(--border);
    background: var(--background);
    text-align: center;
}

.footer p {
    color: var(--foreground);
    opacity: 0.75;
    margin-bottom: var(--spacing-sm);
}

.footer-copyright {
    font-size: 0.875rem;
    opacity: 0.6 !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .hero {
        min-height: 50vh;
        padding: var(--spacing-xl) var(--spacing-sm);
    }

    .logo {
        height: 80px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .projects {
        padding: var(--spacing-xl) var(--spacing-sm);
    }

    .projects-grid {
        gap: var(--spacing-md);
    }

    .project-card {
        margin-bottom: var(--spacing-md);
    }

    .project-image {
        height: 180px;
    }

    .project-content {
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 45vh;
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .logo {
        height: 60px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .project-image {
        height: 160px;
    }

    .divider {
        height: 36px;
    }
}
/* ============================================
   QR CODE STYLING
   ============================================ */

.qr-code {
    width: 120px;
    height: 120px;
    display: block;
    margin: var(--spacing-lg) auto;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.qr-code:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.coffee-text {
    font-size: 0.95rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.85;
}

.support-link {
    color: var(--primary);
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.support-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    body {
        background: white;
    }

    .project-card {
        page-break-inside: avoid;
    }
}
