/* ===========================
   Custom Styles for Hikma AI
   =========================== */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

/* Islamic Geometric Pattern - Dark */
.islamic-pattern {
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(16, 185, 129, 0.1) 35px, rgba(16, 185, 129, 0.1) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(16, 185, 129, 0.1) 35px, rgba(16, 185, 129, 0.1) 70px);
    background-size: 100px 100px;
}

/* Islamic Geometric Pattern - Light */
.islamic-pattern-light {
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255, 255, 255, 0.1) 35px, rgba(255, 255, 255, 0.1) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255, 255, 255, 0.1) 35px, rgba(255, 255, 255, 0.1) 70px);
    background-size: 100px 100px;
}

/* Feature Card Hover Effects */
.feature-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

/* Gradient Text Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.05);
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.delay-1000 {
    animation-delay: 1s;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #10b981, #059669);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #059669, #047857);
}

/* Mobile Menu Transition */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
}

#mobile-menu.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Card Shine Effect */
@keyframes shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite;
}

/* Scroll to Top Button Animation */
#scroll-top {
    transition: opacity 0.3s, transform 0.3s;
}

#scroll-top.show {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Islamic Star Pattern */
.star-pattern {
    position: relative;
}

.star-pattern::before {
    content: '✦';
    position: absolute;
    font-size: 2rem;
    color: rgba(245, 158, 11, 0.2);
    animation: twinkle 2s infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.8;
    }
}

/* Testimonial Card Hover Effect */
.testimonial-card {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.testimonial-card:hover {
    transform: translateY(-5px) rotateX(2deg);
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #10b981;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Gradient Border Animation */
@keyframes gradient-border {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-border {
    position: relative;
    background: linear-gradient(45deg, #10b981, #f59e0b, #10b981);
    background-size: 300% 300%;
    animation: gradient-border 3s ease infinite;
    padding: 2px;
    border-radius: 1rem;
}

.gradient-border-inner {
    background: white;
    border-radius: calc(1rem - 2px);
}

/* Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 1024px) {
    html {
        font-size: 14px; /* Reduced from 16px */
    }
}

@media (min-width: 1280px) {
    html {
        font-size: 15px; /* Reduced from 18px */
    }
}

/* Desktop-specific size reductions */
@media (min-width: 1024px) {
    /* Reduce hero section sizes */
    .hero-title {
        font-size: 2.5rem !important; /* Reduced from 4xl/6xl */
    }
    
    .hero-subtitle {
        font-size: 1.125rem !important; /* Reduced from lg/xl */
    }
    
    /* Reduce section padding */
    section {
        padding-top: 3rem !important; /* Reduced from py-20 */
        padding-bottom: 3rem !important;
    }
    
    /* Reduce feature card sizes */
    .feature-card {
        padding: 1.5rem !important; /* Reduced from p-8 */
    }
    
    /* Reduce button sizes */
    .btn-primary {
        padding: 0.75rem 1.5rem !important; /* Reduced from px-8 py-4 */
        font-size: 0.875rem !important;
    }
    
    /* Reduce image sizes */
    .hero-image {
        max-width: 400px !important;
        height: auto !important;
    }
    
    /* Reduce logo size */
    .logo {
        width: 2.5rem !important; /* Reduced from w-12 */
        height: 2.5rem !important; /* Reduced from h-12 */
    }
    
    /* Reduce navigation height */
    nav {
        height: 3.5rem !important; /* Reduced from h-16 */
    }
    
    /* Reduce section headers */
    .section-title {
        font-size: 2rem !important; /* Reduced from 3xl/5xl */
    }
    
    /* Reduce testimonial card padding */
    .testimonial-card {
        padding: 1.5rem !important; /* Reduced from p-8 */
    }
    
    /* Reduce CTA section padding */
    .cta-section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Reduce footer padding */
    footer {
        padding-top: 2rem !important; /* Reduced from py-12 */
        padding-bottom: 2rem !important;
    }
}

/* Hero Image Animation */
.hero-image {
    animation: float 6s ease-in-out infinite;
}

/* Prevent layout shift issues */
#home {
    position: relative;
    will-change: auto;
}

#home [data-aos] {
    will-change: transform, opacity;
}

/* Ensure stats remain visible */
.text-3xl.font-bold.text-emerald-600 {
    min-height: 2.25rem;
    display: block;
}

/* Prevent gap between sections */
section {
    position: relative;
    transform: translateZ(0);
}

/* Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #10b981, transparent);
    margin: 2rem 0;
}

/* Islamic Calligraphy Font Support */
.arabic-text {
    font-family: 'Amiri', serif;
    direction: rtl;
    text-align: right;
}

/* Custom Checkbox Styles (for future forms) */
input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #10b981;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

input[type="checkbox"]:checked {
    background: #10b981;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
}

/* Toast Notification Styles (for future use) */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

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

.box-shadow-lg {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

/* Dark Mode Support (for future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here when implementing dark mode toggle */
}

