/* ========================================
   UNIVERSAL.CSS - Comprehensive styling system
   Features: Hero, Gallery, Accordion, ToC, Sliders, Skeleton, Animations
   Version: 1.0
   ======================================== */

/* ========== FONTS & BASE ========== */
* {
    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;
}

/* ========== 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;
}

/* ========== 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);
    }
}

/* ========== 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;
}

/* ========== TABLE OF CONTENTS (DROPDOWN) ========== */
.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);
}

/* ========== TEXT LAYOUTS ========== */
.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);
}

/* ========== GALLERY WITH SKELETON LOADER ========== */
.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 {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    animation: zoomIn 0.3s ease;
}

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

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 50px;
    font-size: 50px;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    color: #667eea;
}

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

.lightbox-prev,
.lightbox-next {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    font-size: 2rem;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: white;
    color: #1A3A52;
}

/* ========== IMAGE SLIDERS ========== */

/* Manual Slider */
.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;
}

.slider-slide {
    min-width: 100%;
    position: relative;
}

.slider-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: #1A3A52;
    border: none;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    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: 10px;
    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;
    transform: scale(1.3);
}

/* Auto Slider (Slideshow) */
.slideshow-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);
}

.slideshow-wrapper {
    position: relative;
    height: 600px;
}

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

.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%);
    display: flex;
    gap: 1rem;
    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);
}

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

.accordion-item {
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    margin-bottom: 1rem;
    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-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%);
}

/* ========== 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);
}

/* ========== BACK TO TOP BUTTON ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #2C5F8D;
    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(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.back-to-top:hover {
    background-color: #1A3A52;
    transform: translateY(-3px);
}

/* ========== 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;
}

/* ========== RESPONSIVE DESIGN ========== */
@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;
    }
}

@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;
    }
}

@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;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .hero-section,
    .gallery-section,
    nav,
    footer,
    .breadcrumb,
    .scroll-indicator,
    .back-to-top,
    .scroll-progress,
    .slider-btn,
    .slideshow-controls {
        display: none;
    }
    
    body {
        background-color: white;
    }
    
    .content-section {
        page-break-inside: avoid;
    }
}

/* ========== 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; }
