﻿/**
 * FlashGL Blocks — Frontend Styles Supplement
 *
 * Additional styles for Hero, Services, and Stats sections
 * when used as fallback template parts (not Gutenberg blocks).
 * Includes counter animation keyframes.
 *
 * @package FlashGL
 */

/* ==============================
   Hero Section (fallback template)
   ============================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--wp--preset--color--dark, #0D1B4A);
    overflow: hidden;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(13, 27, 74, 0.9) 0%,
        rgba(26, 43, 140, 0.7) 50%,
        rgba(13, 27, 74, 0.8) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: var(--wp--custom--content-max, 1200px);
    width: 100%;
    margin: 0 auto;
    padding: 80px 24px;
    text-align: center;
}

.hero__title {
    color: var(--wp--preset--color--white, #FFFFFF);
    font-size: var(--wp--preset--font-size--6xl, 3.75rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero__subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--wp--preset--font-size--xl, 1.25rem);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

/* Trust badges */
.hero__badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.hero__badge {
    height: 40px;
    width: auto;
    opacity: 0.7;
    transition: opacity var(--wp--custom--transition-fast, 150ms) ease;
    filter: brightness(0) invert(1);
}

.hero__badge:hover {
    opacity: 1;
}

/* ==============================
   Services Section (fallback template)
   ============================== */

.services {
    padding: 80px 0;
    background-color: var(--wp--preset--color--white, #FFFFFF);
}

.services__header {
    text-align: center;
    max-width: var(--wp--custom--content-max, 1200px);
    margin: 0 auto 60px;
    padding: 0 24px;
}

.services__title {
    color: var(--wp--preset--color--primary, #1A2B8C);
    font-size: var(--wp--preset--font-size--4xl, 2.25rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.services__subtitle {
    color: var(--wp--preset--color--gray-500, #6B7B8D);
    font-size: var(--wp--preset--font-size--lg, 1.125rem);
    max-width: 600px;
    margin: 0 auto;
}

.services__grid {
    display: grid;
    gap: 32px;
}

.services__grid--3col {
    grid-template-columns: repeat(3, 1fr);
}

.services__grid--4col {
    grid-template-columns: repeat(4, 1fr);
}

.services__card {
    background-color: var(--wp--preset--color--light, #F5F7FA);
    border-radius: var(--wp--custom--radius-md, 8px);
    padding: 40px 32px;
    text-align: center;
    transition: transform var(--wp--custom--transition-base, 300ms) ease,
                box-shadow var(--wp--custom--transition-base, 300ms) ease;
}

.services__card:hover {
    transform: translateY(-4px);
    box-shadow: var(--wp--custom--shadow-lg, 0 10px 15px rgba(0,0,0,0.1));
}

.services__card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: rgba(26, 43, 140, 0.1);
    color: var(--wp--preset--color--primary, #1A2B8C);
    margin-bottom: 24px;
}

.services__card:hover .services__card-icon {
    background-color: var(--wp--preset--color--primary, #1A2B8C);
    color: var(--wp--preset--color--white, #FFFFFF);
}

.services__card-title {
    color: var(--wp--preset--color--gray-800, #2D3748);
    font-size: var(--wp--preset--font-size--xl, 1.25rem);
    font-weight: 600;
    margin-bottom: 12px;
}

.services__card-desc {
    color: var(--wp--preset--color--gray-500, #6B7B8D);
    font-size: var(--wp--preset--font-size--sm, 0.875rem);
    line-height: 1.6;
    margin-bottom: 20px;
}

.services__card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--wp--preset--color--primary, #1A2B8C);
    font-size: var(--wp--preset--font-size--sm, 0.875rem);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--wp--custom--transition-fast, 150ms) ease;
}

.services__card-link:hover {
    color: var(--wp--preset--color--accent, #D00020);
}

.services__card-link svg {
    transition: transform var(--wp--custom--transition-fast, 150ms) ease;
}

.services__card-link:hover svg {
    transform: translateX(4px);
}

/* ==============================
   Stats Section (fallback template)
   ============================== */

.stats {
    padding: 80px 0;
    background-color: #fff;
    color: var(--wp--preset--color--gray-800, #1F2937);
    position: relative;
    overflow: hidden;
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: var(--wp--custom--content-max, 1200px);
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.stats__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.stats__number {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 12px;
}

.stats__counter {
    font-size: var(--wp--preset--font-size--6xl, 3.75rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stats__label {
    font-size: var(--wp--preset--font-size--base, 1rem);
    opacity: 0.85;
    line-height: 1.4;
}

/* Counter animation — visible state */
.stats__item.is-visible {
    animation: flashgl-stats-fade-in 0.6s ease-out forwards;
}

.stats__item:nth-child(2).is-visible {
    animation-delay: 0.15s;
}

.stats__item:nth-child(3).is-visible {
    animation-delay: 0.3s;
}

.stats__item:nth-child(4).is-visible {
    animation-delay: 0.45s;
}

@keyframes flashgl-stats-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================
   Responsive
   ============================== */

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

    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero__title {
        font-size: var(--wp--preset--font-size--5xl, 3rem);
    }

    .hero__subtitle {
        font-size: var(--wp--preset--font-size--lg, 1.125rem);
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
    }

    .hero__content {
        padding: 60px 16px;
    }

    .hero__title {
        font-size: var(--wp--preset--font-size--4xl, 2.25rem);
    }

    .hero__subtitle {
        font-size: var(--wp--preset--font-size--base, 1rem);
    }

    .hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .hero__actions .btn {
        width: 100%;
        max-width: 300px;
    }

    .hero__badges {
        gap: 16px;
    }

    .hero__badge {
        height: 32px;
    }

    .services {
        padding: 60px 0;
    }

    .services__grid--3col,
    .services__grid--4col {
        grid-template-columns: 1fr;
    }

    .services__card {
        padding: 32px 24px;
    }

    .stats {
        padding: 60px 0;
    }

    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .stats__counter {
        font-size: var(--wp--preset--font-size--5xl, 3rem);
    }
}

@media (max-width: 480px) {
    .stats__grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .stats__counter {
        font-size: var(--wp--preset--font-size--4xl, 2.25rem);
    }
}

/* ==============================
   Footer — Mobile bottom bar + legal links
   (Widget column hiding is in base.css)
   ============================== */

@media (max-width: 640px) {
    .site-footer__bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .site-footer__legal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
}
