/* mangfood.css - Custom CSS for Glitch Menu Page */

/* Root variables for consistent styling and dynamic adjustments (if needed by JS) */
:root {
    --header-height: 80px; /* Default header height for desktop */
    --accent-color-light: #55324c; /* Lighter neon blue/cyan */
    --accent-color-dark: #3a0e38;  /* Darker neon blue/cyan */
    --text-light: #E0E0E0;
    --text-medium: #A0A0A0;
    --bg-dark: #121212;
    --bg-medium: #1A1A1A;
    --bg-light: #1F1F1F;
    --border-color: #282828;
    /* Updated shadows for a consistent glitchy neon effect */
    --shadow-light: rgba(85, 50, 76, 0.5); /* Shadow based on accent color */
    --shadow-dark: rgba(0, 0, 0, 0.6); /* Darker, more pronounced shadow */
    --neon-glow: 0 0 15px var(--accent-color-light), 0 0 30px var(--accent-color-light); /* Combined neon glow effect */
}

/* General Body Styles */
html {
    scroll-behavior: smooth; /* Smooth scrolling for nav links */
}

body {
    direction: rtl; /* Set text direction to right-to-left for Arabic */
    text-align: right; /* Align text to the right */
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif; /* Professional font stack */
    background-color: var(--bg-dark);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure background covers full screen */
    font-size: 16px;
    overflow-y: scroll; /* Allow vertical scrolling */
    -webkit-overflow-scrolling: touch; /* Improved scrolling on iOS */
}

/* Scrollbar Styling for a refined look */
body::-webkit-scrollbar {
    width: 10px;
}
body::-webkit-scrollbar-track {
    background: var(--bg-medium);
}
body::-webkit-scrollbar-thumb {
    background-color: var(--accent-color-dark);
    border-radius: 10px;
    border: 2px solid var(--bg-medium);
}
body::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-color-light);
}

/* Header Container - Now Sticky */
header {
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); /* More visible shadow for sticky header */
    position: sticky; /* Make header sticky */
    top: 0; /* Stick to the top */
    width: 100%;
    z-index: 1000; /* Ensure it stays on top of other content */
    padding: 1rem 0; /* Vertical padding */
    display: flex;
    flex-direction: column; /* Stack logo and nav vertically */
    align-items: center; /* Center horizontally */
    flex-shrink: 0;
    min-height: var(--header-height); /* Dynamic height from JS */
    box-sizing: border-box; /* Include padding in height */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition on scroll/state change */
    isolation: isolate;
}

/* Remove deprecated <center> tag effect - use CSS */
center {
    display: block; /* Ensures it doesn't interfere, but use CSS for centering */
}

/* Header Title (Glitch) */
header h1 {
    color: var(--accent-color-light);
    font-size: 3.2rem; /* Slightly larger for more impact */
    text-shadow: var(--neon-glow); /* Apply combined neon glow */
    margin: 0; /* Remove default margins */
    padding-bottom: 1rem; /* Space below title */
    font-weight: 700;
    letter-spacing: 2px; /* Slight letter spacing for style */
}

/* Navigation */
nav {
    width: 100%; /* Ensure nav takes full width */
    text-align: center; /* Center the nav buttons */
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center; /* Center buttons horizontally */
    align-items: center;
    flex-wrap: wrap; /* Allow buttons to wrap to next line */
    gap: 20px; /* Increased space between buttons for better touch targets */
}

nav ul button {
    color: var(--text-medium);
    font-weight: 500;
    padding: 10px 20px; /* More padding for better clickability */
    border-radius: 8px; /* Slightly more rounded */
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: none;
    border: 1px solid transparent; /* Subtle border for definition */
    cursor: pointer;
    font-size: 1.05rem; /* Slightly larger font */
    white-space: nowrap; /* Prevent button text from wrapping */
}

nav ul button:hover {
    color: var(--accent-color-light);
    text-shadow: 0 0 10px var(--accent-color-light), 0 0 20px rgba(0, 230, 230, 0.4); /* Enhanced glow on hover */
    border-color: var(--accent-color-dark); /* Border lights up on hover */
    transform: translateY(-3px); /* Subtle lift effect */
    box-shadow: 0 5px 15px rgba(0, 230, 230, 0.2); /* Soft shadow on hover */
}

/* Specific style for the "add-food" button */
nav ul button[onclick*="admin-food.php"] {
    background-color: var(--accent-color-dark);
    color: var(--text-light);
    font-weight: 600;
    padding: 12px 25px; /* More prominent padding */
    border-radius: 25px; /* More rounded, pill-like shape */
    box-shadow: 0 0 20px rgba(0, 140, 140, 0.5), 0 0 30px rgba(0, 140, 140, 0.3); /* Stronger glow */
    border: none; /* No border for this button */
    position: relative; /* For potential pseudo-elements */
    z-index: 1;
}

nav ul button[onclick*="admin-food.php"]:hover {
    background-color: var(--accent-color-light);
    box-shadow: 0 0 30px rgba(0, 163, 163, 0.7), 0 0 50px rgba(0, 163, 163, 0.5); /* Intense glow on hover */
    transform: translateY(-4px); /* More pronounced lift */
    color: var(--bg-dark); /* Text color subtly changes for contrast */
}

/* Style for the new logout button */
.logout-button {
    background-color: #4CAF50; /* A pleasant green for logout */
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    font-size: 1.05rem;
    white-space: nowrap;
}

.logout-button:hover {
    background-color: #66BB6A; /* Lighter green on hover */
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(102, 187, 106, 0.6);
}


/* Main Content Sections */
section {
    padding: 50px 0; /* More vertical padding for sections */
    margin-bottom: 40px; /* Space between sections */
    text-align: center; /* Center content within sections */
    position: relative; /* For any absolute positioning inside sections */
}

/* Remove extra br tags from HTML and control spacing with CSS */
section br {
    display: none;
}

section h1 {
    font-size: 3rem; /* Slightly larger for section titles */
    color: var(--accent-color-light);
    text-shadow: var(--neon-glow); /* Apply combined neon glow */
    margin-bottom: 50px; /* More space below title */
    font-weight: 700;
    padding: 0 20px; /* Padding for title to prevent touching edges */
}

/* Card Holder - Grid Layout */
.card-holder {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Slightly larger min-width for cards */
    gap: 35px; /* More space between cards */
    max-width: 1280px; /* Increased max width for content */
    margin: 0 auto; /* Center the grid */
    padding: 0 25px; /* Horizontal padding for grid on page */
}

/* Individual Card Styling */
.card {
    background-color: var(--bg-medium);
    border: 1px solid var(--border-color);
    border-radius: 15px; /* More rounded corners */
    box-shadow: 0 10px 30px var(--shadow-dark); /* Deeper shadow */
    padding: 30px; /* More padding inside card */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content within card */
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease; /* Smooth transitions for all properties */
    width: 100%; /* Take full grid column width */
    box-sizing: border-box; /* Include padding in card width */
}

.card:hover {
    transform: translateY(-10px); /* More pronounced lift */
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.8), 0 0 50px rgba(0, 255, 255, 0.2); /* Stronger, more dramatic shadow and glow */
    background-color: var(--bg-light); /* Slightly lighter background on hover */
}

.card img {
    width: 100%; /* Make image fill card width */
    max-width: 220px; /* Slightly larger max image size */
    height: 220px; /* Fixed height for images */
    object-fit: cover; /* Cover ensures image fills space without distortion */
    border-radius: 10px; /* More rounded image corners */
    margin-bottom: 25px; /* More space below image */
    border: 2px solid var(--accent-color-dark); /* Thicker border */
    /* Reduced shadow for the card images as per request */
    box-shadow: 0 0 8px rgba(0, 204, 204, 0.2); /* Soft, consistent glow for card images */
    cursor: pointer; /* Add cursor to indicate clickability for Lightbox */
}

.card h2 {
    font-size: 1.7rem; /* Larger title font */
    color: var(--accent-color-light);
    margin-bottom: 12px;
    font-weight: 600;
}

.card p { /* Adding a general paragraph style if you have descriptions */
    color: var(--text-medium);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.card h2:last-of-type { /* Price */
    font-size: 1.4rem;
    color: var(--text-light);
    margin-bottom: 25px; /* More space before button */
    font-weight: 700;
}

.card a { /* Delete link */
    background-color: #555; /* A neutral dark gray for delete */
    color: #FFFFFF;
    padding: 10px 22px; /* More padding */
    border-radius: 8px; /* More rounded */
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* More pronounced shadow */
}

.card a:hover {
    background-color: #777; /* Lighter gray on hover */
    transform: translateY(-3px); /* Subtle lift */
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.5); /* Stronger shadow on hover */
}

/* Custom Close Button for Lightbox (positioned relative to screen) */
.custom-lightbox-close-btn {
    position: fixed; /* Makes it fixed on the screen */
    top: 25px; /* Distance from top */
    right: 25px; /* Distance from right */
    z-index: 2001; /* Ensure it appears above Lightbox */
    background-color: var(--accent-color-light); /* Uses the accent color from root */
    color: var(--text-light); /* Uses the text color from root */
    font-size: 1.2rem;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.9;
    transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.2s ease;
    display: none; /* Hidden by default, will be shown by JavaScript */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    direction: rtl; /* Ensure text direction is right-to-left for Arabic */
}

.custom-lightbox-close-btn:hover {
    background-color: var(--accent-color-dark); /* Darker accent color on hover */
    opacity: 1;
    transform: translateY(-2px);
}

/* New Zoom/Shrink Button for Lightbox (positioned relative to screen) */
.custom-lightbox-zoom-btn {
    position: fixed;
    top: 25px;
    right: 180px; /* Adjust this value to position it next to the close button */
    z-index: 2001;
    background-color: #4CAF50; /* Green color for the zoom button */
    color: white;
    font-size: 1.2rem;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.9;
    transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.2s ease;
    display: none; /* Hidden by default */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    direction: rtl;
}

.custom-lightbox-zoom-btn:hover {
    background-color: #66BB6A; /* Lighter green on hover */
    opacity: 1;
    transform: translateY(-2px);
}


/* --- Responsive Adjustments --- */

/* For medium screens (tablets, smaller laptops) */
@media (max-width: 1024px) {
    header h1 {
        font-size: 2.8rem;
        padding-bottom: 0.8rem;
    }

    nav ul {
        gap: 15px; /* Slightly less gap for nav buttons */
        padding: 0 15px; /* Add some padding to prevent buttons from touching edges */
    }

    nav ul button {
        padding: 9px 18px;
        font-size: 1rem;
    }

    nav ul button[onclick*="admin-food.php"] {
        padding: 11px 22px;
    }

    .logout-button {
        padding: 9px 18px;
        font-size: 1rem;
    }

    section {
        padding: 40px 0;
        margin-bottom: 30px;
    }

    section h1 {
        font-size: 2.5rem;
        margin-bottom: 40px;
    }

    .card-holder {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Smaller min-width for cards */
        gap: 25px;
        padding: 0 20px; /* Less horizontal padding */
    }

    .card {
        padding: 25px;
    }

    .card img {
        max-width: 200px;
        height: 200px;
        margin-bottom: 20px;
    }

    .card h2 {
        font-size: 1.5rem;
    }
    .card p {
        font-size: 1rem;
    }
    .card h2:last-of-type {
        font-size: 1.2rem;
    }
    .card a {
        padding: 9px 18px;
        font-size: 0.95rem;
    }

    /* Responsive adjustment for custom buttons */
    .custom-lightbox-close-btn {
        top: 15px;
        right: 15px;
        padding: 8px 15px;
        font-size: 1rem;
    }
    .custom-lightbox-zoom-btn {
        top: 15px;
        right: 130px; /* Adjust based on new close button size */
        padding: 8px 15px;
        font-size: 1rem;
    }
}

/* For small screens (mobile phones) */
@media (max-width: 768px) {
    header {
        padding: 0.8rem 0;
        min-height: unset; /* Allow height to collapse if content wraps */
    }

    header h1 {
        font-size: 2.2rem;
        padding-bottom: 0.5rem;
        letter-spacing: 1px;
    }

    nav ul {
        flex-direction: row; /* Keep buttons in a row, allow wrapping */
        gap: 10px; /* Even smaller gap */
        padding: 0 10px;
        margin-top: 10px; /* Space below header title */
    }

    nav ul button {
        padding: 8px 15px;
        font-size: 0.9rem;
        border-radius: 6px;
    }

    nav ul button[onclick*="admin-food.php"] {
        padding: 9px 18px;
        font-size: 0.95rem;
    }

    .logout-button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    section {
        padding: 30px 0;
        margin-bottom: 20px;
    }

    section h1 {
        font-size: 2rem;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .card-holder {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Even smaller min-width for mobile */
        gap: 20px;
        padding: 0 15px;
    }

    .card {
        padding: 20px;
    }

    .card img {
        max-width: 180px;
        height: 180px;
        margin-bottom: 15px;
    }

    .card h2 {
        font-size: 1.3rem;
    }
    .card p {
        font-size: 0.95rem;
    }
    .card h2:last-of-type {
        font-size: 1.1rem;
    }
    .card a {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* Responsive adjustment for custom buttons */
    .custom-lightbox-close-btn {
        top: 10px; /* Move closer to top edge */
        right: 10px;
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    .custom-lightbox-zoom-btn {
        top: 10px;
        right: 110px; /* Adjust position for very small screens */
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.9rem;
    }

    nav ul {
        gap: 8px;
        padding: 0 5px;
    }

    nav ul button {
        font-size: 0.8rem;
        padding: 7px 12px;
    }

    nav ul button[onclick*="admin-food.php"] {
        font-size: 0.85rem;
        padding: 8px 16px;
    }

    .logout-button {
        font-size: 0.8rem;
        padding: 7px 12px;
    }

    section h1 {
        font-size: 1.7rem;
        margin-bottom: 25px;
    }

    .card-holder {
        grid-template-columns: 1fr; /* Single column on very small screens */
        max-width: 320px; /* Constrain width of single card */
        gap: 15px;
        padding: 0 10px;
    }

    .card {
        padding: 15px;
    }

    .card img {
        max-width: 150px;
        height: 150px;
    }

    .card h2 {
        font-size: 1.2rem;
    }
    .card p {
        font-size: 0.9rem;
    }
    .card h2:last-of-type {
        font-size: 1.05rem;
    }
    .card a {
        padding: 7px 14px;
        font-size: 0.85rem;
    }

    /* Responsive adjustment for custom buttons */
    .custom-lightbox-close-btn {
        top: 5px; /* Even closer to top edge */
        right: 5px;
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    .custom-lightbox-zoom-btn {
        top: 5px;
        right: 90px; /* Adjust position for very small screens */
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}