/* ═══════════════════════════════════════════════════════
   SEGAM Dental Clinic – Custom Styles
   Mirrors the React project's design system exactly.
   ═══════════════════════════════════════════════════════ */

:root {
    --radius: 1rem;
    --background: #FFFFFF;
    --foreground: #3A4C56;
    --card: #FFFFFF;
    --card-foreground: #3A4C56;
    --primary: #F2A48F;
    --primary-foreground: #3A4C56;
    --teal: #F2A48F;
    --teal-soft: #F5DCD3;
    --secondary: #F5DCD3;
    --muted: #FDFAFA;
    --muted-foreground: #3A4C56;
    --border: #F5DCD3;
    --ring: #F2A48F;
    --gradient-brand: linear-gradient(135deg, #F5DCD3 0%, #EE947B 100%);
    --gradient-dark: linear-gradient(135deg, #3A4C56 0%, #3A4C56 100%);
    --shadow-soft: 0 10px 30px -10px rgba(242, 164, 143, 0.40);
    --shadow-lift: 0 12px 25px -8px rgba(58, 76, 86, 0.12);
}

/* ────── Base ────── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

* {
    border-color: var(--border);
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
    font-family: 'Trajan Pro', 'Cinzel', serif !important;
    letter-spacing: -0.02em;
}

/* ────── Arabic Font Overrides ────── */
:lang(ar) body,
:lang(ar) h1,
:lang(ar) h2,
:lang(ar) h3,
:lang(ar) h4,
:lang(ar) p,
:lang(ar) a,
:lang(ar) span,
:lang(ar) button,
:lang(ar) input,
:lang(ar) textarea,
:lang(ar) label,
:lang(ar) .tagline-pill {
    font-family: 'Frutiger Arabic', 'Frutiger LT Arabic', 'Tajawal', ui-sans-serif, system-ui, sans-serif !important;
    letter-spacing: normal !important;
}

/* ────── Brand Utilities ────── */
.bg-gradient-brand {
    background: var(--gradient-brand);
}

.hover\:bg-gradient-brand:hover {
    background: var(--gradient-brand) !important;
}

.hover\:text-white:hover {
    color: #fff !important;
}

.text-gradient-brand {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.shadow-brand {
    box-shadow: var(--shadow-soft);
}

.shadow-soft {
    box-shadow: var(--shadow-soft);
}

.shadow-lift {
    box-shadow: var(--shadow-lift);
}

/* ────── Card Lift (matches React card-lift utility) ────── */
.card-lift {
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.7s ease, border-color 0.3s ease;
}

.card-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

/* ────── Tagline Pill (matches React Tagline component) ────── */
.tagline-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(242, 164, 143, 0.2);
    background: rgba(242, 164, 143, 0.05);
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ────── Pulse Ring (Hero video button) ────── */
.pulse-ring {
    animation: segam-pulse 2.4s ease-out infinite;
}

@keyframes segam-pulse {
    0% {
        transform: scale(1);
        opacity: 0.55;
    }

    70% {
        transform: scale(1.75);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* ────── Float Animation ────── */
.float-slow {
    animation: segam-float 7s ease-in-out infinite;
}

@keyframes segam-float {

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

    50% {
        transform: translateY(-14px);
    }
}

/* ────── Reveal Animation (matches Framer Motion whileInView) ────── */
.reveal {
    opacity: 0;
    transform: translateY(48px) rotateX(25deg) scale(0.92);
    transform-style: preserve-3d;
    perspective: 1200px;
    transition: opacity 1.3s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
}

/* ────── Navbar scroll state ────── */
.navbar-scrolled {
    box-shadow: var(--shadow-soft) !important;
    border-bottom-color: transparent !important;
}

/* ────── Before / After Comparison Slider ────── */
.ba-container {
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.ba-container img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ba-label {
    position: absolute;
    top: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.ba-label-before {
    left: 1rem;
    background: rgba(58, 76, 86, 0.7);
    color: #fff;
}

.ba-label-after {
    right: 1rem;
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.ba-handle {
    position: absolute;
    inset-block: 0;
    width: 3px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.ba-handle-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow-lift);
    display: grid;
    place-items: center;
    transition: transform 0.2s;
}

.ba-container:hover .ba-handle-knob {
    transform: translate(-50%, -50%) scale(1.1);
}

/* BA Carousel – 3D active/inactive (matches React scale/opacity) */
.before-after-swiper .swiper-wrapper {
    align-items: center;
}

.before-after-swiper .swiper-slide {
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.before-after-swiper .swiper-slide .ba-slide-inner {
    transition: transform 0.5s ease, opacity 0.5s ease;
    transform: scale(0.9);
    opacity: 0.5;
}

.before-after-swiper .swiper-slide-active .ba-slide-inner {
    transform: scale(1.1);
    opacity: 1;
    z-index: 10;
}

/* ────── Video Modal ────── */
#video-modal.active {
    display: flex;
}

/* ────── Toast ────── */
#toast.show {
    display: block;
    animation: toast-in 0.5s ease forwards;
}

#toast.hide {
    animation: toast-out 0.5s ease forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

/* ────── Review cards equal height ────── */
.reviews-swiper .swiper-slide {
    height: auto;
}

.reviews-swiper .swiper-slide>article {
    height: 100%;
}

/* ────── Service card icon hover (matches React group-hover) ────── */
.service-icon-wrap {
    transition: background 0.3s, color 0.3s;
}

/* Uploaded icon (svg/png/jpg — any format) rendered as a CSS mask so it
   always inherits `color` from its wrapper: colored by default, and
   whatever color the wrapper switches to on hover/state (e.g. white). */
.icon-mask {
    display: block;
    flex: 0 0 auto;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    transition: background-color 0.3s;
}

.service-card:hover .service-icon-wrap {
    background: var(--gradient-brand) !important;
    color: #fff !important;
}

/* ────── WhyUs icon hover ────── */
.why-icon {
    transition: transform 0.3s;
}

.why-icon:hover {
    transform: scale(1.1);
}

/* ────── Form focus styles ────── */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(242, 164, 143, 0.2);
}

/* ────── Custom scrollbar ────── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f4f6f8;
}

::-webkit-scrollbar-thumb {
    background: #F2A48F;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF7E67;
}

/* ────── Selection ────── */
::selection {
    background: rgba(242, 164, 143, 0.25);
}

/* ────── Responsive ────── */
@media (max-width: 639px) {
    /* Responsive adjustments */
}