/**
 * MY-TASTE - Main Stylesheet
 * 
 * Dit bestand bevat de basis stijlen die voor alle thema's gelden.
 * Thema-specifieke kleuren worden in de theme bestanden gedefineerd.
 */

/* =====================================================
   CSS RESET & BASE
   ===================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary, 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: var(--text-base, 1rem);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */
:root {
    --font-primary: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

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

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

p {
    margin-bottom: 1rem;
}

/* =====================================================
   LAYOUT
   ===================================================== */
.main-content {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

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

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
    background: var(--bg-card);
    box-shadow: 0 2px 10px var(--shadow);
    padding: 0.75rem 0;
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-xl);
    color: var(--primary) !important;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.brand-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary);
    background: var(--bg-secondary);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(45, 52, 54, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Search in navbar */
.navbar .input-group {
    min-width: 200px;
}

.navbar .form-control {
    border-radius: 20px 0 0 20px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}

.navbar .btn-outline-primary {
    border-radius: 0 20px 20px 0;
    border-left: none;
}

/* Theme dropdown */
.theme-dropdown {
    min-width: 180px;
}

.theme-preview {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 0.5rem;
    border: 2px solid var(--border);
}

.theme-preview-light { background: linear-gradient(135deg, #FFFBF7, #FF6B35); }
.theme-preview-dark { background: linear-gradient(135deg, #1A1A2E, #FF7B4A); }
.theme-preview-warm-kitchen { background: linear-gradient(135deg, #FAF3E3, #C1440E); }
.theme-preview-cyberpunk { background: linear-gradient(135deg, #0D0D0D, #FF00FF); }
.theme-preview-pastel { background: linear-gradient(135deg, #FEFEFE, #B8A9C9); }

/* Notification dropdown */
.notification-dropdown {
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    color: var(--text-primary);
}

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

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

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: var(--text-lg);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--text-sm);
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
    background: var(--bg-card);
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow);
}

.card-img-top {
    aspect-ratio: 16/10;
    object-fit: cover;
    width: 100%;
}

.card-body {
    padding: 1.25rem;
}

.card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* Recipe Card Specifiek */
.recipe-card {
    position: relative;
}

.recipe-card__image-wrapper {
    position: relative;
    overflow: hidden;
}

.recipe-card__badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.recipe-card__time {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
}

.recipe-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.recipe-card__author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recipe-card__author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.recipe-card__author span {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* =====================================================
   TAGS & BADGES
   ===================================================== */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.tag i {
    font-size: 0.7rem;
}

/* Dietary Tags */
.tag-veganistisch, .tag-vegan { background: #D4EDDA; color: #155724; }
.tag-vegetarisch, .tag-vegetarian { background: #D4EDDA; color: #155724; }
.tag-glutenvrij, .tag-gluten-free { background: #FFF3CD; color: #856404; }
.tag-lactosevrij, .tag-lactose-free { background: #D1ECF1; color: #0C5460; }
.tag-suikervrij, .tag-sugar-free { background: #F8D7DA; color: #721C24; }
.tag-keto { background: #E2D5F1; color: #5A3E85; }
.tag-halal { background: #D1F2EB; color: #0E6655; }
.tag-kosher { background: #D6EAF8; color: #1A5276; }

/* Difficulty Tags */
.tag-makkelijk, .tag-easy { background: #D4EDDA; color: #155724; }
.tag-gemiddeld, .tag-medium { background: #FFF3CD; color: #856404; }
.tag-gevorderd, .tag-advanced { background: #F8D7DA; color: #721C24; }

/* Category Tags */
.tag-category {
    background: var(--primary);
    color: white;
}

/* Badge component */
.badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.25rem;
}

/* =====================================================
   RATING STARS
   ===================================================== */
.rating {
    display: inline-flex;
    gap: 0.125rem;
}

.rating__star {
    color: var(--warning, #FDCB6E);
    font-size: 1.125rem;
}

.rating__star--empty {
    color: var(--text-muted);
}

.rating__star--half {
    position: relative;
}

.rating__value {
    font-weight: 700;
    margin-left: 0.5rem;
}

.rating__count {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-left: 0.25rem;
}

/* Interactive Rating */
.rating-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.25rem;
}

.rating-input input {
    display: none;
}

.rating-input label {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
    color: var(--warning, #FDCB6E);
}

/* =====================================================
   FORMS
   ===================================================== */
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.625rem 1rem;
    font-size: var(--text-base);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-text {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.input-group-text {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Checkbox & Radio */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border);
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.alert-success {
    background: rgba(0, 184, 148, 0.1);
    color: #00B894;
}

.alert-danger {
    background: rgba(225, 112, 85, 0.1);
    color: #E17055;
}

.alert-warning {
    background: rgba(253, 203, 110, 0.1);
    color: #E17055;
}

.alert-info {
    background: rgba(46, 196, 182, 0.1);
    color: #2EC4B6;
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/pattern.svg') repeat;
    opacity: 0.05;
}

.hero__title {
    font-size: var(--text-5xl);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero__buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero__title {
        font-size: var(--text-3xl);
    }
    
    .hero__subtitle {
        font-size: var(--text-lg);
    }
}

/* =====================================================
   SECTION HEADERS
   ===================================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* =====================================================
   RECIPE GRID
   ===================================================== */
.recipe-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

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

@media (min-width: 992px) {
    .recipe-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

/* Horizontal scroll voor mobile */
.recipe-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.recipe-scroll::-webkit-scrollbar {
    height: 6px;
}

.recipe-scroll::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.recipe-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.recipe-scroll > * {
    scroll-snap-align: start;
    flex: 0 0 280px;
}

/* =====================================================
   COMMENTS
   ===================================================== */
.comment {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.comment:last-child {
    border-bottom: none;
}

.comment__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment__content {
    flex: 1;
}

.comment__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.comment__author {
    font-weight: 700;
    color: var(--text-primary);
}

.comment__time {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.comment__text {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.comment__actions {
    display: flex;
    gap: 1rem;
}

.comment__action {
    font-size: var(--text-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

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

/* Nested comments */
.comment__replies {
    margin-left: 3.5rem;
    margin-top: 1rem;
}

/* =====================================================
   FLOATING ACTION BUTTON
   ===================================================== */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 100;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.5);
    color: white;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--primary);
}

.footer-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    transition: color 0.2s ease;
}

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

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
}

/* =====================================================
   COOKIE BANNER
   ===================================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    box-shadow: 0 -4px 20px var(--shadow);
    padding: 1rem 0;
    z-index: 1050;
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination {
    display: flex;
    gap: 0.25rem;
}

.page-item .page-link {
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    font-weight: 600;
}

.page-item .page-link:hover {
    background: var(--primary);
    color: white;
}

.page-item.active .page-link {
    background: var(--primary);
    color: white;
}

.page-item.disabled .page-link {
    color: var(--text-muted);
    background: transparent;
}

/* =====================================================
   LOADING STATES
   ===================================================== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-secondary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =====================================================
   EMPTY STATES
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state__icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state__title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state__text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }
.bg-card { background-color: var(--bg-card) !important; }

.rounded-lg { border-radius: 16px !important; }
.shadow-sm { box-shadow: 0 2px 10px var(--shadow) !important; }
.shadow { box-shadow: 0 4px 20px var(--shadow) !important; }
.shadow-lg { box-shadow: 0 8px 30px var(--shadow) !important; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =====================================================
   GROUP CARDS
   ===================================================== */
.group-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-lg);
}

a.card {
    color: inherit;
}

a.card:hover {
    text-decoration: none;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
.fade-in {
    animation: fadeIn 0.3s ease;
}

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

.slide-up {
    animation: slideUp 0.3s ease;
}

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

/* =====================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================== */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
    
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl); }
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}
