/* 
 * Kibbeh House - Custom Homepage Styles
 */

:root {
    --kh-primary: #0369a1;
    /* Ocean Blue */
    --kh-primary-dark: #0c4a6e;
    --kh-accent: #f59e0b;
    /* Amber/Gold */
    --kh-dark: #0f172a;
    /* Slate 900 */
    --kh-light: #f8fafc;
    /* Slate 50 */
    --kh-gray: #64748b;
    --kh-font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --kh-container: 1100px;
}

/* Base Reset/Setup for Homepage */
.custom-homepage {
    font-family: var(--kh-font-main);
    color: var(--kh-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.custom-homepage h1,
.custom-homepage h2,
.custom-homepage h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

.kh-container {
    max-width: var(--kh-container);
    margin: 0 auto;
    padding: 0 20px;
}

.kh-section {
    padding: 80px 0;
}

/* === Hero Section === */
.kh-hero {
    position: relative;
    height: 90vh;
    /* Full viewport height */
    min-height: 600px;
    display: flex;
    align-items: center;
    background: #0f172a;
    /* Fallback */
    color: #fff;
    margin-top: -20px;
    /* Counteract Astra default padding if any */
}

.kh-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7)), url('https://kibbeh-house.com/wp-content/uploads/2025/11/kibbeh_hero.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.kh-hero-content {
    position: relative;
    /* Above bg */
    z-index: 1;
    max-width: 600px;
}

.kh-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.kh-hero-title span {
    color: var(--kh-accent);
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.kh-hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.kh-hero-actions {
    display: flex;
    gap: 15px;
}

/* Buttons */
.kh-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: var(--kh-primary);
    color: #fff;
    border-radius: 99px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.kh-btn-primary:hover {
    background: var(--kh-primary-dark);
    transform: translateY(-2px);
    color: #fff;
}

.kh-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 99px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.kh-btn-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* === Product Highlight === */
.kh-highlight {
    background: #fff;
}

.kh-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.kh-highlight-text {
    padding-right: 20px;
}

.kh-label {
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--kh-accent);
    margin-bottom: 10px;
}

.kh-highlight-text h2 {
    font-size: 2.5rem;
    color: var(--kh-dark);
    margin-bottom: 1rem;
}

.kh-feature-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 30px;
}

.kh-feature-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.kh-check {
    color: var(--kh-primary);
    font-weight: 800;
}

.kh-text-link {
    color: var(--kh-primary);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.kh-text-link:hover {
    text-decoration: underline;
}

.kh-media-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.kh-media-card img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.kh-media-card:hover img {
    transform: scale(1.05);
}

.kh-badge-floating {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--kh-dark);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* === Values Grid === */
.kh-values {
    background: var(--kh-light);
}

.kh-section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.kh-section-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
}

.kh-values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.kh-value-card {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

.kh-value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.kh-value-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.kh-value-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.kh-value-card p {
    color: var(--kh-gray);
    font-size: 0.95rem;
}

/* === CTA === */
.kh-cta {
    padding: 100px 0;
    background: var(--kh-primary);
    color: #fff;
    text-align: center;
}

.kh-cta-box h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.kh-cta-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.kh-btn-white {
    display: inline-block;
    padding: 16px 40px;
    background: #fff;
    color: var(--kh-primary);
    border-radius: 99px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.kh-btn-white:hover {
    color: var(--kh-primary);
    transform: scale(1.05);
}


/* === Reviews / Social Proof === */
.kh-reviews {
    background: #fff;
    border-top: 1px solid #f1f5f9;
}

.kh-label-text {
    display: block;
    color: var(--kh-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.kh-rating-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 8px 16px;
    border-radius: 99px;
    border: 1px solid #cbd5e1;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--kh-dark);
}

.kh-rating-summary .stars {
    color: var(--kh-accent);
}

.kh-reviews-carousel {
    margin-top: 40px;
    position: relative;
    /* Fade mask on edges */
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.kh-reviews-track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 20px 0;
    /* Padding for shadows only */
}

.kh-reviews-track::-webkit-scrollbar {
    display: none;
}

.kh-review-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    /* Desktop: Exactly 3 cards visible. 
       (100% width - 2 gaps of 30px) / 3 
       We use calc to be precise. */
    width: calc((100% - 60px) / 3);
    flex: 0 0 calc((100% - 60px) / 3);
    max-width: calc((100% - 60px) / 3);
    scroll-snap-align: start;
}

.kh-review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.kh-review-stars {
    color: var(--kh-accent);
    font-size: 1.1rem;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.kh-review-text {
    font-size: 1.05rem;
    color: var(--kh-dark);
    margin-bottom: 20px;
    flex-grow: 1;
    font-style: italic;
    line-height: 1.5;
}

.kh-review-author {
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kh-review-author .name {
    font-weight: 700;
    color: var(--kh-primary);
}

.kh-review-author .verified-badge {
    font-size: 0.8rem;
    color: #16a34a;
    /* Green for verified */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* === Mobile Responsive === */
@media (max-width: 768px) {
    .kh-section {
        padding: 50px 0;
    }

    .kh-hero {
        height: auto;
        min-height: 500px;
        padding: 100px 0 60px;
        /* More top padding for nav */
    }

    .kh-hero-title {
        font-size: 2.5rem;
    }

    .kh-grid-2col,
    .kh-values-grid,
    .kh-reviews-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .kh-hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .kh-btn-primary,
    .kh-btn-secondary {
        width: 100%;
    }

    .kh-highlight-text {
        text-align: center;
        padding-right: 0;
        order: 2;
    }

    .kh-highlight-media {
        order: 1;
    }

    .kh-feature-list {
        display: inline-block;
        text-align: left;
    }

    .kh-review-card {
        /* Mobile: Show most of one card centered */
        min-width: auto !important;
        width: 85% !important;
        /* Force width */
        max-width: none !important;
        /* Reset desktop constraint */
        flex: 0 0 85% !important;
        scroll-snap-align: center;
    }

    .kh-reviews-track {
        gap: 15px;
        /* Smaller gap for mobile */
        padding: 20px 7.5%;
        /* Center the 85% card (15% rem / 2 = 7.5%) */
    }
}

/* === Magical Animations === */

/* 1. Reveal on Scroll Base */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* 2. Stagger Delays (for grids) */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* 3. Hero Parallax Text */
.kh-hero-content {
    animation: fadeUpHero 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(40px);
}

@keyframes fadeUpHero {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 4. Button Shimmer Effect */
.kh-btn-primary {
    position: relative;
    overflow: hidden;
}

.kh-btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: all 0.6s;
    transform: skewX(-20deg);
}

.kh-btn-primary:hover::after {
    left: 100%;
    transition: 0.7s;
}

/* 5. Spotlight Hover Effect (Cards) */
.kh-value-card,
.kh-review-card {
    position: relative;
    overflow: hidden;
    /* Ensure spotlight works */
}

.kh-value-card::before,
.kh-review-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y),
            rgba(3, 105, 161, 0.06),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

.kh-value-card:hover::before,
.kh-review-card:hover::before {
    opacity: 1;
}

/* 6. Floating Animation (Badge) */
.kh-badge-floating {
    animation: floatBadge 3s ease-in-out infinite;
}

@keyframes floatBadge {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* 7. Hero Title Gradient Flow */
.kh-hero-title span {
    background-size: 200% auto;
    animation: shineText 4s linear infinite;
}

@keyframes shineText {
    to {
        background-position: 200% center;
    }
}

/* 8. Magical Background Orbs */
.kh-magic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.kh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatingOrb 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--kh-accent);
    top: -10%;
    right: -10%;
    opacity: 0.15;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--kh-primary);
    bottom: -15%;
    left: -15%;
    opacity: 0.1;
    animation-duration: 25s;
}

@keyframes floatingOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-30px, 40px) scale(1.1);
    }
}

/* 9. Scroll Progress Line */
.kh-scroll-line {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--kh-accent), var(--kh-primary));
    width: 0%;
    /* JS will update this */
    z-index: 9999;
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--kh-accent);
}

/* 10. 3D Tilt Effect Base */
.kh-tilt-card {
    transition: transform 0.1s ease-out;
    /* Super fast for mouse tracking */
    transform-style: preserve-3d;
    backface-visibility: hidden;
}