/* =====================
   CSS VARIABLES
===================== */
:root {
    --spice:    #c0392b;
    --turmeric: #e67e22;
    --cream:    #fff8f0;
    --dark:     #1a1a1a;
    --text:     #333;
    --muted:    #777;
    --card-bg:  #ffffff;
    --shadow:   0 4px 20px rgba(0,0,0,0.10);
}

/* =====================
   BASE / RESET
===================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    background: var(--cream);
    font-family: 'Lato', Arial, sans-serif;
    font-size: 16px;
    color: var(--text);
}

/* =====================
   HERO
===================== */
.hero {
    position: relative;
    width: 100%;
    min-height: 100svh;
    background: url("images/IMG_1518.jpeg") center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.35) 0%,
        rgba(0,0,0,0.6) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 30px 24px;
    color: white;
    animation: fadeUp 0.9s ease both;
}

.hero-tag {
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffd89b;
    margin-bottom: 16px;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 8vw, 4rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 14px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.hero-sub {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    color: rgba(255,255,255,0.85);
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

.hero-btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--spice);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(192,57,43,0.4);
}

.hero-btn:hover {
    background: #a93226;
    transform: translateY(-2px);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================
   NAVIGATION
===================== */
nav {
    background: var(--dark);
    text-align: center;
    padding: 14px 10px;
    position: sticky;
    top: 0;
    z-index: 900;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 14px;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s;
}

nav a:hover { color: #ffd89b; }

/* =====================
   SECTION LABEL
===================== */
.section-label {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--turmeric);
    font-weight: 700;
    margin-bottom: 8px;
}

/* =====================
   SOCIAL SECTION
===================== */
.social-section {
    text-align: center;
    padding: 40px 20px;
    background: white;
}

.social-section > .section-label {
    margin-bottom: 20px;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.social-buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    padding: 15px 20px;
    text-decoration: none;
    color: white;
    border-radius: 12px;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    transition: opacity 0.2s, transform 0.2s;
}

.social-buttons a:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.social-icon {
    font-size: 1.1rem;
    font-style: normal;
}

.fb { background: #1877f2; }
.ig { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.yt { background: #ff0000; }

/* =====================
   ABOUT SECTION
===================== */
.about {
    background: #fff0db;
    padding: 50px 20px;
}

.about-inner {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.about h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    color: var(--dark);
    margin-bottom: 16px;
}

.about p {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 24px;
}

.email-link {
    display: inline-block;
    padding: 12px 24px;
    background: var(--spice);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.email-link:hover { background: #a93226; }

/* =====================
   ADMIN BUTTON
===================== */
#adminBtn {
    position: fixed;
    top: 15px;
    right: 15px;
    padding: 10px 16px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
    font-size: 0.85rem;
    font-family: 'Lato', sans-serif;
    backdrop-filter: blur(4px);
}

#adminBtn:hover { background: rgba(0,0,0,0.9); }

/* =====================
   LOGIN BOX
===================== */
#loginBox {
    position: fixed;
    top: 60px;
    right: 15px;
    width: 280px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    z-index: 1000;
}

#loginBox h2 {
    text-align: center;
    margin-bottom: 12px;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
}

#loginBox input {
    width: 100%;
    padding: 10px 12px;
    margin: 5px 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 1rem;
}

#loginBox input:focus { border-color: var(--turmeric); }

#loginBox button {
    width: 100%;
    padding: 11px;
    margin-top: 8px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
}

#loginBox button:nth-of-type(1) { background: #4caf50; color: white; }
#loginBox button:nth-of-type(2) { background: #f44336; color: white; }

/* =====================
   ADMIN PANEL
===================== */
.admin {
    text-align: center;
    margin: 20px auto;
    width: 90%;
    max-width: 400px;
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.admin h2 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 14px;
}

.admin input {
    width: 100%;
    padding: 10px 12px;
    margin: 6px 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
    outline: none;
}

.admin input:focus { border-color: var(--turmeric); }

.admin button {
    width: 100%;
    padding: 13px;
    background: var(--turmeric);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
}

.admin button:hover { background: #d35400; }

/* =====================
   SEARCH BAR
===================== */
.search-container {
    text-align: center;
    margin: 24px auto;
    padding: 0 16px;
}

.search-container input {
    width: 100%;
    max-width: 500px;
    padding: 14px 20px;
    border: 2px solid var(--turmeric);
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    background: white;
    color: var(--text);
    font-family: 'Lato', sans-serif;
}

.search-container input:focus {
    border-color: var(--spice);
    box-shadow: 0 0 0 3px rgba(230,126,34,0.15);
}

/* =====================
   RECIPES GRID
===================== */
.recipes {
    padding: 20px 16px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

/* =====================
   RECIPE CARD
===================== */
.card {
    background: var(--card-bg);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.card:hover { transform: translateY(-4px); }

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 14px 16px 16px;
}

.card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: var(--dark);
}

.card p {
    font-size: 0.93rem;
    color: var(--muted);
    line-height: 1.55;
}

/* =====================
   ADMIN CARD BUTTONS
===================== */
.card-admin-buttons {
    display: flex;
    gap: 8px;
    padding: 10px 16px 0;
}

.edit-btn {
    padding: 7px 14px;
    background: var(--turmeric);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
}

.edit-btn:hover { background: #d35400; }

.delete-btn {
    padding: 7px 14px;
    background: var(--spice);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
}

.delete-btn:hover { background: #a93226; }

/* =====================
   EDIT MODAL
===================== */
#editModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.edit-modal-box {
    background: white;
    padding: 28px 24px;
    border-radius: 14px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    text-align: center;
}

.edit-modal-box h2 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 16px;
    font-size: 1.4rem;
}

.edit-modal-box input {
    width: 100%;
    padding: 11px 14px;
    margin: 6px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

.edit-modal-box input:focus { border-color: var(--turmeric); }

.edit-modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.save-btn {
    flex: 1;
    padding: 13px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
}

.cancel-btn {
    flex: 1;
    padding: 13px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
}

/* =====================
   FOOTER
===================== */
footer {
    text-align: center;
    padding: 20px 16px;
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

/* =====================
   TABLET
===================== */
@media (min-width: 601px) {
    .social-buttons {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .social-buttons a {
        width: auto;
        min-width: 160px;
    }

    .recipes {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================
   DESKTOP
===================== */
@media (min-width: 900px) {
    .recipes {
        grid-template-columns: repeat(3, 1fr);
    }
}