@tailwind base;
@tailwind components;
@tailwind utilities;

/* Base Layer */
@layer base {
    html {
        scroll-behavior: smooth;
    }

    body {
        @apply overflow-x-hidden bg-white;
        font-family: 'Zain', sans-serif;
    }
}

/* Components Layer */
@layer components {

    /* ===== GRADIENTS ===== */
    .gradient-hero {
        background: linear-gradient(180deg, #FAFDFF 14.728%, #C3EAF9 100%);
    }

    .gradient-btn-pink {
        background: linear-gradient(90deg, #cd23a7 0%, #7f1469 100%);
    }

    .gradient-btn-pink-alt {
        background: linear-gradient(90deg, #cd23a7 0%, #a61a88 100%);
    }

    .gradient-topbar {
        background: linear-gradient(90deg, #1387b3 0%, #0d607f 100%);
    }

    .gradient-section {
        background: linear-gradient(270deg, #fdecf8 0%, #edf8fd 100%);
    }

    .gradient-footer {
        background: linear-gradient(0deg, #f5fcff 0%, #ffffff 100%);
    }

    .gradient-card-1 {
        background: linear-gradient(270deg, #fef6fc 0%, #f6fcfe 100%);
    }

    .gradient-card-2 {
        background: linear-gradient(270deg, #f6fcfe 0%, #fef6fc 100%);
    }

    .gradient-form-bg {
        background: linear-gradient(0deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.2) 100%);
    }

    /* ===== SERVICE CIRCLE ===== */
    .service-circle {
        @apply w-[275px] h-[275px] transition-transform duration-300;
    }

    .service-circle img {
        @apply w-full h-full object-cover;
    }

    /* ===== CARDS ===== */
    .testimonial-card {
        @apply p-6 rounded-4xl backdrop-blur-sm;
    }

    .form-card {
        @apply gradient-form-bg p-8 rounded-4xl backdrop-blur-sm;
    }

    /* ===== INPUTS ===== */
    .input-field {
        @apply w-full px-4 py-3 rounded-2xl border border-gray-50 bg-white text-right focus:outline-none focus:border-pink-primary transition-colors;
    }

    /* ===== NAVIGATION ===== */
    .nav-link {
        @apply text-teal-dark text-sm font-bold hover:text-pink-primary transition-colors;
    }

    .nav-link-active {
        @apply text-pink-primary text-sm font-bold;
    }

    /* ===== SOCIAL ICONS ===== */
    .social-icon {
        @apply w-8 h-8 rounded-full bg-white/80 flex items-center justify-center hover:bg-pink-primary hover:text-white transition-all duration-300;
    }

    .contact-from-wrapper {
        border-radius: 2rem;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.80) 0%, rgba(255, 255, 255, 0.20) 100%);
    }

    .testimonial-card {
        @apply relative;
    }

    .testimonial-card-inner {
        @apply relative z-[1];
    }

    .testimonial-card::before {
        content: '';
        position: absolute;
        top: 20px;
        left: 20px;
        width: 7.625rem;
        height: 7.625rem;
        background-size: cover;
        background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik05MS4xMTEyIDNDODcuNTE2MSAzIDg0LjA2ODIgNC40MjgxNyA4MS41MjYgNi45NzAzM0M3OC45ODM4IDkuNTEyNDkgNzcuNTU1NyAxMi45NjA0IDc3LjU1NTcgMTYuNTU1NlY1Ny4yMjIyQzc3LjU1NTcgNjAuODE3NCA3OC45ODM4IDY0LjI2NTMgODEuNTI2IDY2LjgwNzRDODQuMDY4MiA2OS4zNDk2IDg3LjUxNjEgNzAuNzc3OCA5MS4xMTEyIDcwLjc3NzhDOTIuOTA4OCA3MC43Nzc4IDk0LjYzMjggNzEuNDkxOSA5NS45MDM4IDcyLjc2MjlDOTcuMTc0OSA3NC4wMzQgOTcuODg5IDc1Ljc1OCA5Ny44ODkgNzcuNTU1NlY4NC4zMzMzQzk3Ljg4OSA4Ny45Mjg1IDk2LjQ2MDggOTEuMzc2NCA5My45MTg3IDkzLjkxODZDOTEuMzc2NSA5Ni40NjA3IDg3LjkyODYgOTcuODg4OSA4NC4zMzM0IDk3Ljg4ODlDODIuNTM1OSA5Ny44ODg5IDgwLjgxMTkgOTguNjAzIDc5LjU0MDggOTkuODc0Qzc4LjI2OTggMTAxLjE0NSA3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g4ODkgNi4yNTYyNCA5OC42MDMgNC45ODUxNiA5OS44NzRDMy43MTQwOSAxMDEuMTQ1IDMgMTAyLjg2OSAzIDEwNC42NjdWMTE4LjIyMkMzIDEyMC4wMiAzLjcxNDA5IDEyMS43NDQgNC45ODUxNiAxMjMuMDE1QzYuMjU2MjQgMTI0LjI4NiA3Ljk4MDIgMTI1IDkuNzc3NzggMTI1QzIwLjU2MzIgMTI1IDMwLjkwNyAxMjAuNzE1IDM4LjUzMzUgMTEzLjA4OUM0Ni4xNTk5IDEwNS40NjMgNTAuNDQ0NCA5NS4xMTg4IDUwLjQ0NDQgODQuMzMzM1YxNi41NTU2QzUwLjQ0NDQgMTIuOTYwNCA0OS4wMTYzIDkuNTEyNDkgNDYuNDc0MSA2Ljk3MDMzQzQzLjkzMiA0LjQyODE3IDQwLjQ4NCAzIDM2Ljg4ODkgM0gxNi41NTU2WiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==);
    }


    .mask {
        width: 200px;
        height: 200px;
        mask-repeat: no-repeat;
        margin: 0 auto;
    }

    .mask-1 {
        -webkit-mask-image: url(images/mask-1.svg);
        mask-image: url(images/mask-1.svg);
    }

    .mask-2 {
        -webkit-mask-image: url(images/mask-2.svg);
        mask-image: url(images/mask-2.svg);
    }

    .mask-3 {
        -webkit-mask-image: url(images/mask-3.svg);
        mask-image: url(images/mask-3.svg);
    }

    .mask-4 {
        -webkit-mask-image: url(images/mask-4.svg);
        mask-image: url(images/mask-4.svg);
    }
}

/* Utilities Layer */
@layer utilities {

    /* Animation Classes */
    .animate-float {
        animation: float 3s ease-in-out infinite;
    }

    /* Wave Animation Classes */
    .animate-wave {
        animation: wave 8s ease-in-out infinite;
    }

    .animate-wave-slow {
        animation: wave 10s ease-in-out infinite;
    }

    .animate-wave-fast {
        animation: wave 6s ease-in-out infinite;
    }

    /* RTL Helpers */
    .flip-x {
        transform: scaleX(-1);
    }

    /* Text Shadows */
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    /* Hover Scale */
    .hover-scale {
        @apply transition-transform duration-300 hover:scale-105;
    }

    /* Line Clamp */
    .line-clamp-3 {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Keyframe Animations */
@keyframes wave {

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

    50% {
        transform: translateX(-25px);
    }
}

@keyframes float {

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

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

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header Sticky State - Outside layers to prevent purging */
.header-sticky #top-bar {
    display: none !important;
}

/* Footer Widgets Layout */
@media (min-width: 1024px) {
    .gradient-footer .grid.lg\:grid-cols-3 {
        display: grid;
        grid-template-columns: 2fr 1fr 2fr;
    }
}

.about-widget,
.app-widget {
    flex: 2;
}

.quick-links-widget {
    flex: 1;
}
/* ===== LTR/RTL Support ===== */
html[dir="ltr"] .input-field {
    text-align: left;
}

html[dir="ltr"] .testimonial-card::before {
    left: auto;
    right: 20px;
}

html[dir="ltr"] .border-r-4 {
    border-right: 0;
    border-left: 4px solid;
}

/* Flip icons for LTR */
html[dir="ltr"] .flip-rtl {
    transform: scaleX(-1);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-switcher:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lang-switcher svg {
    width: 1rem;
    height: 1rem;
}
