/* styles.css */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    background-color: #f9f9f9;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Dark Mode */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .menu-item,
body.dark-mode .hero-content,
body.dark-mode form input,
body.dark-mode form textarea,
body.dark-mode .modal-content {
    background: rgba(40, 40, 40, 0.95);
}

body.dark-mode .menu-item h3,
body.dark-mode h2 {
    color: #FFD700;
}

/* Header with Glassmorphism */
header {
    background: linear-gradient(135deg, rgba(0, 100, 0, 0.9), rgba(0, 128, 0, 0.7));
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #FFD700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

ul li a.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    position: relative;
    transition: color 0.3s ease;
}

ul li a.nav-link.active {
    color: #FFD700;
    border-bottom: 2px solid #FFD700;
}

ul li a.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #FFD700;
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

ul li a.nav-link:hover::after {
    width: 100%;
}

ul li a.nav-link:hover {
    color: #FFD700;
}

#theme-toggle {
    background: none;
    border: none;
    color: #FFD700;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#theme-toggle:hover {
    transform: rotate(180deg);
}

/* Hero Section with Slideshow */
.hero {
    height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
    animation: slideshow 15s infinite;
}

@keyframes slideshow {
    0% { background-image: url('https://via.placeholder.com/1920x1080?text=South+African+Landscape'); }
    33% { background-image: url('https://via.placeholder.com/1920x1080?text=SA+Sunset'); }
    66% { background-image: url('https://via.placeholder.com/1920x1080?text=SA+Cuisine'); }
    100% { background-image: url('https://via.placeholder.com/1920x1080?text=South+African+Landscape'); }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
}

.hero-content {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 30px 50px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeIn 1.5s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Space between elements */
    padding-bottom: 40px; /* Extra padding to move buttons down */
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 20px; /* Ensure space below paragraph */
}

.btn {
    background: linear-gradient(45deg, #FFD700, #FF8C00);
    color: #006400;
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block; /* Ensure buttons don't stretch */
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hero-content .btn {
    margin: 0 10px; /* Space between buttons */
}

/* Scroll Animation for Sections */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section Styles */
section {
    padding: 80px 40px;
    margin-top: 60px;
}

h2 {
    font-size: 42px;
    font-weight: 700;
    color: #006400;
    margin-bottom: 30px;
    position: relative;
}

body.dark-mode h2::after {
    background: #FF8C00;
}

h2::after {
    content: '';
    width: 60px;
    height: 4px;
    background: #FFD700;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Menu Section */
.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.menu-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

.menu-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #006400, #FFD700);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.menu-item:hover::before {
    opacity: 0.1;
}

.menu-item h3 {
    font-size: 26px;
    color: #006400;
    margin-bottom: 10px;
}

.menu-item p {
    font-size: 16px;
    color: #555;
}

body.dark-mode .menu-item p {
    color: #ccc;
}

.menu-item span {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #FF8C00;
    margin-top: 15px;
}

/* Gallery Section */
.gallery-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-images img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.gallery-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
}

.lightbox-caption {
    color: #fff;
    font-size: 18px;
    margin-top: 10px;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #FFD700;
    font-size: 30px;
    cursor: pointer;
}

/* Contact Section */
form {
    max-width: 700px;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, textarea {
    padding: 15px;
    border: 1px solid rgba(0, 100, 0, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

body.dark-mode input,
body.dark-mode textarea {
    border-color: rgba(255, 215, 0, 0.3);
}

input:focus, textarea:focus {
    border-color: #FFD700;
    transform: scale(1.02);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 150px;
}

/* Reservation Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideIn 0.5s ease;
}

body.dark-mode .modal-content {
    background: rgba(40, 40, 40, 0.95);
}

@keyframes slideIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #006400;
}

body.dark-mode .close {
    color: #FFD700;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #006400, #004d00);
    color: #fff;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

footer p {
    font-size: 16px;
    margin: 5px 0;
    animation: slideUp 1s ease-in-out;
}

@keyframes slideUp {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 10px 20px;
    }

    ul {
        flex-direction: column;
        gap: 15px;
    }

    .logo {
        font-size: 24px;
    }

    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 32px;
    }

    .hero {
        background-attachment: scroll;
    }

    .hero-content {
        padding: 20px;
    }

    .menu-items, .gallery-images {
        grid-template-columns: 1fr;
    }

    .hero-content .btn {
        margin: 5px 0; /* Stack buttons vertically on smaller screens */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 32px;
    }

    .btn {
        padding: 10px 20px;
    }

    .menu-item, .gallery-images img {
        padding: 15px;
    }
}