/*
 * HERO v7.1 — Egypt Edition with WhatsApp conversation card
 * Drop-in replacement for /public/css/hero_v7.css
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --hero-ink: #1F2937;
    --hero-ink-deep: #0F1418;
    --hero-gold: #F5C767;
    --hero-sand: #E6C78A;
    --hero-emerald: #10B981;
    --hero-emerald-glow: rgba(16, 185, 129, 0.45);
    --hero-wa-green: #25D366;
    --hero-wa-dark: #075E54;
    --hero-wa-bubble-in: #FFFFFF;
    --hero-wa-bubble-out: #DCF8C6;
    --hero-cream: #FAF7F2;
}

.hero {
    position: relative;
    min-height: 92vh;
    max-height: 920px;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    background: var(--hero-ink-deep);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    isolation: isolate;
}

.hero .container,
.hero .hero-visual,
.hero .hero-stats,
.hero .dashboard-preview {
    display: none !important;
}

.hero-v7 {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: grid;
    grid-template-columns: 1fr;
}

/* HERO BACKGROUND - Hot air balloon */
.hero-v7__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.hero-v7__bg::before {
    content: '';
    position: absolute;
    inset: -5%;
    background-image: url('/storage/uploads/meta/hero-bg.jpg');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    transform: scale(1.0);
    animation: heroKenBurns 32s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes heroKenBurns {
    0%   { transform: scale(1.0) translate(0, 0); }
    100% { transform: scale(1.12) translate(-2%, -2%); }
}

/* Warm desert-toned gradient overlay (was green, now warm for Egypt) */
.hero-v7__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(115deg, rgba(15, 20, 24, 0.86) 0%, rgba(62, 40, 20, 0.55) 45%, rgba(100, 60, 28, 0.25) 100%),
        linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
}

.hero-v7__grain {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0.08;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

.hero-v7__content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(32px, 4vh, 56px) clamp(24px, 5vw, 80px) clamp(40px, 6vh, 80px);
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
    color: #fff;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.hero-v7__main {
    display: flex;
    flex-direction: column;
    align-self: center;
}

.hero-v7__tag {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--hero-gold);
    margin-bottom: 28px;
    opacity: 0;
    animation: heroReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}
.hero-v7__tag::before {
    content: '';
    width: 48px;
    height: 1px;
    background: var(--hero-gold);
}

.hero-v7__title {
    font-family: 'Fraunces', 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-variation-settings: 'opsz' 144, 'SOFT' 50;
    font-size: clamp(2.6rem, 5.8vw, 5.4rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 24px 0;
    max-width: 18ch;
    text-shadow: 0 2px 30px rgba(0,0,0,0.35);
    opacity: 0;
    animation: heroReveal 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}
.hero-v7__title-accent {
    font-weight: 900;
    color: var(--hero-gold);
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
    display: inline-block;
}

.hero-v7__subtitle {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    font-weight: 400;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 40px 0;
    max-width: 52ch;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    opacity: 0;
    animation: heroReveal 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.hero-v7__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-bottom: 48px;
    opacity: 0;
    animation: heroReveal 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.65s forwards;
}

.hero-v7__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 30px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 999px;
    cursor: pointer;
    border: 0;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, background 0.3s ease;
    white-space: nowrap;
}

.hero-v7__btn--primary {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 12px 30px -8px var(--hero-emerald-glow), 0 0 0 1px rgba(16,185,129,0.3) inset;
}
.hero-v7__btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -8px var(--hero-emerald-glow), 0 0 0 1px rgba(16,185,129,0.5) inset;
    color: #fff;
}
.hero-v7__btn--primary::after {
    content: '→';
    font-size: 18px;
    transition: transform 0.3s ease;
}
.hero-v7__btn--primary:hover::after {
    transform: translateX(4px);
}

.hero-v7__btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.22);
}
.hero-v7__btn--ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-3px);
    color: #fff;
}
.hero-v7__btn--ghost i {
    color: var(--hero-gold);
}

.hero-v7__proof {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(24px, 4vw, 56px);
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    animation: heroReveal 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}
.hero-v7__proof-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hero-v7__proof-num {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--hero-gold);
    line-height: 1;
    font-variation-settings: 'opsz' 144;
}
.hero-v7__proof-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

/* ========================================================
 * WHATSAPP CONVERSATION CARD (floating right side)
 * ======================================================== */
.hero-v7__wa {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    padding: 16px;
    background: rgba(237, 229, 221, 0.96);
    border-radius: 22px;
    box-shadow:
        0 30px 60px -12px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: rotate(-2deg);
    opacity: 0;
    animation: heroWaFloat 6s ease-in-out infinite, heroWaReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.95s forwards;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@keyframes heroWaReveal {
    0% {
        opacity: 0;
        transform: rotate(-2deg) translateY(40px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: rotate(-2deg) translateY(0) scale(1);
    }
}

@keyframes heroWaFloat {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50%      { transform: rotate(-2deg) translateY(-8px); }
}

/* Override animation composition: float is secondary, reveal handles initial */
.hero-v7__wa {
    animation:
        heroWaReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.95s forwards,
        heroWaFloat 6s ease-in-out 2.2s infinite;
}

/* Header bar */
.hero-v7__wa-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 10px;
}
.hero-v7__wa-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.hero-v7__wa-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.hero-v7__wa-name {
    font-size: 13px;
    font-weight: 600;
    color: #111B21;
    line-height: 1;
}
.hero-v7__wa-status {
    font-size: 11px;
    color: #667781;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}
.hero-v7__wa-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #25D366;
    display: inline-block;
}
.hero-v7__wa-icon {
    width: 18px;
    height: 18px;
    color: #25D366;
    flex-shrink: 0;
}

/* Bubbles */
.hero-v7__wa-bubbles {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
}
.hero-v7__wa-bubble {
    max-width: 78%;
    padding: 8px 12px 6px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.4;
    color: #111B21;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}
.hero-v7__wa-bubble--in {
    align-self: flex-start;
    background: var(--hero-wa-bubble-in);
    border-top-left-radius: 4px;
}
.hero-v7__wa-bubble--out {
    align-self: flex-end;
    background: var(--hero-wa-bubble-out);
    border-top-right-radius: 4px;
}
.hero-v7__wa-bubble-time {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 6px;
    font-size: 10px;
    color: #667781;
    float: right;
    margin-top: 2px;
    line-height: 1;
}
.hero-v7__wa-bubble--out .hero-v7__wa-bubble-time::after {
    content: '\2713\2713';
    color: #53BDEB;
    margin-left: 3px;
    letter-spacing: -1px;
}

/* Typing indicator */
.hero-v7__wa-typing {
    align-self: flex-start;
    padding: 10px 14px;
    background: var(--hero-wa-bubble-in);
    border-radius: 14px;
    border-top-left-radius: 4px;
    display: inline-flex;
    gap: 4px;
    align-items: center;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}
.hero-v7__wa-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #667781;
    animation: heroWaDot 1.2s ease-in-out infinite;
}
.hero-v7__wa-typing span:nth-child(2) { animation-delay: 0.2s; }
.hero-v7__wa-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes heroWaDot {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30%           { opacity: 1; transform: translateY(-3px); }
}

/* Scroll cue */
.hero-v7__scroll {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: heroScrollBounce 2.4s ease-in-out infinite;
    pointer-events: none;
}
.hero-v7__scroll::after {
    content: '';
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.65), rgba(255,255,255,0));
}

@keyframes heroReveal {
    0% { opacity: 0; transform: translateY(24px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes heroScrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
    50%      { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* Tablet: single column, WA goes below stats */
@media (max-width: 1024px) {
    .hero-v7__content {
        grid-template-columns: 1fr;
    }
    .hero-v7__wa {
        max-width: 320px;
        margin: 20px auto 0;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 88vh;
        max-height: none;
    }
    .hero-v7__content {
        padding: 100px 24px 80px;
    }
    .hero-v7__title {
        font-size: clamp(2.2rem, 10vw, 3.4rem);
        max-width: 100%;
    }
    .hero-v7__subtitle {
        font-size: 1rem;
        margin-bottom: 32px;
    }
    .hero-v7__actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 340px;
    }
    .hero-v7__btn {
        justify-content: center;
        padding: 16px 24px;
    }
    .hero-v7__proof {
        gap: 20px 32px;
    }
    .hero-v7__proof-num {
        font-size: 1.6rem;
    }
    .hero-v7__scroll {
        display: none;
    }
    .hero-v7__wa {
        max-width: 300px;
        margin: 24px auto 0;
        padding: 14px;
    }
    .hero-v7__wa-bubble {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .hero-v7__tag {
        font-size: 10px;
        margin-bottom: 20px;
    }
    .hero-v7__tag::before {
        width: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-v7__bg::before { animation: none; }
    .hero-v7__scroll { animation: none; }
    .hero-v7__tag, .hero-v7__title, .hero-v7__subtitle,
    .hero-v7__actions, .hero-v7__proof, .hero-v7__wa {
        opacity: 1;
        animation: none;
        transform: rotate(-2deg);
    }
}

/* ============================================================
 * HERO v7.3: Social-proof stack (caption + WA cards + ratings)
 * ============================================================ */

.hero-v7__stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    max-width: 400px;
    margin-left: auto;
    width: 100%;
}

/* Caption pill */
.hero-v7__caption {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 14px;
    background: rgba(15, 20, 24, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.92);
    text-transform: uppercase;
    align-self: flex-end;
    transform: rotate(-2deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: heroV73Reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
}
.hero-v7__caption svg { opacity: 0.85; }

@keyframes heroV73Reveal {
    0%   { opacity: 0; transform: rotate(-2deg) translateY(16px) scale(0.92); }
    100% { opacity: 1; transform: rotate(-2deg) translateY(0) scale(1); }
}

/* Rating card shared */
.hero-v7__rating {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 24px 50px -14px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.18) inset;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #1F2937;
    width: min(300px, 85%);
    opacity: 0;
}

.hero-v7__rating-badge {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.hero-v7__rating-badge--tp {
    background: #00B67A;
}
.hero-v7__rating-badge--g {
    width: 30px;
    height: 30px;
}

.hero-v7__rating-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.hero-v7__rating-stars {
    display: inline-flex;
    gap: 1px;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 1px;
}
.hero-v7__rating-stars--tp span { color: #00B67A; }
.hero-v7__rating-stars--g span { color: #FBBC05; }

.hero-v7__rating-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    margin-top: 2px;
}
.hero-v7__rating-meta strong {
    font-weight: 800;
    font-size: 13px;
    color: #0F1418;
    letter-spacing: -0.005em;
}
.hero-v7__rating-meta span {
    font-size: 10px;
    color: #6B7280;
    letter-spacing: 0.01em;
}

/* Trustpilot rating position + animation */
.hero-v7__rating--trustpilot {
    align-self: flex-end;
    margin-right: -8px;
    transform: rotate(-3deg);
    animation:
        heroV73RatingTPReveal 1s cubic-bezier(0.22, 1, 0.36, 1) 1.1s forwards,
        heroV73RatingTPFloat 7s ease-in-out 2.2s infinite;
}
@keyframes heroV73RatingTPReveal {
    0%   { opacity: 0; transform: rotate(-3deg) translateY(24px) scale(0.9); }
    100% { opacity: 1; transform: rotate(-3deg) translateY(0) scale(1); }
}
@keyframes heroV73RatingTPFloat {
    0%, 100% { transform: rotate(-3deg) translateY(0); }
    50%      { transform: rotate(-3deg) translateY(-6px); }
}

/* Google rating position + animation */
.hero-v7__rating--google {
    align-self: flex-start;
    margin-left: -6px;
    transform: rotate(3deg);
    animation:
        heroV73RatingGReveal 1s cubic-bezier(0.22, 1, 0.36, 1) 1.5s forwards,
        heroV73RatingGFloat 8s ease-in-out 2.6s infinite;
}
@keyframes heroV73RatingGReveal {
    0%   { opacity: 0; transform: rotate(3deg) translateY(24px) scale(0.9); }
    100% { opacity: 1; transform: rotate(3deg) translateY(0) scale(1); }
}
@keyframes heroV73RatingGFloat {
    0%, 100% { transform: rotate(3deg) translateY(0); }
    50%      { transform: rotate(3deg) translateY(-6px); }
}

/* Second WA card (smaller, offset, different rotation) */
.hero-v7__wa--alt {
    max-width: 320px;
    align-self: flex-start;
    margin-left: -10px;
    padding: 14px;
    font-size: 13px;
    animation:
        heroV73WaAltReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 1.25s forwards,
        heroV73WaAltFloat 7s ease-in-out 2.4s infinite;
}
@keyframes heroV73WaAltReveal {
    0%   { opacity: 0; transform: rotate(2deg) translateY(36px) scale(0.9); }
    100% { opacity: 1; transform: rotate(2deg) translateY(0) scale(1); }
}
@keyframes heroV73WaAltFloat {
    0%, 100% { transform: rotate(2deg) translateY(0); }
    50%      { transform: rotate(2deg) translateY(-10px); }
}
.hero-v7__wa--alt .hero-v7__wa-typing { display: none; }

/* Mobile: stack centered, hide second WA card and caption to save height */
@media (max-width: 768px) {
    .hero-v7__stack {
        max-width: 100%;
        align-items: center;
        gap: 12px;
        margin: 24px auto 0;
    }
    .hero-v7__caption,
    .hero-v7__wa--alt {
        display: none;
    }
    .hero-v7__rating {
        width: min(280px, 100%);
    }
    .hero-v7__rating--trustpilot {
        margin-right: 0;
        align-self: center;
    }
    .hero-v7__rating--google {
        margin-left: 0;
        align-self: center;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-v7__caption,
    .hero-v7__rating,
    .hero-v7__wa--alt {
        opacity: 1 !important;
        animation: none !important;
    }
}
