/* General Page Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f8f8f8;
    margin: 0;
    padding: 0;
}

/* Hero Section Standardization */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 250px;
    background-size: cover;
    background-position: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: normal;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Departments Section */
.departments {
    text-align: center;
    padding: 50px 20px;
    background: white;
}

.departments h2 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 30px;
}

/* Departments Grid */
.departments-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* Individual Department Box */
.department {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.department:hover {
    transform: translateY(-5px);
}

.department img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.department h3 {
    font-size: 1.4em;
    color: #333;
    margin-top: 10px;
}

.department p {
    font-size: 1.1em;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .departments-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Departments Hero Section */
.departments-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 300px;
    background: url('../images/hero.jpg') no-repeat center center/cover;
    background-size: cover;
    color: white;
    padding: 80px 20px;
}

/* Hero Overlay */
.departments-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Adds a dark shade */
    z-index: 1;
}

/* Ensure text appears on top of overlay */
.departments-hero .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.departments-hero .hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.departments-hero .hero-subtitle {
    font-size: 1.5rem;
    font-weight: normal;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .departments-hero {
        height: 250px;
    }

    .departments-hero .hero-title {
        font-size: 2rem;
    }

    .departments-hero .hero-subtitle {
        font-size: 1.2rem;
    }
}
