/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Reset dan Variabel */
:root {
    --gradient-start: #ffb74d;
    --gradient-middle: #ff9800;
    --gradient-end: #f57c00;
    --primary-light: #fff3e0;
    --primary: #ff9800;
    --primary-dark: #f57c00;
    --secondary: #ffb74d;
    --accent: #ff5722;
    --text-dark: #bf360c;
    --text-light: #ffffff;
    --text-muted: #6d4c41;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 4px 6px rgba(191, 54, 12, 0.1);
    --shadow-md: 0 6px 12px rgba(191, 54, 12, 0.15);
    --shadow-lg: 0 15px 25px rgba(191, 54, 12, 0.2);
    --border-radius-sm: 12px;
    --border-radius-md: 20px;
    --border-radius-lg: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-middle), var(--gradient-end));
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><circle cx="50" cy="50" r="40" fill="none" stroke="%23bf360c" stroke-width="2"/><path d="M30 30 L70 70 M70 30 L30 70" stroke="%23bf360c" stroke-width="2"/></svg>');
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Navbar Responsif */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(20px, 5vw, 24px);
    font-weight: 700;
    color: var(--text-dark);
}

.nav-brand i {
    color: var(--primary);
    font-size: clamp(24px, 6vw, 28px);
}

.nav-search {
    flex: 1;
    max-width: 400px;
    min-width: 250px;
}

.nav-search form {
    display: flex;
    gap: 8px;
}

.nav-search input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid rgba(191, 54, 12, 0.1);
    border-radius: 30px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

.nav-search button {
    width: 42px;
    height: 42px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-search button:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: clamp(10px, 2vw, 20px);
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.nav-links a:hover {
    background: rgba(255, 152, 0, 0.1);
    color: var(--primary);
}

/* Hero Section Responsif */
.hero {
    position: relative;
    padding: clamp(40px, 8vw, 80px) 20px clamp(60px, 10vw, 120px);
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 183, 77, 0.9), rgba(245, 124, 0, 0.9));
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 0 10px;
}

.hero h1 {
    font-size: clamp(28px, 6vw, 48px);
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--text-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease;
    line-height: 1.2;
}

.hero p {
    font-size: clamp(14px, 3vw, 18px);
    color: var(--text-dark);
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
    padding: 0 10px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: clamp(20px, 5vw, 50px);
    animation: fadeInUp 1s ease 0.4s both;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    min-width: 100px;
}

.stat-number {
    display: block;
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: clamp(12px, 2.5vw, 14px);
    color: var(--text-dark);
    opacity: 0.8;
}

.hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: auto;
}

/* Filter Section Responsif */
.filter-section {
    margin: clamp(-30px, -4vw, -50px) 0 40px;
    position: relative;
    z-index: 10;
    padding: 0 15px;
}

.filter-container {
    background: white;
    border-radius: clamp(20px, 4vw, 50px);
    padding: clamp(15px, 3vw, 30px);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.filter-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid rgba(191, 54, 12, 0.1);
    border-radius: 30px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-filter {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-filter:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-reset {
    padding: 10px 20px;
    background: rgba(191, 54, 12, 0.1);
    color: var(--text-dark);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-reset:hover {
    background: rgba(191, 54, 12, 0.2);
}

/* Recipes Grid Responsif */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(15px, 3vw, 30px);
    margin: 40px 0;
}

.recipe-card {
    background: white;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.recipe-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-image img {
    transform: scale(1.05);
}

.recipe-badge {
    position: absolute;
    top: 15px;
    right: 15px;
}

.kategori-badge {
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.recipe-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.recipe-title {
    font-size: clamp(16px, 4vw, 18px);
    margin-bottom: 8px;
    color: var(--text-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-desc {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-card-footer {
    margin-top: auto;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 12px;
    color: var(--text-muted);
}

.recipe-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.recipe-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-recipe {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-recipe:hover {
    background: var(--primary-dark);
    transform: translateX(5px);
}

/* Detail Resep Responsif */
.recipe-detail {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin: 30px 0;
}

.recipe-header {
    background: linear-gradient(135deg, var(--primary-light), white);
    padding: clamp(20px, 4vw, 40px);
    border-bottom: 1px solid rgba(191, 54, 12, 0.1);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-button:hover {
    color: var(--primary);
    transform: translateX(-5px);
}

.recipe-title-section {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.recipe-image-large {
    width: 100%;
    height: 300px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.recipe-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-info-large h1 {
    font-size: clamp(24px, 5vw, 32px);
    margin-bottom: 15px;
    color: var(--text-dark);
}

.recipe-description {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.8;
}

.recipe-meta-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--primary-light);
    border-radius: var(--border-radius-sm);
}

.meta-item i {
    font-size: 24px;
    color: var(--primary);
}

.meta-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.meta-value {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
}

.tingkat-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.tingkat-badge.mudah {
    background: #c8e6c9;
    color: #2e7d32;
}

.tingkat-badge.sedang {
    background: #fff3e0;
    color: #f57c00;
}

.tingkat-badge.sulit {
    background: #ffcdd2;
    color: #c62828;
}

.recipe-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    padding: clamp(20px, 4vw, 40px);
}

/* Ingredients Section */
.ingredients-section {
    background: var(--primary-light);
    padding: 25px;
    border-radius: var(--border-radius-md);
}

.ingredients-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 20px;
}

.ingredients-list {
    list-style: none;
}

.ingredients-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(191, 54, 12, 0.1);
    font-size: 14px;
}

.ingredients-list li i {
    color: var(--primary);
    font-size: 16px;
    margin-top: 2px;
}

/* Instructions Section */
.instructions-section {
    padding: 25px;
}

.instructions-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 20px;
}

.instructions-list {
    list-style: none;
    counter-reset: step-counter;
}

.instructions-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    counter-increment: step-counter;
    position: relative;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    padding-top: 5px;
    font-size: 14px;
    line-height: 1.6;
}

/* Video Section */
.video-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--primary-light);
}

.video-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 18px;
}

.video-placeholder {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    border-radius: var(--border-radius-md);
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.video-placeholder i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 10px;
}

.video-placeholder span {
    display: block;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.btn-video {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background: #ff0000;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-video:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

/* Recipe Navigation */
.recipe-navigation {
    display: flex;
    justify-content: space-between;
    padding: 20px 40px 40px;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-prev, .nav-next {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-dark);
    padding: 12px 20px;
    background: var(--primary-light);
    border-radius: 30px;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 350px;
}

.nav-prev:hover, .nav-next:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.nav-info {
    display: flex;
    flex-direction: column;
}

.nav-label {
    font-size: 11px;
    opacity: 0.7;
}

.nav-title {
    font-weight: 600;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination Responsif */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.page-link:hover, .page-link.active {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Footer Responsif */
.footer {
    background: rgba(191, 54, 12, 0.1);
    backdrop-filter: blur(10px);
    margin-top: 60px;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: clamp(20px, 4vw, 40px);
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.footer-section ul li i {
    color: var(--primary);
}

.level-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.level-dot.mudah {
    background: #2e7d32;
}

.level-dot.sedang {
    background: #f57c00;
}

.level-dot.sulit {
    background: #c62828;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(191, 54, 12, 0.2);
    color: var(--text-muted);
    font-size: 13px;
}

.fa-heart {
    color: #ff4081;
}

/* Empty State Responsif */
.empty-state {
    text-align: center;
    padding: clamp(40px, 8vw, 80px) 20px;
    background: white;
    border-radius: var(--border-radius-lg);
    grid-column: 1 / -1;
}

.empty-state i {
    color: var(--primary-light);
    margin-bottom: 15px;
    font-size: clamp(2rem, 5vw, 3rem);
}

.empty-state h3 {
    font-size: clamp(18px, 4vw, 24px);
    margin-bottom: 8px;
    color: var(--text-dark);
}

.empty-state p {
    color: var(--text-muted);
    font-size: clamp(13px, 3vw, 14px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .recipe-title-section {
        grid-template-columns: 250px 1fr;
    }
    
    .recipe-meta-large {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .recipe-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
    }
    
    .nav-brand {
        justify-content: center;
    }
    
    .nav-search {
        max-width: 100%;
        width: 100%;
    }
    
    .nav-links {
        justify-content: center;
        width: 100%;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .btn-filter, .btn-reset {
        width: 100%;
        justify-content: center;
    }
    
    .recipe-title-section {
        grid-template-columns: 1fr;
    }
    
    .recipe-image-large {
        height: 250px;
    }
    
    .recipe-meta-large {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .recipe-navigation {
        flex-direction: column;
    }
    
    .nav-prev, .nav-next {
        max-width: 100%;
    }
    
    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .hero {
        padding: 30px 12px 50px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat {
        min-width: auto;
    }
    
    .recipe-meta-large {
        grid-template-columns: 1fr;
    }
    
    .meta-item {
        padding: 10px;
    }
    
    .ingredients-section, .instructions-section {
        padding: 15px;
    }
    
    .instructions-list li {
        flex-direction: column;
        gap: 5px;
    }
    
    .step-number {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .page-link {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
    .btn-filter:hover, .btn-reset:hover, .btn-recipe:hover {
        transform: none;
    }
    
    .nav-links a, .btn-filter, .btn-reset, .btn-recipe {
        padding: 12px 15px;
    }
}