/* Import Kanit Font */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@200;300;400;500;600&display=swap');

/********** Template CSS **********/
:root {
    --primary: #460404;
    --secondary: #777777;
    --light: #ffcbcb;
    --dark: #252525;
}

/* Apply Kanit font to body */
body {
    font-family: 'Kanit', sans-serif;
    font-weight: 300;
}

/* Adjust heading weights */
h1, h2, h3, h4, h5, h6,
.navbar .navbar-nav .nav-link,
.btn,
.section-title {
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
}

/* Lighter weight for some elements */
.footer .btn.btn-link,
.footer .copyright,
.text-secondary {
    font-weight: 200;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Navbar ***/
.navbar {
    background-color: #720006 !important;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 20px 0;
    color: #f5f5f5 !important;
    font-weight: 500;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: #dfab1e !important;
}

.navbar-brand {
    color: #1b0000 !important;
}

.navbar-toggler {
    border-color: #1b0000 !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 8px 0;
    }

    .navbar .navbar-nav {
        margin-top: 8px;
        border-top: 1px solid rgba(256, 256, 256, .1)
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-item.dropdown.active > .nav-link {
    font-weight: bold;
}

.dropdown-item.active {
    background-color: #d4d4d4;
    color: rgb(131, 3, 3);
}


/*** Header ***/
#header-carousel .carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    z-index: 1;
}

#header-carousel .carousel-control-prev,
#header-carousel .carousel-control-next {
    width: 10%;
}

#header-carousel .carousel-control-prev-icon,
#header-carousel .carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 500px;
    }
    
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

#header-carousel .carousel-indicators [data-bs-target] {
    width: 60px;
    height: 60px;
    text-indent: 0;
    margin-bottom: 15px;
    border: 2px solid #dbb8b8;
    border-radius: 60px;
    overflow: hidden;
}

#header-carousel .carousel-indicators [data-bs-target] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Carousel Styles */
.carousel-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Desktop styles */
@media (min-width: 1200px) {
    .carousel-image-container {
        height: 900px;
    }
    
    .carousel-image {
        height: 900px;
        object-fit: cover;
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1199px) {
    .carousel-image-container {
        height: 450px;
    }
    
    .carousel-image {
        height: 450px;
        object-fit: cover;
    }
}

/* Mobile styles */
@media (max-width: 767px) {
    .carousel-image-container {
        height: 300px;
    }
    
    .carousel-image {
        height: 300px;
        object-fit: cover;
    }
    
    #header-carousel .carousel-control-prev,
    #header-carousel .carousel-control-next {
        width: 40px;
        height: 40px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    #header-carousel .carousel-control-prev-icon,
    #header-carousel .carousel-control-next-icon {
        width: 20px;
        height: 20px;
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
    .carousel-image-container {
        height: 250px;
    }
    
    .carousel-image {
        height: 250px;
        object-fit: cover;
    }
}

/* Carousel fade effect */
.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

/* Hover effect for carousel images */
.carousel-image-container:hover .carousel-image {
    transform: scale(1.02);
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)) center center no-repeat;
    background-size: cover;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: var(--secondary);
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}


/*** Section Title ***/
.section-title {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
}

.section-title::before {
    position: absolute;
    content: "";
    width: calc(100% + 80px);
    height: 2px;
    top: 4px;
    left: -40px;
    background: var(--primary);
    z-index: -1;
}

.section-title::after {
    position: absolute;
    content: "";
    width: calc(100% + 120px);
    height: 2px;
    bottom: 4px;
    left: -60px;
    background: var(--primary);
    z-index: -1;
}

.section-title.text-start::before {
    width: calc(100% + 40px);
    left: 0;
}

.section-title.text-start::after {
    width: calc(100% + 60px);
    left: 0;
}



/*** Img Border ***/
.img-border {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.img-border::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    right: 3rem;
    bottom: 3rem;
    border: 5px solid var(--primary);
    border-radius: 6px;
}

.img-border img {
    position: absolute;
    top: 3rem;
    left: 3rem;
    width: calc(100% - 3rem);
    height: calc(100% - 3rem);
    object-fit: cover;
    border-radius: 6px;
}


/*** Facts ***/
.fact-item {
    transition: .5s;
}

.fact-item:hover {
    margin-top: -10px;
    background: #ecb0b0 !important;
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
}


/*** Service ***/


/*** Feature ***/
.progress {
    height: 5px;
}

.progress .progress-bar {
    width: 0px;
    transition: 3s;
}


/*** Project ***/
.project-item a {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: rgba(0, 0, 0, .5);
    border-radius: 6px;
    opacity: 0;
    transition: .5s;
}

.project-item:hover a {
    opacity: 1;
}

.project-carousel .owl-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.project-carousel .owl-dot {
    width: 35px;
    height: 35px;
    margin: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #DEE2E6;
    border-radius: 35px;
    transition: .5s;
}

.project-carousel .owl-dot:hover,
.project-carousel .owl-dot.active {
    color: #FFFFFF;
    border-color: var(--primary);
    background: var(--primary);
}


/*** Team ***/
.team-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
}

.team-item .team-text {
    position: relative;
    height: 65px;
}

.team-item .team-title {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    align-items: center;
    justify-content: center;
    transition: .5s;
}

.team-item:hover .team-title {
    top: -65px;
}

/*** Testimonial ***/

.testimonial-carousel .owl-item .testimonial-item img {
    width: 60px;
    height: 60px;
}

.testimonial-carousel .owl-item .testimonial-item,
.testimonial-carousel .owl-item .testimonial-item * {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
    background: var(--primary) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item * {
    color: #FFFFFF !important;
}

.testimonial-carousel .owl-nav {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    margin: 0 12px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #DEE2E6;
    border-radius: 50px;
    font-size: 18px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: #FFFFFF;
    border-color: var(--primary);
    background: var(--primary);
}


/*** Footer ***/
.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--secondary);
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--secondary);
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

.footer .copyright a:hover {
    color: var(--primary);
}

.overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: all 0.5s;
}

.position-relative:hover .overlay {
    opacity: 1;
}

.navbar-nav .nav-link.border {
    opacity: 0.9;
}

.navbar-nav .nav-link.border:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    opacity: 1;
}

.form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* เพิ่ม CSS สำหรับ hover effect ของปุ่ม */
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2) !important;
}

.dropdown-menu {
    margin-top: 0.5rem;
    background-color: white;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #e09f9f;
}

.dropdown-item.text-danger:hover {
    background-color: #dc3545;
    color: white !important;
}

.dropdown-divider {
    margin: 0.5rem 0;
}

.dropdown-toggle::after {
    margin-left: 0.5em;
    vertical-align: middle;
}

.service-item {
    background: #FFFFFF;
    transition: .5s;
    border-radius: 10px;
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
    min-height: 320px;
    overflow: hidden;
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 45px rgba(0, 0, 0, .12);
}

.service-item .btn-square {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .5s;
}

.service-item:hover .btn-square {
    background: var(--primary);
}

.service-item:hover .btn-square i {
    color: #FFFFFF;
}

.service-item .btn-primary {
    transition: .3s;
}

.service-item:hover .btn-primary {
    background: var(--primary);
    transform: translateX(5px);
}

.service-text {
    height: 100%;
    position: relative;
}

.btn-wrapper {
    bottom: 0;
    width: 100%;
    padding-bottom: 1rem;
}

.hover-shadow {
    transition: all 0.3s ease;
}
.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.service-item:hover .service-overlay {
    opacity: 1;
}

.service-overlay .btn {
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    opacity: 0;
}

.service-item:hover .service-overlay .btn {
    transform: translateY(0);
    opacity: 1;
}


/* Unified Card Styles for all sections */
.card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    background: white;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

/* Image Container */
.card img {
    transition: all 0.3s ease;
}

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

/* Card Text Styles */
.card-title {
    line-height: 1.4;
}

.card-text {
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
}

/* Activity Card (for backward compatibility) */
.activity-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    background: white;
    height: 100%;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.activity-card img {
    transition: all 0.3s ease;
}

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

.activity-card h6 {
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-card p {
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Button Hover Effect */
.hover-shadow:hover {
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.2);
    transform: translateX(5px);
}

/* Responsive Card Styles */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem !important;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-text {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .position-absolute.top-0 .d-flex {
        gap: 0.25rem;
    }
    
    .position-absolute.bottom-0 .d-flex {
        gap: 0.25rem;
    }
}

@media (max-width: 576px) {
    .card img {
        height: 180px !important;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    .card-title {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
    
    .btn-outline-danger {
        padding: 0.25rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* Congrats Section Styles */
.congrats-section {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.content-layer { z-index: 2; }

/* Decorative circles */
.bg-decor { top: 0; left: 0; z-index: 1; }
.decor-circle {
    background: rgba(255, 255, 255, 0.10);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    filter: blur(0.3px);
}
.decor-1 {
    top: -6vw;
    right: -6vw;
    width: clamp(120px, 18vw, 220px);
    height: clamp(120px, 18vw, 220px);
}
.decor-2 {
    bottom: -5vw;
    left: -5vw;
    width: clamp(90px, 14vw, 180px);
    height: clamp(90px, 14vw, 180px);
    animation-duration: 8s;
    animation-direction: reverse;
    background: rgba(255, 255, 255, 0.08);
}

/* Heading area */
.hero-text { max-width: min(90vw, 700px); }
.trophy-icon { font-size: clamp(2.25rem, 6vw, 4rem); filter: drop-shadow(0 0 20px rgba(255,255,255,0.8)); }
.trophy-glow {
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
.hero-title { font-size: clamp(1.6rem, 4.5vw, 3rem); text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
.hero-subtitle { font-size: clamp(1.1rem, 3.2vw, 2rem); text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.decoration-line { width: clamp(60px, 10vw, 120px); height: 3px; background: linear-gradient(90deg, transparent, #ffffff, transparent); }

/* Carousel container */
.congrats-carousel-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(0,0,0,0.28);
    transition: transform 0.3s ease;
}
.congrats-carousel-container:hover { transform: translateY(-4px); }

/* Slide image with responsive height */
.congrats-slide-image {
    height: clamp(220px, 50vh, 520px);
    object-fit: cover;
    filter: brightness(1.06) contrast(1.06);
    will-change: transform;
}

/* Overlay and caption */
.image-overlay { background: linear-gradient(45deg, rgba(0,0,0,0.2), transparent); z-index: 5; }
.caption-gradient { background: linear-gradient(transparent, rgba(0,0,0,0.65)); z-index: 10; }

/* Indicators */
.indicators-custom { bottom: clamp(10px, 2.5vw, 20px); z-index: 15; }
.carousel-indicator-custom {
    width: clamp(8px, 1.2vw, 12px) !important;
    height: clamp(8px, 1.2vw, 12px) !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,0.55) !important;
    border: 2px solid rgba(255,255,255,0.85) !important;
    margin: 0 clamp(4px, 1vw, 8px) !important;
    transition: all 0.3s ease !important;
}
.carousel-indicator-custom.active {
    background: #ffffff !important;
    border-color: #ffffff !important;
    transform: scale(1.25);
}

/* Navigation buttons */
.carousel-nav-btn {
    width: clamp(40px, 6vw, 60px);
    height: clamp(40px, 6vw, 60px);
    background: rgba(255,255,255,0.22);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.carousel-nav-btn i { font-size: clamp(1rem, 2.8vw, 1.5rem); }
.carousel-nav-btn.prev { margin-left: clamp(8px, 2vw, 20px); }
.carousel-nav-btn.next { margin-right: clamp(8px, 2vw, 20px); }
.carousel-nav-btn:hover { background: rgba(255,255,255,0.3) !important; transform: scale(1.06); transition: all 0.25s ease; }

/* Slide transition */
.carousel-item { transition: transform 0.8s ease-in-out; }

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
    .congrats-carousel-container, .carousel-item, .carousel-nav-btn { transition: none !important; }
    .decor-circle, .trophy-glow { animation: none !important; }
}

/* Small devices tweaks */
@media (max-width: 576px) {
    .congrats-slide-image { height: clamp(200px, 42vh, 440px); }
}

/* ITA Section */
.ita-section {
    background: linear-gradient(rgba(161, 161, 161, 0.7), rgba(161, 161, 161, 0.7)), url('../img/lbg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Student Count Section */
.student-count-section {
    background-color: rgb(117, 0, 0);
}

/* Download Documents Section */
.download-section {
    margin-top: -180px;
    position: relative;
    z-index: 1;
}

/* Vision Card */
.vision-card {
    transition: all 0.3s ease;
    background: linear-gradient(to bottom, #fff, #f8f9fa);
}

.vision-card .vision-text {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.6;
    color: #333;
    padding: 20px;
    background: rgba(220, 53, 69, 0.05);
    border-radius: 10px;
}

/* Other Cards */
.mission-card, .objectives-card, .strategy-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.mission-card:hover, .objectives-card:hover, .strategy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* List Items */
.mission-item, .objective-item, .strategy-item {
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mission-item:hover, .objective-item:hover, .strategy-item:hover {
    background: rgba(220, 53, 69, 0.05);
}

/* Icons */
.fa-check-circle, .fa-dot-circle, .fa-star {
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 991.98px) {
    .vision-card .vision-text {
        font-size: 1.2rem;
    }
    
    .mission-item p, .objective-item p, .strategy-item p {
        font-size: 0.85rem;
    }
}

@media (max-width: 767.98px) {
    .col-lg-4 {
        margin-bottom: 1rem;
    }
}

/* Information Card Styles */
.info-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.info-card .card-header {
    border-bottom: none;
}

.info-card .icon-wrapper {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Link List Styles */
.link-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-radius: 12px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.info-link:hover {
    background: #fff;
    border-color: #dc3545;
    color: #dc3545;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.1);
}

.link-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 10px;
}

.link-content span {
    font-size: 1rem;
}

.link-content small {
    font-size: 0.85rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .info-card .card-header {
        padding: 15px;
    }
    
    .info-card .card-body {
        padding: 15px;
    }
    
    .info-link {
        padding: 12px;
    }
    
    .link-content span {
        font-size: 0.9rem;
    }
    
    .link-content small {
        font-size: 0.75rem;
    }
}

/* Card Header Styles */
.info-card .card-header .icon-wrapper {
    width: 45px;
    height: 45px;
    min-width: 45px; /* เพิ่มเพื่อป้องกันการบีบ */
    display: flex;
    align-items: center;
    justify-content: center;
}



.link-icon {
    width: 40px;
    height: 40px;
    min-width: 40px; /* เพิ่มเพื่อป้องกันการบีบ */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 10px;
    margin-right: 16px; /* ปรับระยะห่างให้เท่ากัน */
}

.link-content {
    flex-grow: 1;
    padding-right: 16px; /* เพิ่มระยะห่างจากลูกศร */
}

.info-link i.fa-arrow-right {
    width: 20px; /* กำหนดความกว้างคงที่ */
    text-align: center;
}

/* ปรับขนาดตัวอักษร */
.link-content span {
    font-size: 0.95rem;
    line-height: 1.4;
}

.link-content small {
    font-size: 0.8rem;
    display: block;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .info-link {
        padding: 10px 12px;
    }
    
    .link-icon {
        width: 35px;
        height: 35px;
        min-width: 35px;
    }
}

/* ITA Card Styles */
.ita-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    height: 100%;
}

.ita-card:hover {
    transform: translateY(-5px);
    color: inherit;
}

.ita-card .card-body {
    background: #fff;
    border: 1px solid rgba(220, 53, 69, 0.1);
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ita-card:hover .card-body {
    border-color: #dc3545;
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.1);
}

.ita-card .icon-wrapper {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ita-card:hover .icon-wrapper {
    background: #dc3545;
}

.ita-card:hover .icon-wrapper i {
    color: white !important;
}

.ita-card .content-wrapper {
    flex-grow: 1;
}

.ita-card .arrow-wrapper {
    width: 24px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.ita-card:hover .arrow-wrapper {
    opacity: 1;
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 768px) {
    .ita-card .card-body {
        padding: 20px;
    }
    
    .ita-card .icon-wrapper {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }
    
    .ita-card .icon-wrapper i {
        font-size: 1.5em;
    }
}


.description-text {
    font-size: 1.1rem;
    line-height: 1.8;
    letter-spacing: 0.3px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .description-text {
        font-size: 1rem;
        line-height: 1.6;
    }
}

.icon-hover {
    transition: transform 0.3s ease;
}
a:hover .icon-hover {
    transform: scale(1.1);
}
.icon-color-change {
    transition: color 0.3s ease;
}
a:hover .icon-color-change {
    color: #550000 !important; /* สีน้ำตาล */
}
.custom-accordion {
    --bs-accordion-border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.custom-accordion .accordion-item {
    border: 1px solid rgba(220, 53, 69, 0.1);
    margin-bottom: 1.2rem;
    border-radius: 18px !important;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.custom-accordion .accordion-button {
    cursor: pointer;
    padding: 1.8rem;
    font-weight: 600;
    font-size: 1.15rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    position: relative;
}

.custom-accordion .accordion-button i {
    font-size: 1.4rem;
    color: #dc3545;
    opacity: 0.9;
    transition: all 0.3s ease;
    margin-right: 1.5rem;
}

.custom-accordion .accordion-button:not(.collapsed) {
    color: #dc3545;
    background: linear-gradient(145deg, #fff5f5, #fff0f0);
    box-shadow: inset 0 -1px 0 rgba(220, 53, 69, 0.1);
}

.custom-accordion .accordion-button:hover {
    background: linear-gradient(145deg, #fff5f5, #fff0f0);
    transform: translateY(-2px);
}

.custom-accordion .accordion-button:hover i {
    transform: scale(1.1);
    color: #dc3545;
}

.custom-accordion .accordion-body {
    background-color: #ffffff;
    padding: 2rem;
    line-height: 1.8;
    color: #666666;
    font-size: 1.05rem;
}

.custom-accordion .content-wrapper {
    position: relative;
    padding-left: 1rem;
    border-left: 3px solid rgba(220, 53, 69, 0.3);
}

.custom-accordion .accordion-button::after {
    width: 35px;
    height: 35px;
    background-color: #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.25);
}

.custom-accordion .accordion-item:hover {
    box-shadow: 0 10px 25px rgba(220, 53, 69, 0.1);
}

@media (max-width: 768px) {
    .custom-accordion .accordion-button {
        padding: 1.25rem;
        font-size: 1rem;
    }
    
    .custom-accordion .accordion-body {
        padding: 1.25rem;
    }
    
    .custom-accordion .accordion-button i {
        font-size: 1.2rem;
    }
}

.custom-accordion .accordion-button::after {
    display: none; /* ซ่อนปุ่ม toggle */
}



/* เพิ่มเส้นขอบด้านล่างเพื่อแสดงว่าสามารถคลิกได้ */
.custom-accordion .accordion-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #dc3545;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.custom-accordion .accordion-button:hover::before {
    width: 100%;
}
.info-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.info-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 1px solid rgba(220, 53, 69, 0.1);
}

.info-icon {
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}



.condition-card {
    padding: 2rem;
    border-radius: 15px;
    background: linear-gradient(145deg, #fff5f5, #fff0f0);
    border: 1px solid rgba(220, 53, 69, 0.1);
}

.condition-title {
    color: #dc3545;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.condition-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.condition-list li {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.condition-list li:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.1);
}

.summary-card {
    padding: 1.5rem;
    border-radius: 15px;
    background: #ffffff;
    border: 2px solid rgba(220, 53, 69, 0.2);
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(220, 53, 69, 0.1);
}

@media (max-width: 768px) {
    .info-section {
        padding: 1rem;
    }
    
    .info-card, .condition-card, .summary-card {
        padding: 1.5rem;
    }
    
    .condition-list li {
        padding: 0.8rem;
    }
}

.navbar {
    transition: all 0.3s ease;
}

.navbar-scrolled {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.home-link {
    transition: opacity 0.3s ease;
}

@media (max-width: 991.98px) {
    .navbar-scrolled {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}


.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    margin-left: 1px; /* ระยะห่างจากเมนูหลัก */
    min-width: 200px;
    
}

/* ปรับแต่งลูกศร */
.dropdown-submenu > a:after {
    display: inline-block;
    margin-left: 0.5em;
    vertical-align: middle;
    content: "";
    border-top: 0.3em solid transparent;
    border-right: 0;
    border-bottom: 0.3em solid transparent;
    border-left: 0.3em solid;
}

/* เอฟเฟกต์ hover */
.dropdown-submenu:hover > .dropdown-menu {
    display: block !important;
}


/* สำหรับเมนูหลักที่ active */
.dropdown-submenu > a.active:after {
    border-left-color: white;
}

/* OIT Page Specific Styles */
.icon-wrapper {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.card:hover .icon-wrapper {
    background: rgba(220, 53, 69, 0.2);
    transform: scale(1.1);
}

.card:hover .icon-wrapper i {
    color: #dc3545 !important;
    transform: scale(1.1);
}

/* OIT Button Styles */
.btn-outline-danger:hover {
    background: linear-gradient(45deg, #dc3545, #fd7e14);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* Responsive adjustments for OIT cards */
@media (max-width: 768px) {
    .icon-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .icon-wrapper i {
        font-size: 1.8rem !important;
    }
}