/* ============================
   GLOBAL STYLES & VARIABLES
   ============================ */
:root {
    --primary-color: #057405;
    --primary-light: #e6f7e6;
    --primary-dark: #045904;
    --secondary-color: #43597e;
    --secondary-light: #ebeef4;
    --strong-gray: #666666;
    --second-white: #f8f8f8;
    --badge-bg: #ffffff;
    --accent-color: #ff9500;
    --accent-light: #fff3e0;
}

body {
    font-family: "Inter", sans-serif;
    color: #212529;
    background-color: #fdfdfd;
    background-image: linear-gradient(
            rgba(5, 116, 5, 0.03) 1px,
            transparent 1px
        ),
        linear-gradient(90deg, rgba(5, 116, 5, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
}

/* Fix for responsive images */
img {
    max-width: 100%;
}

/* Transition effects */
a,
button,
.btn {
    transition: all 0.3s ease;
}

/* ============================
   HERO SECTION
   ============================ */
.hero-title {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.8px;
    color: #333;
    position: relative;
}

.hero-title .text-success {
    color: var(--primary-color) !important;
    position: relative;
    display: inline-block;
}

.hero-title .text-success::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: var(--primary-light);
    z-index: -1;
    border-radius: 4px;
}

.lead-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--strong-gray);
    max-width: 450px;
    position: relative;
    padding-left: 15px;
    border-left: 3px solid var(--primary-color);
}

/* ============================
   HERO CAROUSEL
   ============================ */
.hero-carousel {
    height: 100%;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 1px 5px rgba(0, 0, 0, 0.03),
        0 -1px 0 rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    border: 5px solid white;
}

.hero-carousel::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(
        135deg,
        rgba(5, 116, 5, 0.1),
        rgba(67, 89, 126, 0.1)
    );
    border-radius: 1.2rem;
    z-index: -1;
}

.hero-carousel .carousel-item {
    height: 500px;
}

.hero-carousel .carousel-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.7s ease;
}

.hero-carousel:hover .carousel-item.active img {
    transform: scale(1.03);
}

.hero-carousel .carousel-caption {
    background-color: rgba(5, 116, 5, 0.8);
    border-radius: 0.5rem;
    padding: 1rem;
    bottom: 2rem;
    left: 10%;
    right: 10%;
}

.hero-carousel .carousel-indicators {
    bottom: 10px;
}

.hero-carousel .carousel-indicators [data-bs-target] {
    background-color: var(--primary-color);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.hero-carousel .carousel-indicators .active {
    width: 12px;
    height: 12px;
    background-color: white;
    border: 2px solid var(--primary-color);
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 10%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next {
    opacity: 1;
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
    background-color: var(--primary-color);
    border-radius: 50%;
    padding: 1rem;
    background-size: 50%;
}

/* ============================
   BADGES & CUSTOM ELEMENTS
   ============================ */
.badge-custom {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.badge-custom::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--secondary-color)
    );
    opacity: 0.8;
}

.badge-icon {
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.badge-icon img {
    width: 16px;
    height: 16px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

.shadow-badge {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.bg-badge-white {
    background-color: var(--badge-bg);
}

/* ============================
   SECTION TITLES
   ============================ */
.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.8px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--primary-light)
    );
    border-radius: 2px;
}

.section-title.text-white::after {
    background: linear-gradient(90deg, white, rgba(255, 255, 255, 0.5));
}

/* ============================
   STATS SECTION
   ============================ */
.stats-number {
    font-size: 2.625rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--primary-color);
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);
}

.text-strong-gray {
    color: var(--strong-gray);
}

.bg-second-white {
    background-color: var(--second-white);
    position: relative;
    overflow: hidden;
    background-image: radial-gradient(
            circle at 20% 80%,
            rgba(5, 116, 5, 0.05) 0%,
            transparent 25%
        ),
        radial-gradient(
            circle at 80% 20%,
            rgba(67, 89, 126, 0.05) 0%,
            transparent 25%
        );
}

.bg-alkhairiyah-light {
    background-color: rgba(5, 116, 5, 0.1);
}

.text-alkhairiyah {
    color: var(--primary-color);
}

.card .rounded-circle {
    transition: transform 0.3s ease;
}

.card:hover .rounded-circle {
    transform: scale(1.1) rotate(5deg);
}

/* ============================
   PROGRAM CARDS & SLIDER
   ============================ */
.program-card {
    transition: all 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
}

.program-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--accent-color)
    );
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.program-card:hover::before {
    opacity: 1;
}

.program-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.program-card .card-body {
    position: relative;
    z-index: 1;
    background-color: #fff;
}

.program-card .card-body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(230, 247, 230, 0.5) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.program-card:hover .card-body::before {
    opacity: 1;
}

.program-card .card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
}

.program-card .card-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--strong-gray);
}

.program-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.program-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--accent-color, #ff9500);
    color: white;
    padding: 5px 15px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.1);
    clip-path: polygon(8% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.program-control {
    background-color: var(--primary-color);
    border-radius: 50%;
    height: 40px;
    width: 40px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.program-control:hover {
    background-color: var(--primary-dark);
    opacity: 1;
    box-shadow: 0 0 15px rgba(5, 116, 5, 0.3);
}

.program-control.carousel-control-prev {
    left: -20px;
}

.program-control.carousel-control-next {
    right: -20px;
}

.program-control .carousel-control-prev-icon,
.program-control .carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

.program-slider-wrapper {
    overflow: hidden;
    position: relative;
    margin-top: 40px;
}

.program-slider {
    display: flex;
    gap: 20px;
    animation: slidePrograms 30s linear infinite;
}

.program-slide {
    flex: 0 0 auto;
    width: 300px;
}

@keyframes slidePrograms {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.program-slider::after {
    content: "";
    display: inline-block;
    width: 50%;
}

/* ============================
   PROGRESS BARS
   ============================ */
.progress {
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    background-color: #e9ecef;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), #0ca50c);
    box-shadow: 0 0 10px rgba(5, 116, 5, 0.5);
}

.progress-bar-striped.bg-success {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
}

/* ============================
   BACKGROUNDS & GRADIENTS
   ============================ */
.bg-gradient-success {
    background: linear-gradient(135deg, #045904 0%, #057405 100%);
    position: relative;
    overflow: hidden;
}

.bg-gradient-success::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M20 0 L40 20 L20 40 L0 20 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: 40px 40px;
}

.bg-animated-gradient {
    background: linear-gradient(
        -45deg,
        var(--primary-light),
        #ffffff,
        var(--secondary-light),
        #f9f9f9
    );
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ============================
   NEWS CARDS
   ============================ */
.news-card-alt {
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    overflow: hidden;
}

.news-card-alt:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.news-date {
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================
   BUTTONS
   ============================ */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    z-index: -1;
}

.btn:hover::after {
    height: 100%;
}

.btn-dark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(5, 116, 5, 0.2);
}

.btn-dark:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 6px 15px rgba(5, 116, 5, 0.3);
    transform: translateY(-3px);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(5, 116, 5, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(5, 116, 5, 0.3);
}

.btn-success {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-success:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-dark {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-dark:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(5, 116, 5, 0.2);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.btn-icon {
    transition: all 0.3s ease;
}

.btn-icon:hover {
    transform: translateY(-3px);
}

.btn-icon.rounded-circle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
}

.btn-icon.rounded-circle i {
    font-size: 1.5rem;
}

.btn-icon.rounded-circle:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-icon.rounded-circle:hover .bxl-facebook {
    color: #1877f2;
}

.btn-icon.rounded-circle:hover .bxl-instagram {
    color: #e1306c;
}

.btn-icon.rounded-circle:hover .bxl-twitter {
    color: #000;
}

.btn-icon.rounded-circle:hover .bxl-youtube {
    color: #ff0000;
}

/* ============================
   HEADER & FOOTER
   ============================ */
header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 3px solid var(--primary-color);
}

footer {
    background: linear-gradient(135deg, #045904 0%, #057405 100%);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(
            circle at 10% 90%,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 20%
        ),
        radial-gradient(
            circle at 90% 10%,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 20%
        );
    opacity: 0.7;
}

footer .list-unstyled li a {
    transition: all 0.3s;
    position: relative;
    display: inline-block;
}

footer .list-unstyled li a:hover {
    color: white !important;
    transform: translateX(5px);
}

footer .list-unstyled li a::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: white;
    transition: width 0.3s ease;
}

footer .list-unstyled li a:hover::before {
    width: 100%;
}

/* ============================
   UTILITY CLASSES
   ============================ */
.ellipse-decoration {
    width: 643px;
    height: 643px;
}

.w-110 {
    width: 110%;
}

.w-120 {
    width: 120%;
}

.min-height-16 {
    min-height: 4rem;
}

.min-height-432 {
    min-height: 432px;
}

.rounded-4 {
    border-radius: 0.75rem;
}

.rounded-5 {
    border-radius: 1rem;
}

/* ============================
   RESPONSIVE STYLES
   ============================ */

/* Mobile Styles */
@media (max-width: 767.98px) {
    /* Hero Carousel - Mobile */
    .hero-carousel .carousel-item {
        height: 250px !important;
    }

    .hero-carousel .carousel-item img,
    .hero-carousel-img {
        height: 100% !important;
        width: 100%;
        object-fit: cover !important;
        object-position: center top;
    }

    .hero-carousel .carousel-caption {
        display: block !important;
        position: absolute;
        bottom: 10px;
        left: 10px;
        right: 10px;
        background: rgba(5, 116, 5, 0.85);
        padding: 8px 12px;
        border-radius: 8px;
    }

    .hero-carousel .carousel-caption h5 {
        font-size: 0.9rem;
        margin-bottom: 3px;
        font-weight: 600;
    }

    .hero-carousel .carousel-caption p {
        font-size: 0.75rem;
        margin-bottom: 0;
        line-height: 1.3;
    }

    .hero-carousel .carousel-indicators {
        bottom: 5px;
    }

    .hero-carousel .carousel-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
}

/* Desktop Styles */
@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
        letter-spacing: -1.28px;
    }

    .lead-text {
        font-size: 1.125rem;
        max-width: 450px;
    }

    .section-title {
        font-size: 2rem;
        letter-spacing: -1.12px;
    }

    .hero-carousel .carousel-item {
        height: 500px;
    }

    .hero-carousel .carousel-item img {
        height: 100%;
        width: 100%;
        object-fit: cover;
        object-position: center;
    }
}
