/**
 * OnePay Reusable Component System
 * Base components for cards, grids, sections, and animations
 * Used across all pages for consistent design
 */

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS (Shared across all components)
   ═══════════════════════════════════════════════════════════════ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

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

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, 20px);
    }
}

/* ═══════════════════════════════════════════════════════════════
   GRID UTILITIES (Responsive layout system)
   ═══════════════════════════════════════════════════════════════ */

/* 4-Column Grid (stats, advantages) */
.grid--4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .grid--4col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid--4col {
        grid-template-columns: 1fr;
    }
}

/* 3-Column Grid (values, features, advantages) */
.grid--3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

@media (max-width: 1024px) {
    .grid--3col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid--3col {
        grid-template-columns: 1fr;
    }
}

/* 2-Column Grid (mission/vision, testimonials) */
.grid--2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem;
}

@media (max-width: 768px) {
    .grid--2col {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SECTION CONTAINER (Page sections with background treatment)
   ═══════════════════════════════════════════════════════════════ */

.section {
    padding: 7rem 0;
    position: relative;
    overflow: hidden;
}

/* Light background variant */
.section--light {
    background: white;
}

.section--light-gradient {
    background: linear-gradient(to bottom, white 0%, #f5f7fc 100%);
}

/* Dark background variant */
.section--dark {
    background: linear-gradient(135deg, var(--primary-blue) 0%, rgba(12, 21, 78, 0.9) 50%, rgba(222, 78, 42, 0.05) 100%);
    color: white;
}

/* Gradient background variant */
.section--gradient {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
}

/* Floating orb decorations */
.section::before,
.section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.section--light::before {
    top: -10%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(12, 21, 78, 0.03) 0%, transparent 70%);
}

.section--dark::before {
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.15) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

.section--dark::after {
    bottom: -15%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    animation: float 10s ease-in-out infinite reverse;
}

.section--gradient::after {
    bottom: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.04) 0%, transparent 70%);
}

/* ═══════════════════════════════════════════════════════════════
   SECTION HEADER (Title + tag patterns)
   ═══════════════════════════════════════════════════════════════ */

.section-header {
    text-align: center;
    margin-bottom: 5rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

.section-tag {
    display: block;
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    color: var(--primary-blue);
    font-size: 2.8rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
    line-height: 1.1;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-orange) 50%, transparent 100%);
    border-radius: 3px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--gray);
    font-weight: 500;
    margin: 1rem 0 0 0;
}

/* ═══════════════════════════════════════════════════════════════
   BASE CARD COMPONENT
   ═══════════════════════════════════════════════════════════════ */

.card {
    background: white;
    border-radius: 18px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
    border-top: 5px solid var(--primary-blue);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out both;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card:nth-child(4) {
    animation-delay: 0.4s;
}

.card:nth-child(5) {
    animation-delay: 0.5s;
}

.card:nth-child(6) {
    animation-delay: 0.6s;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.08) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 18px;
}

.card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-18px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-top-color: var(--primary-orange);
    border-color: rgba(222, 78, 42, 0.1);
}

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

.card:hover::after {
    top: -30%;
    right: -30%;
    opacity: 1;
}

/* Card Icon */
.card__icon {
    font-size: 3.5rem;
    color: var(--primary-orange);
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.card:hover .card__icon {
    transform: scale(1.25) rotate(10deg);
}

/* Card Title */
.card__title {
    color: var(--primary-blue);
    font-size: 1.15rem;
    font-weight: 900;
    margin: 0 0 1.2rem 0;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
}

/* Card Text */
.card__text {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════
   CARD VARIANTS
   ═══════════════════════════════════════════════════════════════ */

/* Stat Card (dark background, larger text) */
.card--stat {
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    border-left: 5px solid var(--primary-orange);
    border-top: none;
    text-align: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInUp 0.8s ease-out both;
}

.card--stat::before {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, transparent 100%);
}

.card--stat:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border-left-color: rgba(255, 255, 255, 0.5);
}

.card--stat__icon {
    font-size: 3.2rem;
    color: var(--primary-orange);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card--stat:hover .card--stat__icon {
    transform: scale(1.3) rotate(15deg);
}

.card--stat__number {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    letter-spacing: -1.5px;
    line-height: 1;
}

.card--stat__label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

/* Large Card (dark gradient background, white text) */
.card--large {
    background: linear-gradient(135deg, var(--primary-blue) 0%, rgba(12, 21, 78, 0.85) 100%);
    color: white;
    border-top: none;
    border-left: 6px solid var(--primary-orange);
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem;
    grid-column: span 1;
    animation: slideInUp 0.8s ease-out both;
}

.card--large::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.25) 0%, transparent 70%);
    border-radius: 50%;
}

.card--large::before {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.card--large .card__icon,
.card--large .card--large__icon {
    color: var(--primary-orange);
    font-size: 3.2rem;
}

.card--large .card__title,
.card--large .card--large__title {
    color: white;
    font-size: 1.6rem;
    text-transform: none;
    font-weight: 800;
}

.card--large .card__text,
.card--large .card--large__text {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    font-size: 1rem;
}

/* Feature Item Card (left icon, text on right) */
.card--feature {
    display: flex;
    gap: 2.5rem;
    padding: 2.5rem;
    background: white;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-left: 5px solid var(--primary-blue);
    border-top: 2px solid transparent;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.8s ease-out both;
}

.card--feature:nth-child(1) {
    animation-delay: 0.1s;
}

.card--feature:nth-child(2) {
    animation-delay: 0.2s;
}

.card--feature:nth-child(3) {
    animation-delay: 0.3s;
}

.card--feature:nth-child(4) {
    animation-delay: 0.4s;
}

.card--feature::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.04) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 18px;
}

.card--feature::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.4s ease;
}

.card--feature:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    transform: translateX(12px) translateY(-4px);
    border-left-color: var(--primary-orange);
    border-top-color: var(--primary-orange);
}

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

.card--feature:hover::after {
    top: -20%;
    right: -20%;
    opacity: 1;
}

.card--feature__icon {
    font-size: 2.5rem;
    color: var(--primary-orange);
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 0.5rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.card--feature:hover .card--feature__icon {
    transform: scale(1.25) rotate(-10deg);
}

.card--feature__content {
    position: relative;
    z-index: 1;
    text-align: left;
}

.card--feature__title {
    color: var(--primary-blue);
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 0.7rem 0;
    letter-spacing: -0.3px;
}

.card--feature__text {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .card {
        padding: 2rem;
    }

    .card__icon {
        font-size: 2.5rem;
    }

    .card__title {
        font-size: 1.1rem;
    }

    .card--feature {
        gap: 1.5rem;
        padding: 2rem;
        flex-direction: column;
    }

    .card--feature__icon {
        font-size: 2rem;
        align-items: center;
        justify-content: center;
        padding-top: 0;
    }

    .card--stat {
        padding: 2rem 1.5rem;
    }

    .card--stat__icon {
        font-size: 2.5rem;
    }

    .card--stat__number {
        font-size: 2rem;
    }

    .card--stat__label {
        font-size: 0.8rem;
    }

    .card--large {
        padding: 2.5rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card__icon {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .card__title {
        font-size: 1rem;
    }

    .card__text {
        font-size: 0.9rem;
    }

    .card--stat {
        padding: 1.5rem 1rem;
    }

    .card--stat__icon {
        font-size: 2rem;
    }

    .card--stat__number {
        font-size: 1.5rem;
    }

    .card--feature {
        gap: 1rem;
        padding: 1.5rem;
    }

    .card--feature__icon {
        font-size: 1.8rem;
    }

    .card--feature__title {
        font-size: 1rem;
    }

    .card--feature__text {
        font-size: 0.9rem;
    }
}