/* --- General Setup & CSS Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    line-height: 1.6;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* --- Sidebar Styles (Desktop) --- */
.sidebar {
    width: 388px; /* Changed from calc(350px + 1cm) */
    flex-shrink: 0;
    height: 100vh;
    position: fixed;
    background-color: #333;
    color: #f4f4f4;
    text-align: center;
    padding: 2em 1em;
    overflow-y: auto;
}

.sidebar h1 {
    color: #f4f4f4;
    font-size: 1.8em;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.sidebar p {
    color: #f4f4f4;
    margin-bottom: 1em;
    font-size: 0.9em;
}

.profile-pic {
    width: 219px; /* Changed from calc(200px + 0.5cm) */
    height: 219px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #555;
    margin-bottom: 1em;
}

/* --- Navigation & Login Form --- */
.sidebar nav ul {
    list-style-type: none;
}

.sidebar nav ul li a {
    padding: 0.3em 1em;
    color: #e1f7df;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.3s ease, background-color 0.2s ease-in-out;
}

/* Combined hover rule for sidebar links */
.sidebar nav ul li a:hover {
    color: #5396de;
    text-decoration: underline;
    background-color: #555;
}

span {
    font-weight: bold;
}

.sidebar nav ul li a i {
    width: 20px;
    text-align: center;
}

.admin-login {
    margin-top: 2.5em;
    padding-top: 1.5em;
    border-top: 1px solid #555;
}

.admin-login input {
    width: 100%;
    margin-bottom: 0.75em;
    padding: 0.6em;
    border-radius: 3px;
    border: 1px solid #666;
    background: #222;
    color: #f4f4f4;
}

.admin-login button {
    width: 100%;
    padding: 0.7em;
    border-radius: 3px;
    border: none;
    background: #007bff;
    color: white;
    cursor: pointer;
}

/* --- Main Content Area (Desktop) --- */
.main-content {
    flex-grow: 1;
    margin-left: 388px; /* MUST match the sidebar width */
    background-color: #b8bdb8;
    color: #222;
    padding: 2em 4em;
}

.content-box h1 {
    font-size: 2.5em;
    margin-bottom: 1em;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5em;
    color: #023739;
}

.content-box h2 {
    color: #023739;
    padding: 1px 6px;
    border-radius: 3px;
    display: inline-block;
    font-size: 1.5em;
    margin-top: 0.1em;
    margin-bottom: 0.7em;
    border-bottom: 1px solid #007bff;
}

.content-box p {
    margin-bottom: 1.2em;
    font-size: 1.1em;
}

/* --- Gallery Page Styles --- */
.main-content h2 {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 10px;
    color: #333;
}

.gallery-container {
    position: relative;
    max-width: 800px;
    margin: 20px auto;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-container img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.gallery-container .caption {
    text-align: center;
    padding: 15px;
    margin: 0;
    font-style: italic;
    color: #555;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.gallery-container .prev-btn,
.gallery-container .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white; /* Changed from red for better visibility */
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 20px;
}

.gallery-container .prev-btn:hover,
.gallery-container .next-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.gallery-container .prev-btn {
    left: 15px;
}

.gallery-container .next-btn {
    right: 15px;
}

#gallery7 {
  width: 332.16px;
  height: 620.48px;
}
/* --- Responsive Design for Mobile --- */
@media (max-width: 992px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        z-index: 1000;
    }

    .profile-pic {
        width: 150px;
        height: 150px;
    }

    .main-content {
        margin-left: 0;
        padding: 2em 1.5em;
    }

    .content-box h1 {
        font-size: 2em;
    }
}