/* ============================= */
/* RESET & BASE STYLES */
/* ============================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ============================= */
/* ANIMATIONS */
/* ============================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================= */
/* NAVIGATION BAR */
/* ============================= */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    height: 40px;
    width: 40px;
    margin-right: 0;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-size: 1rem;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #ea580c;
    background-color: #fff7ed;
}

.nav-link.active {
    color: #ea580c;
    font-weight: 600;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ============================= */
/* HERO SECTION */
/* ============================= */
.hero {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 2rem;
    color: #7c2d12;
    font-weight: 600;
    max-width: 800px;
    margin: 0 auto;
}

/* ============================= */
/* DAILY RECIPES SECTION (INDEX PAGE) */
/* ============================= */
.daily-recipes-section {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    padding: 60px 20px;
    text-align: center;
}

.daily-recipes-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    color: #7c2d12;
    margin-bottom: 50px;
    font-weight: 700;
}

.recipes-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.recipe-showcase-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.recipe-showcase-card:nth-child(1) {
    animation-delay: 0.2s;
}

.recipe-showcase-card:nth-child(2) {
    animation-delay: 0.4s;
}

.recipe-showcase-card:nth-child(3) {
    animation-delay: 0.6s;
}

.recipe-showcase-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.showcase-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recipe-showcase-card:hover .showcase-image img {
    transform: scale(1.1);
}

.showcase-content {
    padding: 25px;
}

.showcase-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #7c2d12;
    margin-bottom: 10px;
}

.showcase-description {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.showcase-info {
    display: flex;
    justify-content: space-around;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 0.9rem;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-all-recipes {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-all-recipes:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
}

.btn-all-recipes:active {
    transform: translateY(-1px);
}

/* ============================= */
/* RECIPES SECTION */
/* ============================= */
.recipes-section {
    padding: 3rem 2rem;
    background-color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* ============================= */
/* RECIPE CARD */
/* ============================= */
.recipe-card {
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.recipe-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-image img {
    transform: scale(1.05);
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.recipe-description {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.recipe-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #888;
}

.recipe-btn {
    display: block;
    width: 100%;
    padding: 0.875rem;
    background-color: #ea580c;
    color: #ffffff;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.recipe-btn:hover {
    background-color: #c2410c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

/* ============================= */
/* ADMIN PANEL STYLES */
/* ============================= */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.admin-header h1 {
    margin: 0;
    font-size: 2.5em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.action-buttons-group {
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.9em;
}

.table-wrapper {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f7fafc;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

tr:hover {
    background: #f7fafc;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-active {
    background: #c6f6d5;
    color: #22543d;
}

.badge-inactive {
    background: #fed7d7;
    color: #742a2a;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
    color: #2d3748;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #718096;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    border-top: 2px solid #e2e8f0;
    padding-top: 20px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #718096;
}

.empty-state-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

/* ============================= */
/* FOOTER */
/* ============================= */
.footer {
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.footer-section h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.footer-section p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-section a {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ea580c;
}

.footer-bottom {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: #999;
    font-size: 0.875rem;
}

/* ============================= */
/* RESPONSIVE DESIGN */
/* ============================= */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 300px;
    }

    .nav-link {
        width: 100%;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .recipes-showcase {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .nav-container {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }

    .recipes-section {
        padding: 2rem 1rem;
    }

    .daily-recipes-section {
        padding: 30px 1rem;
    }

    .recipe-card {
        border-radius: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-header h1 {
        font-size: 1.8em;
    }

    .section-title {
        font-size: 1.5rem;
    }
}
