/* Global Styles */
:root {
    --primary: #0d1b3a;
    --secondary: #d4af37;
    --accent: #a52a2a;
    --light: #f8f6f2;
    --dark: #2c2c2c;
    --text: #333;
    --gold-light: #f0e6d2;
    --gold-dark: #b8860b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Lato:wght@300;400;700&display=swap');

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--light);
    background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    padding-top: 0;
}

/* Override Bootstrap styles */
.btn-warning {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
    color: var(--primary) !important;
    font-weight: bold;
}

.btn-warning:hover {
    background-color: #c9a22e !important;
    border-color: #c9a22e !important;
}

.form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.8rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-link:hover, .nav-link.active {
    background: var(--secondary) !important;
    color: var(--primary) !important;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hidden {
    display: none;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--primary), #0a1529);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/golden.png');
    opacity: 0.1;
    pointer-events: none;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    background: var(--secondary);
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: url('https://source.unsplash.com/random/1920x1080/?gourmet,fine-dining') center/cover no-repeat;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    border-bottom: 5px solid var(--secondary);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(13, 27, 58, 0.8), rgba(13, 27, 58, 0.4));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 20px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-weight: 300;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

#search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px 0 0 50px;
    font-size: 1.1rem;
    outline: none;
}

#search-btn {
    padding: 0 30px;
    background: var(--secondary);
    color: var(--primary);
    border: none;
    border-radius: 0 50px 50px 0;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

#search-btn:hover {
    background: #e6c34d;
}

/* Recipe Grid */
.recipe-grid, .favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* Trending Section */
.trending-section {
    margin: 60px 0 40px;
}

.trending-section h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.trending-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--gold-dark));
    border-radius: 2px;
}

.trending-recipes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.trending-recipe {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    position: relative;
    height: 150px;
}

.trending-recipe:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.trending-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.trending-recipe::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%);
}

.trending-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    color: white;
    font-weight: bold;
    z-index: 2;
    font-size: 1.1rem;
}

/* Results Header */
.results-header {
    margin: 40px 0 20px;
}

.results-header h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    font-size: 2rem;
}

/* Modal improvements */
.modal-content {
    border: 2px solid var(--secondary);
}

.ingredients-list {
    padding-left: 1.5rem;
}

.ingredients-list li {
    margin-bottom: 0.5rem;
    position: relative;
}

.ingredients-list li:before {
    content: "•";
    color: var(--secondary);
    font-weight: bold;
    position: absolute;
    left: -1.2rem;
    top: 0;
}

.instructions p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Ensure images are high quality */
.recipe-image, .trending-image, .modal-body img {
    background-size: cover !important;
    background-position: center !important;
    object-fit: cover;
}

.modal-body img {
    width: 100%;
    height: auto;
    max-height: 400px;
}

.recipe-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(212, 175, 55, 0.15);
    position: relative;
}

.recipe-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: rgba(212, 175, 55, 0.3);
}

.recipe-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary), var(--gold-dark));
    opacity: 0.7;
    transition: opacity 0.3s;
}

.recipe-card:hover::before {
    opacity: 1;
}

.recipe-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.recipe-content {
    padding: 20px;
}

.recipe-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.recipe-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.recipe-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.favorite-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px;
}

.favorite-btn:hover {
    transform: scale(1.2);
}

.favorite-btn.active {
    color: var(--accent);
    animation: pulse 0.5s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.view-recipe {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.view-recipe:hover {
    background: #0d1b3a;
}

/* Pricing Section */
.pricing-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.plan {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
}

.plan:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.plan h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.plan p {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary);
    margin-bottom: 25px;
}

.plan ul {
    list-style: none;
    text-align: left;
    margin-bottom: 30px;
}

.plan li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.plan li:before {
    content: "✓";
    color: var(--secondary);
    margin-right: 10px;
    font-weight: bold;
}

/* Contact Section */
.contact-form {
    max-width: 600px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.contact-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    margin: 0 auto;
}

.contact-form button:hover {
    background: #0d1b3a;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--dark);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.modal-body img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.modal h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.modal h3 {
    margin: 20px 0 10px;
    color: var(--secondary);
}

.modal ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.modal p {
    line-height: 1.8;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: 100px;
}

footer p {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        height: 50vh;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    nav ul {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 40vh;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-content {
        padding: 10px;
    }
    
    nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .recipe-grid, .favorites-grid {
        grid-template-columns: 1fr;
    }
}
