/* ==========================================
   ABOUT INTRO SECTION
========================================== */

.about-intro-section {
    width: 100%;
    position: relative;
    overflow: hidden;
    isolation: isolate;

    padding: 75px 20px;
    background: var(--light-text, #ffffff);
    font-family: 'Poppins', sans-serif;
}


/* ==========================================
   SIDE BACKGROUND TEXTURE (with slow drift)
========================================== */

.about-intro-section::before,
.about-intro-section::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;

    width: 280px;
    max-width: 22%;

    background-image: url("../images/contact-bg.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;

    opacity: 0.10;
    pointer-events: none;
    z-index: -1;

    animation: aboutTextureDrift 9s ease-in-out infinite;
}

.about-intro-section::before {
    left: 0;
    transform: rotate(180deg);
}

.about-intro-section::after {
    right: 0;
    animation-delay: -4s;
}

@keyframes aboutTextureDrift {

    0%,
    100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -24px;
    }
}


/* ==========================================
   MAIN CONTAINER
========================================== */

.about-intro-container {
    width: 100%;
    max-width: 1320px;
    margin: auto;
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: 1fr 1.35fr;
    align-items: center;
    gap: 55px;
}


/* ==========================================
   LEFT IMAGE COLLAGE
========================================== */

.about-gallery {
    position: relative;
    width: 100%;
    min-height: 610px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 225px 280px;
    gap: 20px;

    padding: 0;
}

/* Image cards (float + mouse parallax) */

.about-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 11px;
    z-index: 2;

    /* Floating animation */
    animation: aboutGalleryFloat 6s ease-in-out infinite;

    /* Mouse parallax (set by JS through --mx / --my) */
    translate: calc(var(--mx, 0) * var(--depth, 10) * 1px) calc(var(--my, 0) * var(--depth, 10) * 1px);

    transition:
        box-shadow 0.5s ease,
        border-radius 0.5s ease,
        translate 0.6s cubic-bezier(0.22, 1, 0.36, 1);

    will-change: transform;
}

/* Light sweep on hover */

.about-gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;

    background: linear-gradient(115deg,
            transparent 30%,
            rgba(255, 255, 255, 0.38) 50%,
            transparent 70%);

    transform: translateX(-130%);
}

.about-gallery-item:hover::after {
    transform: translateX(130%);
    transition: transform 0.9s ease;
}

/* Images */

.about-gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;

    /* Image reveal animation is triggered by JS */
    opacity: 1;
    clip-path: inset(0);

    transition:
        transform 0.8s cubic-bezier(0.2, 0.7, 0.3, 1),
        filter 0.5s ease;

    will-change: transform;
}

/* Image hover zoom */

.about-gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(1.04);
}

/* Card hover */

.about-gallery-item:hover {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    animation-play-state: paused;
}


/* ==========================================
   IMAGE CARD POSITIONS
========================================== */

.gallery-item-one {
    grid-column: 1;
    grid-row: 1;

    height: 225px;
    margin-top: 0;

    animation-delay: 0s;
    --depth: 14;
}

.gallery-item-two {
    grid-column: 2;
    grid-row: 1;

    height: 280px;
    margin-top: 20px;

    animation-delay: 1s;
    --depth: -10;
}

.gallery-item-three {
    grid-column: 1;
    grid-row: 2;

    height: 280px;

    animation-delay: 1.5s;
    --depth: -16;
}

.gallery-item-four {
    grid-column: 2;
    grid-row: 2;

    height: 283px;
    margin-top: -10px;

    animation-delay: 0.7s;
    --depth: 12;
}


/* ==========================================
   IMAGE REVEAL ANIMATION
========================================== */

/* Images reveal after gallery enters viewport */

.about-gallery.about-visible .about-gallery-item img {
    animation: aboutImageReveal 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Staggered image entrance */

.about-gallery.about-visible .gallery-item-one img {
    animation-delay: 0.05s;
}

.about-gallery.about-visible .gallery-item-two img {
    animation-delay: 0.2s;
}

.about-gallery.about-visible .gallery-item-three img {
    animation-delay: 0.35s;
}

.about-gallery.about-visible .gallery-item-four img {
    animation-delay: 0.5s;
}

/* Reveal uses clip-path so hover zoom can still work */

@keyframes aboutImageReveal {
    0% {
        opacity: 0;
        clip-path: inset(12% 8% 12% 8%);
        filter: brightness(0.85);
    }

    100% {
        opacity: 1;
        clip-path: inset(0);
        filter: brightness(1);
    }
}


/* ==========================================
   FLOATING IMAGE CARDS
========================================== */

@keyframes aboutGalleryFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}


/* ==========================================
   GALLERY DECORATION
========================================== */

.about-gallery-decoration {
    position: absolute;
    width: 260px;
    height: 260px;

    left: -100px;
    bottom: -65px;

    border-radius: 50%;

    background:
        repeating-radial-gradient(circle,
            color-mix(in srgb,
                var(--primary-color) 10%,
                transparent) 0px,
            transparent 3px,
            transparent 10px);

    z-index: 0;
    pointer-events: none;
    transform-origin: center;

    /* Opposite-direction parallax */
    translate: calc(var(--mx, 0) * -26px) calc(var(--my, 0) * -26px);
    transition: translate 0.8s cubic-bezier(0.22, 1, 0.36, 1);

    animation: aboutCircleFloat 6s ease-in-out infinite;
}

@keyframes aboutCircleFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-18px) rotate(8deg);
    }
}


/* ==========================================
   RIGHT CONTENT
========================================== */

.about-intro-content {
    position: relative;
    z-index: 2;
    width: 100%;
}


/* ==========================================
   SECTION LABEL
========================================== */

.about-section-label {
    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--primary-color);
    font-size: 13px;
    font-weight: 700;

    margin-bottom: 14px;
}

.about-section-label i {
    font-size: 15px;
}

/* Line that draws itself after the label */

.about-section-label::after {
    content: "";
    height: 2px;
    width: 50px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

.about-animation-ready .about-section-label::after {
    width: 0;
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1) 0.4s;
}

.about-animation-ready .about-section-label.about-visible::after {
    width: 50px;
}

/* Tag icon swings in */

.about-section-label.about-visible i {
    display: inline-block;
    transform-origin: top center;
    animation: aboutTagSwing 1.2s ease 0.3s backwards;
}

@keyframes aboutTagSwing {
    0% {
        transform: rotate(-40deg) scale(0);
    }

    50% {
        transform: rotate(18deg) scale(1.2);
    }

    75% {
        transform: rotate(-8deg);
    }

    100% {
        transform: rotate(0) scale(1);
    }
}


/* ==========================================
   HEADING (word-by-word reveal + underline)
========================================== */

.about-intro-heading {
    color: var(--secondary-color);

    font-size: clamp(28px, 2.2vw, 34px);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -1px;

    margin: 0 0 28px;
}

/* Highlighted part (direct child only, so the split word spans are not affected) */

.about-intro-heading>span:not(.about-word) {
    color: var(--primary-color);
    display: inline;

    /* Underline that draws itself */
    background-image: linear-gradient(var(--primary-color), var(--primary-color));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 3px;
    padding-bottom: 3px;

    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;

    transition: background-size 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.9s;
}

.about-animation-ready .about-intro-heading:not(.about-visible)>span:not(.about-word) {
    background-size: 0% 3px;
}

/* Words are created by JS */

.about-animation-ready .about-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.15em;
    margin-bottom: -0.15em;
}

.about-animation-ready .about-word-inner {
    display: inline-block;
    transform: translateY(115%);

    transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--w, 0) * 0.06s + 0.1s);
}

.about-animation-ready .about-intro-heading.about-visible .about-word-inner {
    transform: translateY(0);
}


/* ==========================================
   DESCRIPTION
========================================== */

.about-intro-description {
    font-size: 14px;
    line-height: 1.7;

    color: var(--text-muted, #6c7b91);

    margin-bottom: 25px;
    max-width: 650px;
}


/* ==========================================
   STATISTICS
========================================== */

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    background: var(--surface-color, #f4f9fd);
    border: 1px solid var(--border-color, #e5e9ef);
    border-radius: 12px;

    padding: 15px 10px;
    margin-bottom: 34px;
}

.about-stat-item {
    text-align: center;
    padding: 0 8px;
    position: relative;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.about-stat-item:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.about-stat-item h3 {
    font-size: 35px;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;

    color: var(--secondary-color);

    margin: 0 0 2px;

    transition: color 0.3s ease;
}

.about-stat-item:hover h3 {
    color: var(--primary-color);
}

.about-stat-item p {
    font-size: 12px;
    color: var(--text-muted, #6c7b91);
    margin: 0;
}

.about-stat-item:not(:last-child)::after {
    content: "";
    position: absolute;

    right: 0;
    top: 8px;

    height: 43px;
    width: 1px;

    background: var(--border-color, #dce3ea);
}

/* Staggered pop-in */

.about-animation-ready .about-stats:not(.about-visible) .about-stat-item {
    opacity: 0;
}

.about-animation-ready .about-stats.about-visible .about-stat-item {
    animation: aboutStatPop 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: calc(var(--i, 0) * 0.15s + 0.25s);
}

@keyframes aboutStatPop {
    0% {
        opacity: 0;
        transform: translateY(26px) scale(0.85);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ==========================================
   BENEFITS AND MISSION
========================================== */

.about-bottom-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;

    gap: 25px;
    align-items: center;

    margin-bottom: 35px;
}

/* Benefits list - visible by default (works without JS) */

.about-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-benefits ul li {
    display: flex;
    align-items: center;
    gap: 13px;

    color: var(--secondary-color);
    font-size: 13px;
    font-weight: 500;

    margin-bottom: 12px;

    opacity: 1;
    transform: translateX(0);
}

/* Check icon as a round badge */

.about-benefits ul li i {
    width: 20px;
    height: 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    border-radius: 50%;
    font-size: 10px;

    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 14%, transparent);
}

/* Hidden state only when animation JS is loaded */

.about-animation-ready .about-benefits ul li {
    opacity: 0;
    transform: translateX(-20px);

    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

/* Show benefits when the bottom content becomes visible (staggered by --i) */

.about-animation-ready .about-bottom-content.about-visible .about-benefits ul li {
    opacity: 1;
    transform: translateX(0);
    transition-delay: calc(var(--i, 0) * 0.1s + 0.1s);
}

/* Check badges pop */

.about-bottom-content.about-visible .about-benefits ul li i {
    animation: aboutCheckPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: calc(var(--i, 0) * 0.1s + 0.4s);
}

@keyframes aboutCheckPop {
    0% {
        transform: scale(0) rotate(-90deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}


/* ==========================================
   MISSION AND VISION
========================================== */

.about-mission {
    padding-left: 5px;
}

.mission-icon {
    position: relative;

    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--primary-color);
    font-size: 32px;

    margin-bottom: 8px;

    transition:
        transform 0.4s ease,
        background 0.4s ease;
}

/* Ripple ring around the icon */

.mission-icon::before {
    content: "";
    position: absolute;
    inset: 0;

    border-radius: 50%;
    border: 2px solid var(--primary-color);

    opacity: 0;
    animation: aboutRing 2.8s ease-out infinite;
}

@keyframes aboutRing {
    0% {
        transform: scale(0.75);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.7);
        opacity: 0;
    }
}

.about-mission:hover .mission-icon {
    transform: rotate(-8deg) scale(1.08);
}

.about-mission h4 {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 700;

    margin: 0 0 5px;
}

.about-mission p {
    color: var(--text-muted, #6c7b91);
    font-size: 13px;
    line-height: 1.65;

    margin: 0;
}


/* ==========================================
   ACTION AREA
========================================== */

.about-action-area {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}


/* ==========================================
   KNOW MORE BUTTON
========================================== */

.about-know-more {
    position: relative;
    overflow: hidden;

    display: inline-flex;
    align-items: center;
    gap: 15px;

    padding: 8px 8px 8px 23px;

    background: var(--primary-color);
    color: var(--light-text);

    border-radius: 14px;

    font-size: 15px;
    font-weight: 600;

    text-decoration: none;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;

    /* Soft pulsing glow */
    animation: aboutBtnGlow 2.8s ease-in-out infinite;
}

@keyframes aboutBtnGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary-color) 40%, transparent);
    }

    60% {
        box-shadow: 0 0 0 14px transparent;
    }
}

/* Button shine */

.about-know-more::before {
    content: "";
    position: absolute;

    top: 0;
    left: -120%;

    width: 100%;
    height: 100%;

    background: linear-gradient(110deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);

    transition: left 0.7s ease;
}

.about-know-more:hover::before {
    left: 120%;
}

.about-know-more:hover {
    background: var(--accent-color);
    color: var(--secondary-color);

    transform: translateY(-3px);

    animation: none;
    box-shadow: 0 12px 25px rgba(69, 109, 48, 0.22);
}

.about-button-icon {
    width: 39px;
    height: 39px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.17);
    border-radius: 9px;

    transition: transform 0.35s ease;
}

.about-know-more:hover .about-button-icon {
    transform: translate(3px, -3px);
}


/* ==========================================
   CONTACT INFORMATION
========================================== */

.about-contact {
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-contact-icon {
    display: inline-block;

    font-size: 30px;
    color: var(--primary-color);

    transition: transform 0.35s ease;

    /* Occasional ring-like wiggle */
    animation: aboutWiggle 5s ease-in-out infinite;
}

@keyframes aboutWiggle {

    0%,
    84%,
    100% {
        transform: rotate(0);
    }

    87% {
        transform: rotate(-14deg);
    }

    90% {
        transform: rotate(12deg);
    }

    93% {
        transform: rotate(-8deg);
    }

    96% {
        transform: rotate(5deg);
    }
}

.about-contact:hover .about-contact-icon {
    transform: scale(1.1) rotate(5deg);
    animation: none;
}

.about-contact small {
    display: block;

    font-size: 11px;
    font-weight: 600;

    color: var(--primary-color);

    margin-bottom: 3px;
}

.about-contact a {
    display: block;

    font-size: 19px;
    font-weight: 700;

    color: var(--secondary-color);
    text-decoration: none;
}


/* ==========================================
   SCROLL REVEAL ANIMATION
========================================== */

/* JS adds .about-animation-ready to the section after initialization */

.about-animation-ready [data-about-reveal] {
    opacity: 0;
    transform: translateY(35px);

    transition:
        opacity 0.8s ease,
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--delay, 0s);
}

.about-animation-ready [data-about-reveal].about-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Direction variants */

.about-animation-ready [data-about-reveal="left"] {
    transform: translateX(-50px);
}

.about-animation-ready [data-about-reveal="right"] {
    transform: translateX(50px);
}

.about-animation-ready [data-about-reveal="zoom"] {
    transform: scale(0.92);
}

/* Heading animates word by word instead */

.about-animation-ready [data-about-reveal="words"] {
    opacity: 1;
    transform: none;
}

/* Gallery entrance */

.about-animation-ready [data-about-reveal="gallery"] {
    opacity: 0;
    transform: translateX(-45px) scale(0.96);

    transition:
        opacity 1s ease,
        transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-animation-ready [data-about-reveal="gallery"].about-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}


/* ==========================================
   TABLET RESPONSIVE
========================================== */

@media (max-width: 1100px) {

    .about-intro-container {
        grid-template-columns: 0.9fr 1.1fr;
        gap: 30px;
    }

    .about-gallery {
        min-height: 500px;
        grid-template-rows: 190px 230px;
        gap: 15px;
    }

    .gallery-item-one {
        height: 190px;
    }

    .gallery-item-two {
        height: 230px;
    }

    .gallery-item-three {
        height: 230px;
    }

    .gallery-item-four {
        height: 230px;
    }

    .about-intro-heading {
        font-size: 28px;
    }

    .about-stat-item h3 {
        font-size: 28px;
    }

    .about-bottom-content {
        gap: 15px;
    }

    .about-benefits ul li {
        font-size: 12px;
        gap: 8px;
    }

    .about-contact a {
        font-size: 16px;
    }

    .about-intro-section::before,
    .about-intro-section::after {
        width: 190px;
        opacity: 0.09;
    }
}


/* ==========================================
   MOBILE RESPONSIVE
========================================== */

@media (max-width: 767px) {

    .about-intro-section {
        padding: 55px 18px;
    }

    .about-intro-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-gallery {
        max-width: 500px;
        margin: auto;
        min-height: auto;

        grid-template-rows: 180px 220px;
        gap: 13px;
    }

    .gallery-item-one {
        height: 180px;
    }

    .gallery-item-two {
        height: 210px;
        margin-top: 10px;
    }

    .gallery-item-three {
        height: 220px;
    }

    .gallery-item-four {
        height: 220px;
        margin-top: -10px;
    }

    .about-intro-heading {
        font-size: 29px;
        line-height: 1.35;
        margin-bottom: 18px;
    }

    .about-intro-description {
        font-size: 13px;
    }

    .about-stats {
        padding: 15px 5px;
        margin-bottom: 25px;
    }

    .about-stat-item h3 {
        font-size: 26px;
    }

    .about-stat-item p {
        font-size: 10px;
    }

    .about-bottom-content {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .about-mission {
        padding-left: 0;
    }

    .about-action-area {
        gap: 20px;
    }

    /* Side texture */

    .about-intro-section::before,
    .about-intro-section::after {
        width: 100px;
        max-width: 18%;
        opacity: 0.05;
    }

    /* Gallery reveal from bottom */

    .about-animation-ready [data-about-reveal="gallery"] {
        transform: translateY(30px) scale(0.97);
    }

    .about-animation-ready [data-about-reveal="gallery"].about-visible {
        transform: translateY(0) scale(1);
    }

    /* Reduce hover zoom on touch devices */

    .about-gallery-item:hover img {
        transform: scale(1.02);
    }
}


/* ==========================================
   SMALL MOBILE
========================================== */

@media (max-width: 576px) {

    .about-benefits ul li {
        font-size: 14px;
        gap: 10px;
    }
}

@media (max-width: 480px) {

    .about-gallery {
        grid-template-rows: 145px 180px;
        gap: 10px;
    }

    .gallery-item-one {
        height: 145px;
    }

    .gallery-item-two {
        height: 170px;
    }

    .gallery-item-three {
        height: 180px;
    }

    .gallery-item-four {
        height: 180px;
    }

    .about-intro-heading {
        font-size: 25px;
    }

    .about-stat-item h3 {
        font-size: 22px;
    }

    .about-stat-item p {
        font-size: 9px;
    }

    .about-benefits ul li {
        font-size: 12px;
    }

    .about-action-area {
        flex-direction: column;
        align-items: flex-start;
    }

    .about-contact a {
        font-size: 16px;
    }
}


/* ==========================================
   ACCESSIBILITY: REDUCED MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {

    .about-animation-ready [data-about-reveal],
    .about-animation-ready [data-about-reveal="gallery"],
    .about-animation-ready .about-benefits ul li,
    .about-word-inner,
    .about-gallery-item,
    .about-gallery-item img,
    .about-gallery-decoration,
    .about-stat-item,
    .about-benefits ul li i,
    .about-section-label i,
    .about-section-label::after,
    .mission-icon,
    .about-know-more,
    .about-know-more::before,
    .about-button-icon,
    .about-contact-icon,
    .about-intro-section::before,
    .about-intro-section::after {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        translate: none !important;
        opacity: 1 !important;
    }

    .mission-icon::before {
        animation: none !important;
        opacity: 0 !important;
    }

    .about-intro-heading>span:not(.about-word) {
        background-size: 100% 3px !important;
        transition: none !important;
    }
}