/* facilities.css */
:root {
    --primary-color: #0066cc;
    --secondary-color: #f8f9fa;
    --accent-color: #ffc107;
    --text-primary: #333333;
    --text-secondary: #666666;
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* สำหรับไอคอนในเมนูหลัก */
nav .fas,
nav .fab,
nav i {
    color: white !important; /* ใช้ !important เพื่อ override สีอื่นๆ */
}

/* ถ้าต้องการให้ไอคอนเมนูมี hover effect */
nav .nav-link:hover .fas,
nav .nav-link:hover .fab,
nav .nav-link:hover i {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: color 0.3s ease;
}

/* ยกเว้นไอคอนในส่วนเนื้อหา (cards) ให้ยังคงเป็นสีน้ำเงิน */
.card .fas,
.card .fab,
.card i {
    color: var(--primary-color);
}






/* Back to Top Button */
#backToTop,
.back-to-top {
    background-color: var(--primary-color) !important; /* สีน้ำเงิน */
    border: none !important;
    color: white !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* ไอคอนในปุ่ม */
#backToTop i,
.back-to-top i,
.fa-arrow-up {
    color: white !important; /* ลูกศรสีขาว */
    font-size: 1.2rem;
}

/* Hover effect */
#backToTop:hover,
.back-to-top:hover {
    background-color: #0056b3 !important; /* สีน้ำเงินเข้มขึ้นเมื่อ hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Animation เมื่อ hover */
#backToTop:hover i,
.back-to-top:hover i {
    animation: moveUpDown 0.8s infinite;
}

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

















/* Hero Section Styles */
.staff-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                url('/assets/images/school-building.jpg') center/cover no-repeat;
    min-height: 40vh;
    position: relative;
    background-attachment: fixed;
	display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* เพิ่ม filter เพื่อปรับความสว่างและ contrast */
    filter: brightness(1.1) contrast(1.1);
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.staff-hero-content {
    position: relative;
    z-index: 2;
}

.staff-hero h1 {
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.staff-hero .lead {
    font-family: 'Sarabun', sans-serif;
    font-size: 1.25rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive styles */
@media (max-width: 768px) {
    .staff-hero {
        background-attachment: scroll;
        min-height: 30vh;
    }
    
    .staff-hero h1 {
        font-size: 2rem;
    }
    
    .staff-hero .lead {
        font-size: 1.1rem;
    }
}


.staff-hero:hover {
    filter: brightness(1.15) contrast(1.15);
    transition: filter 0.3s ease;
}



/* Animation for content */
[data-aos="fade-up"] {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
    opacity: 1;
}


/* Rest of your existing CSS remains the same */
.section-title {
    font-family: 'Prompt', sans-serif;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Card Styles */
.building-card,
.room-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), 
                box-shadow var(--transition-speed);
    background: white;
}

.building-card:hover,
.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.building-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.building-card:hover .card-img-top {
    transform: scale(1.05);
}

.card-title {
    font-family: 'Prompt', sans-serif;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Room Card Specific Styles */
.room-card .img-fluid {
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.room-card .card-body {
    padding: 1.5rem;
}

/* List Styles */
.list-unstyled li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.list-unstyled li i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* Icon Styles */
.fas, .fab {
    color: var(--primary-color);
    transition: transform var(--transition-speed);
}

.card:hover .fas {
    transform: scale(1.1);
}

/* Animation Delays for AOS */
[data-aos-delay="100"] { transition-delay: 100ms; }
[data-aos-delay="200"] { transition-delay: 200ms; }
[data-aos-delay="300"] { transition-delay: 300ms; }
[data-aos-delay="400"] { transition-delay: 400ms; }

/* Responsive Styles */
@media (max-width: 1200px) {
    .room-card .card-body {
        padding: 1.25rem;
    }
}

@media (max-width: 992px) {
    .section-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .room-card .img-fluid {
        height: 200px;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.5rem;
    }

    .card-body {
        padding: 1rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .building-card:hover,
    .room-card:hover {
        transform: none;
    }

    .building-card:active,
    .room-card:active {
        transform: scale(0.98);
    }
}

/* Print Styles */
@media print {
    .hero-section {
        height: auto;
        padding: 2rem 0;
    }

    .hero-overlay {
        display: none;
    }

    .card {
        break-inside: avoid;
        box-shadow: none;
    }

    .card-img-top,
    .img-fluid {
        max-height: 200px;
    }
}