/* ==========================================================================
   OOB Pages Shared Styles
   Used by: AboutUs, Gallery, NewsEvents
   ========================================================================== */

/* Base page container with fade-in animation */
.oob-page {
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius-lg: 1.25rem;
    --radius-md: 0.75rem;
    animation: fadeIn 0.4s ease-out;
}

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

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

/* Back navigation link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
}

.back-link:hover {
    transform: translateX(-4px);
}

/* Hero banner - common structure */
.hero-banner {
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-banner h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.hero-banner p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Intro/content cards */
.intro-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
}

.content-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.content-card:hover {
    transform: translateY(-2px);
}

.content-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-card h2::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    border-radius: 2px;
}

.content-card p, .content-card ul {
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
}

.content-card ul {
    padding-left: 1.25rem;
}

.content-card li {
    margin-bottom: 0.5rem;
}

/* Hero image */
.hero-image {
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
    background: #f8f9fa;
}

/* Empty state */
.empty-gallery {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
    color: #888;
    box-shadow: var(--shadow-soft);
}

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

.empty-gallery p {
    font-size: 1.1rem;
    margin: 0;
}

/* ==========================================================================
   AboutUs Theme (Purple gradient)
   ========================================================================== */
.oob-page.about-theme {
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-hover: 0 8px 30px rgba(102, 126, 234, 0.2);
    --theme-color: #667eea;
    --theme-color-alt: #764ba2;
}

.oob-page.about-theme .back-link { color: #667eea; }
.oob-page.about-theme .back-link:hover { color: #764ba2; }
.oob-page.about-theme .hero-banner { background: var(--gradient-primary); }
.oob-page.about-theme .content-card { border: 1px solid rgba(102, 126, 234, 0.1); }
.oob-page.about-theme .content-card:hover { box-shadow: var(--shadow-hover); }
.oob-page.about-theme .content-card h2::before { background: var(--gradient-primary); }
.oob-page.about-theme .content-card strong { color: #667eea; }

/* ==========================================================================
   Gallery Theme (Pink gradient)
   ========================================================================== */
.oob-page.gallery-theme {
    --gradient-primary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-hover: 0 12px 40px rgba(240, 147, 251, 0.25);
    --theme-color: #f5576c;
    --theme-color-alt: #f093fb;
}

.oob-page.gallery-theme .back-link { color: #f5576c; }
.oob-page.gallery-theme .back-link:hover { color: #f093fb; }
.oob-page.gallery-theme .hero-banner { background: var(--gradient-primary); }
.oob-page.gallery-theme .intro-card { border: 1px solid rgba(240, 147, 251, 0.15); }

/* Gallery Container */
.gallery-container {
    margin-bottom: 2rem;
}

.gallery-main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    background: #1a1a2e;
}

/* Gallery Carousel */
.oob-page.gallery-theme .carousel {
    background: #1a1a2e;
}

.oob-page.gallery-theme .carousel-item {
    transition: transform 0.6s ease-in-out, opacity 0.3s ease-in-out;
}

.oob-page.gallery-theme .carousel-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 500px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    padding: 1rem;
}

.oob-page.gallery-theme .carousel-image-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Image Counter */
.gallery-counter {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10;
    letter-spacing: 0.5px;
}

/* Caption */
.oob-page.gallery-theme .carousel-caption {
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 3rem 2rem 1.5rem;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
}

.oob-page.gallery-theme .carousel-caption p {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 0 auto;
}

/* Navigation Arrows */
.oob-page.gallery-theme .carousel-control-prev,
.oob-page.gallery-theme .carousel-control-next {
    width: 60px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.oob-page.gallery-theme .carousel:hover .carousel-control-prev,
.oob-page.gallery-theme .carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.carousel-nav-icon i {
    font-size: 1.25rem;
    color: white;
}

.oob-page.gallery-theme .carousel-control-prev:hover .carousel-nav-icon,
.oob-page.gallery-theme .carousel-control-next:hover .carousel-nav-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* Indicators */
.oob-page.gallery-theme .carousel-indicators {
    bottom: 1rem;
    margin-bottom: 0;
    gap: 0.5rem;
}

.oob-page.gallery-theme .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    transition: all 0.3s ease;
    opacity: 1;
}

.oob-page.gallery-theme .carousel-indicators button.active {
    background: white;
    transform: scale(1.2);
}

.oob-page.gallery-theme .carousel-indicators button:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Thumbnail Strip */
.gallery-thumbnails {
    margin-top: 1rem;
    padding: 0.5rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.thumbnail-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--theme-color) #f0f0f0;
}

.thumbnail-strip::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-strip::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 3px;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 3px solid transparent;
    padding: 0;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.thumbnail-item:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.thumbnail-item.active {
    border-color: var(--theme-color);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Empty State */
.oob-page.gallery-theme .empty-gallery {
    text-align: center;
    padding: 5rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.empty-gallery-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
    border-radius: 50%;
}

.oob-page.gallery-theme .empty-gallery i {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.oob-page.gallery-theme .empty-gallery h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.5rem;
}

.oob-page.gallery-theme .empty-gallery p {
    font-size: 1rem;
    color: #6c757d;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .oob-page.gallery-theme .carousel-image-wrapper {
        height: 350px;
        padding: 0.5rem;
    }
    
    .gallery-counter {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .oob-page.gallery-theme .carousel-control-prev,
    .oob-page.gallery-theme .carousel-control-next {
        opacity: 1;
        width: 40px;
    }
    
    .carousel-nav-icon {
        width: 36px;
        height: 36px;
    }
    
    .carousel-nav-icon i {
        font-size: 1rem;
    }
    
    .thumbnail-item {
        width: 60px;
        height: 45px;
    }
    
    .oob-page.gallery-theme .carousel-caption {
        padding: 2rem 1rem 1rem;
    }
    
    .oob-page.gallery-theme .carousel-caption p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .oob-page.gallery-theme .carousel-image-wrapper {
        height: 280px;
    }
    
    .gallery-thumbnails {
        display: none;
    }
}

/* ==========================================================================
   NewsEvents Theme (Teal/Green gradient)
   ========================================================================== */
.oob-page.news-theme {
    --gradient-primary: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --shadow-hover: 0 12px 40px rgba(17, 153, 142, 0.2);
    --theme-color: #11998e;
    --theme-color-alt: #38ef7d;
}

.oob-page.news-theme .back-link { color: #11998e; }
.oob-page.news-theme .back-link:hover { color: #38ef7d; }
.oob-page.news-theme .hero-banner { background: var(--gradient-primary); }
.oob-page.news-theme .intro-card { border: 1px solid rgba(17, 153, 142, 0.12); }

/* News cards */
.news-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(17, 153, 142, 0.08);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    animation: slideUp 0.5s ease-out backwards;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.news-card-img-wrapper {
    overflow: hidden;
    position: relative;
}

.news-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card-img {
    transform: scale(1.05);
}

.placeholder-img {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: white;
    transition: transform 0.4s ease;
}

.news-card:hover .placeholder-img {
    transform: scale(1.05);
}

.news-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #11998e;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.85rem;
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1) 0%, rgba(56, 239, 125, 0.1) 100%);
    border-radius: 2rem;
    width: fit-content;
}

.news-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-card-preview {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-more-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #11998e;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.75rem;
    transition: all 0.2s ease;
}

.news-card:hover .read-more-indicator {
    gap: 0.5rem;
    color: #38ef7d;
}

/* Staggered animation for news cards */
.news-grid .col-md-6:nth-child(1) .news-card { animation-delay: 0.1s; }
.news-grid .col-md-6:nth-child(2) .news-card { animation-delay: 0.15s; }
.news-grid .col-md-6:nth-child(3) .news-card { animation-delay: 0.2s; }
.news-grid .col-md-6:nth-child(4) .news-card { animation-delay: 0.25s; }
.news-grid .col-md-6:nth-child(5) .news-card { animation-delay: 0.3s; }
.news-grid .col-md-6:nth-child(6) .news-card { animation-delay: 0.35s; }

/* ==========================================================================
   News Modal Styles
   ========================================================================== */
.oob-page.news-theme .modal-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.oob-page.news-theme .modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.oob-page.news-theme .modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.oob-page.news-theme .modal-header .btn-close:hover {
    opacity: 1;
}

.oob-page.news-theme .modal-body {
    padding: 2rem;
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

.oob-page.news-theme .modal-date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #11998e;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1) 0%, rgba(56, 239, 125, 0.1) 100%);
    border-radius: 2rem;
    width: fit-content;
}

.oob-page.news-theme .modal-image-container img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.oob-page.news-theme .modal-content-text {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.8;
}

.oob-page.news-theme .modal-content-text p {
    margin-bottom: 1rem;
}

.oob-page.news-theme .modal-content-text p:last-child {
    margin-bottom: 0;
}

.oob-page.news-theme .modal-content {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.oob-page.news-theme .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
}

/* Responsive modal sizing */
@media (max-width: 768px) {
    .oob-page.news-theme .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .oob-page.news-theme .modal-body {
        padding: 1.5rem;
    }

    .oob-page.news-theme .modal-header {
        padding: 1rem 1.5rem;
    }

    .oob-page.news-theme .modal-title {
        font-size: 1.25rem;
    }
}
