/* ======================================================
   ACTIVITIES PAGE - CUSTOM STYLES
   Apple-Inspired Minimalist Design
   ====================================================== */

:root {
    --primary-color: #d35400;
    --dark-bg: #0f1419;
    --light-bg: #f8f9fa;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --border-light: #e9ecef;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --spacing-unit: 1rem;
}

/* ======================================================
   HERO SECTION
   ====================================================== */

.activities-hero {
    /* Use same color family as the back-to-top button for brand consistency */
    background: linear-gradient(135deg, #0b5345 0%, #077454 100%);
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.activities-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* subtle highlights matching back-to-top tones */
    background: 
        radial-gradient(circle at 20% 50%, rgba(11,83,69,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(7,116,84,0.04) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.activities-hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    letter-spacing: -1px;
    line-height: 1.1;
}

.activities-hero p {
    font-size: 1.3rem;
    color: #b0b8c1;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.3px;
}

/* ======================================================
   ACTIVITIES SECTION
   ====================================================== */

.activities-section {
    background-color: #ffffff;
    position: relative;
    z-index: 2;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 80px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid var(--border-light);
    background: #ffffff;
    color: var(--text-dark);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: -1;
    transition: left 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: #ffffff;
}

.filter-btn:hover::before {
    left: 0;
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Activities Gallery Grid */
.activities-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    animation: fadeInUp 0.8s ease-out;
}

@media (max-width: 1024px) {
    .activities-gallery {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .activities-gallery {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* Activity Card */
.activity-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-light);
}

.lg-gallery-item {
    text-decoration: none;
    display: block;
    height: 100%;
}

.lg-gallery-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.lg-gallery-item:hover .activity-card {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* Image Wrapper */
.image-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e9e9e9 100%);
}

.activity-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.activity-card:hover .activity-image {
    transform: scale(1.05);
}

/* Overlay Badge */
.overlay-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(211, 84, 0, 0.95);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* View Icon */
.view-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 24px;
    opacity: 0;
    transition: var(--transition);
    z-index: 3;
    cursor: pointer;
}

.activity-card:hover .view-icon {
    opacity: 1;
}

/* Activity Content */
.activity-content {
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.activity-content h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 16px 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.activity-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0 0 24px 0;
    flex-grow: 1;
    letter-spacing: 0.2px;
}

/* Read More Link */
.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    gap: 8px;
    cursor: pointer;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.lg-gallery-item .read-more {
    cursor: pointer;
}

.read-more:hover {
    transform: translateX(4px);
    border-bottom-color: var(--primary-color);
}

.read-more::after {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-left: 4px;
    transition: var(--transition);
}

.read-more:hover::after {
    transform: translateX(2px);
}

/* ======================================================
   CTA SECTION
   ====================================================== */

.activities-cta {
    /* Match CTA to back-to-top button color palette */
    background: linear-gradient(135deg, #0b5345 0%, #077454 100%);
    padding: 100px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.activities-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(11,83,69,0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(7,116,84,0.03) 0%, transparent 50%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

.activities-cta h2 {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.activities-cta p {
    font-size: 1.15rem;
    color: #b0b8c1;
    margin: 0 0 40px 0;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ======================================================
   LIGHTGALLERY CUSTOMIZATION
   ====================================================== */

.lg-container {
    animation: lgFadeIn 0.3s ease-out;
    position: fixed !important;
    z-index: 9999 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: none !important;
}

.lg-container.lg-show {
    display: block !important;
}

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

.lg-backdrop {
    background-color: rgba(15, 20, 25, 0.95);
    z-index: 9998 !important;
    display: none !important;
}

.lg-show .lg-backdrop {
    display: block !important;
}

.lg-toolbar {
    background: transparent;
    z-index: 10000 !important;
    display: none !important;
}

.lg-show .lg-toolbar {
    display: flex !important;
}

.lg-toolbar .lg-icon {
    color: #ffffff;
    transition: var(--transition);
}

.lg-toolbar .lg-icon:hover {
    color: var(--primary-color);
}

/* Ensure body doesn't scroll when gallery is open */
body.lg-on {
    overflow: hidden;
}

/* ======================================================
   ANIMATIONS (AOS)
   ====================================================== */

.activity-item {
    opacity: 0;
}

.activity-item[data-aos="fade-up"] {
    animation: aosSlideIn 0.8s ease-out forwards;
}

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

/* Activity item hidden state for filtering */
.activity-item.hidden {
    display: none;
}

/* ======================================================
   RESPONSIVE DESIGN
   ====================================================== */

@media (max-width: 1024px) {
    .activities-hero h1 {
        font-size: 3.5rem;
    }

    .activities-hero p {
        font-size: 1.1rem;
    }

    .activities-cta h2 {
        font-size: 2.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons a {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .activities-hero {
        padding: 80px 0;
    }

    .activities-hero h1 {
        font-size: 2.5rem;
    }

    .activities-hero p {
        font-size: 1rem;
    }

    .activities-section {
        padding: 60px 0;
    }

    .filter-controls {
        margin-bottom: 50px;
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .activity-content {
        padding: 24px 20px;
    }

    .activity-content h3 {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .activity-content p {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    .activities-cta {
        padding: 60px 0;
    }

    .activities-cta h2 {
        font-size: 1.8rem;
    }

    .activities-cta p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .activities-hero h1 {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }

    .activities-hero p {
        font-size: 0.95rem;
    }

    .filter-controls {
        margin-bottom: 40px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .activities-gallery {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .activity-content {
        padding: 20px 16px;
    }

    .activity-content h3 {
        font-size: 1rem;
    }

    .activity-content p {
        font-size: 0.85rem;
    }
}

/* ======================================================
   ACCESSIBILITY
   ====================================================== */

.filter-btn:focus,
.read-more:focus,
a.theme-btn:focus,
a.theme-btn-s3:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    .activity-card {
        border: 2px solid var(--text-dark);
    }

    .filter-btn {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .activity-image {
        transform: scale(1) !important;
    }
}

/* ======================================================
   UTILITY CLASSES
   ====================================================== */

.section-padding {
    padding: 100px 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .section-padding {
        padding: 40px 0;
    }
}

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

/* ======================================================
   DARK MODE SUPPORT (Optional)
   ====================================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #1a1a1a;
        --text-dark: #e8e8e8;
        --text-light: #a8a8a8;
        --border-light: #333;
    }

    .activity-card {
        background: #1f1f1f;
        border-color: #333;
    }

    .filter-btn {
        background: #1f1f1f;
        color: #e8e8e8;
        border-color: #333;
    }

    .activities-section {
        background-color: #0a0a0a;
    }
}

/* ======================================================
   SIMPLE GALLERY MODAL
   Lightweight popup gallery used instead of LightGallery
   ====================================================== */
.simple-gallery-modal {
    font-family: inherit;
}
.simple-gallery-modal .sg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,20,25,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.simple-gallery-modal[aria-hidden="false"] .sg-overlay {
    opacity: 1;
    pointer-events: auto;
}
.sg-content {
    position: relative;
    max-width: 1100px;
    width: calc(100% - 40px);
    max-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sg-image-wrap {
    position: relative;
    width: 100%;
    text-align: center;
}
.sg-image {
    max-width: 100%;
    max-height: calc(100vh - 180px);
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.sg-caption {
    margin-top: 12px;
    color: #dfe6ea;
    font-size: 0.95rem;
    text-align: center;
}
.sg-prev, .sg-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.06);
    border: none;
    color: #ffffff;
    font-size: 28px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.sg-prev { left: -70px; }
.sg-next { right: -70px; }
.sg-close {
    position: absolute;
    top: -12px;
    right: -12px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #ffffff;
    font-size: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
}

@media (max-width: 768px) {
    .sg-prev { left: 8px; }
    .sg-next { right: 8px; }
    .sg-close { top: 8px; right: 8px; }
    .sg-image { max-height: calc(100vh - 140px); }
}

