/* General Styles */
body {
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    text-align: center;
    direction: rtl;
}

.container {
    max-width: 600px; /* Maintains a compact layout */
    margin: 0 auto;
    padding: 20px;
}

img {
    max-width: 100%;
    height: auto;
}

/* Enlarged Logo */
.logo img {
    width: 250px;
    height: auto;
    margin: 10px auto; /* Reduced top and bottom margin */
}

/* Slogan Styles */
.slogan {
    margin-top: 5px; /* Reduced space between logo and slogan */
    font-size: 1.2em;
    font-weight: bold;
    color: #006400; /* Dark Green */
}

/* Social Media Buttons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px; /* Increased spacing between icons */
    margin: 15px 0; /* Reduced vertical margin */
}

.social-icons a {
    text-decoration: none;
}

.social-icons img {
    width: 60px; /* Increased size */
    height: 60px;
    transition: transform 0.3s ease;
}

.social-icons img:hover {
    transform: scale(1.1);
}

/* Gallery Wrapper */
.gallery-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 30px 0;
}

/* Photo Gallery with Slider */
.gallery-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    direction: ltr; /* Ensures the slider behaves in LTR mode */
}

/* Each Gallery Slide */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Always 3 columns */
    grid-gap: 10px;
    margin: 0;
    flex-shrink: 0;
    width: 100%;
}

/* Uniform Image Appearance */
.gallery img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery img:hover {
    transform: scale(1.05);
}

/* Navigation Buttons */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.nav-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Swapped positions for RTL layout */
.prev-button {
    right: 10px;
}

.next-button {
    left: 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: block;
}

.modal-content {
    position: relative;
    padding: 20px;
    max-width: 500px;
    margin: 80px auto;
    text-align: center;
    background-color: #fff;
    border-radius: 10px;
}

.modal-content img {
    width: 100%;
    max-width: 400px;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.modal-content img.full-view {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    cursor: zoom-out;
    transform: scale(1.5); /* Adjusted zoom level */
}

.modal-content h2 {
    margin-top: 15px;
    font-size: 1.5em;
}

.modal-content p {
    margin: 10px 0;
    font-size: 1em;
    color: #555;
}

.modal-content .ask-button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #1E88E5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 15px;
}

.modal-content .ask-button:hover {
    background-color: #1565C0;
}

.modal-content .close-button {
    position: absolute;
    top: 15px;
    left: 15px;
    background: transparent;
    border: none;
    font-size: 2em;
    color: #333;
    cursor: pointer;
}

/* Map Section */
.location {
    margin: 30px 0;
}

.location iframe {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: 8px;
}

.location .address {
    margin-top: 10px;
    font-size: 1.1em;
    font-weight: bold;
}

.location button {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #1E88E5;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.location button:hover {
    background-color: #1565C0;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        max-width: 100%; /* Allow the container to use full width on mobile */
        padding: 10px;
    }

    .gallery {
        grid-template-columns: repeat(3, 1fr); /* Maintain 3 columns on mobile */
    }

    .gallery img {
        border-radius: 5px;
    }

    .nav-button {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .social-icons {
        gap: 15px; /* Adjust spacing for smaller screens */
    }

    .social-icons img {
        width: 50px; /* Adjusted size for mobile */
        height: 50px;
    }

    .logo img {
        width: 220px;
    }

    .slogan {
        font-size: 1em;
        margin-top: 5px; /* Further reduce space if needed */
    }

    .modal-content {
        margin: 40px 10px;
    }

    .modal-content img {
        max-width: 100%;
        max-height: 250px;
    }
}
