/* Global Styles */
body {
    font-family: 'Kanit', sans-serif;
    background-color: #f8f9fa;
    color: #4a4a4a;
    overflow-x: hidden;
    font-weight: 400;
    font-style: normal;
    line-height: 1.6;
    overflow-x: hidden;
}

:root {
    --primary-pink: #e45d94;  /* สีชมพูหลักตามภาพ */
    --footer-pink: #d64d7d;
    --text-dark: #212529;
}

/* Container Max Width */
.container {
    max-width: 1170px !important;
}
 
/* Override Bootstrap Colors */
.display-6{
    font-size: 1.7em;
    line-height: 1.3em;
}
.text-primary {
    color: var(--primary-pink) !important;
}
.ls-wide { letter-spacing: .03em; }
.bg-primary {
    background-color: var(--primary-pink) !important;
}
.border-primary {
    border-color: var(--primary-pink) !important;
}
.btn-primary {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
}
.btn-primary:hover {
    background-color: #c04075;
    border-color: #c04075;
}
.ux-shape-divider.ux-shape-divider--bottom.ux-shape-divider--style-tilt.ux-shape-divider--flip {
    transform: scaleX(-1);
}

/* Header Styles - Split Layout */
header {
    background-color: transparent !important; /* Let children handle bg */
    /* Removed overflow: hidden because it clips dropdowns. Backgrounds are clipped by body {overflow-x: hidden} instead. */
}

/* Logo Section - Left */
.logo-section {
    background-color: #fff;
    min-width: fit-content;
    position: relative;
}
.logo-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 100%;
    bottom: 0;
    width: 100vw;
    background-color: #fff;
}
.logo-section img {
    max-height: 65px;
}
/* Menu Section - Right */
.menu-section {
    background-color: #000;
    position: relative;
}
.menu-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 100%;
    bottom: 0;
    width: 100vw;
    /*max-width: 100%;*/
    background-color: #000;
}

/* Navigation Links */
.navbar-dark .navbar-nav .nav-link {
    color: #fff !important;
    transition: color 0.3s;
    font-size: 1rem;
    padding-left: 0.6rem !important;
    padding-right: 0.6rem !important;
    font-weight: 400;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #f06eaa !important;
}

/* Language Switcher */
.lang-dropdown-container .nav-top-link {
    color: #f06eaa !important; /* Pink text by default */
}

.lang-dropdown-container:hover .sub-menu {
    display: block !important;
}

li.nav-item.position-relative.lang-dropdown-container {
    font-size: 1rem;
}
.sub-menu {
    z-index: 2000;
    min-width: 220px !important; /* Larger width */
    padding: 15px !important;
    border-radius: 4px;
    border: none;
    border-top: 4px solid #f06eaa; /* Pink top border */
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    margin-top: 10px; /* Space for the triangle */
}

/* Triangle Pointer for Language Dropdown */
.sub-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #f06eaa;
}

.sub-menu li {
    margin-bottom: 8px;
}
.sub-menu li:last-child {
    margin-bottom: 0;
}

.sub-menu li a {
    padding: 5px 0;
    display: block;
    transition: all 0.2s;
}

/* Invisible Bridge for Hover Stability */
.sub-menu::after {
    content: '';
    position: absolute;
    top: -20px; /* Covers the 10px margin plus buffer */
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
    z-index: -1; /* Place behind the triangle if needed, though transparent doesn't matter much */
}

.sub-menu li a:hover span {
    color: #f06eaa;
    
}

/* Apply Button */
.btn-apply {
    color: #fff;
    border: 1px solid #fff;
    transition: all 0.3s;
    letter-spacing: .03em;
}

.btn-apply:hover {
    background-color: #f06eaa;
    border-color: #f06eaa;
    color: #fff;
}

/* Search Dropdown Styles */
.search-toggle {
    cursor: pointer;
    font-size: 1.1rem;
}
.search-toggle:hover {
    color: #f06eaa !important;
}

.search-container:hover .search-dropdown {
    display: block !important;
}

.search-dropdown {
    display: none; /* Hide by default */
    position: absolute; /* Ensure it's positioned absolutely */
    right: 0;
    top: 100%; /* Align with header bottom */
    margin-top: 0;
    border-top: 3px solid #f06eaa; /* Pink top border like visual reference */
    z-index: 2000;
    min-width: 300px; /* Restore min-width */
    background: white;
}

/* Triangle Arrow for Dropdown */
.search-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #f06eaa;
}

/* Search Button */
.search-dropdown .btn-primary {
    background-color: #5d5a88; /* Purple color from reference */
    border-color: #5d5a88;
}
.search-dropdown .btn-primary:hover {
    background-color: #4a476f;
}

/* Focus state for input */
.search-dropdown .form-control:focus {
    box-shadow: none;
}

/* Mobile Search Overlay */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1070;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.mobile-search-inner {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    gap: 8px;
}

.mobile-search-inner form {
    flex: 1;
    min-width: 0;
}

.mobile-search-inner .form-control {
    flex: 1;
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    font-size: 1rem;
}

.mobile-search-inner .form-control:focus {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 2px rgba(228, 93, 148, 0.15);
}

.mobile-search-inner .btn-primary {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
    padding: 10px 18px;
    border-radius: 5px;
}

.mobile-search-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #888;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.mobile-search-close:hover {
    color: #333;
}

/* Navbar */
.navbar-nav .nav-link {
    color: #444;
    font-size: 0.9rem;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
    color: var(--primary-pink) !important;
}

/* Hero Section */
/* Hero Section */
.hero-section {
    position: relative;
    height: 550px; /* Fixed height as requested */
    min-height: 550px;
    overflow: hidden;
    /* Create the pink gradient overlay on top of the image */
}

/* Gradient Overlay - Applies to all slides */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #e45d94 0%, #e45d94 35%, rgba(228, 93, 148, 0) 100%);
    z-index: 1;
    pointer-events: none; /* Allow interaction with slider content */
}

/* Carousel Controls - Circular edge-aligned buttons */
.hero-section .carousel-control-prev,
.hero-section .carousel-control-next {
    width: auto;
    opacity: 0;
    z-index: 3;
    padding: 0;
    transition: opacity 0.3s ease;
}

.hero-section:hover .carousel-control-prev,
.hero-section:hover .carousel-control-next {
    opacity: 1;
}

.hero-section .carousel-control-prev {
    left: 10px;
}

.hero-section .carousel-control-next {
    right: 10px;
}

.hero-section .carousel-control-prev-icon,
.hero-section .carousel-control-next-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background-color: transparent;
    background-size: 40%;
    transition: all 0.25s ease;
}

.hero-section .carousel-control-prev-icon:hover,
.hero-section .carousel-control-next-icon:hover {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
}

/* Carousel Background Image with Zoom Effect */
.carousel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1);
    z-index: 0;
}

/* Custom Fade Transition Speed */
.carousel-fade .carousel-item {
    opacity: 0;
    transition-duration: 1s; /* Slower fade */
    transition-property: opacity;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    opacity: 0;
}

/* Keyframes for smooth zoom */
@keyframes zoomEffect {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

/* Activate Zoom on Active Slide using Animation */
.carousel-item.active .carousel-bg {
    animation: zoomEffect 10s linear forwards;
}

/* Section 3: Quick Menu */
.section-quick-menu {
    margin-top: -20px;
    position: relative;
    z-index: 9; 
}

.quick-menu-container {
    background-color: #1d1e20;
    background-image: url(https://contents.bu.ac.th/contents/dist/images/bu_pattern_standard_flip.svg);
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: 1156px 602px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0;
}

.quick-menu-item {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 500;
}

.quick-menu-item:last-child {
    border-right: none;
}

.quick-menu-item i {
    font-size: 1.1rem;
}

.quick-menu-item:hover {
    color: #f06eaa !important;
}

@media (max-width: 991px) {
    .quick-menu-item {
        border-right: none;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
        min-width: 50%;
    }

    .quick-menu-item:nth-child(odd) {
        border-right: 1px dashed rgba(255, 255, 255, 0.2);
    }

    .quick-menu-item:nth-last-child(-n+2) {
        border-bottom: none;
    }
}

/* Section Header (AWARDS style) */
.section-header-line {
    margin: 1px;
}
.section-header {
    position: relative;
    padding-bottom: 0;
}

.section-header-title {
    margin-top: 5px !important;
    white-space: nowrap;
    padding-bottom: 10px;
    border-bottom: 3px solid #d6d6d6;
    position: relative;
    z-index: 1;
}

.section-header-line {
    flex: 1;
    height: 1px;
    background-color: #e0e0e0;
    margin: 0;
    align-self: flex-end; 
}

.section-header-link {
    margin-top: 10px;
    white-space: nowrap;
    color: var(--primary-pink);
    font-size: .97em;
    font-weight: 500;
    padding-bottom: 8px;
    border-bottom: 1px solid #f06eaa;
    position: relative;
    z-index: 1;
    transition: color 0.2s;
}

.section-header-link:hover {
    color: #333;
     border-bottom: 1px solid #333;
}

/* Section Header - White Variant */
.section-header-white .section-header-title {
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.section-header-white .section-header-line {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Intro Lists */
.list-unstyled li {
    margin-bottom: 0.5rem;
}

/* Awards Cards */
.award-card {
    transition: transform 0.3s;
    background-color: #fff;
    height: 100%;
}
.award-card:hover {
    transform: translateY(-5px);
  /*  box-shadow: 0 4px 15px rgba(0,0,0,0.1);*/
}

/* News Section */
.three-lines-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

/* People Grayscale Effect */
.grayscale {
    filter: grayscale(100%);
    transition: filter 0.3s;
    cursor: pointer;
}
.grayscale:hover {
    filter: grayscale(0%);
}

/* Degree Level Section (Formerly People) */
.section-people {
    position: relative;
    background-image: url('../image/bg_student.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Optional: adds a nice parallax-like feel */
    z-index: 1;
}

.section-people::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(240, 110, 170, 0.895);
    z-index: -1;
}

.degree-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.degree-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.degree-card h5 {
    color: #444;
    font-weight: 800;
    margin-bottom: 15px;
    font-size: 1.15rem;
}

.degree-card p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.btn-degree {
    border: 1.5px solid #f06eaa;
    color: #f06eaa;
    background: transparent;
    padding: 6px 30px;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 50px !important;
    transition: all 0.3s ease;
    width: fit-content;
    align-self: center;
}

.btn-degree:hover {
    background-color: #f06eaa;
    color: #ffffff;
}

/* Service Boxes */
.service-box {
    transition: all 0.3s;
}

/* Shape Dividers */
.ux-shape-divider {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 10;
}

.ux-shape-divider--top {
    top: -1px;
    transform: rotate(180deg);
}

.ux-shape-divider svg {
    display: block;
    width: 100%;
    height: 100px;
}

.ux-shape-fill {
    fill: #ffffff;
}

.section-research {
    position: relative;
    padding-top: 100px !important; /* Make room for the tilt if needed, or adjust padding */
    overflow: hidden;
}

/* Animations */
.reveal-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 1s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.research-image-wrapper {
    position: relative;
    z-index: 5;
}
.service-box {
    height: 100px;
    transition: transform 0.3s;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.service-box:hover {
    transform: translateY(-3px);
}

/* Footer Links */
footer a.text-white {
    transition: opacity 0.2s;
}
footer a.text-white:hover {
    opacity: 0.8;
}

/* News Section Refinement */
.section-news {
    background-color: rgb(240, 110, 170) !important;
    color: #ffffff !important;
    position: relative;
    padding-bottom: 120px !important; /* Extra room for bottom divider */
}

.section-news h4, 
.section-news h6, 
.section-news p, 
.section-news a,
.section-news .list-group-item {
    color: #ffffff !important;
}


.section-news .border-bottom,
.section-news .flex-grow-1 {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Image Hover Gradient Effect */
.news-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.news-image-wrapper img {
    transition: transform 0.5s ease;
}

.news-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-image-wrapper:hover::after {
    opacity: 1;
}

.news-image-wrapper:hover img {
    transform: scale(1.05);
}

/* Bottom Shape Divider */
.ux-shape-divider--bottom {
    bottom: -1px;
    top: auto;
    transform: none; /* No rotation for bottom tilt */
}

/* Events Section Refinement */
.text-pink-custom {
    color: #f06eaa !important;
}

.section-grid-events .border-bottom {
    border-color: #dee2e6 !important;
}

.event-card {
    transition: transform 0.3s;
}

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

.event-card img {
    border-radius: 10px;
}

.event-card h6 {
    font-size: 0.95rem;
    line-height: 1.4;
}

.event-card hr {
    opacity: 0.2;
}

/* Alumni Section */
.section-alumni {
    background-color: #f8f9fa;
}

.alumni-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.alumni-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    transition: all 0.5s ease;
    display: block;
}

.alumni-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.448);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    transition: all 0.5s ease;
}

.alumni-overlay h6 {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.alumni-overlay p {
    color: #ccc;
    font-size: 0.75rem;
    margin: 0;
}

/* Hover Effects */
.alumni-card:hover img {
    filter: grayscale(0%) contrast(1);
    transform: scale(1.05);
}

.alumni-card:hover .alumni-overlay {
    background-color: rgba(0, 0, 0, 0);
}

.alumni-card:hover .alumni-overlay h6 {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Purple Footer Bar */
.alumni-bar {
    background-color: #535697;
    color: #ffffff;
    padding: 12px 0;
}

.alumni-bar .btn-link-all {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.alumni-bar .btn-link-all:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Service Links Section - Redesigned */
.service-image-link {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-image-link img {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(1);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.service-image-link:hover img {
    filter: brightness(1.1);
    transform: scale(1.02);
}

/* Info Boxes */
.info-box-pink {
    background-color: #f06eaa;
    color: #ffffff;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
}

.info-box-pink h6 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.5;
}

.info-box-pink img { 
    margin: 0 auto;
}

.info-box-white {
    background-color: #ffffff;
    border: none;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
}

.info-box-white h6,
.info-box-white h5 {
    font-weight: 700;
    margin-bottom: 15px;
}

.info-box-white img {
    max-width: 160px;
    margin: 0 auto 10px;
}

.btn-outline-pink {
    background-color: transparent;
    color: var(--primary-pink);
    border: 2px solid var(--primary-pink);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-outline-pink:hover {
    background-color: var(--primary-pink);
    color: #fff;
}

.btn-info-white {
    background-color: #f06eaa;
    color: #ffffff;
    border: none;
    padding: 8px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-info-white:hover {
    background-color: #d85a92;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(240, 110, 170, 0.3);
}

/* Video Section */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Ratio */
    height: 0;
    overflow: hidden;
}

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

/* Responsive Adjustments */
@media (max-width: 991px) {
    /* Hero Section Responsive */
    .hero-section {
        height: 100dvh;
        min-height: 100dvh;
    }

    .hero-section .row {
        align-items: flex-end !important;
        padding-bottom: 40px;
    }
    
    .hero-section::before {
        /* Adjust gradient for mobile: Top to Bottom or semitransparent overlay */
        background: linear-gradient(180deg, rgba(228, 93, 148, 0.9) 0%, rgba(228, 93, 148, 0.6) 100%);
    }

    .hero-section .display-4 {
        font-size: 2.5rem; /* Smaller heading */
    }
    
    .hero-section p {
        font-size: 1rem !important;
    }

    /* Navbar Slide-in Effect */
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: 0;
        padding: 0;
        z-index: 1050;
        width: 100%;
        height: 100vh;
        background-color: #e978aca3; /* Pink Overlay Background */
        overflow-x: hidden;
        transition: transform 0.35s ease-in-out;
        transform: translateX(100%);
        display: block !important;
        visibility: hidden;
    }

    .navbar-collapse.show {
        transform: translateX(0);
        visibility: visible;
    }

    .navbar-collapse.collapsing {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1050;
        width: 100%;
        height: 100vh !important;
        background-color: #e978aca3;
        transition: transform 0.35s ease-in-out;
        transform: translateX(100%);
        display: block;
        visibility: visible;
    }
    
    .navbar-collapse.show.collapsing {
        transform: translateX(0);
    }

    /* Close Button */
    .mobile-menu-close {
        position: absolute;
        top: 15px;
        right: 15px;
        z-index: 1060;
        background: none;
        border: none;
        font-size: 1.6rem;
        color: #555;
        cursor: pointer;
        padding: 5px 10px;
        line-height: 1;
    }

    .mobile-menu-close:hover {
        color: #000;
    }
    
    /* Menu Content Container */
    .navbar-nav {
        background-color: hsla(0,0%,100%,.95);
        height: 100%;
        width: 75%;
        max-width: 400px;
        margin-left: auto;
        padding: 50px 25px 25px;
        overflow-y: auto;
        box-shadow: -2px 0 15px rgba(0,0,0,0.08);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    /* Menu Text Color & Alignment */
    .navbar-nav .nav-item {
        width: 100%;
        text-align: left;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Override uppercase for mobile */
    .navbar-nav {
        text-transform: none !important;
    }

    .navbar-dark .navbar-nav .nav-link {
        color: rgba(74,74,74,.85) !important;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        padding: 18px 10px !important;
        font-size: 1.05rem;
        font-weight: 400 !important;
        display: block;
        width: 100%;
        text-transform: none;
    }

    /* Hover Effect */
    .navbar-dark .navbar-nav .nav-link:hover, 
    .navbar-dark .navbar-nav .nav-link:focus {
        background-color: rgba(0, 0, 0, .05);
        color: hsla(0, 0%, 7%, .85) !important;
    }

    /* Hide Desktop Search inside Drawer */
    .navbar-nav .search-container,
    .navbar-nav .search-dropdown {
        display: none !important;
    }

    /* Mobile Social Icons */
    .mobile-social-icons {
        border-bottom: none !important;
    }

    .mobile-social-icons .social-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        color: #555;
        font-size: 1.1rem;
        text-decoration: none;
        transition: color 0.2s;
    }

    .mobile-social-icons .social-icon:hover {
        color: var(--primary-pink);
    }

    /* Apply Button Styling in Mobile Menu - Outline Style */
    .navbar-nav .btn-apply {
        display: inline-block;
        width: auto;
        text-align: center;
        margin-top: 15px;
        background-color: transparent !important;
        color: var(--primary-pink) !important;
        border: 1.5px solid var(--primary-pink) !important;
        padding: 8px 35px !important;
        border-radius: 50px;
        font-weight: 500;
    }

    .navbar-nav .btn-apply:hover {
        background-color: var(--primary-pink) !important;
        color: #fff !important;
    }
    
    /* Language Switcher in Mobile */
    .navbar-nav .lang-dropdown-container {
        margin: 0 !important;
    }

    .navbar-nav .lang-dropdown-container .nav-top-link {
        color: rgba(74,74,74,.85) !important;
        padding: 18px 10px !important;
        justify-content: flex-start;
        display: flex;
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    .navbar-nav .lang-dropdown-container .nav-top-link .fa-angle-down {
        margin-left: auto;
    }
    
    /* Sub-menu in mobile */
    .navbar-nav .sub-menu {
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        border-top: none !important;
        padding-left: 20px !important;
        display: none;
        background-color: transparent !important;
        min-width: auto !important;
        margin-top: 0;
    }

    .navbar-nav .sub-menu::before {
        display: none; /* Hide the triangle arrow on mobile */
    }
    
    .navbar-nav .lang-dropdown-container:hover .sub-menu,
    .navbar-nav .lang-dropdown-container.active .sub-menu {
        display: block !important;
    }

    /* Toggler Button */
    .navbar-toggler {
        z-index: 1060;
        position: relative;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    /* Intro Section */
    .section-intro .col-lg-5 {
        margin-bottom: 30px;
    }
    
    /* Research Section */
    .section-research img {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    /* Further Mobile Adjustments */
    .hero-section {
        height: 100dvh;
        min-height: 100dvh;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .hero-quick-menu {
        position: relative !important; /* Stack normally on mobile */
    }

    .award-card img {
        height: auto;
    }
    .menu-section::after {
        display: none;
    }
}

/* Footer - Redesigned */
footer {
    position: relative;
    background-image: url('../image/img_banner02.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(240, 110, 170, 0.901);
    z-index: 1;
}

footer .container {
    position: relative;
    z-index: 2;
}

footer .footer-logo {
    max-width: 100px;
    height: auto;
}

footer a {
    color: #ffffff !important;
    text-decoration: none;
}

footer a:hover {
    opacity: 0.8;
}


.copyright-bar {
    background-color: #535697;
    color: #ffffff;
    padding: 15px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: transparent;
    border: 2px solid #999;
    border-radius: 50%;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.back-to-top-btn:hover,
.back-to-top-btn:active {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(228, 93, 148, 0.4);
}

.back-to-top-btn.show {
    display: flex;
}
.btn:hover {
    color: #666 ;
}
.btn.btn-secondary{
    background-color:#535697;
    color:#fff; 
}
.btn.btn-secondary:hover{
    box-shadow: inset 0 0 0 100px rgba(0, 0, 0, .2);
    color: #fff;
    opacity: 1;
    outline: none;
}

.btn-outline-secondary {
    background-color: transparent;
    color: #535697;
    border: 2px solid #535697;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-outline-secondary:hover {
    background-color: #535697;
    color: #fff;
}

.text-indent {
    text-indent: 2.5em;
}

li::marker {
  color: #e45d94;
}

.cistyle h1, h2, h3, h4, h5 {
    color:#535697;
}
.cistyle ul {
    padding-left: 30px !important;
}
.image-content {
    margin-bottom: 20px;
}
.f-caption {
    display:none;
}
.fancybox__thumbs {
    display:none;
}

.boxcontactci a:link {
    color:#535697;
    text-decoration: none;
}

.boxcontactci a:hover {
    color:#f170a7;
}

.boxcontactci a:visited {
    color:#535697;
}

.boxcontactci a:visited:hover {
    color:#f170a7;
}

.boxcontactci i {
    margin-right: 10px;
}

/* ============================================
   ★ ส่วนเพิ่มใหม่: GALLERY A - Masonry Grid (พื้นหลังเข้ม)
   ภาพสลับใหญ่-เล็ก, hover zoom + เส้นชมพูด้านล่าง
   ============================================ */
.section-gallery-a {
    background-color: #1a1a1a;
}

.masonry-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.masonry-large {
    height: 300px;
}

.masonry-small {
    height: 200px;
}

.masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.masonry-item:hover img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.masonry-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 15px 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    transition: all 0.3s ease;
}

.masonry-item:hover .masonry-overlay {
    padding-bottom: 20px;
}

.masonry-caption {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

.masonry-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #e45d94;
    transition: width 0.4s ease;
}

.masonry-item:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .masonry-large {
        height: 220px;
    }
    .masonry-small {
        height: 160px;
    }
}

/* Lightbox for Gallery A */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 75%);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    text-align: center;
    max-width: 85%;
    max-height: 85vh;
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-caption {
    color: #fff;
    font-size: 1rem;
    margin-top: 15px;
    font-weight: 400;
    opacity: 0.9;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    cursor: pointer;
    z-index: 100000;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: #e45d94;
    border-color: #e45d94;
}

.lightbox-close {
    top: 25px;
    right: 25px;
}

.lightbox-prev {
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
}

/* ★ จบส่วนเพิ่มใหม่: GALLERY A */

/* ============================================
   ★ ส่วนเพิ่มใหม่: Floating Social FAB (ปุ่มลอยติดต่อเรา)
   ปุ่มแชทสีน้ำเงิน + เมนู Social Icons
   ============================================ */
.fab-container {
    position: fixed;
    bottom: 95px;
    right: 30px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Main Toggle Button */
.fab-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5b6abf 0%, #4a5ab5 100%);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(74, 90, 181, 0.45);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 22px rgba(74, 90, 181, 0.55);
}

.fab-toggle .fab-icon-open {
    transition: all 0.3s ease;
}

.fab-toggle .fab-icon-close {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg);
    transition: all 0.3s ease;
}

.fab-container.active .fab-toggle .fab-icon-open {
    opacity: 0;
    transform: rotate(90deg);
}

.fab-container.active .fab-toggle .fab-icon-close {
    opacity: 1;
    transform: rotate(0deg);
}

.fab-container.active .fab-toggle {
    background: linear-gradient(135deg, #5b6abf 0%, #4a5ab5 100%);
}

/* Menu Container */
.fab-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    pointer-events: none;
}

.fab-container.active .fab-menu {
    pointer-events: all;
}

/* Individual FAB Items */
.fab-item {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 1.35rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    /* Hidden by default */
    opacity: 0;
    transform: translateY(20px) scale(0.5);
}

.fab-container.active .fab-item {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger animation delays */
.fab-container.active .fab-item:nth-child(1) { transition-delay: 0.04s; }
.fab-container.active .fab-item:nth-child(2) { transition-delay: 0.08s; }
.fab-container.active .fab-item:nth-child(3) { transition-delay: 0.12s; }
.fab-container.active .fab-item:nth-child(4) { transition-delay: 0.16s; }
.fab-container.active .fab-item:nth-child(5) { transition-delay: 0.20s; }
.fab-container.active .fab-item:nth-child(6) { transition-delay: 0.24s; }

.fab-item:hover {
    transform: scale(1.12) !important;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.3);
}

/* Phone - Green */
.fab-phone {
    background: linear-gradient(135deg, #25d366 0%, #1da851 100%);
}

/* LINE - Green */
.fab-line {
    background: linear-gradient(135deg, #00c300 0%, #00a300 100%);
}

.fab-line i {
    font-size: 1.6rem;
}

/* Facebook Messenger - Blue */
.fab-messenger {
    background: linear-gradient(135deg, #00b2ff 0%, #006aff 100%);
}

/* Instagram - Gradient */
.fab-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.fab-instagram i {
    font-size: 1.5rem;
}

/* TikTok - Black */
.fab-tiktok {
    background: #000;
}

/* Close Button - Blue/Purple */
.fab-close {
    background: linear-gradient(135deg, #5b6abf 0%, #4a5ab5 100%);
}

/* FAB Label (tooltip on left) */
.fab-label {
    position: absolute;
    right: calc(100% + 12px);
    white-space: nowrap;
    background: #fff;
    color: #333;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    opacity: 0;
    transform: translateX(8px);
    transition: all 0.25s ease;
}

.fab-item:hover .fab-label {
    opacity: 1;
    transform: translateX(0);
}



/* Mobile adjustments */
@media (max-width: 768px) {
    .fab-container {
        bottom: 85px;
        right: 30px;
    }
    .fab-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    .fab-item {
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
    }
    .fab-menu {
        gap: 10px;
    }

}
/* ★ จบส่วนเพิ่มใหม่: Floating Social FAB */
/* Administrators Page Styles */
.admin-banner {
    min-height: 250px;
    display: flex;
    align-items: center;
    background-image: url('https://ssru.ac.th/images/banner-administrators.jpg'); /* Placeholder image */
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: var(--primary-pink);
}

.admin-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(228, 93, 148, 0.9) 0%, rgba(228, 93, 148, 0.5) 100%);
    z-index: 1;
}

.admin-banner .container {
    z-index: 2;
}

.admin-card {
    background: #fff;
    border-radius: 15px;
    transition: all 0.3s ease;
    padding-top: 2rem !important;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.admin-photo-wrapper {
    width: 140px;           /* กลับมาใช้ความกว้างวงรี */
    height: 180px;          /* ความสูงที่มากกว่าเพื่อให้เป็นวงรีแนวตั้ง */
    margin: 0 auto 1.5rem;
    border-radius: 50%;     /* ทำให้เป็นทรงรี */
    overflow: hidden;
    border: 3px solid #e45d94; /* ขอบสีชมพู SSRU */
    box-shadow: 0 4px 15px rgba(228, 93, 148, 0.2);
}

.admin-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.admin-card:hover .admin-photo-wrapper img {
    transform: scale(1.1);
}

.admin-name {
    color: #1a4a8d; /* สีน้ำเงินสไตล์ SSRU */
    font-size: 1rem; 
    line-height: 1.4;
    font-weight: 600;
    padding: 0 10px;
}

.admin-position {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 300;
    margin-bottom: 1rem;
    padding: 0 10px;
    line-height: 1.3;
}

.admin-contact {
    font-size: 0.9rem;
    color: #6c757d;
}

.admin-contact a:hover {
    color: var(--primary-pink);
}

@media (max-width: 768px) {
    .admin-banner {
        min-height: 200px;
    }
    .admin-banner h1 {
        font-size: 1.5rem;
    }
}

/* Dropdown Hover Effects */
.nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: rgba(228, 93, 148, 0.1);
    color: var(--primary-pink);
}

.dropdown-item.active {
    background-color: var(--primary-pink);
}

.fees-container { padding: 40px 0; background-color: #fff; }
        .faculty-section { margin-bottom: 40px; scroll-margin-top: 100px; }
        .faculty-title { 
            color: #1a4a8d; 
            font-size: 1.4rem;
            margin-bottom: 25px;
            font-weight: 700;
            border-left: 6px solid #e45d94; /* แถบสีชมพูด้านซ้าย */
            padding-left: 15px;
        }
        .table-responsive {
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.12);
            margin: 10px 5px 35px 5px;
            background: #fff;
            overflow: hidden;
        }
        .table-fees {
            background: #fff;
            border: none;
            font-size: 0.82rem;
            border-collapse: separate;
            border-spacing: 0;
            margin-bottom: 0;
        }
        .table-fees thead th {
            background-color: #f8fafc;
            color: #2d3748;
            border: none !important;
            padding: 15px 10px;
            font-weight: 700;
            text-align: center;
            vertical-align: middle;
        }
        /* หัวตารางส่วน "รวมทั้งสิ้น" เป็นสีชมพู */
        .table-fees thead th.bg-total {
            background-color: #e45d94 !important;
            color: white !important;
        }
        /* หัวตารางแถวที่สอง (ชาย/หญิง) เป็นสีม่วงชมพู */
        .table-fees tr.header-sub-pink th {
            background-color: #ff75ad !important;
            color: white !important;
            padding: 10px 5px;
            font-weight: 600;
        }
        
        .table-fees td { 
            padding: 12px 15px; 
            border-bottom: 1px solid #edf2f7 !important;
            border-right: none !important;
            border-left: none !important;
        }
        .price-text { text-align: center; color: #4a5568; }
        .total-price { 
            font-weight: 900; 
            text-align: center; 
            color: #1a202c;
        }

        .quick-nav {
            background: #f8fafc;
            padding: 15px;
            border-radius: 12px;
            margin-bottom: 35px;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .quick-nav-link {
            padding: 6px 14px;
            background: #fff;
            color: #4a5568;
            text-decoration: none;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 0.78rem;
            transition: all 0.2s;
        }
        .quick-nav-link:hover {
            background: #e45d94;
            color: #fff;
            border-color: #e45d94;
        }
        /* Quick Nav Design 2.0 */
        .quick-nav-container {
            background-color: #f8f9fa;
            padding: 40px 0;
            margin-bottom: 50px;
        }
        .quick-nav-card {
            background: white;
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 15px 40px rgba(0,0,0,0.12);
        }
        .quick-nav-title {
            font-weight: 700;
            color: #333;
            margin-bottom: 25px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        .quick-nav-link {
            display: inline-block;
            padding: 10px 22px;
            margin: 6px;
            background-color: #f1f3f5;
            color: #495057;
            border-radius: 50px;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.2s ease;
            font-size: 0.85rem;
            border: none;
        }
        .quick-nav-link:hover {
            background-color: #e9ecef;
            color: #212529;
            transform: translateY(-2px);
        }