/* General Reset and Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
header {
    background-color: lightblue;
    padding: 15px 0;
    color: white;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

header a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    margin-top: 15px;
    display: inline-block;
    border: 1px solid #fff;
    padding: 10px 20px;
    border-radius: 5px;
}

header a:hover {
    background-color: lightcoral;
    border-color: lightcoral;
}

.logo-img {
    height: 120px; 
    width: auto;
    margin-right: 15px; 
}
/* Navbar Styling */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    background-color: white; /* Dark background for contrast */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow to give depth */
}

/* Navbar Links List */
.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
}

.nav-links li {
    margin-left: 30px; /* More spacing between links */
}

.nav-links a {
    color: black; /* Light gray text for readability */
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem; /* Slightly larger text for visibility */
    transition: color 0.3s, transform 0.3s; /* Smooth transition for hover effects */
}

/* Hover Effects for Links */
.nav-links a:hover {
    color: black; /* Accent color on hover */
    transform: scale(1.1); /* Slight zoom effect */
}

/* Navbar Logo */
.logo img {
    width: 130px; /* Adjust logo and right image size */
    height: 120px;
}

/* Navbar Right (auth links or other items) */
.auth-links a {
    color: black;
    text-decoration: none;
    margin-left: 20px;
    font-weight: bold;
    transition: color 0.3s;
}

.auth-links a:hover {
    color: black; /* Accent color on hover */
}


.auth-links a {
    margin-left: 15px;
    color: black;
    text-decoration: none;
}

/* General body and font styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

/* Header Styles */
header {
    background-color: lightblue;
    color: white;
    padding: 20px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

header a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    margin-top: 15px;
    display: inline-block;
    border: 1px solid #fff;
    padding: 10px 20px;
    border-radius: 5px;
}

header a:hover {
    background-color: lightcoral;
    border-color: lightcoral;
}

/* Navbar Logo */
.logo-img {
    height: 120px;
    width: auto;
    margin-right: 15px;
}

/* Auth Links */
.auth-links a {
    color: black;
    text-decoration: none;
    margin-left: 20px;
    font-weight: bold;
    transition: color 0.3s;
}

.auth-links a:hover {
    color: #ff4081;
}

/* Modal Styles */
.modal {
    display: none;  /* Hidden by default */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 50%;
    max-width: 400px;
}

/* Close Button Styling */
.close-btn {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
}

/* Success Message Box */
#login-message {
    display: none;
    color: green;
    font-weight: bold;
    margin-top: 10px;
}

#login-message.success {
    display: block;
    text-align: center;
    padding: 10px;
    background-color: #e8f5e9; /* Light green background */
    border: 1px solid #388e3c; /* Green border */
    border-radius: 5px;
}

#login-message.error {
    display: block;
    text-align: center;
    padding: 10px;
    background-color: #fbe9e7; /* Light red background */
    border: 1px solid #e57373; /* Red border */
    border-radius: 5px;
}



/* Gallery Section */
.gallery-section {
    padding: 50px 20px;
    background-color: #f4f4f4;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.gallery-title {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.gallery-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: #555;
}

/* Gallery Section */
.gallery-section {
    padding: 50px 20px;
    background-color: #f4f4f4;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.gallery-title {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.gallery-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: #555;
}

/* Gallery Grid as a CSS Grid */
.gallery-grid {
    display: grid; /* Use grid for layout */
    grid-template-columns: repeat(3, 1fr); /* 3 columns, each with equal width */
    gap: 20px; /* Add space between the items */
    justify-items: center; /* Center the items horizontally within their grid cell */
}

/* Gallery Item Styling */
.gallery-item {
    width: 100%; /* Ensure the item takes full width of the grid cell */
    text-align: center;
}

.gallery-item img {
    width: 100%; /* Make sure the images fill their containers */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* User Info and Caption Styling */
.gallery-item-details {
    margin-top: 10px;
    text-align: left;
    color: #444;
    font-size: 1rem;
}

.user-name {
    font-weight: bold;
    color: #2c3e50;
}

.caption {
    font-style: italic;
    color: #777;
}

/* Footer Styles */
footer {
    background-color: lightblue;
    color: white;
    padding: 10px 0; /* Reduced padding */
    text-align: center;
}

.social-links a {
    color: white;
    margin: 0 10px; /* Reduced margin between links */
    text-decoration: none;
    font-size: 16px;
}

#login-form input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#login-form button {
    width: 100%;
    padding: 10px;
    background-color: lightcoral;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#login-form button:hover {
    background-color: #ff3366;
}

#login-message {
    color: red;
    margin-top: 10px;
}


footer p {
    font-size: 14px; /* Optional: Reduces the font size of any text inside the footer */
}

/* Mobile and Smaller Screen Adjustments */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on smaller screens */
    }

    .gallery-item {
        width: 100%; /* Ensure full width of grid item on smaller screens */
    }
}

/* Media Query for Mobile */
@media (max-width: 768px) {
    .gallery-title {
        font-size: 2em;
    }

    .gallery-description {
        font-size: 1.1em;
    }

    .gallery-item-details {
        font-size: 0.9em;
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    
    /* Logo adjustments */
    .navbar .logo {
        margin-top: 10px; /* Add small top margin for better spacing */
        margin-bottom: 0; /* Remove space below logo */
        text-align: center; /* Center the logo */
        padding-left: 15px; /* Add space to the left of the logo */
        padding-right: 15px; /* Add space to the right of the logo */
    }

    /* Navbar layout */
    .navbar {
        display: flex;
        flex-direction: column;  /* Stack elements vertically */
        justify-content: flex-start;  /* Align items at the top */
        align-items: left; /* Center items horizontally */
        min-height: 150px; /* Increase height for better spacing */
        padding: 2px 6px;  /* Add padding around navbar for even spacing on all sides */
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }

    /* Links section layout */
    .navbar .nav-links,
    .auth-links {
        display: flex;
        flex-wrap: wrap; /* Allow items to wrap if necessary */
        justify-content: center; /* Center links horizontally */
        gap: 8px; /* Space between items */
        margin: 0; /* Remove any default margin */
        width: 100%; /* Ensure the links section takes up full width */
    }

    /* Style for individual links */
    .nav-links a,
    .auth-links a {
        font-size: 12px;  /* Smaller font size */
        padding: 2px 6px; /* Adjust padding for spacing */
        white-space: nowrap;  /* Prevent text wrapping */
        margin: 0 5px;  /* Small margin between links */
    }

    /* Auth links section */
    .auth-links {
        margin-top: 10px; /* Small gap between nav links and auth links */
    }

    /* Ensure nav links span the full width */
    .nav-links {
        text-align: center; /* Center text inside nav-links */
    }
}

/* Responsive Design for iPad */
@media screen and (min-width: 768px) and (max-width: 1024px) {

    /* Logo adjustments */
    .navbar .logo {
        margin-top: 10px; /* Add small top margin for better spacing */
        margin-bottom: 0; /* Remove space below logo */
        text-align: center; /* Center the logo */
        padding-left: 15px; /* Add space to the left of the logo */
        padding-right: 15px; /* Add space to the right of the logo */
        width: 100%; /* Ensure the logo takes up full width */
    }

    /* Navbar layout */
    .navbar {
        display: flex;
        flex-direction: ro;  /* Keep elements in a horizontal line */
        justify-content: space-between;  /* Space out elements with equal margins */
        align-items: center; /* Vertically align items */
        min-height: 100px; /* Ensure enough space for the navbar */
        padding: 10px 20px;  /* Add padding to the left and right of the navbar */
        overflow-x: hidden; /* Prevent horizontal scrolling */
        width: 100%; /* Ensure navbar takes up full width */
    }

    /* Links section layout */
    .navbar .nav-links,
    .auth-links {
        display: flex;
        flex-wrap: nowrap; /* Prevent wrapping of links */
        justify-content: flex-start; /* Align items to the left */
        gap: 15px; /* Increase space between items */
        margin: 0; /* Remove any default margin */
        width: auto; /* Let links take their natural width */
        flex-grow: 1; /* Allow links section to grow and take available space */
    }

    /* Style for individual links */
    .nav-links a,
    .auth-links a {
        font-size: 14px;  /* Slightly larger font size for readability */
        padding: 5px 10px; /* Adjust padding for better spacing */
        white-space: nowrap;  /* Prevent text wrapping */
        margin: 0;  /* Remove additional margins */
        text-align: center; /* Ensure links are centered */
    }

    /* Auth links section */
    .auth-links {
        margin-left: 20px; /* Add space between nav and auth links */
    }

    /* Ensure nav links stay aligned */
    .nav-links {
        text-align: left; /* Align links to the left */
        width: auto; /* Allow nav links to adjust their width */
    }
}

/* Responsive Design for iPad Mini (portrait/landscape, min-width: 768px and max-width: 1024px) */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    
    /* Logo adjustments */
    .navbar .logo {
        margin-top: 10px;
        margin-bottom: 0;
        text-align: center;
        padding-left: 15px;
        padding-right: 15px;
        width: 100%;  /* Ensure logo takes up full width */
    }

    /* Navbar layout */
    .navbar {
        display: flex;
        flex-direction: column;  /* Stack elements vertically */
        justify-content: space-between;
        align-items: center;
        min-height: 100px;  /* Ensure enough height for the navbar */
        padding: 5px 10px;
        overflow-x: hidden;
        width: 100%;
    }

    /* Links section layout */
    .navbar .nav-links,
    .auth-links {
        display: flex;
        flex-wrap: nowrap;  /* Prevent wrapping of links */
        justify-content: flex-start;  /* Align items to the left */
        gap: 15px;  /* Increase space between items */
        margin: 0;
        width: auto;
        flex-grow: 1;  /* Allow links section to grow */
    }

    /* Style for individual links */
    .nav-links a,
    .auth-links a {
        font-size: 16px;  /* Slightly larger font size for readability */
        padding: 8px 12px;
        white-space: nowrap;
        margin: 0;
        text-align: center;  /* Ensure links are centered */
    }

    /* Auth links section */
    .auth-links {
        margin-left: 10px;  /* Space between nav and auth links */
    }

    /* Ensure nav links stay aligned */
    .nav-links {
        text-align: left;  /* Align links to the left */
        width: auto;
    }
}
