/* Core Variables */
:root {
    --bg-color: #f8fafc;      /* Slightly deeper off-white for texture */
    --text-main: #1e293b;     /* Slate dark for professional text */
    --accent-blue: #2c5282;   /* Deep navy for brand identity */
    --accent-earth: #64748b;  /* Slate grey for secondary accents */
    --card-white: #ffffff;
}

/* Base Body Styles */
body {
    background-color: var(--bg-color);
    background-image: radial-gradient(#e2e8f0 0.5px, transparent 0.5px); /* Very subtle dot pattern */
    background-size: 20px 20px;
    color: var(--text-main);
    line-height: 1.8;
}

/* Professional Navigation */
.w3-top.w3-bar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px); /* Modern frosted glass effect */
    color: var(--text-main) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-bottom: 1px solid #e2e8f0;
}

/* Hero Section Typography */
.hero-title {
    font-size: clamp(3.5rem, 12vw, 8rem);
    font-weight: 800;
    color: var(--accent-blue);
    letter-spacing: -2px;
    background: linear-gradient(135deg, #2c5282 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; /* Professional gradient text */
    margin-bottom: 0;
}

.hero-subheading {
    font-size: 1.5rem;
    color: var(--accent-earth);
    font-style: italic;
    margin-top: -10px;
    font-weight: 400;
}

/* Content Container as a Professional Card */
#about .w3-content {
    background: var(--card-white);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

/* Team Photo Styling (inchin.html) */
#about img[src*="inchin-kimeltuwe"], 
#about img[src*="team"] {
    border: 8px solid white !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.3s ease;
}

#about img[src*="inchin-kimeltuwe"]:hover,
#about img[src*="team"]:hover {
    transform: rotate(-1deg) scale(1.02);
}

/* Headers with Accent Lines */
h2, h3 {
    font-weight: 700 !important;
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
}

h2::after, .section-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-blue);
    margin-top: 10px;
    border-radius: 2px;
}

/* Section header specific spacing */
.section-header {
    color: var(--accent-blue);
    font-weight: 700;
    margin-bottom: 30px;
}

/* Gallery Sizing (TOP GRID) */
.gallery-header {
    max-width: 1200px;
    margin: 20px auto 0 auto;
    padding: 0 16px;
}

.gallery-img {
    width: 100%;
    height: 180px; 
    object-fit: cover; /* Crops images to fill area without stretching */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-img:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(44, 82, 130, 0.2);
    filter: brightness(1.05);
}

/* Carousel Specifics (MIDDLE SLIDESHOW) */
.slides {
    display: none; /* Controlled by JavaScript */
}

.carousel-img {
    border-radius: 16px;
    height: 450px !important; 
    object-fit: cover;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* Social Cards Styling */
.social-card {
    display: block;
    text-decoration: none;
    background: var(--card-white);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px -10px rgba(44, 82, 130, 0.2);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.social-card span {
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}

.social-card p {
    color: var(--accent-earth);
    margin: 0;
    line-height: 1.4;
}

/* Responsive Table/List Styling */
.w3-ul.w3-hoverable li {
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 16px !important;
    transition: background 0.2s ease;
}

.w3-ul.w3-hoverable li:hover {
    background-color: #f1f5f9 !important;
    color: var(--accent-blue) !important;
}

/* Minimal Footer */
footer hr {
    border-top: 1px solid #e2e8f0;
    width: 50px;
    margin: 20px auto;
}

footer h5 {
    color: var(--accent-earth);
    font-size: 0.9rem;
    font-weight: 400;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .gallery-img {
        height: 120px;
        margin-bottom: 16px;
    }
    .carousel-img {
        height: 250px !important;
    }
    .hero-title {
        letter-spacing: -1px;
    }
    #about .w3-content {
        padding: 20px;
    }
}


/* Gallery Container and Label Styling */
.gallery-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.gallery-link {
    text-decoration: none;
    display: block;
}

/* The Label Overlay */
.gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(44, 82, 130, 0.85); /* Matches --accent-blue with transparency */
    color: white;
    padding: 8px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

/* Animation: Label pops up on hover */
.gallery-container:hover .gallery-label {
    background: var(--accent-blue);
    padding: 12px;
}

/* Ensure the image scales properly inside the new container */
.gallery-img {
    display: block;
    width: 100%;
    height: 180px; 
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-container:hover .gallery-img {
    transform: scale(1.1); /* Zoom effect on the image */
}

        .hero-title {
            font-size: clamp(3rem, 12vw, 8rem);
            font-weight: bold;
            color: var(--accent-blue);
            margin: 0;
        }
        
        /* Video Card Styling */
        .video-card {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
            margin-bottom: 48px;
            border: 1px solid #e2e8f0;
        }

        .video-container {
            position: relative;
            padding-bottom: 56.25%;
            height: 0;
            overflow: hidden;
        }

        .video-container iframe {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            border: none;
        }

        .video-info {
            padding: 24px;
        }

        .video-meta {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
            margin: 16px 0;
            font-size: 0.95rem;
        }

        .citation-box {
            background: #f1f5f9;
            padding: 12px;
            border-radius: 0px;
            font-size: 0.85rem;
            color: #475569;
            border-left: 4px solid var(--accent-blue);
        }

        .badge-audience {
            background: var(--accent-blue);
            color: white;
            padding: 2px 10px;
            border-radius: 20px; /* Rounded pill shape looks more modern */
            font-size: 0.85rem;
            white-space: nowrap; /* Prevents the number from breaking into two lines */
        }