/* Custom Styles for Recipe Website */

/* Reset and General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

/* Custom Logo Styling */
.custom-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.custom-logo:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.logo-icon {
    background: linear-gradient(135deg, #ff8c42, #ff6b35, #d63031, #e17055);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.logo-icon i {
    color: white;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.logo-text {
    font-family: 'Fredoka One', cursive;
    font-size: 1.7rem;
    background: linear-gradient(135deg, #ff8c42, #ff6b35, #d63031, #e17055);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
    position: relative;
    font-weight: 400;
}

.logo-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #ff8c42, #ff6b35);
    transition: width 0.3s ease;
}

.custom-logo:hover .logo-text::after {
    width: 100%;
}

.custom-logo:hover .logo-icon {
    transform: rotate(360deg);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.6);
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(255, 140, 66, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 140, 66, 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 140, 66, 0.4);
    }
}

/* Responsive Logo */
@media (max-width: 768px) {
    .logo-text {
        font-size: 1.4rem;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
        margin-right: 8px;
    }
    
    .logo-icon i {
        font-size: 1rem;
    }
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.navbar-nav .nav-link:hover {
    color: #ffc107 !important;
}

/* Search Form */
.navbar .input-group {
    min-width: 250px;
}

/* Breadcrumb */
.breadcrumb {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.card-body {
    padding: 1.25rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.card-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Recipe Meta */
.recipe-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.recipe-meta .badge {
    font-size: 0.75rem;
}

/* Category Cards */
.category-card {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.category-card:hover {
    color: white;
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.category-card .category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Hero Section */
.hero-section {
    background-image: url('https://i.ibb.co.com/RkZ72Drv/bg-resep.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    animation: backgroundMove 20s ease-in-out infinite;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.8) 0%, rgba(10, 88, 202, 0.9) 100%);
    z-index: 1;
    animation: overlayPulse 8s ease-in-out infinite;
}

/* Animasi untuk background hero */
@keyframes backgroundMove {
    0%, 100% {
        background-position: center center;
    }
    25% {
        background-position: center top;
    }
    50% {
        background-position: center bottom;
    }
    75% {
        background-position: center center;
    }
}

/* Animasi untuk overlay gradient */
@keyframes overlayPulse {
    0%, 100% {
        background: linear-gradient(135deg, rgba(13, 110, 253, 0.8) 0%, rgba(10, 88, 202, 0.9) 100%);
    }
    33% {
        background: linear-gradient(135deg, rgba(10, 88, 202, 0.7) 0%, rgba(13, 110, 253, 0.7) 100%);
    }
    66% {
        background: linear-gradient(135deg, rgba(13, 110, 253, 0.6) 0%, rgba(10, 88, 202, 0.8) 100%);
    }
}

.hero-section .container,
.hero-section .container-fluid,
.hero-section .w-100 {
    position: relative;
    z-index: 2;
    animation: heroFloat 6s ease-in-out infinite;
}

/* Animasi floating untuk konten hero */
@keyframes heroFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.min-vh-50 {
    min-height: 50vh;
}

.hero-content {
    padding: 4rem 0;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.search-form .input-group {
    max-width: 100%;
}

.search-form .form-control {
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-form .btn {
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.section-title p {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

/* Recipe Detail */
.recipe-header {
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.recipe-quick-info {
    font-size: 0.95rem;
}

.recipe-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.recipe-image:hover {
    transform: scale(1.02);
}

.recipe-info {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.recipe-info .info-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recipe-info .info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.recipe-info .info-icon {
    font-size: 1.5rem;
    display: block;
}

.recipe-info .info-label {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recipe-info .info-value {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

/* Recipe Description */
.recipe-description {
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.description-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #495057;
    text-align: justify;
}

/* Ingredients Section */
.ingredients-section {
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.ingredients-section:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.ingredient-number {
    font-size: 0.75rem;
    min-width: 24px;
    min-height: 24px;
}

.ingredient-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #495057;
}

/* Instructions Section */
.instructions-section {
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.instructions-section:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.instruction-item {
    transition: transform 0.2s ease;
    position: relative;
}

.instruction-item:hover {
    transform: translateX(5px);
}

.step-number {
    font-size: 0.9rem;
    min-width: 32px;
    min-height: 32px;
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.instruction-text {
    font-size: 1rem;
    color: #495057;
    line-height: 1.6;
}

/* Ingredients & Instructions Lists */
.ingredients-list,
.instructions-list {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.ingredients-list ul,
.instructions-list ol {
    margin-bottom: 0;
}

.ingredients-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.instructions-list li {
    padding: 1rem 0;
    border-bottom: 1px solid #f8f9fa;
    line-height: 1.6;
}

.ingredients-list li:last-child,
.instructions-list li:last-child {
    border-bottom: none;
}

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 3rem;
}

.page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Error Messages */
.error-message {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.error-message i {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    color: #dc3545;
}

/* Lazy Loading Images */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazy.loaded {
    opacity: 1;
}

/* Social Share Buttons */
.social-share {
    margin: 2rem 0;
    text-align: center;
}

.social-share .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    border: none;
    font-weight: 500;
}

.social-share .btn i {
    margin-right: 0.5rem;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Action Buttons */
.btn-print, .btn-save {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-print {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.btn-print:hover {
    background: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.btn-save {
    background: #17a2b8;
    color: white;
    border-color: #17a2b8;
}

.btn-save:hover {
    background: #138496;
    border-color: #117a8b;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(23, 162, 184, 0.3);
}

/* Section Headers */
.section-header {
    border-bottom: 3px solid #007bff;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: #ffc107;
    border-radius: 2px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .recipe-card {
        margin-bottom: 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .category-card {
        padding: 1.5rem 1rem;
    }
    
    .category-card .category-icon {
        font-size: 2.5rem;
    }
    
    .recipe-image {
        height: 250px;
    }
    
    .recipe-info {
        padding: 1rem;
    }
    
    .recipe-info .info-item {
        padding: 0.75rem 0.5rem;
    }
    
    .recipe-info .info-icon {
        font-size: 1.2rem;
    }
    
    .recipe-info .info-value {
        font-size: 0.9rem;
    }
    
    .recipe-info .info-label {
        font-size: 0.7rem;
    }
    
    .social-share .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin-right: 0.3rem;
        margin-bottom: 0.3rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .description-content {
        font-size: 1rem;
    }
    
    .ingredient-text {
        font-size: 0.9rem;
    }
    
    .instruction-text {
        font-size: 0.95rem;
    }
    
    .btn-print, .btn-save {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .recipe-quick-info {
        font-size: 0.85rem;
    }
    
    .navbar .input-group {
        min-width: 200px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    .recipe-info .row {
        flex-direction: column;
    }
    
    .recipe-info .info-item {
        text-align: center;
        border-bottom: 1px solid #e9ecef;
        margin-bottom: 0.5rem;
        padding-bottom: 0.75rem;
    }
    
    .recipe-info .info-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
    
    .social-share {
        text-align: center;
    }
    
    .ingredients-section, .instructions-section {
        margin-bottom: 1.5rem;
    }
    
    .step-number {
        min-width: 28px;
        min-height: 28px;
        font-size: 0.8rem;
    }
    
    .ingredient-number {
        min-width: 20px;
        min-height: 20px;
        font-size: 0.7rem;
    }
    
    .navbar .input-group {
        min-width: 150px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .breadcrumb,
    footer,
    .social-share,
    #backToTop {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Enhanced Transitions and Typography */
.transition-all {
    transition: all 0.2s ease-in-out;
}

.transition-all:hover {
    transform: translateX(3px);
    background-color: rgba(102, 126, 234, 0.08) !important;
}

.small {
    font-size: 0.9rem;
}

.lh-base {
    line-height: 1.5;
}

.fw-semibold {
    font-weight: 600;
}

/* Improved spacing for mobile */
@media (max-width: 768px) {
    .p-3 {
        padding: 0.75rem !important;
    }
    
    .p-md-4 {
        padding: 1rem !important;
    }
    
    .mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    .mb-lg-4 {
        margin-bottom: 1rem !important;
    }
    
    .h5 {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 576px) {
    .p-3 {
        padding: 0.5rem !important;
    }
    
    .p-md-4 {
        padding: 0.75rem !important;
    }
    
    .small {
        font-size: 0.85rem;
    }
    
    .h5 {
        font-size: 1rem !important;
    }
}

/* Enhanced Hover Effects */
.ingredients-section:hover,
.instructions-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.border-2 {
    border-width: 2px !important;
}