/* TFF Company Website CSS

/* Navigation Styles */
#navbar { 
    transition: all 0.3s ease; 
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-link {
    display: inline-block;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    background: #172554;
    bottom: -12px;
    content: '';
    height: 2px;
    width: 100%;
    left: 50%;
    position: absolute;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;              
    transition: transform 0.3s ease;
}

.nav-link.active {
    color: #112758;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.menu {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.menu:hover, .menu.active {
    background: #112758;
    color: #FFF;      
}

/* Activity Hero Section */
.hero-gradient {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,0 1000,300 1000,1000 0,700"/></svg>');
    background-size: cover;
}

.outline-text { 
    text-shadow: -2px -2px 0 #FFF, 2px -2px 0 #FFF, -2px 2px 0 #FFF, 2px 2px 0 #FFF; 
}

.text-shadow-tff {
    color: #112758;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.5), 0 0 25px rgba(255, 255, 255, 0.2);
}

#sweet.image-content, 
#savoury.image-content,
#special.image-content {
    overflow: hidden;
    position: relative;
}

.sweet-swiper::after,
.savoury-swiper::after,
.special-swiper::after {
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.05) 100%);
    content: '';
    position: absolute;
    inset: 0; 
    border-radius: inherit;
    pointer-events: none;
}

.text-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.content-list {
    flex: 1;
    transition: all 0.3s ease-in-out;
}

.content-list.expanded {
    max-height: 280px;
    overflow-y: auto;
}

.content-list.collapsed {
    max-height: 200px;
    overflow: hidden;
    position: relative;
}

.content-list.collapsed::after {
    background: linear-gradient(transparent, white);
    content: '';
    height: 40px;
    pointer-events: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Breadcrumb */
.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin: 0 0.5rem;
    color: #9CA3AF;
}

/* Activity Hover Card Animations */
.activity-card {
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.activity-card img { transition: transform 0.3s ease; }
.activity-card:hover img { transform: scale(1.05); }

/* Line clamp utilities for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More Button */
.read-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #172554, #1D4ED8);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    transform: translateY(0);
    transition: all 0.2s ease;
}

.read-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.read-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.read-btn:active { transform: translateY(0); }

.read-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Fragrance Category Section */
.category-content {
    align-items: center;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

.category-content.reverse { grid-template-columns: 1fr 1fr; }
.category-content.reverse .text-content { order: 2; }
.category-content.reverse .image-content { order: 1; }
.text-content { padding: 3rem; }

.text-content h3 {
    color: #112758;
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.description p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1rem;
}

.image-content {
    position: relative;
    height: 100%;
    min-height: 500px;
    overflow: hidden;
}

.image-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* Material Design Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.ripple:hover::before {
    width: 300px;
    height: 300px;
}

/* Custom Scrollbar */
::-webkit-scrollbar { 
    width: 8px; 
}

::-webkit-scrollbar-track {
    background: #1E293B;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #172554;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1E40AF;
}


/* Chrome, Edge, Safari */
.scrollbox::-webkit-scrollbar {
    width: 6px;
}

.scrollbox::-webkit-scrollbar-track {
    background: transparent;
}

.scrollbox::-webkit-scrollbar-thumb {
    background-color: rgba(107, 114, 128, 0.5); /* gray-500 */
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox */
.scrollbox {
    scrollbar-width: thin;
    scrollbar-color: rgba(107,114,128,0.5) transparent;
}

.scroll-x-custom::-webkit-scrollbar:horizontal {
    height: 8px;
    width: 0;
}

.scroll-x-custom::-webkit-scrollbar-track:horizontal {
    background: transparent;
}

.scroll-x-custom::-webkit-scrollbar-thumb:horizontal {
    background: #172554;
    border-radius: 4px;
}

.scroll-x-custom::-webkit-scrollbar-thumb:hover:horizontal {
    background: #1E40AF;
}

/* Back to Top Button */
#backToTop { transition: all 0.3s ease-in-out; }

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

/* Accessibility Improvements */
.activity-card:focus-within, .read-btn:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

.read-btn:focus { 
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3); 
}

/* Mobile-first approach additions */
.mobile-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1976d2;
    cursor: pointer;
    display: none;
    transition: all 0.3s ease;
}

.mobile-toggle.rotated i {
    transform: rotate(180deg);
}

.mobile-toggle i {
    display: inline-block;       
    line-height: 1; 
    transform-origin: center center;   
    transition: transform 0.3s ease; 
    vertical-align: middle;             
}

/* Swiper Pagination Style */
.hero-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 9999px;
    height: 0.25rem;
    width: 1.5rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
    background-color: #172554;
    opacity: 1;
    transform: scale(1.1);
}

.swiper-button-next,
.swiper-button-prev {
    z-index: 50; /* หรือมากกว่า overlay */
}

/* Responsive Design */
@media (min-width: 1440px) {
    .text-content { padding: 4rem; }
    .text-content h3 { font-size: 3rem; }
}

@media (max-width: 1024px) {
    .category-content { grid-template-columns: 1fr; }
    
    .category-content.reverse .text-content,
    .category-content.reverse .image-content {
        order: unset;
    }
    
    .text-content { padding: 2rem; }
    
    .text-content h3 {
        font-size: 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;

    }
    
    .image-content { min-height: 300px; }
}

@media (max-width: 768px) {
    .activity-card { margin-bottom: 1rem; }
    .hero-gradient h1 { font-size: 2.5rem; }
    .hero-gradient p { font-size: 1.125rem; }
    .mobile-toggle { display: block; }

    .text-content { 
        position: relative;
        padding: 1.5rem; 
    }

    .text-content h3 { 
        font-size: 1.8rem; 
    }


    .text-content .description,
    .text-content .category {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.6s ease;
    }

    .text-content.expanded .description,
    .text-content.expanded .category { 
        max-height: 1000px; 
    }

    .category-content {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: 100%;
    }

    .image-content {
        height: auto;
        min-height: 250px;
    }

    .outline-text {
        text-shadow: -1px -1px 2px #FFF, 1px -1px 2px #FFF, -1px 1px 2px #FFF, 1px 1px 2px #FFF;
    }
}

@media (max-width: 480px) {
    .activity-card .p-6 { padding: 1rem; }
    .hero-gradient h1 { font-size: 2rem; }
    .hero-gradient p { font-size: 1rem; }
    .text-content h3 { font-size: 1.5rem; }
    
    .read-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}