/* BST Privacy Notice - Modern CSS Styles */

:root {
    --primary-color: #6ABE4A;
    --secondary-color: #6c757d;
    --success-color: #6ABE4A;
    --info-color: #002554;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --bs-primary: #6ABE4A;
    --bs-primary-rgb: 106, 190, 74;
    --gradient-primary: linear-gradient(to right, #6ABE4A, #002554);
    --gradient-secondary: linear-gradient(135deg, #002554 0%, #1a4a7a 100%);
    --shadow-light: 0 2px 20px rgba(0,0,0,0.1);
    --shadow-medium: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-heavy: 0 20px 40px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #ffffff;
    scroll-behavior: smooth;
    transition: opacity 0.15s ease;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Main Layout Container */
.main-layout {
    display: block; /* เปลี่ยนจาก flex เป็น block */
    min-height: 100vh;
    position: relative;
}

.sidebar-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 1000;
    background: white;
    /* border-right: 1px solid #e0e0e0; */
}

.content-area {
    margin-left: 280px;
    min-height: 100vh;
    background: #f8f9fa;
    position: relative;
}

/* Navigation Styles */
.navbar {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-light);
    padding: 0.75rem 0;
    transition: var(--transition);
    position: sticky; /* ให้ติดด้านบน */
    top: 0;
    width: 100%;
    z-index: 100;
    margin: 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: white !important;
    text-decoration: none;
}

.navbar-brand img {
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: white;
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-medium);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    animation: fadeInUp 0.3s ease;
}

.modal-contentcookiePolicy {
    padding: 0 !important;
    background: white !important;
    width: 100% !important;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.containercookiePolicy {
    padding: 0 !important;
    max-width: 100%;
    margin: 0;
}

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

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border-radius: 8px;
    margin: 0 0.5rem;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.language-switcher {
    display: flex;
    gap: 10px;
}

.language-switcher .nav-link,
.language-switcher .language-btn {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.language-switcher .nav-link:hover,
.language-switcher .language-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.language-switcher .language-btn.active {
    background: rgba(255,255,255,0.3);
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 2rem;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.hero-section::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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: slideInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    animation: slideInUp 0.8s ease 0.2s both;
}

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

/* Privacy Grid Cards */
.privacy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    background: white;
}

.privacy-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.privacy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #6ABE4A, #002554);
}

.privacy-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.privacy-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.privacy-card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.privacy-card .btn {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.privacy-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Footer */
.footer {
    background: var(--gradient-secondary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Sidebar Selector */
.sidebar-selector {
    position: relative;
    height: 100%;
    width: 100%;
    pointer-events: auto;
    background: white;
}

.sidebar-toggle {
    display: none; /* ซ่อนปุ่ม toggle เพราะใช้ layout แบบแบ่งซ้ายขวา */
}

.sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-heavy);
}

/* Mobile Sidebar Toggle Button */
.sidebar-toggle-mobile {
    display: none; /* ซ่อนเป็นค่าเริ่มต้น แสดงเฉพาะบน mobile */
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    padding: 0.5rem;
    margin-right: 1rem;
    transition: var(--transition);
}

.sidebar-toggle-mobile:hover {
    color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.sidebar-content {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    transition: all 0.3s ease;
    overflow-y: auto;
    pointer-events: auto;
}

/* ลบ hover effect เพราะ sidebar แสดงเต็มขนาดตลอดเวลาแล้ว */

.sidebar-header {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1;
    overflow: hidden;
    height: 84px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 1; /* แสดงตลอดเวลา */
    transform: translateX(0); /* แสดงตลอดเวลา */
    transition: all 0.3s ease;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    opacity: 1; /* แสดงตลอดเวลา */
    transform: translateX(0); /* แสดงตลอดเวลา */
}

.sidebar-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.75rem; /* ลด padding */
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    overflow: hidden;
}

.sidebar-item:hover {
    background: rgba(106, 190, 74, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    transform: translateX(5px);
}

.sidebar-item.active {
    background: rgba(106, 190, 74, 0.15);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.sidebar-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.sidebar-item span {
    flex: 1;
    font-size: 0.85rem; /* ลดขนาดฟอนต์ */
    line-height: 1.3;
    white-space: normal; /* ให้ข้อความขึ้นบรรทัดใหม่ได้ */
    opacity: 1; /* แสดงตลอดเวลา */
    transform: translateX(0); /* แสดงตลอดเวลา */
    transition: all 0.3s ease;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
}

.sidebar-selector.active .sidebar-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Content Sections */
.content-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    padding: 2rem;
    background: white;
    margin: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.content-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Default empty state */
.content-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--secondary-color);
}

.content-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.content-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.content-empty p {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.content-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.content-card:hover {
    box-shadow: var(--shadow-medium);
}

/* Content Header and Share Button */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-color);
}

.content-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 20px;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.content-body {
    padding: 1rem 0;
}

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-warning {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: var(--dark-color);
}

.btn-info {
    background: var(--info-color);
    border-color: var(--info-color);
    color: white;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus,
.dropdown-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Tablet และ Mobile: เปลี่ยนเป็น full width และใช้ toggle */
    .main-layout {
        display: block;
    }
    
    .sidebar-area {
        position: fixed;
        top: 0;
        left: -280px; /* ซ่อน sidebar */
        width: 280px;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
        background: white;
        box-shadow: var(--shadow-heavy);
    }
    
    .sidebar-area.active {
        left: 0;
    }
    
    .content-area {
        margin-left: 0; /* ลบ margin-left บน tablet/mobile */
        width: 100%;
    }
    
    /* Content sections full width */
    .content-section {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .privacy-grid {
        margin: 1rem;
        padding: 1rem;
    }
    
    /* ซ่อนปุ่ม toggle ของ sidebar เพราะใช้ mobile toggle แทน */
    .sidebar-toggle {
        display: none !important;
    }
    
    /* แสดง mobile toggle button ใน navbar */
    .sidebar-toggle-mobile {
        display: block !important;
    }
    
    /* เพิ่ม overlay เมื่อเปิด sidebar บน mobile */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        pointer-events: none;
    }
    
    .sidebar-area.active ~ .sidebar-overlay,
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .privacy-grid {
        grid-template-columns: 1fr;
        margin: 0;
        padding: 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-brand span {
        display: none;
    }
    
    .sidebar-area {
        width: 280px;
        left: -280px;
    }
    
    .content-area {
        margin-left: 0;
    }
    
    /* Mobile content sections */
    .content-section {
        margin: 0 !important;
        padding: 1rem;
        border-radius: 0;
    }
    
    /* Mobile navbar layout */
    .navbar .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
    }
    
    .navbar-brand {
        flex: 1;
        text-align: center;
        margin: 0;
    }
    
    /* Mobile toggle button styling */
    .sidebar-toggle-mobile {
        display: block !important;
        background: none;
        border: none;
        color: white;
        font-size: 1.2rem;
        padding: 0.5rem;
        border-radius: 4px;
        transition: var(--transition);
        z-index: 1055;
    }
    
    .sidebar-toggle-mobile:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(1.1);
    }
    
    .sidebar-toggle-mobile:focus {
        outline: 2px solid rgba(255, 255, 255, 0.5);
        outline-offset: 2px;
    }
    
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .privacy-card {
        padding: 1.5rem;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .content-section {
        margin: 0 !important; /* ลบ margin บน mobile */
        padding: 1rem;
        border-radius: 0; /* ลบ border-radius บน mobile */
    }
  
    
    
    /* Full width content on mobile */
    .privacy-grid {
        margin: 0;
        padding: 1rem;
        gap: 1rem;
    }
    
    /* Remove margins from main containers */
    .container {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .privacy-grid,
    .loading-spinner {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
    
    .content-section {
        padding: 1rem 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #f8f9fa;
        --light-color: #212529;
    }
    
    body {
        background-color: #1a1a1a;
        color: #f8f9fa;
    }
    
    .privacy-card,
    .content-card {
        background: #2d2d2d;
        color: #f8f9fa;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

.slide-up {
    animation: slideInUp 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Utility Classes */
.text-gradient {
    background: linear-gradient(to right, #6ABE4A, #002554);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-hover {
    transition: var(--transition);
}

.shadow-hover:hover {
    box-shadow: var(--shadow-heavy);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(to right, #6ABE4A, #002554) 1;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-heavy);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--danger-color);
}

.notification-info {
    border-left: 4px solid var(--info-color);
}

.notification i {
    font-size: 1.2rem;
}

.notification-success i {
    color: var(--success-color);
}

.notification-error i {
    color: var(--danger-color);
}

.notification-info i {
    color: var(--info-color);
}

.notification span {
    font-weight: 500;
    color: var(--dark-color);
}
