/* General Styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f4f4f4;
}

/* Navigation */
header {
    background-color: black;
    padding: 15px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto; /* Allow flexible height */
    position: relative;
    z-index: 1000;
}

header img {
    width: 367px; /* Default size */
    height: 80px;
}

@media (max-width: 768px) { /* Target screens smaller than 768px (tablets & mobile) */
    header img {
        width: 150px; /* Adjust as needed */
        height: auto; /* Maintain aspect ratio */
    }
}

@media (max-width: 400px) { /* Target smaller mobile screens */
    header img {
        width: 90%; /* Further reduce size */
        height: 90%;
    }
}


/* Navigation menu */
nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin: 0 10px;
}

nav ul li a {
    text-decoration: none;
    color: Grey;
    font-weight: 500;
}

/* Hamburger Menu (Hidden by default) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger div {
    width: 30px;
    height: 3px;
    background: Grey;
    margin: 5px 0;
}

/* Mobile Styles */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100px;
        right: 20px;
        background: black;
        width: 200px;
        border: 1px solid white;
        box-shadow: 0px 4px 6px rgba(255, 255, 255, 0.1);
        padding: 10px;
    }

    nav ul.show {
        display: flex;
    }

    .hamburger {
        display: flex;
    }
}

/* Hide the hamburger menu on larger screens */
@media (min-width: 769px) {
    .hamburger {
        display: none;
    }
}


/* Hero Section with Slideshow */
.hero {
    position: relative;
    width: 100%;
    height: 50vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 0px;
    
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100vh; /* Adjust height */
    overflow: hidden;
    margin: 0%;
}

.slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide.active {
    opacity: 1;
}


.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.about-section {
    width: 100%; /* Prevents horizontal scrolling */
    max-width: 100%;
    margin: 0 auto;
    padding: 30px;
    background-color: #eaeaea;
    overflow: hidden; /* Ensures content stays inside */
}

.about-section p {
    word-wrap: break-word; /* Breaks long words */
    overflow-wrap: break-word;
    text-align: center; /* Improves readability */
    padding-right:60px;
}

@media (max-width: 768px) {
    .about-section {
        padding: 20px;
        width:100%;
    }

    .about-section p {
        font-size: 14px; /* Make text fit better */
        line-height: 1.5; /* Improve readability */
    }
}

@media (max-width: 480px) {
    .about-section {
        padding: 15px;
        width:100%;
    }

    .about-section p {
        font-size: 13px;
        line-height: 1.4;
    }
}

.about-section h2, .about-section h3 {
    color: #333;
    font-size: 28px;
    margin-bottom: 15px;
    text-align: center;
    padding: 10px;
}

/* Justified text for desktop */
.justified-text {
    text-align: justify;
    font-size: 18px;
    line-height: 1.6;
    color: #555;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px; /* Ensure spacing on small screens */
}

/* Responsive text wrapping for tablets */
@media (max-width: 768px) {
    .about-section {
        padding: 30px;
    }

    .about-section h2, .about-section h3 {
        font-size: 22px;
    }

    .justified-text {
        font-size: 16px;
        max-width: 95%; /* Reduce width for better wrapping */
        padding: 0 15px;
    }
}

/* Further optimizations for very small screens */
@media (max-width: 480px) {
    .about-section {
        padding: 20px; /* Reduce padding on smallest screens */
    }

    .about-section h2, .about-section h3 {
        font-size: 20px; /* Smaller headings for better fitting */
    }

    .justified-text {
        font-size: 14px; /* Reduce text size to fit better */
        line-height: 1.5; /* Adjust spacing */
        max-width: 90%; /* Further restrict width for better wrapping */
        padding: 0 10px; /* More padding to prevent text from touching edges */
    }
}



/* Services Section */
.service-cards .card img {
    width: 220px;  /* Smaller width */
    height: 150px; /* Maintain aspect ratio */
    display: block;
    margin: 8px auto; /* Center the image with less spacing */
}


.services {
    text-align: center;
    padding: 50px;
    background-color: #fff;
}

.service-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.card {
    background: #eaeaea;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 250px;
}


/* Accreditation Section */
.accreditation {
    text-align: center;
    padding: 50px;
}

.logos img {
    margin: 10px;
    width: 100px;
}

/* Gallery Section */

/* Center the Gallery Title */
.gallery {
    text-align: center;
    padding: 20px;
}

/* Keep the Gallery Cards Centered in a Row */
.gallery-container {
    display: flex;
    justify-content: center; /* Center cards horizontally */
    align-items: center; /* Align vertically */
    gap: 20px; /* Space between cards */
    flex-wrap: wrap; /* Allow wrapping if screen is small */
    max-width: 90%; /* Prevents full-width stretching */
    margin: 0 auto; /* Centers the whole container */
}

/* Gallery Card */
.gallery-card {
    width: 350px;
    height: 280px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Gallery Preview */
.gallery-preview {
    display: flex;
    width: 100%;
    height: 100%;
}

.gallery-preview img {
    width:33.33%;
    height: 100%;
    object-fit: cover;
}

/* Overlay (Photos Label) */
.overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.overlay .icon {
    margin-right: 5px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    text-align: center;
}

.lightbox-img {
    max-width: 80%;
    max-height: 80%;
    margin-top: 5%;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* Lightbox Navigation */
.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}



/* Contact Section */
.contact {
    background: #fff;
    padding: 50px;
    text-align: center;
}

form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

form input, form textarea {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    background: #333;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
}

button:hover {
    background: #555;
}

/* Footer */
footer {
    background: #222;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}