/* --- Global Variables & Reset --- */
:root {
    --maroon: #800000; /* The predominant deep, academic red */
    --pink: #FF9EBB;   /* The dominant bright accent */
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f4f4f4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- Gradient Utility Class --- */
/* This applies your requested Maroon-to-Pink gradient layout */
.gradient-bg {
    background: linear-gradient(135deg, var(--maroon) 0%, var(--pink) 100%);
    color: var(--text-light);
}

/* --- Header & Navigation --- */
header {
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 1.8rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

/* --- Hero Section (Home Page) --- */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* --- Main Content Layout --- */
main {
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-top: 5px solid var(--maroon);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card h3 {
    color: var(--maroon);
    margin-bottom: 1rem;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* --- Image Styling for Cards --- */
.card-img {
    width: 100%;
    height: 220px; /* Keeps all images at a uniform height */
    object-fit: cover; /* Ensures images fill the space without stretching */
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 2px solid var(--bg-light);
}

/* --- New Gallery & Portrait Styling --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    border: 3px solid var(--maroon);
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.portrait-card {
    text-align: center;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.portrait-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--pink);
    margin-bottom: 1rem;
}

.portrait-card h4 {
    color: var(--maroon);
    margin-bottom: 0.2rem;
}

.portrait-card p {
    font-size: 0.9rem;
    color: #555;
    font-weight: bold;
}

/* --- Pure CSS Auto-Slider (Home Page) --- */
.slider-container {
    width: 100%;
    max-width: 800px;
    height: 350px;
    margin: 0 auto 2rem auto;
    overflow: hidden; /* Hides the images outside the viewing area */
    border-radius: 8px;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: relative;
}

.slider-wrapper {
    display: flex;
    width: 500%; /* 100% for each of the 5 images */
    height: 100%;
    animation: slideShow 20s infinite; /* Total animation loops every 20 seconds */
}

.slider-wrapper img {
    width: 20%; /* 100% divided by 5 images */
    height: 100%;
    object-fit: cover;
}

/* Keyframes for 5 images:
  Holds on an image for a bit, then slides to the next.
*/
@keyframes slideShow {
    0%, 15%   { transform: translateX(0); }         /* Show Image 1 */
    20%, 35%  { transform: translateX(-20%); }      /* Show Image 2 */
    40%, 55%  { transform: translateX(-40%); }      /* Show Image 3 */
    60%, 75%  { transform: translateX(-60%); }      /* Show Image 4 */
    80%, 95%  { transform: translateX(-80%); }      /* Show Image 5 */
    100%      { transform: translateX(0); }         /* Quick snap back to start */
}

/* Optional: Pause the slider if someone hovers their mouse over it */
.slider-container:hover .slider-wrapper {
    animation-play-state: paused;
}

/* =========================================
   INTERACTIVE & HOVER EFFECTS
   ========================================= */

/* --- Smooth Scrolling --- */
/* Makes jumping between page sections glide instead of snap */
html {
    scroll-behavior: smooth;
}

/* --- 1. Animated Navigation Links --- */
/* Creates a sleek line that slides under the menu links when hovered */
nav a {
    position: relative;
    padding-bottom: 5px;
}
nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--text-light);
    transition: width 0.3s ease-in-out;
}
nav a:hover {
    opacity: 1; /* Removes the old fade effect */
}
nav a:hover::after {
    width: 100%;
}

/* --- 2. Floating Cards with Deep Shadows --- */
/* Makes the Department, Summary, and Portrait cards "lift" off the page */
.card, .portrait-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover, .portrait-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

/* --- 3. Sliding "Read More" Links --- */
/* Nudges the text and arrow to the right when hovered over */
.card a {
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
}
.card a:hover {
    transform: translateX(8px);
    color: var(--maroon) !important;
}

/* --- 4. Gallery Images Subtle Zoom --- */
/* Makes the action shots in your gallery pop out slightly */
.gallery-img {
    transition: transform 0.4s ease, border-color 0.4s ease;
}
.gallery-img:hover {
    transform: scale(1.03);
    border-color: var(--pink);
    z-index: 10;
    position: relative;
}

/* --- 5. Contact Form Focus Glow --- */
/* Gives a nice pink/maroon glow to the boxes when someone is typing */
input, select, textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--maroon);
    box-shadow: 0 0 8px rgba(255, 158, 187, 0.6); /* Soft pink glow */
}

/* --- 6. 3D Submit Button --- */
/* Makes the contact form button lift up and cast a colored shadow */
button {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(128, 0, 0, 0.4);
    opacity: 1; 
}