/**
 * Eltzam Environmental Theme - Enhanced Styles
 * Custom CSS to improve visual design
 */

/* ========================================
   1. ENHANCED ANIMATIONS & EFFECTS
   ======================================== */

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

/* Enhanced neon glow effects */
.neon-glow {
    box-shadow: 0 0 10px rgba(13, 148, 136, 0.3),
                0 0 20px rgba(13, 148, 136, 0.2),
                0 0 30px rgba(13, 148, 136, 0.1);
}

.neon-glow-amber {
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3),
                0 0 20px rgba(245, 158, 11, 0.2),
                0 0 30px rgba(245, 158, 11, 0.1);
}

.neon-text {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5),
                 0 0 20px rgba(13, 148, 136, 0.3),
                 0 0 30px rgba(13, 148, 136, 0.2);
}

.neon-text-amber {
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5),
                 0 0 20px rgba(245, 158, 11, 0.3);
}

/* Enhanced button hover effects */
.btn-neon {
    position: relative;
    overflow: hidden;
}

.btn-neon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-neon:hover::before {
    left: 100%;
}

/* Pulse glow animation */
@keyframes glow-pulse {
    0%, 100% {
        text-shadow: 0 0 10px rgba(13, 148, 136, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(13, 148, 136, 0.8),
                     0 0 30px rgba(13, 148, 136, 0.5);
    }
}

.glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

/* Float animation for orbs */
@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

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

/* Particle glow */
@keyframes particle-glow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

.particle-glow {
    animation: particle-glow 3s ease-in-out infinite;
}

/* Flash animation for trust badges */
@keyframes flash {
    0%, 100% {
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.6),
                    0 0 30px rgba(245, 158, 11, 0.4);
    }
}

.trust-badge-flash {
    animation: flash 2s ease-in-out infinite;
}

/* Scale pulse */
@keyframes scale-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.scale-pulse {
    animation: scale-pulse 2s ease-in-out infinite;
}

/* Electric border effect */
@keyframes electric-border {
    0%, 100% {
        border-color: rgba(245, 158, 11, 0.5);
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.3);
    }
    50% {
        border-color: rgba(245, 158, 11, 0.8);
        box-shadow: 0 0 15px rgba(245, 158, 11, 0.5),
                    0 0 25px rgba(245, 158, 11, 0.3);
    }
}

.electric-border {
    animation: electric-border 2s ease-in-out infinite;
}

/* Icon pulse glow */
@keyframes icon-pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.8));
    }
}

.icon-pulse-glow {
    animation: icon-pulse-glow 2s ease-in-out infinite;
}

/* Glitch effect for title */
@keyframes glitch {
    0%, 100% {
        text-shadow: 2px 2px 0px rgba(13, 148, 136, 0.3),
                     -2px -2px 0px rgba(245, 158, 11, 0.3);
    }
    25% {
        text-shadow: -2px 2px 0px rgba(13, 148, 136, 0.3),
                     2px -2px 0px rgba(245, 158, 11, 0.3);
    }
    50% {
        text-shadow: 2px -2px 0px rgba(13, 148, 136, 0.3),
                     -2px 2px 0px rgba(245, 158, 11, 0.3);
    }
    75% {
        text-shadow: -2px -2px 0px rgba(13, 148, 136, 0.3),
                     2px 2px 0px rgba(245, 158, 11, 0.3);
    }
}

.glitch-effect {
    animation: glitch 4s ease-in-out infinite;
}

/* Bounce glow for scroll indicator */
@keyframes bounce-glow {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.8;
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
    }
    50% {
        transform: translateY(10px);
        opacity: 1;
        filter: drop-shadow(0 0 15px rgba(13, 148, 136, 0.8));
    }
}

.bounce-glow {
    animation: bounce-glow 2s ease-in-out infinite;
}

/* Stat number neon effect */
.stat-number-neon {
    text-shadow: 0 0 10px rgba(13, 148, 136, 0.5),
                 0 0 20px rgba(13, 148, 136, 0.3);
}

/* Flash animation for stats */
@keyframes flash-stat {
    0%, 100% {
        text-shadow: 0 0 10px rgba(13, 148, 136, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(13, 148, 136, 0.8),
                     0 0 30px rgba(13, 148, 136, 0.5);
    }
}

.flash-animation {
    animation: flash-stat 3s ease-in-out infinite;
}

/* Hover glow enhancement */
.hover-glow:hover {
    box-shadow: 0 0 20px rgba(13, 148, 136, 0.4),
                0 0 40px rgba(13, 148, 136, 0.2);
    transform: translateY(-2px);
}

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

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

/* ========================================
   2. TYPOGRAPHY IMPROVEMENTS
   ======================================== */

body {
    font-family: 'Cairo', 'Tajawal', 'Noto Sans Arabic', sans-serif;
    line-height: 1.7;
    color: #334155;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

/* Improved heading hierarchy */
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

/* ========================================
   3. CARD & SECTION STYLES
   ======================================== */

/* Service cards enhancement */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Project cards */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.project-card img {
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover::after {
    opacity: 1;
}

/* ========================================
   4. UTILITY CLASSES
   ======================================== */

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section padding consistency */
section {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
}

/* ========================================
   5. ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus visible styles */
*:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0d9488;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   6. RESPONSIVE IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Better mobile typography */
    body {
        font-size: 16px;
    }
    
    /* Improved touch targets */
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Content with Sidebar Layout */
.content-with-sidebar {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin: 2rem 0;
}

.content-with-sidebar #primary {
    flex: 1;
    min-width: 0;
}

.content-with-sidebar .sidebar {
    width: 320px;
    flex-shrink: 0;
}

@media (max-width: 992px) {
    .content-with-sidebar {
        flex-direction: column;
    }
    
    .content-with-sidebar .sidebar {
        width: 100%;
        order: -1;
    }
}

/* Sidebar Widget - Recent Posts */
.widget_recent_posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_recent_posts ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.widget_recent_posts ul li:last-child {
    border-bottom: none;
}

.widget_recent_posts a {
    display: block;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.widget_recent_posts a:hover {
    color: #0d9488;
}

.widget_recent_posts .post-date {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
}

/* Sidebar Widget - Categories */
.widget_categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_categories ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.widget_categories ul li:last-child {
    border-bottom: none;
}

.widget_categories ul li a {
    color: #1e293b;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
}

.widget_categories ul li a:hover {
    color: #0d9488;
}

/* Sidebar Widget - Contact CTA */
.widget_contact_cta .cta-button {
    display: inline-block;
    background: #0d9488;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.widget_contact_cta .cta-button:hover {
    background: #0f766e;
}

/* ========================================
   7. PRINT STYLES
   ======================================== */

@media print {
    .no-print,
    header,
    footer,
    .fixed {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 90%;
        opacity: 0.7;
    }
}
