/* ========================================
   Custom CSS เสริม Bootstrap
======================================== */

/* Cookie Banner */
.cookie-banner {
    z-index: 9999;
}

/* Hover Effects */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Hero Section Wave Effect */
.hero-section {
    position: relative;
    overflow: hidden;
}

.wave-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Avatar Container */
.avatar-container {
    position: relative;
    display: inline-block;
}

/* Session Item Hover */
.session-item {
    transition: background-color 0.3s ease;
}

.session-item:hover {
    background-color: #f8f9fa !important;
}

/* Time Badge */
.time-badge {
    font-size: 0.85rem;
}

/* Custom Navbar Spacing */
@media (min-width: 992px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .cookie-banner {
        display: none;
    }
}

/* ========================================
   Important Dates Section Styling
======================================== */

/* Date Badge */
.date-badge {
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.date-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Timeline Modern */
.timeline-modern {
    position: relative;
}

.timeline-modern::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, 
        #198754 0%, 
        #0d6efd 20%, 
        #ffc107 40%, 
        #dc3545 60%, 
        #6c757d 80%, 
        #2d6a4f 100%);
    border-radius: 2px;
}

@media (min-width: 768px) {
    .timeline-modern::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 767px) {
    .timeline-modern::before {
        left: 20px;
    }
}

/* Timeline Item Modern */
.timeline-item-modern {
    opacity: 0;
    animation: slideInRight 0.6s ease forwards;
}

.timeline-item-modern:nth-child(1) { animation-delay: 0.1s; }
.timeline-item-modern:nth-child(2) { animation-delay: 0.15s; }
.timeline-item-modern:nth-child(3) { animation-delay: 0.2s; }
.timeline-item-modern:nth-child(4) { animation-delay: 0.25s; }
.timeline-item-modern:nth-child(5) { animation-delay: 0.3s; }
.timeline-item-modern:nth-child(6) { animation-delay: 0.35s; }
.timeline-item-modern:nth-child(7) { animation-delay: 0.4s; }
.timeline-item-modern:nth-child(8) { animation-delay: 0.45s; }
.timeline-item-modern:nth-child(9) { animation-delay: 0.5s; }
.timeline-item-modern:nth-child(10) { animation-delay: 0.55s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse Animation for Critical Badge */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Gradient Background for Main Conference */
.bg-gradient-primary {
    background: linear-gradient(135deg, #2d6a4f 0%, #1b4332 100%) !important;
}

/* Table Styling */
.table-hover tbody tr {
    transition: all 0.3s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(45, 106, 79, 0.05);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Countdown Timer Styling */
#abstractCountdown {
    font-size: 0.9rem;
    font-weight: 600;
    color: #dc3545;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .date-badge {
        min-width: 120px;
    }
    
    .timeline-item-modern .card-body {
        padding: 1rem !important;
    }
}

/* Icon Animations */
.timeline-item-modern:hover .bi {
    animation: bounceIcon 0.6s ease;
}

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

/* Border Accent Animation */
.border-start.border-5 {
    position: relative;
    overflow: hidden;
}

.border-start.border-5::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 0;
    background: linear-gradient(180deg, transparent, currentColor, transparent);
    transition: height 0.5s ease;
}

.border-start.border-5:hover::before {
    height: 100%;
}

/* Calendar Download Section */
.calendar-download-section .btn {
    transition: all 0.3s ease;
}

.calendar-download-section .btn:hover {
    transform: translateY(-3px);
}/* ========================================
   Important Dates Section Styling
======================================== */

/* Date Badge */
.date-badge {
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.date-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Timeline Modern */
.timeline-modern {
    position: relative;
}

.timeline-modern::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, 
        #198754 0%, 
        #0d6efd 20%, 
        #ffc107 40%, 
        #dc3545 60%, 
        #6c757d 80%, 
        #2d6a4f 100%);
    border-radius: 2px;
}

@media (min-width: 768px) {
    .timeline-modern::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 767px) {
    .timeline-modern::before {
        left: 20px;
    }
}

/* Timeline Item Modern */
.timeline-item-modern {
    opacity: 0;
    animation: slideInRight 0.6s ease forwards;
}

.timeline-item-modern:nth-child(1) { animation-delay: 0.1s; }
.timeline-item-modern:nth-child(2) { animation-delay: 0.15s; }
.timeline-item-modern:nth-child(3) { animation-delay: 0.2s; }
.timeline-item-modern:nth-child(4) { animation-delay: 0.25s; }
.timeline-item-modern:nth-child(5) { animation-delay: 0.3s; }
.timeline-item-modern:nth-child(6) { animation-delay: 0.35s; }
.timeline-item-modern:nth-child(7) { animation-delay: 0.4s; }
.timeline-item-modern:nth-child(8) { animation-delay: 0.45s; }
.timeline-item-modern:nth-child(9) { animation-delay: 0.5s; }
.timeline-item-modern:nth-child(10) { animation-delay: 0.55s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse Animation for Critical Badge */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Gradient Background for Main Conference */
.bg-gradient-primary {
    background: linear-gradient(135deg, #2d6a4f 0%, #1b4332 100%) !important;
}

/* Table Styling */
.table-hover tbody tr {
    transition: all 0.3s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(45, 106, 79, 0.05);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Countdown Timer Styling */
#abstractCountdown {
    font-size: 0.9rem;
    font-weight: 600;
    color: #dc3545;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .date-badge {
        min-width: 120px;
    }
    
    .timeline-item-modern .card-body {
        padding: 1rem !important;
    }
}

/* Icon Animations */
.timeline-item-modern:hover .bi {
    animation: bounceIcon 0.6s ease;
}

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

/* Border Accent Animation */
.border-start.border-5 {
    position: relative;
    overflow: hidden;
}

.border-start.border-5::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 0;
    background: linear-gradient(180deg, transparent, currentColor, transparent);
    transition: height 0.5s ease;
}

.border-start.border-5:hover::before {
    height: 100%;
}

/* Calendar Download Section */
.calendar-download-section .btn {
    transition: all 0.3s ease;
}

.calendar-download-section .btn:hover {
    transform: translateY(-3px);
}

/* ========================================
   Responsive Important Dates
======================================== */

@media (max-width: 576px) {
    .date-badge {
        min-width: 100px;
        padding: 0.5rem !important;
    }
    
    .date-badge .fs-2 {
        font-size: 1.5rem !important;
    }
    
    .date-badge .fs-1 {
        font-size: 1.8rem !important;
    }
    
    .date-badge .fw-bold {
        font-size: 0.9rem;
    }
    
    .timeline-modern::before {
        display: none;
    }
    
    .timeline-item-modern .card-body .row {
        text-align: center;
    }
    
    .timeline-item-modern .btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Stack table on mobile */
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    .display-5 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Hide some badges on mobile for cleaner look */
    .timeline-item-modern .badge.bg-light {
        display: none;
    }
}

/* ========================================
   Print Styles for Important Dates
======================================== */

@media print {
    .important-dates-section .btn,
    .important-dates-section .hover-card:hover {
        box-shadow: none !important;
        transform: none !important;
    }
    
    .timeline-modern::before {
        display: block !important;
    }
    
    .date-badge {
        border: 2px solid #333 !important;
        background: white !important;
        color: black !important;
    }
    
    .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .badge {
        border: 1px solid #333;
    }
}

/* ========================================
   Dark Mode Support (Optional)
======================================== */

@media (prefers-color-scheme: dark) {
    .important-dates-section {
        background-color: #1a1a1a;
    }
    
    .important-dates-section .card {
        background-color: #2d2d2d;
        color: #ffffff;
    }
    
    .important-dates-section .text-muted {
        color: #a0a0a0 !important;
    }
}

/* ========================================
   Loading Animation
======================================== */

.important-dates-section.loading {
    opacity: 0.5;
    pointer-events: none;
}

.important-dates-section.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2d6a4f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ========================================
   Fee Calculator Styling
======================================== */

#feeCalculator select {
    cursor: pointer;
    transition: all 0.3s ease;
}

#feeCalculator select:hover {
    border-color: #2d6a4f;
    box-shadow: 0 0 0 0.2rem rgba(45, 106, 79, 0.15);
}

#feeResult {
    animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.currency-conversion {
    animation: fadeIn 0.5s ease;
}

/* Fee Table Enhancements */
.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table-hover tbody tr {
    transition: all 0.3s ease;
    cursor: pointer;
}

.table-hover tbody tr:hover {
    background-color: rgba(45, 106, 79, 0.05);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
}

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

/* Accordion Enhancements */
.accordion-button:not(.collapsed) {
    background-color: rgba(45, 106, 79, 0.1);
    color: #2d6a4f;
}

.accordion-button:focus {
    border-color: #2d6a4f;
    box-shadow: 0 0 0 0.25rem rgba(45, 106, 79, 0.15);
}

/* Responsive Fee Table */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem;
    }
    
    #feeCalculator .col-md-6 {
        margin-bottom: 1rem;
    }
}

