/**
 * SOPL Homepage styles - matched to ASP.NET Default.aspx + Site.Master
 */

:root {
    --sopl-green: #1F6F5F;
    --sopl-green-dark: #007979;
    --sopl-green-deep: #0b2f21;
    --sopl-green-text: #02712f;
    --sopl-green-light: #eaf7ef;
    --sopl-mint: #86efac;
    --sopl-blue: #0473EA;
    --sopl-lime: #38D200;
    --sopl-stat: #396466;
    --sopl-text: #1e293b;
    --sopl-muted: #64748b;
    --sopl-border: #e2e8f0;
    --sopl-bg: #f8fafc;
}

.section-title-blue {
    position: relative;
    display: inline-block;
    font-size: 42px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.15;
    margin-bottom: 24px;
    z-index: 1;
}

/* Keep badge above title (badge + inline-block heading otherwise sit on one line) */
.offerings-section .text-center > .badge,
.partners-section .text-center > .badge {
    display: inline-block;
}

.offerings-section .text-center > .section-title-blue,
.partners-section .text-center > .section-title-blue {
    display: inline-block;
}

/* ===== HERO (matches Default.aspx) ===== */
.hero-carousel-section {
    position: relative;
    width: 100%;
    height: 65vh;
    min-height: 200px;
    overflow: hidden;
    background-color: #000;
}

#heroCarousel,
#heroCarousel .carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#heroCarousel .carousel-item {
    height: 100%;
    width: 100%;
}

#heroCarousel.carousel-fade .carousel-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out !important;
    display: block !important;
    z-index: 0;
}

#heroCarousel.carousel-fade .carousel-item.active {
    position: relative;
    opacity: 1;
    z-index: 1;
}

#heroCarousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
    z-index: 2;
    pointer-events: none;
}

#heroCarousel .carousel-caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 3;
    text-align: center;
    padding: 20px;
    background: transparent;
}

.caption-content {
    max-width: 900px;
    margin: 0 auto;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: soplFadeInUp 0.8s ease;
}

@keyframes soplFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 1s ease-in-out !important;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    opacity: 0;
    transition: opacity 0s;
}

#heroCarousel .carousel-item {
    transition: none !important;
}

#heroCarousel.carousel-fade .carousel-item {
    transition: opacity 1s ease-in-out !important;
}

.carousel-indicators {
    z-index: 4;
    margin-bottom: 30px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 8px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: var(--sopl-lime);
    transform: scale(1.2);
}

.hero-carousel-section .carousel-control-prev,
.hero-carousel-section .carousel-control-next {
    z-index: 4;
    width: 5%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-carousel-section:hover .carousel-control-prev,
.hero-carousel-section:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    background-size: 50%;
    transition: all 0.3s ease;
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
    background-color: var(--sopl-blue);
    transform: scale(1.1);
}

.hero-slide-title {
    font-size: 2.5rem;
}

.hero-slide-title.is-lead {
    font-size: 50px;
}

.caption-content .lead {
    font-size: 1.5rem;
}

/* Stats */
.stats-section {
    border-bottom: 1px solid #e9ecef;
}

.stat-card {
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    color: var(--sopl-stat) !important;
}

.tracking-wide {
    letter-spacing: 1px;
}

/* Mission */
.mission-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.mission-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}

.mission-section .container {
    position: relative;
    z-index: 5;
}

.vision-card {
    position: relative;
    z-index: 5;
    background: #fff;
    transition: all 0.3s ease;
    border: 1px solid rgba(2, 113, 47, 0.1);
    cursor: pointer;
}

.mission-vision-cards[data-card-count="3"] .col-6.offset-3 {
    /* Keep centered bottom card aligned with the 50% card width above */
    max-width: 50%;
}

.vision-card:hover {
    transform: translateY(-5px);
    border-color: var(--sopl-green-text);
    box-shadow: 0 15px 30px rgba(2, 113, 47, 0.1) !important;
}

.vision-card i {
    color: var(--sopl-green-text) !important;
}

.btn-outline-success {
    color: var(--sopl-green-dark);
    border: 2px solid var(--sopl-green-text);
    background: transparent;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-success:hover {
    background-color: var(--sopl-green-dark);
    border-color: var(--sopl-green-text);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(2, 113, 47, 0.2);
}

.text-success {
    color: var(--sopl-green-text) !important;
}

/* What We Do */
.what-we-do-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f4fd 0%, #f7fbff 55%, #f3faf5 100%);
}

.what-we-do-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--whatwedo-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9;
    pointer-events: none;
    z-index: 1;
}

.what-we-do-section > * {
    position: relative;
    z-index: 2;
}

.sdg-carousel-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 60px;
}

.sdg-carousel {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 20px 10px;
}

.sdg-carousel::-webkit-scrollbar {
    display: none;
}

.sdg-card {
    flex: 0 0 260px;
    height: 380px;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(2, 113, 47, 0.12);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.sdg-card:hover {
    transform: translateY(-8px);
    border-color: var(--sopl-green-text);
    box-shadow: 0 15px 35px rgba(2, 113, 47, 0.12);
}

.sdg-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #02712f, #38D200, #02712f);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sdg-card:hover::after {
    opacity: 1;
}

.sdg-card-content {
    height: 100%;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sdg-card-icon {
    width: 130px;
    height: 130px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sdg-card-icon i {
    font-size: 72px;
    color: #1F5457;
    transition: all 0.3s ease;
}

.sdg-card:hover .sdg-card-icon i {
    color: #B7410E;
    transform: scale(1.08);
}

.sdg-card-number {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    color: var(--sopl-green-text);
    background: rgba(2, 113, 47, 0.1);
    padding: 4px 12px;
    border-radius: 30px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.sdg-card-title {
    font-size: 17px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.3;
    text-align: center;
    transition: color 0.3s ease;
}

.sdg-card:hover .sdg-card-title {
    color: var(--sopl-green-text);
}

.sdg-card-short {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin-top: 8px;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

.sdg-card-expanded {
    margin-top: 15px;
    font-size: 12px;
    color: #555;
    line-height: 1.6;
    text-align: center;
    background: #f8f9fa;
    border-radius: 14px;
    padding: 12px;
    flex-grow: 1;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    border: 1px solid rgba(2, 113, 47, 0.2);
}

.carousel-arrow:hover {
    background: var(--sopl-green-text);
    transform: translateY(-50%) scale(1.05);
    border-color: var(--sopl-green-text);
}

.carousel-arrow i {
    font-size: 1.2rem;
    color: var(--sopl-green-text);
    transition: all 0.3s ease;
}

.carousel-arrow:hover i {
    color: #fff;
}

.carousel-arrow-left {
    left: 0;
}

.carousel-arrow-right {
    right: 0;
}

.carousel-indicator {
    text-align: center;
    margin-top: 35px;
}

.auto-rotate-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(2, 113, 47, 0.1);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    color: #24B1B1;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.auto-rotate-badge:hover {
    background: rgba(2, 113, 47, 0.2);
    transform: scale(1.02);
}

.auto-rotate-badge.is-paused {
    opacity: 0.7;
}

/* Services / Offerings */
.offerings-section {
    background: #fff;
    padding: 80px 0;
}

.offering-card {
    background: #ffffff;
    padding: 34px;
    border-radius: 28px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.offering-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 5px;
    background: linear-gradient(90deg, #0f5e3a, #86efac);
    transition: all 0.3s ease;
}

.offering-card:hover {
    transform: translateY(-8px);
    border-color: #0f5e3a;
    box-shadow: 0 22px 45px rgba(15, 94, 58, 0.12);
}

.offering-card:hover::before {
    width: 100%;
}

.offering-top {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.offering-thumb {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
}

.offering-icon {
    width: 76px;
    height: 76px;
    min-width: 76px;
    border-radius: 22px;
    background: #f0f9f4;
    color: #0f5e3a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offering-icon i {
    font-size: 34px;
}

.offering-number {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #0f5e3a;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.service-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13px;
    color: #334155;
    height: 100%;
    transition: all 0.3s ease;
}

.service-pill:hover {
    background: #f0f9f4;
    border-color: #0f5e3a;
    color: #0f5e3a;
}

/* Partners auto slider */
.partner-slider-wrap {
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}

.partner-slider-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: partnerScroll 35s linear infinite;
}

.partner-slider-wrap:hover .partner-slider-track {
    animation-play-state: paused;
}

.partner-slide-item {
    flex: 0 0 200px;
}

.partner-logo-box {
    height: 98px;
    background: #ffffff;
    border-radius: 10px;
    padding: 16px 18px;
    border: 1px solid rgba(15, 94, 58, 0.06);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.25s ease;
}

.partner-logo-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(15, 94, 58, 0.12);
    border-color: rgba(15, 94, 58, 0.18);
}

.partner-logo-img {
    width: 100%;
    height: 64px;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Our Work approach */
.work-approach-subtitle {
    max-width: 960px;
}

.our-work-approach .approach-card {
    background: #fff;
    border-radius: 20px;
    padding: 28px 20px;
    border: 1px solid #edf0f3;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    transition: all 0.3s ease;
}

.our-work-approach .approach-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.11);
}

.our-work-approach .approach-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dcf1f4, #2a7a7e);
    display: flex;
    justify-content: center;
    align-items: center;
}

.our-work-approach .approach-icon i {
    color: #fff;
    font-size: 28px;
}

/* Partners page helpers */
.partners-overview .partner-quick-box {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.partners-overview .partner-quick-box:hover {
    transform: translateY(-3px);
    border-color: #0f5e3a;
    background: #f0f9f4 !important;
}

.partners-overview .stat-badge {
    padding: 8px 20px;
    background: #f0f9f4;
    border-radius: 40px;
    font-size: 14px;
}

.partner-quote .quote-box {
    position: relative;
    overflow: hidden;
}

.partner-quote .quote-box::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

@keyframes partnerScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.badge.bg-success {
    background: linear-gradient(135deg, var(--sopl-green) 0%, var(--sopl-green-dark) 100%) !important;
    letter-spacing: 1.5px;
    font-weight: 600;
    font-size: 0.85rem;
}

@media (max-width: 1200px) {
    .sdg-card {
        flex: 0 0 240px;
    }

    .sdg-card-icon {
        width: 110px;
        height: 110px;
    }
}

@media (max-width: 991px) {
    .hero-carousel-section {
        height: 70vh;
        min-height: 500px;
    }

    .hero-slide-title.is-lead {
        font-size: 2rem;
    }

    .caption-content .lead {
        font-size: 1.25rem !important;
    }

    .section-title-blue {
        font-size: 32px;
    }

    .sdg-carousel-container {
        padding: 30px 50px;
    }

    .sdg-card {
        flex: 0 0 230px;
    }

    .sdg-card-icon {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .hero-carousel-section {
        height: 80vh;
        min-height: 550px;
    }

    .hero-slide-title {
        font-size: 1.75rem;
    }

    .hero-slide-title.is-lead {
        font-size: 1.75rem;
    }

    .stat-card h2,
    .stat-value {
        font-size: 2.5rem;
    }

    .offerings-section {
        padding: 40px 0;
    }

    .sdg-carousel-container {
        padding: 20px 15px;
    }

    .sdg-card {
        flex: 0 0 85%;
        max-width: 85%;
    }

    .carousel-arrow {
        width: 36px;
        height: 36px;
    }

    .hero-carousel-section .carousel-control-prev,
    .hero-carousel-section .carousel-control-next {
        opacity: 1;
    }

    .partner-slide-item {
        flex: 0 0 160px;
    }
}

@media (max-width: 576px) {
    .partner-logo-img {
        height: 40px;
    }

    .badge.bg-success {
        padding: 6px 12px !important;
        font-size: 0.75rem;
    }
}
