/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Tabibu Soar Initiative Custom Styles */
:root {
    --primary-blue: #0d6efd;
    --secondary-blue: #0a58ca;
    --accent-teal: #20c997;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark-text);
    padding-top: 76px; /* For fixed navbar */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand span {
    color: var(--accent-teal);
}

.hero-section-centered {
    min-height: 100vh;
    background:
        linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.50),
            rgba(255, 255, 255, 0.65)
        ),
        url("/assets/snowy_mountain-790420ef.avif");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    margin-top: -20px;
    position: relative;
}

.hero-section-centered::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(transparent, #f8f9fa);
    z-index: 0;
    pointer-events: none;
}

.hero-content-centered {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #212529;
}

.hero-logo-centered {
    max-width: 160px;
    margin-bottom: 30px;
    border-radius: 20px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.hero-section-centered h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #212529;
    text-shadow:
        0 2px 4px rgba(255, 255, 255, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.1);
}

.lead-centered {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: #495057;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

.hero-buttons-centered {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-primary {
    padding: 16px 40px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
    background: #0d6efd;
    color: white;
    border: none;
}

.btn-hero-primary:hover {
    background: #20c997;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.3);
}

.btn-hero-outline {
    padding: 16px 40px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
    background: transparent;
    color: #212529;
    border: 2px solid #0d6efd;
}

.btn-hero-outline:hover {
    background: #0d6efd;
    color: white;
    transform: translateY(-3px);
}

.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-teal);
}

.section-title.text-center:after {
    left: 50%;
    transform: translateX(-50%);
}

.value-card {
    border-left: 4px solid var(--primary-blue);
    padding-left: 15px;
    margin-bottom: 20px;
}

.team-card {
    transition: transform 0.3s ease;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.team-card:hover {
    transform: translateY(-5px);
}

.team-img {
    height: 200px;
    object-fit: cover;
    object-position: top;
}

.activity-card {
    height: 100%;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-5px);
}

.activity-icon {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.impact-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.footer {
    background-color: #1a1a1a;
    color: #ddd;
    padding: 50px 0 20px;
}

.footer a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--accent-teal);
}

.social-icons a {
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    margin-right: 8px;
}

.social-icons a:hover {
    background-color: var(--primary-blue);
}

.governance-chart {
    max-width: 100%;
    height: auto;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-blue);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: -36px;
    top: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: var(--accent-teal);
    border: 3px solid white;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: none;
}

@media (max-width: 991px) {
    .hero-section-centered {
        min-height: 80vh;
        padding: 100px 0 60px;
        background-attachment: scroll;
    }
}

@media (max-width: 768px) {
    .hero-section-centered {
        min-height: auto;
        padding: 80px 0 60px;
    }
    .hero-section-centered h1 {
        font-size: 2.5rem;
    }
    .lead-centered {
        font-size: 1.1rem;
    }
    .hero-buttons-centered {
        flex-direction: column;
        align-items: stretch;
    }

    .impact-number {
        font-size: 2rem;
    }
}

/* Gallery Styles - Design A: Activity Cards with Gallery Buttons */
.activity-card .btn-outline-primary {
    border-width: 2px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.activity-card .btn-outline-primary:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

/* Gallery Styles - Design B: Image-Focused Project Cards */
.project-card {
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.project-card:focus {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

.project-card:focus:not(:focus-visible) {
    outline: none;
}

.project-card:focus-visible {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

.project-card-img {
    height: 350px;
    width: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

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

.project-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        transparent 100%
    );
    padding: 30px 20px;
    pointer-events: none;
}

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

/* GLightbox custom overrides for better accessibility */
.gslide-description {
    background: rgba(0, 0, 0, 0.8);
}

.gslide-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

/* ========================================
   GLightbox Mobile Navigation Arrows
   ======================================== */

/* Ensure navigation arrows are visible on all devices */
.gprev,
.gnext {
    opacity: 0.8 !important;  /* Always visible, not hidden */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gprev:hover,
.gnext:hover {
    opacity: 1 !important;
    transform: scale(1.1);
}

/* Mobile-specific enhancements (phones and small tablets) */
@media (max-width: 768px) {
    .gprev,
    .gnext {
        /* Make buttons larger and more touch-friendly */
        width: 45px !important;
        height: 45px !important;

        /* Ensure full opacity on mobile */
        opacity: 0.9 !important;

        /* Add visual prominence */
        background-color: rgba(13, 110, 253, 0.85) !important;
        border-radius: 50%;

        /* Improve positioning */
        z-index: 9999;

        /* Center the arrow icons */
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Arrow icon styling */
    .gprev svg,
    .gnext svg {
        width: 24px !important;
        height: 24px !important;
        fill: white;
    }

    /* Position adjustments for mobile */
    .gprev {
        left: 10px !important;
    }

    .gnext {
        right: 10px !important;
    }

    /* Active/pressed state for touch feedback */
    .gprev:active,
    .gnext:active {
        opacity: 1 !important;
        background-color: rgba(32, 201, 151, 0.95) !important;
        transform: scale(0.95);
    }

    /* Disabled state (first/last image if loop is disabled) */
    .gprev.disabled,
    .gnext.disabled {
        opacity: 0.3 !important;
        pointer-events: none;
    }
}

/* Extra small devices (very small phones) */
@media (max-width: 375px) {
    .gprev,
    .gnext {
        width: 40px !important;
        height: 40px !important;
    }

    .gprev svg,
    .gnext svg {
        width: 20px !important;
        height: 20px !important;
    }
}

/* Responsive adjustments for project cards */
@media (max-width: 768px) {
    .project-card-img {
        height: 250px;
    }

    .project-card:hover {
        transform: translateY(-5px);
    }

    .project-card-overlay {
        padding: 20px 15px;
    }
}

/* ========================================
   Swiper Carousel Styles - Multi-Item Project Gallery
   ======================================== */

/* Swiper container wrapper */
.projects-carousel-wrapper {
    position: relative;
    padding: 0 60px 50px; /* Space for navigation arrows and pagination */
    margin-bottom: 30px;
}

/* Swiper main container */
.swiper {
    width: 100%;
    height: auto;
    position: relative;
    overflow: visible;  /* Allow navigation buttons to be visible outside container */
}

/* Swiper wrapper - contains the slides */
.swiper-wrapper {
    overflow: hidden;  /* Clip slides that extend beyond bounds */
}

/* Swiper slide - no width constraints (Swiper handles sizing) */
.swiper-slide {
    height: auto;
    display: flex;
}

/* Ensure project cards fill the slide */
.swiper-slide .project-card {
    width: 100%;
}

/* ========================================
   Swiper Navigation Buttons - Custom Styling
   ======================================== */

.swiper-button-prev,
.swiper-button-next {
    width: 50px;
    height: 50px;
    background-color: rgba(13, 110, 253, 0.9);
    border-radius: 50%;
    color: white;
    opacity: 0.6;  /* Semi-visible by default so users know they exist */
    transition: opacity 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

/* Show navigation on hover */
.projects-carousel-wrapper:hover .swiper-button-prev,
.projects-carousel-wrapper:hover .swiper-button-next {
    opacity: 1;  /* Fully visible on hover */
}

/* Position adjustments */
.swiper-button-prev {
    left: -60px;  /* Position 60px outside left edge (in padded area) */
}

.swiper-button-next {
    right: -60px;  /* Position 60px outside right edge (in padded area) */
}

/* Remove default Swiper arrow and resize custom arrow */
.swiper-button-prev:after,
.swiper-button-next:after {
    font-size: 20px;
    font-weight: bold;
}

/* Hover effects */
.swiper-button-prev:hover,
.swiper-button-next:hover {
    background-color: rgba(32, 201, 151, 0.95);
    transform: scale(1.1);
}

/* Focus styles for accessibility */
.swiper-button-prev:focus,
.swiper-button-next:focus {
    opacity: 1;
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
    background-color: rgba(13, 110, 253, 0.95);
}

/* Disabled state */
.swiper-button-prev.swiper-button-disabled,
.swiper-button-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ========================================
   Swiper Pagination - Custom Styling
   ======================================== */

.swiper-pagination {
    bottom: 0 !important;
    position: relative;
    margin-top: 30px;
}

/* Pagination bullets */
.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: var(--primary-blue);
    opacity: 0.5;
    border-radius: 50%;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    margin: 0 5px !important;
}

/* Hover state */
.swiper-pagination-bullet:hover {
    opacity: 0.8;
    transform: scale(1.2);
}

/* Active bullet */
.swiper-pagination-bullet-active {
    background: var(--primary-blue);
    opacity: 1;
    transform: scale(1.3);
}

/* Focus state for accessibility */
.swiper-pagination-bullet:focus {
    outline: 2px solid var(--accent-teal);
    outline-offset: 2px;
}

/* Dynamic bullets (Swiper feature for many slides) */
.swiper-pagination-bullet-dynamic {
    transition: all 0.3s ease;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

/* Tablet and below */
@media (max-width: 991px) {
    .projects-carousel-wrapper {
        padding: 0 50px 50px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 45px;
        height: 45px;
    }

    .swiper-button-prev {
        left: -50px;  /* Match tablet wrapper padding */
    }

    .swiper-button-next {
        right: -50px;
    }

    .swiper-button-prev:after,
    .swiper-button-next:after {
        font-size: 18px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .projects-carousel-wrapper {
        padding: 0 20px 40px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 40px;
        height: 40px;
        opacity: 0.7; /* More visible on mobile */
    }

    .swiper-button-prev {
        left: -15px;  /* Position in padded area (20px padding - 40px button / 2) */
    }

    .swiper-button-next {
        right: -15px;
    }

    .swiper-button-prev:after,
    .swiper-button-next:after {
        font-size: 16px;
    }

    .projects-carousel-wrapper:hover .swiper-button-prev,
    .projects-carousel-wrapper:hover .swiper-button-next {
        opacity: 0.9;
    }

    .swiper-pagination {
        margin-top: 20px;
    }

    .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
    }
}

/* ========================================
   Gallery Integration with Swiper
   ======================================== */

/* Ensure project cards remain interactive inside swiper slides */
.swiper-slide .project-card {
    pointer-events: auto;
    cursor: pointer;
}

/* Prevent swiper drag when clicking on cards */
.swiper-slide .project-card:active {
    cursor: pointer;
}
