html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

/* Recipe Card Styles */
.recipe-card {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.recipe-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.difficulty {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.4);
    /* Fallback */
}

.difficulty.easy {
    background: rgba(34, 197, 94, 0.9);
}

.difficulty.medium {
    background: rgba(255, 170, 0, 0.9);
}

.difficulty.hard {
    background: rgba(239, 68, 68, 0.9);
}

.recipe-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.card-actions-dropdown {
    position: absolute;
    /*bottom: 12px;*/
    right: 0px;
}

.card-actions-dropdown .btn-dropdown {
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 5px;
    font-size: 1.2rem;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.card-actions-dropdown .btn-dropdown:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.recipe-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.recipe-description {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-meta {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
    color: #374151;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.recipe-button {
    margin-top: 10px;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.recipe-button:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: scale(1.02);
}

/* View Toggle Styles */
.view-list .recipe-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
}

.view-list .recipe-grid>.col {
    width: 100% !important;
    max-width: 100% !important;
}

.view-list .recipe-card {
    max-width: 100%;
    display: flex;
    flex-direction: row;
    height: 240px;
}

.view-list .recipe-image {
    width: 320px;
    height: 100%;
}

.view-list .recipe-content {
    flex: 1;
    padding: 24px;
    justify-content: center;
}

.view-list .recipe-description {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.view-list .recipe-button {
    width: auto !important;
    padding-left: 30px;
    padding-right: 30px;
    align-self: flex-start;
}

@media (max-width: 768px) {
    .view-list .recipe-card {
        flex-direction: column;
        height: auto;
    }

    .view-list .recipe-image {
        width: 100%;
        height: 200px;
    }
}

.view-toggle-btn {
    border: 1px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.view-toggle-btn i {
    font-size: 1.1rem;
}

.view-toggle-btn.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.view-toggle-btn:hover:not(.active) {
    background: #f8f9fa;
}

/* Premium Pagination Styles */
.pagination-premium {
    gap: 8px;
}

.pagination-premium .page-item .page-link {
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    color: #4b5563;
    font-weight: 600;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.pagination-premium .page-item.active .page-link {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(34, 197, 94, 0.4);
}

.pagination-premium .page-item:not(.active):not(.disabled) .page-link:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    color: #16a34a;
}

.pagination-premium .page-item.disabled .page-link {
    background: transparent;
    color: #9ca3af;
    box-shadow: none;
}


/* Hero Section for Home Page */
.hero-section {
    position: relative;
    height: 100svh;
    height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url(/images/ImageHome.png);
    background-size: auto 100%;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    margin-bottom: 3rem;
    padding: 0 1rem;
    /*margin-top: -1rem;*/
    /* Compromise for fixed navbar spacing if any */
}

.hero-section h1 {
    font-size: 4rem;
    font-weight: 800;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.5rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: #fff;
    font-size: 2rem;
    opacity: 0.8;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Adjustments for Home Page */
.home-page header {
    position: absolute;
    width: 100%;
    z-index: 1000;
}

.navbar {
    background: rgb(255 158 0 / 60%) !important;
    backdrop-filter: blur(10px);
    border-bottom: none !important;
}

.navbar-brand,
.nav-link {
    color: white !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}