/* ========================================
   YABAAA - UNIFIED STYLESHEET
   Combined: Menu, Footer, Universal styles
   Professional Design System
   Version: 2.3 - CENTERED AUTO-SIZING PANEL
   ======================================== */

/* ========================================
   UPDATES IN VERSION 2.3:
   - Panel now auto-sizes to content (no empty space!)
   - Vertically centered on screen (elegant positioning)
   - Rounded corners on left side (modern touch)
   - Eliminates wasted space when few items
   - Scrollable when content exceeds max-height
   Previous features from 2.2:
   - Softer, elegant color palette (blue-slate)
   - Reduced spacing between ToC items (tighter, cleaner)
   - Pure white panel background
   - Softer shadows and backdrop
   Previous features from 2.1:
   - Floating ToC Panel (slide-out from right)
   - Dual Floating Buttons (ToC Menu + Back to Top)
   - Auto-generated ToC from headings
   - Active section highlighting on scroll
   - Full accessibility & mobile optimization
   ======================================== */

/* ========================================
   TABLE OF CONTENTS
   ========================================
   1. FONTS & IMPORTS
   2. BASE & RESET
   3. NAVIGATION (Desktop & Mobile)
   4. BREADCRUMB
   5. HERO SECTIONS
   6. MAIN CONTENT
   7. TABLE OF CONTENTS
   8. TEXT LAYOUTS & IMAGES
   9. GALLERY & LIGHTBOX
   10. SLIDER & SLIDESHOW
   11. ACCORDION
   12. FOOTER
   13. SCROLL ANIMATIONS
   14. UTILITY ELEMENTS (Back to Top, Progress Bar)
   15. RESPONSIVE DESIGN
   16. PRINT STYLES
   17. UTILITY CLASSES
   ======================================== */

/* ========================================
   1. FONTS & IMPORTS
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* ========================================
   2. BASE & RESET
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.8;
    color: #1F2937;
    background-color: #FAFAFA;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    color: #1A3A52;
    line-height: 1.3;
    margin-top: 0;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    margin-top: 2.5rem;
}

h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: justify;
}

ul, ol {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ========================================
   3. NAVIGATION (Desktop & Mobile)
   ======================================== */

/* Desktop Navigation */
nav {
    background-color: #2C5F8D;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 10000;
}

nav ul {
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

nav li {
    height: 50px;
    position: relative;
}

nav a {
    height: 100%;
    padding: 0 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: #FFFFFF;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 18px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: #1A3A52;
}

nav li:first-child {
    margin-right: auto;
}

/* Submenu Styling (Desktop) */
.submenu {
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    background-color: #1A3A52;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2);
    min-width: 250px;
    width: max-content;
    flex-direction: column;
    list-style: none;
}

.submenu li {
    height: auto;
    white-space: nowrap;
}

.submenu a {
    padding: 15px 30px;
    display: block;
    font-size: 16px;
}

.submenu a:hover {
    background-color: #2C5F8D;
}

/* Show submenu on hover (Desktop only) */
nav li:hover .submenu {
    display: flex;
}

/* Mobile Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 250px;
    z-index: 999;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.sidebar li {
    width: 100%;
}

.sidebar a {
    width: 100%;
    color: #1F2937;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
}

.sidebar a:hover {
    background-color: rgba(44, 95, 141, 0.1);
}

.menu-button {
    display: none;
}

/* Back Arrow Navigation */
.back-arrow a {
    padding: 0 20px !important;
    transition: transform 0.2s ease;
}

.back-arrow a:hover {
    transform: translateY(-3px);
}

.back-arrow svg {
    width: 24px;
    height: 24px;
    fill: #FFFFFF;
}

/* ========================================
   4. BREADCRUMB
   ======================================== */
.breadcrumb {
    padding: 1rem 2rem;
    background-color: #F3F4F6;
    font-size: 0.95rem;
    border-bottom: 1px solid #E5E7EB;
}

.breadcrumb a {
    color: #2C5F8D;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #1A3A52;
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: #9CA3AF;
}

.breadcrumb .current {
    color: #6B7280;
}

/* ========================================
   5. HERO SECTIONS
   ======================================== */
.hero-section {
    position: relative;
    height: 90vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.hero-section.hero-secondary {
    height: 60vh;
    min-height: 400px;
}

.hero-section.hero-small {
    height: 50vh;
    min-height: 350px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 1000px;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    color: white;
    font-size: 4rem;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.7);
    margin-bottom: 1rem;
}

.hero-content h2 {
    color: white;
    font-size: 3rem;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
    margin: 0;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
    margin-top: 0.5rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 24px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        opacity: 0;
        transform: rotate(-45deg) translate(-10px, -10px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(-45deg) translate(10px, 10px);
    }
}

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

/* ========================================
   6. MAIN CONTENT
   ======================================== */
.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.content-section {
    padding: 4rem 2rem;
    background-color: white;
    margin-bottom: 0;
}

.content-section:nth-child(even) {
    background-color: #F9FAFB;
}

/* ========================================
   7. TABLE OF CONTENTS
   ======================================== */
.toc-container {
    max-width: 900px;
    margin: 2rem auto;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.toc-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.toc-header:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.toc-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: white;
}

.toc-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.toc-toggle.active {
    transform: rotate(180deg);
}

.toc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.5rem;
}

.toc-content.active {
    max-height: 1000px;
    padding: 1.5rem;
}

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

.toc-list li {
    margin-bottom: 0.75rem;
}

.toc-list a {
    color: #2C5F8D;
    text-decoration: none;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 6px;
}

.toc-list a:hover {
    background-color: #F3F4F6;
    color: #1A3A52;
    padding-left: 1rem;
}

.toc-list a::before {
    content: "→";
    margin-right: 0.75rem;
    transition: transform 0.3s ease;
}

.toc-list a:hover::before {
    transform: translateX(5px);
}

/* ========================================
   8. TEXT LAYOUTS & IMAGES
   ======================================== */
.text-content {
    max-width: 900px;
    margin: 0 auto;
}

.text-content.full-width {
    max-width: 1200px;
}

.text-image-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.text-image-layout.reverse {
    grid-template-columns: 400px 1fr;
}

.text-image-layout.reverse .text-content {
    order: 2;
}

.text-image-layout.reverse .side-image {
    order: 1;
}

.side-image {
    position: sticky;
    top: 100px;
}

.side-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.side-image img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.image-showcase {
    margin: 3rem 0;
    text-align: center;
}

.image-showcase img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ========================================
   9. GALLERY & LIGHTBOX
   ======================================== */
.gallery-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.gallery-section h2 {
    text-align: center;
    color: white;
    font-size: 3rem;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    aspect-ratio: 4/3;
    background-color: rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

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

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Skeleton Loader for Gallery */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.gallery-item.loading {
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 50px;
    cursor: pointer;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1.5rem;
}

.lightbox-prev,
.lightbox-next {
    background-color: rgba(255, 255, 255, 0.9);
    color: #1A3A52;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ========================================
   10. SLIDER & SLIDESHOW
   ======================================== */
.slider-container {
    position: relative;
    max-width: 1200px;
    margin: 3rem auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slider-slide {
    min-width: 100%;
    height: 500px;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: #1A3A52;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-btn:hover {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.slider-btn-prev {
    left: 20px;
}

.slider-btn-next {
    right: 20px;
}

.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.slider-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-indicator.active {
    background-color: white;
    width: 30px;
    border-radius: 6px;
}

/* Slideshow (Auto-advancing) */
.slideshow-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 12px;
}

.slideshow-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow-slide.active {
    opacity: 1;
}

.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slideshow-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.slideshow-pause,
.slideshow-play {
    background-color: rgba(255, 255, 255, 0.9);
    color: #1A3A52;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.slideshow-pause:hover,
.slideshow-play:hover {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ========================================
   11. ACCORDION
   ======================================== */
.accordion {
    max-width: 900px;
    margin: 0.5rem auto 0;
}

.accordion-item {
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: white;
    transition: box-shadow 0.3s ease;
}

.accordion-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.accordion-header button {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    border: none;
    background: #F9FAFB;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease;
    color: #1A3A52;
}

.accordion-header button:hover {
    background-color: #F3F4F6;
}

.accordion-header button::after {
    content: "▾";
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: #2C5F8D;
}

.accordion-header button[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.accordion-header button[aria-expanded="true"] {
    background: #EEF2FF;
    color: #2C5F8D;
}

.accordion-header button:focus {
    outline: 2px solid #aaa;
    outline-offset: 2px;
}

.accordion-panel {
    padding: 1.5rem;
    background-color: white;
}

.accordion-panel p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.accordion-panel p:last-child {
    margin-bottom: 0;
}

.accordion-panel ul,
.accordion-panel ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

/* Recipe-specific accordion styling */
.recipe-accordion .accordion-header button {
    background: linear-gradient(135deg, #FFF9F0 0%, #FFF5E8 100%);
    border-left: 4px solid #FF9800;
}

.recipe-accordion .accordion-header button[aria-expanded="true"] {
    background: linear-gradient(135deg, #FFF5E8 0%, #FFECCC 100%);
}

/* Reduced margin for sections containing accordions */
.fun-facts-section,
.faq-accordion-section,
.faq-section {
    margin-top: 10px;
    margin-bottom: 1.5rem;
}

.faq-section details {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.faq-section summary {
    font-weight: 600;
    cursor: pointer;
}

/* ========================================
   12. FOOTER
   ======================================== */
.site-footer {
    background-color: #1A3A52;
    color: white;
    padding: 20px 30px;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border-top: 3px solid #2C5F8D;
}

/* Language selector - positioned first */
.footer-languages {
    text-align: center;
    padding: 0 0 15px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
}

.footer-languages a {
    color: white;
    text-decoration: none;
    padding: 5px 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    border-radius: 4px;
}

.footer-languages a:hover {
    color: #7BA7D1;
    background-color: rgba(255, 255, 255, 0.1);
}

.footer-languages .separator {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 5px;
}

/* Footer container - FIXED: True centering with grid */
.footer-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.footer-left {
    justify-self: start;
}

.footer-center {
    justify-self: center;
    font-weight: 400;
    font-size: 14px;
    text-align: center;
}

/* Footer right is not in HTML, but keeping it for potential future use */
.footer-right {
    justify-self: end;
    white-space: nowrap;
    font-weight: 600;
}

.footer-left a,
.footer-right a {
    margin: 0 10px;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.footer-left a svg {
    width: 24px;
    height: 24px;
    stroke: white;
    transition: stroke 0.3s ease;
}

.footer-left a:hover svg {
    stroke: #7BA7D1;
}

.footer-right a:hover {
    text-decoration: underline;
    color: #7BA7D1;
}

/* ========================================
   13. SCROLL ANIMATIONS
   ======================================== */
.fade-in {
    animation: fadeIn 1.2s ease-out;
}

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

.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.hover-scale:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* ========================================
   14. UTILITY ELEMENTS
   ======================================== */

/* ========================================
   14. FLOATING BUTTONS & TOC PANEL
   ======================================== */

/* Floating Buttons Container */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

/* Individual Floating Buttons */
.float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4F7CAC 0%, #3D5A80 100%); /* Softer blue-slate gradient */
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(79, 124, 172, 0.25); /* Softer shadow */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.float-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(79, 124, 172, 0.35); /* Softer shadow on hover */
    background: linear-gradient(135deg, #3D5A80 0%, #2E4057 100%); /* Softer darker gradient */
}

.float-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.4), 0 8px 24px rgba(79, 124, 172, 0.35);
}

.float-btn:active {
    transform: translateY(-2px);
}

.float-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

/* Back to Top Button - Initially Hidden */
.back-to-top-btn {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* ToC Menu Button Tooltip */
.toc-menu-btn::before {
    content: attr(title);
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 12px;
    padding: 6px 12px;
    background: rgba(61, 90, 128, 0.95); /* Updated to match new button color */
    color: white;
    font-size: 0.875rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.toc-menu-btn:hover::before {
    opacity: 1;
}

/* Floating ToC Panel */
.floating-toc-panel {
    position: fixed;
    top: 50%; /* Center vertically */
    transform: translateY(-50%); /* Perfect centering */
    right: -380px; /* Hidden off-screen */
    width: 360px;
    max-height: 85vh; /* Maximum height to prevent overflow */
    height: auto; /* Auto-size to content */
    background: #FFFFFF; /* Pure white background */
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12); /* Softer, more elegant shadow */
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px 0 0 12px; /* Rounded corners on left side for elegance */
}

.floating-toc-panel.active {
    right: 0;
    transform: translateY(-50%); /* Maintain centering when active */
}

/* ToC Panel Header */
.toc-panel-header {
    background: linear-gradient(135deg, #6B8CAE 0%, #4F7CAC 100%); /* Softer blue-slate gradient to match buttons */
    color: white;
    padding: 1.25rem 1.5rem; /* Slightly reduced padding */
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* Softer shadow */
}

.toc-panel-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: white;
    font-weight: 600;
}

.toc-panel-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.toc-panel-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.toc-panel-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.toc-panel-close svg {
    width: 20px;
    height: 20px;
}

/* ToC Panel Navigation */
.toc-panel-nav {
    flex: 0 1 auto; /* Don't force growth - size to content */
    overflow-y: auto; /* Scroll only if content exceeds max-height */
    padding: 0.75rem 0; /* Reduced from 1.5rem to 0.75rem for tighter spacing */
    max-height: calc(85vh - 100px); /* Reserve space for header */
}

/* Custom Scrollbar for ToC Panel */
.toc-panel-nav::-webkit-scrollbar {
    width: 6px;
}

.toc-panel-nav::-webkit-scrollbar-track {
    background: #F3F4F6;
}

.toc-panel-nav::-webkit-scrollbar-thumb {
    background: #CBD5E0;
    border-radius: 3px;
}

.toc-panel-nav::-webkit-scrollbar-thumb:hover {
    background: #A0AEC0;
}

/* ToC Panel Links */
.toc-panel-link {
    display: block;
    color: #1F2937;
    text-decoration: none;
    padding: 0.7rem 1.5rem; /* Reduced from 0.875rem to 0.7rem for tighter spacing */
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.toc-panel-link:hover {
    background: #F9FAFB;
    color: #4F7CAC; /* Updated to match new button color */
    border-left-color: #E5E7EB;
}

.toc-panel-link:focus {
    outline: none;
    background: #F3F4F6;
    box-shadow: inset 3px 0 0 #4F7CAC; /* Updated to match new color scheme */
}

.toc-panel-link.active {
    background: linear-gradient(to right, rgba(79, 124, 172, 0.08) 0%, transparent 100%); /* Softer active background */
    color: #4F7CAC; /* Updated to match new button color */
    border-left-color: #4F7CAC; /* Updated to match new button color */
    font-weight: 600;
}

.toc-panel-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #4F7CAC; /* Updated to match new button color */
}

/* Indented links (h3) */
.toc-panel-link.toc-indent {
    padding: 0.6rem 1.5rem 0.6rem 2.5rem; /* Reduced vertical padding, maintained left indent */
    font-size: 0.9375rem;
    font-weight: 400;
}

.toc-panel-link.toc-indent:hover {
    background: #F3F4F6;
}

/* Backdrop Overlay */
.toc-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Reduced from 0.5 to 0.4 for softer appearance */
    backdrop-filter: blur(3px); /* Increased blur for softer effect */
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.toc-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Old Back to Top Button (Fallback) */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4F7CAC; /* Updated to match new color scheme */
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(79, 124, 172, 0.25); /* Softer shadow */
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #3D5A80; /* Updated to match new color scheme */
    transform: translateY(-3px);
}

/* ========================================
   RESPONSIVE DESIGN FOR FLOATING ELEMENTS
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .floating-toc-panel {
        width: 320px;
        right: -340px;
    }
}

/* Mobile Landscape & Portrait */
@media (max-width: 768px) {
    .floating-buttons {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }
    
    .float-btn {
        width: 50px;
        height: 50px;
    }
    
    .float-btn svg {
        width: 22px;
        height: 22px;
    }
    
    /* Hide tooltip on mobile */
    .toc-menu-btn::before {
        display: none;
    }
    
    .floating-toc-panel {
        width: 90%;
        max-width: 320px;
        right: -100%;
        border-radius: 12px 0 0 12px; /* Keep rounded corners on mobile */
    }
    
    .toc-panel-header {
        padding: 1rem 1rem; /* Reduced padding */
    }
    
    .toc-panel-header h3 {
        font-size: 1.125rem;
    }
    
    .toc-panel-nav {
        padding: 0.5rem 0; /* Reduced from 1rem to 0.5rem for tighter mobile spacing */
    }
    
    .toc-panel-link {
        padding: 0.65rem 1rem; /* Reduced for tighter spacing */
        font-size: 0.9375rem;
    }
    
    .toc-panel-link.toc-indent {
        padding: 0.55rem 1rem 0.55rem 2rem; /* Tighter spacing with maintained indent */
        font-size: 0.875rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .floating-buttons {
        bottom: 16px;
        right: 16px;
        gap: 8px;
    }
    
    .float-btn {
        width: 48px;
        height: 48px;
    }
    
    .float-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .floating-toc-panel {
        width: 100%;
        max-width: 100%;
        border-radius: 0; /* No rounded corners on full-width */
    }
    
    .toc-panel-header {
        padding: 1rem 0.875rem;
    }
}

/* Accessibility: Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .floating-toc-panel,
    .toc-backdrop,
    .float-btn,
    .toc-panel-close {
        transition: none !important;
    }
    
    .float-btn:hover {
        transform: none;
    }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, #667eea, #764ba2);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ========================================
   15. RESPONSIVE DESIGN
   ======================================== */

/* Mobile Navigation Toggle */
@media(max-width: 800px) {
    .hideOnMobile {
        display: none;
    }
    .menu-button {
        display: block;
    }
}

@media(max-width: 400px) {
    .sidebar {
        width: 100%;
    }
}

/* Tablet & Desktop Adjustments */
@media (max-width: 1024px) {
    .text-image-layout,
    .text-image-layout.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .text-image-layout.reverse .text-content,
    .text-image-layout.reverse .side-image {
        order: initial;
    }
    
    .side-image {
        position: relative;
        top: 0;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .slideshow-wrapper {
        height: 400px;
    }
}

/* Tablet Portrait & Mobile Landscape */
@media (max-width: 768px) {
    .hero-section {
        height: 70vh;
        min-height: 400px;
        background-attachment: scroll;
    }
    
    .hero-section.hero-secondary,
    .hero-section.hero-small {
        height: 50vh;
        min-height: 300px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    p {
        font-size: 1rem;
        text-align: left;
    }
    
    .content-section {
        padding: 3rem 1.5rem;
    }
    
    .gallery-section {
        padding: 3rem 1.5rem;
    }
    
    .gallery-section h2 {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .accordion-header button {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .accordion-panel {
        padding: 1rem;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 80vh;
    }
    
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }
    
    .lightbox-nav {
        bottom: 20px;
        gap: 1rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 1.5rem;
        padding: 0.4rem 1rem;
    }
    
    .slider-btn {
        padding: 0.75rem 1rem;
        font-size: 1.5rem;
    }
    
    .slider-btn-prev {
        left: 10px;
    }
    
    .slider-btn-next {
        right: 10px;
    }
    
    .slideshow-wrapper {
        height: 300px;
    }
    
    .toc-header h3 {
        font-size: 1.1rem;
    }
    
    .toc-list a {
        font-size: 0.95rem;
    }

    /* Footer responsive adjustments */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .footer-left,
    .footer-center,
    .footer-right {
        justify-self: center;
    }

    .footer-left a,
    .footer-right a {
        margin: 0 8px;
    }
    
    .footer-languages {
        font-size: 12px;
    }
    
    .footer-languages a {
        padding: 4px 6px;
    }
}

/* Mobile Devices */
@media (max-width: 480px) {
    .breadcrumb {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .content-section {
        padding: 2rem 1rem;
    }
    
    .gallery-section {
        padding: 2rem 1rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
    
    .slideshow-wrapper {
        height: 250px;
    }

    /* Footer mobile optimizations */
    .footer-left a svg {
        width: 20px;
        height: 20px;
    }

    .footer-left a,
    .footer-right a {
        margin: 0 6px;
    }

    .site-footer {
        padding: 15px;
        font-size: 13px;
    }
    
    .footer-languages {
        font-size: 11px;
    }
    
    .footer-languages .separator {
        margin: 0 3px;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .footer-left a {
        margin: 0 5px;
    }
}

/* ========================================
   16. PRINT STYLES
   ======================================== */
@media print {
    .hero-section,
    .gallery-section,
    nav,
    footer,
    .breadcrumb,
    .scroll-indicator,
    .back-to-top,
    .scroll-progress,
    .slider-btn,
    .slideshow-controls,
    .menu-button,
    .sidebar,
    .floating-buttons,
    .floating-toc-panel,
    .toc-backdrop {
        display: none !important;
    }
    
    body {
        background-color: white;
    }
    
    .content-section {
        page-break-inside: avoid;
    }
}

/* ========================================
   17. UTILITY CLASSES
   ======================================== */
.text-center {
    text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.p-3 { padding: 3rem; }



/* ========================================
   READING TIME BADGE STYLES
   Add this to your styles.css file
   ======================================== */

.reading-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 1rem 2rem 0.5rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    animation: fadeInUp 0.5s ease-out;
}

.reading-time-badge svg {
    flex-shrink: 0;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .reading-time-badge {
        margin: 0.5rem 1rem;
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .reading-time-badge {
        display: flex;
        width: calc(100% - 2rem);
        margin: 0.5rem 1rem;
    }
}


/* ========================================
   END OF STYLESHEET
   ======================================== */
