/* Reset and Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #fff7ed, #ffffff);
    /* Orange-50 to white */
    margin: 0;
    padding: 0;
    color: #333;
    min-height: 100vh;
}

/* Container */
.main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.main-header {
    background-color: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    background-color: #f97316;
    /* Orange-500 */
    padding: 0.5rem;
    border-radius: 0.75rem;
    color: white;
    font-size: 1.2rem;
    width: 20%;
}

.logo-section h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    /* Gray-900 */
    margin: 0;
}

.logo-text {
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    padding: 0.5rem;
}

.logout-section {
    padding: 0.5rem 1.25rem;
    /* Reduced from 20px - first value is vertical, second is horizontal */
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #f97316;
    border-radius: 0.5rem;

}

.logout-section:hover {
    background-color: #ea580c;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    transition: transform 0.2s;
    transform: translateY(-2px);
}

.logout-btn {
    text-decoration: none;
    color: white;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    /* Reduced from 0.5rem 1rem - first value is vertical, second is horizontal */
    transition: background-color 0.2s;
}




/* Hero Section */
.hero-section {
    background-color: #fff7ed;
    /* Light orange background */
    padding: 4rem 1rem;
}

.hero-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

@media (min-width: 768px) {
    .hero-content {
        flex-direction: row;
        text-align: left;
    }
}

.hero-text {
    flex: 1;
    text-align: center;
}

@media (min-width: 768px) {
    .hero-text {
        text-align: left;
    }
}

.hero-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text p {
    color: #4b5563;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    background-color: #f97316;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
}

.cta-button:hover {
    background-color: #ea580c;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: rotate(2deg);
    transition: transform 0.3s;
    cursor: pointer;
}

.hero-image img:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Search Section */
.search-section {
    background-color: white;
    padding: 3rem 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff7ed;
    /* Light orange background */
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.search-container h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.search-container form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-container form input,
.search-container form select,
.search-container form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #fed7aa;
    /* Orange-200 */
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.search-container form input:focus,
.search-container form select:focus,
.search-container form textarea:focus {
    outline: none;
    border-color: #f97316;
    /* Orange-500 */
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.search-container form button[type="submit"] {
    background-color: #f97316;
    /* Orange-500 */
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 0.5rem;
}

.search-container form button[type="submit"]:hover {
    background-color: #ea580c;
    /* Orange-600 */
    transform: translateY(-1px);
}

.search-container form button[type="submit"]:active {
    transform: translateY(0);
}

/* Clear filters link styled as secondary button */
.clear-filters-btn {
    display: inline-block;
    margin-left: 0.5rem;
    background-color: transparent;
    color: #f97316;
    padding: 0.75rem 1rem;
    border: 2px solid #f97316;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.15s, color 0.15s, transform 0.08s;
}

.clear-filters-btn:hover {
    background-color: #f97316;
    color: white;
    transform: translateY(-1px);
}

.clear-filters-btn:active {
    transform: translateY(0);
}

/* Form labels styling */
.search-container form label {
    display: block;
    font-weight: 600;
    color: #374151;
    /* Gray-700 */
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Form field wrapper */
.search-container form p {
    margin: 0;
}

/* Content Section */
.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1rem;
    flex-grow: 1;
    width: 100%;
    box-sizing: border-box;
}

/* Recipe Grid */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}

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

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

/* Recipe Card */
.recipe-card {
    background-color: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s;
}

.recipe-card:hover {
    transform: translateY(-4px);
}

.recipe-image img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
}

.recipe-info {
    padding: 1.5rem;
}

.recipe-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.recipe-meta {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

.view-btn {
    display: inline-block;
    margin-top: 1rem;
    background-color: #f97316;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.view-btn:hover {
    background-color: #ea580c;
}

/* Detail Page Styles */
.detail-container {
    background-color: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto;
}

.detail-header {
    text-align: center;
    margin-bottom: 2rem;
}

.detail-header h1 {
    font-size: 2.5rem;
    color: #111827;
    margin-bottom: 1rem;
}

.detail-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: #6b7280;
    font-size: 1.1rem;
}

.detail-image {
    width: 100%;
    height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 3rem;
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-section {
    margin-bottom: 2.5rem;
}

.detail-section h2 {
    color: #f97316;
    border-bottom: 2px solid #fed7aa;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ingredients-list,
.instructions-text {
    line-height: 1.8;
    color: #4b5563;
}

.back-link {
    margin-top: 3rem;
    text-align: center;
}

/* Chart Section */
.detail-chart {
    background-color: #fff7ed;
    padding: 2rem;
    border-radius: 1rem;
    margin: 2rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.detail-chart h2 {
    color: #f97316;
    border-bottom: 2px solid #fed7aa;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.detail-chart form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-chart form label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.detail-chart form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #fed7aa;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: white;
}

.detail-chart form select:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.detail-chart form button[type="submit"] {
    background-color: #f97316;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.detail-chart form button[type="submit"]:hover {
    background-color: #ea580c;
    transform: translateY(-1px);
}

.detail-chart form button[type="submit"]:active {
    transform: translateY(0);
}

.detail-chart img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.main-footer {
    background-color: #111827;
    /* Gray-900 */
    color: white;
    padding: 3rem 1rem;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-content p {
    color: #9ca3af;
    /* Gray-400 */
    font-size: 0.875rem;
}