/* Main Styles for Ramen Recipe Website - Hertz-inspired design */

:root {
    --black-primary: #1E2328;    /* Dark black for headers and important text */
    --black-secondary: #2A2E34;  /* Slightly lighter black for secondary elements */
    --black-tertiary: #3B3F46;   /* Even lighter black for tertiary elements */
    --yellow-primary: #F5B301;   /* Bright yellow for call-to-action elements */
    --yellow-secondary: #FED053; /* Lighter yellow for secondary highlights */
    --gray-light: #f5f5f7;       /* Light gray for backgrounds */
    --gray-medium: #e5e5e5;      /* Medium gray for borders */
    --text-dark: #333333;        /* Dark text color */
    --text-medium: #666666;      /* Medium gray text */
    --text-light: #999999;       /* Light gray text */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    background-color: #ffffff;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

.pagination a, .pagination span {
    color: var(--text-dark);
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid var(--gray-medium);
    margin: 0 4px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pagination a:hover {
    background-color: var(--gray-light);
}

.pagination .active {
    background-color: var(--black-primary);
    color: white;
    border-color: var(--black-primary);
}

.pagination .disabled {
    color: var(--text-light);
    cursor: not-allowed;
}

/* ========== SHARED STYLES ========== */

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

/* Header Styles */
header {
    text-align: center;
    padding: 30px 0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    max-width: 200px;
    height: auto;
}

h1 {
    color: var(--yellow-primary);
    margin: 0;
    font-size: 2.5rem;
    font-weight: bold;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-top: 5px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 60px;
    padding: 20px;
    color: var(--text-medium);
    font-size: 0.9rem;
    border-top: 1px solid var(--gray-medium);
    background-color: #fff;
}

.footer-link {
    color: var(--black-primary);
    text-decoration: none;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--yellow-primary);
    text-decoration: underline;
}

/* ========== INDEX PAGE STYLES ========== */

/* Recipe Card Grid for Index Pages */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.recipe-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--gray-medium);
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.recipe-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.recipe-info {
    padding: 20px;
}

.recipe-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: var(--black-primary);
}

.recipe-desc {
    color: var(--text-medium);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-light);
}

.recipe-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.view-recipe {
    background-color: var(--yellow-primary);
    color: black;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: background-color 0.2s;
}

.view-recipe:hover {
    background-color: var(--yellow-secondary);
}

/* ========== RECIPE DETAIL PAGE STYLES ========== */

/* Recipe page container */
.recipe-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    border-radius: 8px;
}

/* Recipe detail page header */
.recipe-detail-container header {
    text-align: center;
    margin-bottom: 30px;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
}

/* Recipe image on detail page */
.recipe-detail-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    margin: 0 auto 20px;
    display: block;
}

/* Recipe detail meta info */
.recipe-detail-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.meta-item {
    text-align: center;
}

.meta-item i {
    font-size: 24px;
    color: var(--yellow-primary);
}

.meta-label {
    font-size: 14px;
    color: var(--text-light);
}

.meta-value {
    font-weight: bold;
    font-size: 16px;
    color: var(--text-dark);
}

.section-title {
    background-color: var(--black-primary);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: 500;
}

.ingredients-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.ingredient-card {
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    padding: 15px;
    width: calc(33.33% - 20px);
    box-sizing: border-box;
    background-color: var(--gray-light);
}

@media (max-width: 768px) {
    .ingredient-card {
        width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .ingredient-card {
        width: 100%;
    }
}

.ingredient-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--black-primary);
}

.ingredient-measure {
    color: var(--text-medium);
    font-size: 14px;
}

.instructions {
    margin-bottom: 30px;
}

.instructions ol {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.shop-button {
    display: block;
    background-color: var(--yellow-primary);
    color: black;
    text-align: center;
    padding: 15px 0;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    margin: 30px auto;
    width: 60%;
    transition: background-color 0.3s;
}

.shop-button:hover {
    background-color: var(--yellow-secondary);
}

/* ========== INSTACART BRANDING STYLES ========== */

.header-top {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 15px 0;
    background-color: #fff;
}

.instacart-branding {
    height: 40px; /* Default size for desktop */
    max-width: 100%;
}

.instacart-powered-logo {
    height: 100%;
    width: auto;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .instacart-branding {
        height: 35px; /* Slightly smaller on medium screens */
    }
}

@media (max-width: 480px) {
    .instacart-branding {
        height: 40px; /* INCREASED size for mobile to ensure readability */
    }

    .header-top {
        padding: 20px 0; /* Add more padding for better spacing on mobile */
    }
}