/* ==========================================================================
   Organic Land - Site Stylesheet
   Custom rules that sit on top of the Tailwind utility framework.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Small reusable components
   -------------------------------------------------------------------------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    background-color: var(--tw-color-primary, #1c8139);
    color: #FBF8F1;
    font-weight: 500;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: #176b30;
}

.cert-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 0.75rem;
    padding: 1.5rem 1.5rem 0;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: box-shadow 0.3s ease;
}

.cert-card:hover {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.cert-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.cert-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: rgba(28, 129, 57, 0.1);
    color: #1c8139;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-badge {
    border-radius: 9999px;
    padding: 0.125rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.cert-badge-blue {
    background: #dbeafe;
    color: #1e40af;
}

.cert-badge-green {
    background: #dcfce7;
    color: #166534;
}

.cert-badge-purple {
    background: #f3e8ff;
    color: #6b21a8;
}

.cert-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1c241c;
}

.cert-desc {
    font-size: 0.875rem;
    color: #64748b;
}

.cert-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0 1.5rem;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.cert-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 2.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: #fff;
    transition: all 0.2s ease;
}

.cert-card:hover .cert-download-btn {
    background: #1c8139;
    color: #fff;
}

/* --------------------------------------------------------------------------
   2. Hero slider
   The goal: the slider must NEVER clip or crop its own decorative images,
   on any viewport. Instead of fixed pixel heights/positions (the source of
   the "cropped floating photo" bug on phones) everything below scales with
   clamp()/percentages relative to the slide itself.
   -------------------------------------------------------------------------- */
.hero-section {
    isolation: isolate;
}

.hero-swiper {
    width: 100%;
    /* Fallback height; overridden by JS breakpoints (autoHeight) on mobile */
    height: clamp(560px, 62vw, 650px);
}

.hero-swiper .swiper-slide {
    position: relative;
    display: flex;
    align-items: center;
    height: auto;
    min-height: clamp(520px, 90vw, 650px);
    padding-block: 2.5rem;
    overflow: hidden;
    /* safety net: nothing can ever bleed outside the slide */
}

@media (min-width: 1024px) {
    .hero-swiper .swiper-slide {
        min-height: 0;
        padding-block: 0;
    }
}

.hero-slide-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
}

.hero-slide-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    width: 100%;
}

@media (min-width: 1024px) {
    .hero-slide-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

.hero-eyebrow {
    display: inline-block;
    background: rgba(28, 129, 57, 0.1);
    color: #1c8139;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: clamp(1.875rem, 6vw, 3.75rem);
    font-weight: 700;
    line-height: 1.15;
    color: #1c241c;
    margin-top: 1rem;
}

.hero-copy {
    font-size: clamp(1rem, 2.2vw, 1.125rem);
    color: #64748b;
    margin-top: 1rem;
}

/* The visual stage: a square-ish, self-contained box. Every child inside is
   sized in relation to THIS box (% or clamp), so shrinking the box on a
   small screen shrinks every image proportionally — nothing gets clipped. */
.hero-visual {
    position: relative;
    width: 100%;
    height: clamp(220px, 78vw, 450px);
    max-width: 450px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.center-plate {
    width: clamp(160px, 55vw, 320px);
    height: clamp(160px, 55vw, 320px);
    object-fit: cover;
    border-radius: 9999px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    border: 4px solid #fff;
    transform: scale(0.4);
    opacity: 0;
    transition: transform 1s ease-out 0.3s, opacity 1s ease-out 0.3s;
}

.floating-item {
    position: absolute;
    width: clamp(64px, 20vw, 128px);
    height: clamp(64px, 20vw, 128px);
    object-fit: cover;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.15);
    border: 2px solid #fff;
    opacity: 0;
    transition: transform 1s ease-out, opacity 1s ease-out;
}

.floating-item-1 {
    transition-delay: 0.5s;
}

.floating-item-2 {
    transition-delay: 0.7s;
}

/* Percentage-based corners keep every floating photo fully inside
   .hero-visual at any size, instead of the old fixed top-4/left-10 offsets
   that pushed images outside a shrunken container on phones. */
.pos-top-left {
    top: 2%;
    left: 2%;
    transform: translate(-60px, -60px);
}

.pos-top-right {
    top: 2%;
    right: 2%;
    transform: translate(60px, -60px);
}

.pos-bottom-left {
    bottom: 2%;
    left: 2%;
    transform: translate(-60px, 60px);
}

.pos-bottom-right {
    bottom: 2%;
    right: 2%;
    transform: translate(60px, 60px);
}

.swiper-slide-active .slide-text {
    animation: heroTextIn 0.9s ease-out forwards;
}

.swiper-slide-active .center-plate {
    transform: scale(.8);
    opacity: 1;
}

.swiper-slide-active .floating-item {
    transform: translate(0, 0);
    opacity: 1;
}

@keyframes heroTextIn {
    from {
        transform: translateY(2.5rem);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-text {
    opacity: 0;
}

.swiper-slide-active .slide-text {
    opacity: 1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(3deg);
    }
}

@keyframes floatReverse {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(10px) rotate(-3deg);
    }
}

.floating-active-1 {
    animation: float 4s ease-in-out infinite;
}

.floating-active-2 {
    animation: floatReverse 5s ease-in-out infinite;
}

.hero-nav-btn {
    color: #1c8139;
}

.hero-nav-btn::after {
    font-size: 1.5rem;
}

@media (max-width: 767px) {
    .hero-nav-btn {
        display: none;
    }
}

.swiper-pagination-bullet-active {
    background-color: #1c8139 !important;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {

    .center-plate,
    .floating-item,
    .slide-text,
    .floating-active-1,
    .floating-active-2 {
        animation: none !important;
        transition: none !important;
    }
}

/**/
/* Mobile */
/* تصغير جميع العناصر إلى 0.3 على الموبايل*/

@media (max-width: 767px) {

    .hero-visual {
        max-width: 100%;
        height: 260px;
    }

    .swiper-slide-active .center-plate {
        transform: scale(.4);
    }

    .center-plate {
        transform: scale(.3);
    }

    .floating-item {
        transform: scale(.4);
    }

}

/*توزيع العناصر على كامل عرض الشاشة*/
@media (max-width:767px) {

    .pos-top-left {
        top: 2%;
        left: 0;
    }

    .pos-top-right {
        top: 2%;
        right: 0;
    }

    .pos-bottom-left {
        bottom: 25%;
        left: 0;
    }

    .pos-bottom-right {
        bottom: 25%;
        right: 0;
    }

}

/*
.swiper-slide-active .pos-middle-left,
.swiper-slide-active .pos-middle-right{
    transform:translate(0,-50%);
    opacity:1;
}*/