/* css/style.css */
/* Updated for Sections, Fade Animations, Cards */

:root {
    --primary: #2E7D32;
    --secondary: #4CAF50;
    --accent: #FFC107;
    --text: #333;
    --bg: #F5F5F5;
    --white: #FFF;
    --shadow: 0 4px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arimo', sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Header */
.header {
    background: var(--primary);
    color: var(--white);
    padding: 1rem;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    width: 90px;
    height: 90px;
}

.header-text {
    text-align: center;
}

/* Navigation */
.nav {
    background: var(--secondary);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-list {
    display: flex;
    list-style: none;
}

.nav-list li {
    margin: 0 1rem;
}

.nav-list a {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
}

.nav-list a:hover {
    color: var(--accent);
}

.nav-search {
    display: flex;
}

.nav-search input {
    padding: 0.5rem;
    border: none;
}

.nav-search button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.hamburger {
    display: none;
}

/* Hero */
.hero {
    position: relative;
    height: 80vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.3)), url('https://www.lita.go.tz/images/banner-slider1.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
}

.hero-content h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.floating-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    position: absolute;
    bottom: -50px;
    width: 80%;
    max-width: 1200px;
}

.card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
}

.card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
}

.btn:hover {
    background: var(--secondary);
}

/* Floating Glass Cards */
.floating-glass {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    width: 180px;
}

.left-glass {
    left: 10px;
}

.right-glass {
    right: 10px;
}

.floating-glass:hover {
    transform: translateY(-50%) scale(1.05);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 4rem auto 2rem;
    padding: 0 1rem;
}

.slider {
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 10px;
}

.slides {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
}

.slide img {
    width: 100%;
    height: auto;
}

.caption {
    text-align: center;
    padding: 0.5rem;
    background: rgba(0,0,0,0.5);
    color: var(--white);
}

.welcome-note img {
    float: left;
    margin-right: 1rem;
    width: 20%;
    border-radius: 50%;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.news-card {
    box-shadow: var(--shadow);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    height: auto;
}

.news-card h3 {
    padding: 0.5rem;
}

.news-card p {
    padding: 0 0.5rem 0.5rem;
}

.view-all {
    display: inline-block;
    margin-top: 1rem;
}

/* Sections with Fade Animation */
.section {
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.section-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.section-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.section-card:hover {
    transform: translateY(-10px);
}

.section-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Custom Modal Animations */
.modal.slide-left .modal-dialog {
    animation: slideInLeft 0.5s ease;
}

.modal.slide-top .modal-dialog {
    animation: slideInTop 0.5s ease;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInTop {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal.fade .modal-dialog {
    transition: opacity 0.3s linear, transform 0.3s ease;
}

.modal.show .modal-dialog {
    opacity: 1;
}

/* AI Chat */
.ai-chat-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.ai-chat-btn:hover {
    transform: scale(1.1);
}

.chat-messages {
    border: 1px solid var(--bg);
    padding: 1rem;
    height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.chat-interface input {
    width: calc(100% - 80px);
    padding: 0.5rem;
}

.chat-interface button {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--white);
    border: none;
}

/* Footer */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-listing {
    list-style: none;
}

.footer-listing li a {
    color: var(--white);
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
}

.social-media-lists {
    display: flex;
    list-style: none;
}

.social-media-lists li {
    margin-right: 1rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
}

.footer-damn-lists {
    display: flex;
    justify-content: center;
    list-style: none;
}

.footer-damn-lists li {
    margin: 0 1rem;
}

.footer-damn-lists li a {
    color: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
    }

    .nav-list {
        flex-direction: column;
        display: none;
    }

    .nav-list.show {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .floating-cards {
        grid-template-columns: 1fr;
        position: static;
        margin: 2rem 0;
    }

    .floating-glass {
        position: static;
        transform: none;
        width: 100%;
        margin: 1rem 0;
    }
}

/* Custom Horizontal Modal */
.modal.horizontal .modal-body {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: flex-start;
}

.modal.horizontal .modal-body .content-left {
    flex: 1;
}

.modal.horizontal .modal-body .content-right {
    flex: 1;
    text-align: center;
}

/* Responsive: Stack vertically on small screens */
@media (max-width: 768px) {
    .modal.horizontal .modal-body {
        flex-direction: column;
    }
}
.nav-list i {
    display: block;
    text-align: center;
    color: gold;
}

/* Floating Glass Cards with Animation */
.floating-glass {
    position: absolute;
    top: 60%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    width: 160px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    animation: float 4s ease-in-out infinite;
    z-index: 5;
}

.left-glass { left: 5%; }
.right-glass { 
    right: 5%; 
    animation-delay: 2s; /* Offset animation for variety */
}

.floating-glass i {
    font-size: 2.5rem;
    color: var(--accent);
    filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.6));
}

.floating-glass span {
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.floating-glass:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1) translateY(-10px);
    border-color: var(--accent);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* CEO Section Styles */
#ceo-welcome {
    padding: 60px 0;
    background: #fdfdfd;
}

.ceo-card {
    display: flex;
    background: var(--white);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 20px 20px 60px #d9d9d9, -20px -20px 60px #ffffff; /* Neumorphic Shadow */
    border: 1px solid rgba(0,0,0,0.05);
}

/* Left Profile Side */
.ceo-profile {
    flex: 1;
    background: linear-gradient(145deg, var(--primary), #1e5221);
    color: var(--white);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ceo-image-container {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    padding: 10px;
    background: rgba(255,255,255,0.2);
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.ceo-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white);
}

.ceo-details h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.ceo-title {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Right Message Side */
.ceo-message {
    flex: 2;
    padding: 60px;
    position: relative;
}

.quote-icon {
    position: absolute;
    top: 40px;
    left: 40px;
    font-size: 4rem;
    color: rgba(46, 125, 50, 0.05);
    z-index: 0;
}

.section-title-left {
    color: var(--primary);
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.message-body p {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.8;
    z-index: 1;
    position: relative;
}

.ceo-signature {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.ceo-signature strong {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 992px) {
    .ceo-card {
        flex-direction: column;
    }
    .ceo-message {
        padding: 40px 20px;
    }
}

/* Styling the paragraph to act as a Call-to-Action */
.section-card p {
    margin-top: 1.2rem;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    background: #eeeeee;
    border-radius: 50px;
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 2px 2px 5px #bcbcbc, inset -2px -2px 5px #ffffff; /* Sunken Neumorphic look */
    position: relative;
    cursor: pointer;
}

/* Add a dynamic arrow using CSS pseudo-element */
.section-card p::after {
    content: ' →';
    opacity: 0;
    transition: all 0.3s ease;
    margin-left: -10px;
}

/* Card Hover State - This triggers the paragraph change */
.section-card:hover {
    transform: translateY(-5px);
}

.section-card:hover p {
    background: var(--accent); /* Changes to Gold */
    color: var(--primary);
    box-shadow: 0 10px 20px rgba(255, 193, 7, 0.3); /* Glowing effect */
    padding-right: 35px; /* Make space for the arrow */
}

.section-card:hover p::after {
    opacity: 1;
    margin-left: 8px;
}

/* Subtle "Attention" Animation */
@keyframes pulse-hint {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Apply pulse to paragraphs to catch the user's eye */
.section-card p {
    animation: pulse-hint 3s infinite ease-in-out;
}


/* --- RESPONSIVE MASTER OVERRIDES --- */

/* Tablet & Smaller (Max 992px) */
@media (max-width: 992px) {
    .ceo-card {
        flex-direction: column; /* Stack CEO image on top of message */
        margin: 0 15px;
    }

    .ceo-profile {
        padding: 30px;
        flex: none;
        width: 100%;
    }

    .ceo-message {
        padding: 30px;
    }

    .quick-access-container {
        gap: 15px;
        padding: 10px;
    }

    .floating-glass {
        width: 180px; /* Slightly smaller cards */
        padding: 1rem;
    }
}

/* Mobile Devices (Max 768px) */
@media (max-width: 768px) {
    /* Header & Nav */
    .header-container {
        padding: 0 15px;
    }

    .nav-list {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary);
        flex-direction: column;
        display: none; /* Controlled by 'show' class in JS */
        padding: 20px;
        text-align: center;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }

    .nav-list.show {
        display: flex;
    }

    .nav-list li {
        margin: 15px 0;
    }

    /* Floating Cards - Stacked for Mobile */
    .quick-access-container {
        flex-direction: column;
        align-items: center;
        margin-top: 5px;
    }

    .floating-glass {
        width: 90%; /* Full width on mobile */
        justify-content: flex-start; /* Align icon and text for better flow */
        animation: none; /* Disable floating on mobile to prevent mis-taps */
    }

    /* CEO Section Mobile */
    .ceo-image-container {
        width: 150px;
        height: 150px;
    }

    .ceo-message h2 {
        font-size: 1.5rem;
    }

    /* Section Cards Grid */
    .section-cards {
        grid-template-columns: 1fr; /* Force 1 column on small screens */
        gap: 20px;
        padding: 0 10px;
    }

    /* Footer Mobile */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h3::after {
        left: 25%; /* Center the border-bottom on mobile */
    }
}

/* Small Mobile (Max 480px) */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .floating-glass span {
        font-size: 0.8rem;
    }
}

/* Campus Map Section */
.campus-map-wrapper {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.campus-map {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 30px;
    box-shadow: 20px 20px 60px #d9d9d9, -20px -20px 60px #ffffff; /* Strong Neumorphic Lift */
    max-width: 600px;
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

.campus-map h3 {
    color: var(--primary);
    margin-bottom: 2rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

/* Underline for the title */
.campus-map h3::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    background: var(--accent);
    bottom: -10px;
    left: 20%;
    border-radius: 2px;
}

/* Map Frame and Image */
.map-frame {
    text-align: center;
    max-width: 500px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    border: 8px solid var(--white);
    box-shadow: inset 5px 5px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.campus-map img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

/* Glassmorphism Overlay on Hover */
.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 125, 50, 0.4); /* LITA Green Tint */
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.map-overlay p {
    color: var(--white);
    font-weight: 700;
    background: var(--accent);
    padding: 10px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

/* Hover States */
.map-frame:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.map-frame:hover img {
    transform: scale(1.05);
}

.map-frame:hover .map-overlay {
    opacity: 1;
}

.map-frame:hover .map-overlay p {
    transform: translateY(0);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .campus-map {
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    .map-overlay {
        display: none; /* Hide overlay on mobile for cleaner view */
    }
    
    .map-frame {
        border-width: 4px;
    }
}
