/*
Theme Name: qeema and global
Theme URI: https://qeematech.net
Author: mahmoudadel-qeematech
Author URI:  https://qeematech.net
Description: Custom WordPress theme for Global United for Industries
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: paperpack-pro
*/

/* Custom CSS Variables from index.css */
:root {
    /* Navy Blue & Gold Industrial Theme */
    --background: #0d1316;
    /* 200 25% 10% */
    --foreground: #f2efe6;
    /* 45 40% 95% */

    --card: #151d21;
    /* 200 30% 12% */
    --card-foreground: #f2efe6;
    /* 45 40% 95% */

    --popover: #151d21;
    /* 200 30% 12% */
    --popover-foreground: #f2efe6;
    /* 45 40% 95% */

    --primary: #dfad3f;
    /* 40 50% 55% */
    --primary-foreground: #0f1416;
    /* 200 30% 8% */

    --secondary: #1e262b;
    /* 200 35% 18% */
    --secondary-foreground: #f2efe6;
    /* 45 40% 95% */

    --muted: #1e2529;
    /* 200 25% 16% */
    --muted-foreground: #8496a0;
    /* 200 15% 55% */

    --accent: #dfad3f;
    /* 40 50% 55% */
    --accent-foreground: #0f1416;
    /* 200 30% 8% */

    --destructive: #ef4444;
    /* 0 84.2% 60.2% */
    --destructive-foreground: #f8fafc;
    /* 210 40% 98% */

    --border: #263238;
    /* 200 25% 20% */
    --input: #263238;
    /* 200 25% 20% */
    --ring: #dfad3f;
    /* 40 50% 55% */

    --radius: 0.5rem;

    /* Custom tokens */
    --gold: #dfad3f;
    --gold-light: #e6c87a;
    /* 40 55% 65% */
    --gold-dark: #b98925;
    /* 40 45% 45% */
    --navy: #151d21;
    --navy-light: #222c33;
    /* 200 25% 18% */
    --navy-dark: #0d1214;
    /* 200 35% 8% */

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, hsl(41 60% 70%), hsl(41 56% 60%), hsl(41 48% 48%));
    --gradient-navy: linear-gradient(180deg, hsl(200 30% 12%), hsl(200 35% 8%));
    --gradient-hero: linear-gradient(135deg, hsl(200 35% 8% / 0.92), hsl(200 30% 12% / 0.82));

    /* Shadows */
    --shadow-gold: 0 4px 34px hsl(41 56% 60% / 0.24);
    --shadow-card: 0 10px 40px hsl(200 35% 5% / 0.5);

    /* Typography */
    --font-sans: 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll-triggered: initial state (hidden until in view) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: none;
}
.animate-on-scroll.animate-fade-in-scroll {
    transform: none;
}
.animate-on-scroll.animate-scale-scroll {
    transform: scale(0.95);
}
.animate-on-scroll.animate-left-scroll {
    transform: translateX(20px);
}
.animate-on-scroll.animate-right-scroll {
    transform: translateX(-20px);
}

/* When in view: run animation */
.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0) scale(1) translateX(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.animate-scale-scroll.in-view {
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Utility Animations */
.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

.animate-slide-right {
    animation: slideRight 0.6s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

/* Hover animations - cards & buttons */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-6px);
}
.hover-scale {
    transition: transform 0.3s ease;
}
.hover-scale:hover {
    transform: scale(1.02);
}
.hover-glow:hover {
    box-shadow: var(--shadow-gold);
}

/* Product/blog cards: gold border (subtle) + stronger on hover */
article.bg-card,
article.group.bg-card,
a.group.relative.bg-card,
.partner-logo-card,
.paperpack-product-gallery-new .paperpack-product-thumbs-swiper button {
    border-color: rgba(223, 173, 63, 0.18) !important;
}
article.bg-card:hover,
article.group.bg-card:hover,
a.group.relative.bg-card:hover,
.partner-logo-card:hover,
.paperpack-product-gallery-new .paperpack-product-thumbs-swiper button:hover {
    border-color: rgba(223, 173, 63, 0.55) !important;
    box-shadow: 0 18px 60px rgba(0,0,0,0.45), 0 10px 40px rgba(223, 173, 63, 0.12);
}

/* Gallery (Home + About) */
.paperpack-gallery__media {
    position: relative;
    overflow: hidden;
}
.paperpack-gallery__link {
    position: relative;
}
.paperpack-gallery__media img {
    width: 100%;
    height: 100%;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 600ms ease, filter 600ms ease;
}
.paperpack-gallery__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.25) 45%, rgba(0, 0, 0, 0.78) 100%);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 260ms ease, transform 260ms ease;
}
.paperpack-gallery__item:hover .paperpack-gallery__overlay {
    opacity: 1;
    transform: translateY(0);
}
.paperpack-gallery__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(223, 173, 63, 0.28);
    background: rgba(10, 16, 18, 0.58);
    color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.paperpack-gallery__pill i,
.paperpack-gallery__cta i {
    color: var(--gold);
}
.paperpack-gallery__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(223, 173, 63, 0.35);
    background: linear-gradient(135deg, rgba(223, 173, 63, 0.22), rgba(223, 173, 63, 0.06));
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 55px rgba(0,0,0,0.45), 0 10px 32px rgba(223, 173, 63, 0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 12.5px;
    font-weight: 800;
}
.paperpack-gallery__item:hover .paperpack-gallery__media img {
    transform: scale(1.06);
    filter: saturate(1.06) contrast(1.02);
}

/* Home portfolio filters */
.paperpack-gallery__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 18px;
}
.paperpack-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(10, 16, 18, 0.30);
    color: rgba(255,255,255,0.88);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.2px;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}
.paperpack-filter:hover {
    transform: translateY(-1px);
    border-color: rgba(223, 173, 63, 0.35);
    background: rgba(223, 173, 63, 0.10);
}
.paperpack-filter.is-active {
    border-color: rgba(223, 173, 63, 0.55);
    background: linear-gradient(135deg, rgba(223, 173, 63, 0.22), rgba(223, 173, 63, 0.06));
    color: rgba(255,255,255,0.95);
    box-shadow: 0 18px 55px rgba(0,0,0,0.40), 0 10px 32px rgba(223, 173, 63, 0.10);
}
.paperpack-gallery__item {
    transition: opacity 200ms ease, transform 200ms ease, filter 200ms ease;
}
.paperpack-gallery__item.is-filtered-out {
    opacity: 0.18;
    filter: grayscale(0.35);
    transform: scale(0.985);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .paperpack-filter,
    .paperpack-gallery__item {
        transition: none !important;
    }
}

/* Lightbox (Gallery) */
.paperpack-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}
.paperpack-lightbox.is-open {
    display: block;
}
.paperpack-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.paperpack-lightbox__dialog {
    position: relative;
    max-width: min(980px, calc(100vw - 28px));
    margin: 6vh auto 0;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(10, 16, 18, 0.92);
    box-shadow: 0 50px 120px rgba(0,0,0,0.65), 0 18px 60px rgba(223, 173, 63, 0.10);
}
.paperpack-lightbox__img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 72vh;
    object-fit: contain;
    background: rgba(0,0,0,0.35);
}
.paperpack-lightbox__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.paperpack-lightbox__cap {
    color: rgba(255,255,255,0.88);
    font-size: 14px;
    line-height: 1.6;
}
.paperpack-lightbox__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(223, 173, 63, 0.35);
    background: rgba(223, 173, 63, 0.10);
    color: var(--gold);
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.paperpack-lightbox__close:hover {
    transform: translateY(-1px);
    background: rgba(223, 173, 63, 0.16);
    border-color: rgba(223, 173, 63, 0.55);
}

@media (prefers-reduced-motion: reduce) {
    .paperpack-gallery__overlay,
    .paperpack-gallery__media img,
    .paperpack-lightbox__close {
        transition: none !important;
    }
}

/* Printing identity: Services + Process */
.paperpack-kicker {
    box-shadow: 0 18px 55px rgba(0,0,0,0.35), 0 10px 32px rgba(223, 173, 63, 0.10);
}
.paperpack-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(10, 16, 18, 0.38);
    color: rgba(255,255,255,0.86);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.paperpack-services {
    position: relative;
    overflow: hidden;
}
.paperpack-services::after {
    content: "";
    position: absolute;
    inset: -80px -60px auto auto;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle at 30% 30%, rgba(223, 173, 63, 0.22), transparent 60%);
    filter: blur(2px);
    opacity: 0.9;
    pointer-events: none;
}
.paperpack-service-card {
    position: relative;
}
.paperpack-service-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(223, 173, 63, 0.12), transparent 40%, rgba(255,255,255,0.06));
    opacity: 0;
    transition: opacity 260ms ease;
}
.paperpack-service-card:hover::before {
    opacity: 1;
}
.paperpack-services__image-wrap,
.paperpack-process__image-wrap {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(10, 16, 18, 0.25);
    box-shadow: 0 40px 120px rgba(0,0,0,0.55), 0 16px 60px rgba(223, 173, 63, 0.10);
}
.paperpack-services__image,
.paperpack-process__image {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    filter: saturate(1.03) contrast(1.02);
}
.paperpack-process__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.paperpack-process__step-head {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 10px;
}
.paperpack-process__num {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: rgba(255,255,255,0.92);
    border: 1px solid rgba(223, 173, 63, 0.35);
    background: rgba(223, 173, 63, 0.10);
}
.paperpack-process__icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(10, 16, 18, 0.35);
}

@media (min-width: 768px) {
    .paperpack-process__list {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

/* Marquee */
.paperpack-marquee {
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(223, 173, 63, 0.18);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(90deg, rgba(223, 173, 63, 0.10), rgba(10, 16, 18, 0.35), rgba(223, 173, 63, 0.10));
}
.paperpack-marquee::before,
.paperpack-marquee::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 72px;
    pointer-events: none;
    z-index: 2;
}
.paperpack-marquee::before {
    right: 0;
    background: linear-gradient(270deg, rgba(10,16,18,0.95), rgba(10,16,18,0));
}
.paperpack-marquee::after {
    left: 0;
    background: linear-gradient(90deg, rgba(10,16,18,0.95), rgba(10,16,18,0));
}
.paperpack-marquee__track {
    padding: 14px 0;
}
.paperpack-marquee__row {
    display: inline-flex;
    align-items: center;
    gap: 26px;
    white-space: nowrap;
    will-change: transform;
    animation: paperpackMarquee var(--pp-marquee-speed, 22s) linear infinite;
}
.paperpack-marquee__text {
    color: rgba(255,255,255,0.86);
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: none;
}
@keyframes paperpackMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(35%); }
}
html[dir="rtl"] .paperpack-marquee__row {
    animation-direction: reverse;
}

/* Finishes cards: extra polish */
.paperpack-finishes {
    position: relative;
    overflow: hidden;
}
.paperpack-finishes::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at 30% 30%, rgba(223, 173, 63, 0.18), transparent 62%);
    opacity: 0.9;
    pointer-events: none;
}
.paperpack-finish-card {
    position: relative;
}
.paperpack-finish-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(223, 173, 63, 0.10), transparent 45%, rgba(255,255,255,0.06));
    opacity: 0;
    transition: opacity 240ms ease;
}
.paperpack-finish-card:hover::before {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .paperpack-marquee__row {
        animation: none !important;
        transform: none !important;
    }
}

/* Hero: Swiper خلفية + طبقة داكنة للنص */
.bg-gradient-hero {
    background: var(--gradient-hero);
}

.paperpack-hero-media {
    min-height: 90vh;
}

.paperpack-hero-swiper,
.paperpack-hero-swiper .swiper-wrapper,
.paperpack-hero-swiper .swiper-slide {
    min-height: 90vh;
    height: 100%;
}

.paperpack-hero-swiper .swiper-slide img {
    display: block;
}

/* Hero slider: continuous motion (Ken Burns + subtle pan) */
.paperpack-hero-slide img {
    transform: scale(1.06) translate3d(0, 0, 0);
    will-change: transform;
}
.paperpack-hero-slide.is-active img {
    animation: paperpackKenBurns 8.5s ease-in-out both;
}
@keyframes paperpackKenBurns {
    0%   { transform: scale(1.06) translate3d(0, 0, 0); }
    50%  { transform: scale(1.12) translate3d(-1.2%, -1.1%, 0); }
    100% { transform: scale(1.16) translate3d(-2.2%, -2.0%, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .paperpack-hero-slide.is-active img {
        animation: none;
        transform: none;
    }
}

.paperpack-hero-overlay {
    background:
        /* Softer overlay: keep bottom contrast, brighten mid/top */
        linear-gradient(180deg, rgba(8, 10, 12, 0.35) 0%, rgba(8, 10, 12, 0.55) 45%, rgba(8, 10, 12, 0.85) 100%),
        linear-gradient(135deg, hsl(200 35% 6% / 0.50), hsl(200 28% 10% / 0.42));
}

/* Product gallery (frontend Swiper) */
.paperpack-product-gallery-swiper,
.paperpack-product-thumbs-swiper {
    width: 100%;
}
.paperpack-product-thumbs-swiper .swiper-slide {
    opacity: 0.75;
}
.paperpack-product-thumbs-swiper .swiper-slide-thumb-active {
    opacity: 1;
}
.paperpack-product-gallery-swiper img {
    display: block;
}

.paperpack-hero-content {
    transition: transform 0.45s ease;
}

.paperpack-hero:hover .paperpack-hero-content {
    transform: translateY(-3px);
}

.paperpack-hero:hover .paperpack-hero-badge {
    background-color: rgba(212, 160, 51, 0.28);
    box-shadow: 0 8px 28px rgba(212, 160, 51, 0.14);
}

.paperpack-hero:hover .paperpack-hero-headline {
    text-shadow: 0 0 42px rgba(212, 160, 51, 0.14);
}

.paperpack-hero-btn-primary {
    transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;
}

.paperpack-hero-btn-primary:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 14px 40px rgba(212, 160, 51, 0.5), 0 4px 14px rgba(0, 0, 0, 0.35);
    filter: brightness(1.1) saturate(1.05);
}

.paperpack-hero-btn-primary:active {
    transform: translateY(-2px) scale(1.01);
}

.paperpack-hero-btn-outline {
    transition: transform 0.28s ease, background-color 0.28s ease, border-color 0.28s ease, color 0.28s ease, box-shadow 0.28s ease;
}

.paperpack-hero-btn-outline:hover {
    transform: translateY(-5px) scale(1.03);
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 160, 51, 0.85);
    color: var(--gold-light);
    box-shadow: 0 0 0 1px rgba(212, 160, 51, 0.35), 0 12px 32px rgba(0, 0, 0, 0.35);
}

.paperpack-hero-btn-outline:active {
    transform: translateY(-2px) scale(1.01);
}

.paperpack-hero-pagination.swiper-pagination-horizontal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.paperpack-hero-bullet {
    display: inline-block;
    height: 0.625rem;
    width: 0.625rem;
    margin: 0 !important;
    padding: 0;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: width 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
    background-color: rgba(242, 239, 230, 0.35);
    opacity: 1;
}

.paperpack-hero-bullet:hover {
    background-color: rgba(242, 239, 230, 0.55);
    transform: scale(1.15);
}

.paperpack-hero-bullet-active {
    width: 2rem;
    border-radius: 9999px;
    background-color: var(--gold);
}

.paperpack-hero-bullet-active:hover {
    background-color: var(--gold-light);
}

/* أرقامنا — نمط الصف البسيط (ذهبي على خلفية داكنة) */
.paperpack-stats-section .paperpack-stat-number {
    color: #c5a059;
    font-variant-numeric: tabular-nums;
}

.paperpack-stats-section--home-band .paperpack-stat-cell .paperpack-stat-number {
    /* Slightly larger (per request) */
    font-size: clamp(1.85rem, 3.8vw, 2.8rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.paperpack-stats-section--home-band .paperpack-stat-cell .paperpack-stat-label {
    font-size: 0.75rem;
    line-height: 1.25;
    margin-top: 0.55rem;
    color: rgba(242, 239, 230, 0.75);
}

.paperpack-stats-section--home-band .paperpack-stat-row {
    row-gap: 1.6rem;
}

/* صفحة من نحن — صف أرقام بأربعة أعمدة (مثل مرجع Lovable) */
.paperpack-stats-section--about-row .about-stat-row-cell {
    padding: 0.25rem 0;
}

@media (min-width: 1024px) {
    .paperpack-stats-section--home-band .paperpack-stat-cell .paperpack-stat-number {
        font-size: clamp(2.2rem, 2.6vw, 3.1rem);
    }
}

/* سلايدر شعارات العملاء (Swiper) */
.paperpack-partners-wrap {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.paperpack-partners-swiper {
    overflow: hidden;
}

.paperpack-partners-swiper .swiper-slide {
    width: auto !important;
    height: auto;
    display: flex;
    align-items: stretch;
    justify-content: center;
    box-sizing: border-box;
}

.paperpack-partners-swiper .partner-logo-card {
    margin-left: auto;
    margin-right: auto;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    a,
    button,
    [role="button"] {
        transition: none;
    }

    body {
        animation: none;
    }

    .paperpack-mobile-menu {
        transition: none;
        transform: none;
    }

    .paperpack-hero-content,
    .paperpack-hero-badge,
    .paperpack-hero-headline,
    .paperpack-hero-btn-primary,
    .paperpack-hero-btn-outline,
    .paperpack-hero-bullet {
        transition: none;
    }

    .paperpack-hero:hover .paperpack-hero-content {
        transform: none;
    }

    .paperpack-hero-btn-primary:hover,
    .paperpack-hero-btn-outline:hover {
        transform: none;
    }
}

/* Stagger children when parent gets .in-view */
.animate-stagger-children > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.animate-stagger-children.in-view > *:nth-child(1) { transition-delay: 0.05s; }
.animate-stagger-children.in-view > *:nth-child(2) { transition-delay: 0.1s; }
.animate-stagger-children.in-view > *:nth-child(3) { transition-delay: 0.15s; }
.animate-stagger-children.in-view > *:nth-child(4) { transition-delay: 0.2s; }
.animate-stagger-children.in-view > *:nth-child(5) { transition-delay: 0.25s; }
.animate-stagger-children.in-view > *:nth-child(6) { transition-delay: 0.3s; }
.animate-stagger-children.in-view > * {
    opacity: 1;
    transform: translateY(0);
}

/* Base Styles */
html {
    direction: rtl;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.7;
    text-align: start;
}

/* Global spacing polish for all pages */
section {
    scroll-margin-top: 7rem; /* fixed header */
}

/* ===== Modern section system (premium + clean) ===== */

/* Section separators (subtle) */
section {
    position: relative;
}
section::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(223, 173, 63, 0.14),
        rgba(255, 255, 255, 0.06),
        rgba(223, 173, 63, 0.14),
        transparent
    );
    opacity: 0.9;
    pointer-events: none;
}

/* Stronger section headings (works with existing h2/h3 usage) */
h2,
h3 {
    text-wrap: balance;
}
h2 {
    letter-spacing: -0.015em;
}

/* Gold badge style unify */
.bg-gold\/20.text-gold,
span.text-gold.font-semibold {
    border: 1px solid rgba(223, 173, 63, 0.22);
    background: radial-gradient(600px 120px at 50% 50%, rgba(223, 173, 63, 0.16), rgba(223, 173, 63, 0.08));
}

/* Section background blobs (apply to sections only; avoid locking body scroll) */
section.bg-navy-dark,
section.bg-background,
section.bg-navy {
    position: relative;
    overflow: hidden;
}
section.bg-navy-dark::after,
section.bg-background::after,
section.bg-navy::after {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(420px 240px at 15% 20%, rgba(223, 173, 63, 0.10), transparent 60%),
        radial-gradient(520px 280px at 85% 70%, rgba(223, 173, 63, 0.07), transparent 62%);
    filter: blur(2px);
    pointer-events: none;
}
/* Keep content above blobs */
section.bg-navy-dark > *,
section.bg-background > *,
section.bg-navy > * {
    position: relative;
    z-index: 1;
}

/* Modern cards: glass + premium border */
.bg-card {
    background: color-mix(in oklab, var(--card) 78%, black);
}
.bg-card.border,
.bg-card.border-border,
article.bg-card {
    position: relative;
    border-color: rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(10px);
}
.bg-card.border::before,
.bg-card.border-border::before,
article.bg-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(223, 173, 63, 0.35), rgba(255, 255, 255, 0.08), rgba(223, 173, 63, 0.18));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0.55;
    pointer-events: none;
}
.bg-card.border:hover::before,
.bg-card.border-border:hover::before,
article.bg-card:hover::before {
    opacity: 0.9;
}

/* Card images: smoother */
.rounded-2xl img,
.rounded-xl img {
    transform: translateZ(0);
}

/* Modern container rhythm */
.container {
    max-width: 1200px;
}

@media (min-width: 1024px) {
    .container {
        max-width: 1280px;
    }
}

/* Pro content: nicer reading and consistent blocks */
.prose {
    --tw-prose-body: rgba(132, 150, 160, 1);
}
.prose a {
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}
.prose a:hover {
    filter: brightness(1.08);
}
.prose blockquote {
    border-inline-start: 3px solid rgba(223, 173, 63, 0.55);
    background: rgba(21, 29, 33, 0.35);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}
.prose hr {
    border-color: rgba(223, 173, 63, 0.18);
}

/* Forms: consistent premium inputs everywhere */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"],
input[type="password"],
textarea,
select {
    border-radius: 0.75rem;
    border-color: rgba(38, 50, 56, 0.95);
}
input:focus,
textarea:focus,
select:focus {
    border-color: rgba(223, 173, 63, 0.65) !important;
    box-shadow: 0 0 0 3px rgba(223, 173, 63, 0.18);
}

/* Pagination: cleaner pills */
.pagination .nav-links,
.nav-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(223, 173, 63, 0.22);
    color: rgba(242, 239, 230, 0.9);
    background: rgba(21, 29, 33, 0.35);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.page-numbers:hover {
    transform: translateY(-2px);
    border-color: rgba(223, 173, 63, 0.5);
    background: rgba(223, 173, 63, 0.08);
}
.page-numbers.current {
    background: rgba(223, 173, 63, 0.18);
    border-color: rgba(223, 173, 63, 0.65);
    color: var(--foreground);
}

/* Blog/Product cards: consistent sheen + border */
article.group.bg-card,
.bg-card.rounded-2xl {
    backdrop-filter: blur(8px);
}

/* Footer links: tighter, premium underline */
footer a:hover {
    text-decoration: none;
    filter: brightness(1.08);
}

/* Page enter (subtle) */
body {
    animation: paperpackPageIn 0.35s ease-out both;
}

@keyframes paperpackPageIn {
    from { opacity: 0.01; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes paperpackSpin {
    to { transform: rotate(360deg); }
}

/* Scroll progress (top bar) */
.paperpack-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 12000;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
}
.paperpack-scroll-progress__bar {
    height: 100%;
    width: 100%;
    background: var(--gradient-gold);
    box-shadow: 0 0 18px rgba(223, 173, 63, 0.35);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.08s linear;
}

/* Direction helpers (useful for phone/email/numbers inside RTL) */
.dir-ltr {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: left;
}
.dir-rtl {
    direction: rtl;
    unicode-bidi: isolate;
    text-align: right;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--foreground);
    letter-spacing: -0.01em;
}

* {
    border-color: var(--border);
}

/* Ensure consistent font everywhere (forms/buttons/WP content) */
button,
input,
select,
textarea,
optgroup,
option {
    font-family: inherit;
}

/* Better focus visibility (keyboard users) */
:focus-visible {
    outline: 2px solid color-mix(in oklab, var(--ring) 78%, white);
    outline-offset: 3px;
}

/* Subtle selection */
::selection {
    background: color-mix(in oklab, var(--gold) 35%, transparent);
    color: var(--foreground);
}

/* Micro-interactions */
a,
button,
[role="button"] {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

/* Active/current link: gold border (menus) */
.current-menu-item > a,
.current_page_item > a,
.current-menu-ancestor > a {
    color: var(--gold);
    border-color: var(--gold);
}

/* If theme menus don't set a border, add a subtle underline */
.current-menu-item > a,
.current_page_item > a,
.current-menu-ancestor > a {
    border-bottom: 2px solid var(--gold);
    padding-bottom: 0.35rem;
}

/* Pressed state feedback */
a:active,
button:active,
[role="button"]:active {
    border-color: var(--gold);
}

/* Animated underline helper (opt-in) */
.link-underline {
    position: relative;
    text-decoration: none;
}
.link-underline::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.25em;
    height: 2px;
    transform: scaleX(0);
    transform-origin: right;
    background: color-mix(in oklab, var(--gold) 85%, white);
    transition: transform 0.25s ease;
    opacity: 0.9;
}
.link-underline:hover::after,
.link-underline:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Button press feel (opt-in) */
.pressable:active {
    transform: translateY(1px) scale(0.99);
}

/* Card sheen (opt-in) */
.sheen {
    position: relative;
    overflow: hidden;
}
.sheen::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(closest-side, rgba(212, 160, 51, 0.18), transparent 60%);
    transform: translate3d(-20%, 10%, 0) rotate(18deg);
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.5s ease;
    pointer-events: none;
}
.sheen:hover::before {
    opacity: 1;
    transform: translate3d(10%, -10%, 0) rotate(18deg);
}

/* Mobile menu: animate open/close instead of instant hide */
.paperpack-mobile-menu {
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    overflow: clip;
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease;
    will-change: max-height, opacity, transform;
}
.paperpack-mobile-menu.is-open {
    max-height: 480px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Custom Text/Bg Utilities handled by Tailwind config in functions.php, but adding fallbacks/extras here if needed */
.text-gradient-gold {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gradient utilities (used across templates) */
.bg-gradient-gold {
    background: var(--gradient-gold);
}
.bg-gradient-navy {
    background: var(--gradient-navy);
}
.shadow-gold {
    box-shadow: var(--shadow-gold);
}

/* Performance: skip rendering offscreen sections (mobile win) */
.cv-auto {
    content-visibility: auto;
    contain-intrinsic-size: 800px;
}

/* ودجت واتساب - زر ثابت في الموقع */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
    color: #fff;
}
.whatsapp-float:focus {
    outline: 2px solid #25d366;
    outline-offset: 2px;
    color: #fff;
}
.whatsapp-float svg {
    flex-shrink: 0;
}

/* بوب أب النماذج (صفحة المنتج) */
.paperpack-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: block;
    padding: 1rem;
}
.paperpack-modal-hidden {
    display: none !important;
}
.paperpack-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    cursor: pointer;
}
.paperpack-modal-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: 100%;
    max-width: 28rem;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
/* حقول النماذج داخل البوب أب - خلفية وحدود واضحة */
.paperpack-modal-box input[type="text"],
.paperpack-modal-box input[type="email"],
.paperpack-modal-box input[type="tel"],
.paperpack-modal-box textarea {
    display: block;
    width: 100%;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 0.375rem;
    padding: 0.625rem 0.75rem;
    color: #f1f5f9;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.paperpack-modal-box input::placeholder,
.paperpack-modal-box textarea::placeholder {
    color: rgba(148, 163, 184, 0.8);
}
.paperpack-modal-box input:focus,
.paperpack-modal-box textarea:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.7);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}
.paperpack-modal-close {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 0.25rem;
}
.paperpack-modal-close:hover {
    color: var(--foreground);
    background: var(--muted);
}

/* صفحة من نحن — نسخة الماكيت */
.about-page--mockup .about-mockup-hero {
    background: linear-gradient(180deg, hsl(200 30% 8%) 0%, hsl(200 28% 6%) 100%);
}

.paperpack-stats-section--cards .about-stat-card {
    min-height: 11rem;
}

@media (min-width: 768px) {
    .paperpack-stats-section--cards .about-stat-card {
        min-height: 12.5rem;
    }
}

/* صفحة من نحن — طبقة إضافية */
.about-page-hero .about-page-badge {
    box-shadow: 0 0 32px rgba(212, 160, 51, 0.12);
}

.about-page-story .about-page-story-p:first-of-type {
    font-size: 1.0625rem;
    color: var(--foreground);
    opacity: 0.92;
}

@media (min-width: 768px) {
    .about-page-story .about-page-story-p:first-of-type {
        font-size: 1.125rem;
    }
}

.about-page-cta-btn:hover {
    transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
    .about-page-cta-btn:hover {
        transform: none;
    }

    .about-value-card:hover {
        transform: none;
    }
}