/* Custom CSS for Meed Elektrik Website */

/* Font Family */
.font-inter {
    font-family: 'Inter', sans-serif;
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

/* Custom Color Variables */
:root {
    --primary-gold: #ba8f30;
    --secondary-dark: #4a4948;
    --accent-white: #ffffff;
    --bg-black: #000000;
    --bg-darker: #0a0a0a;
    --bg-gray-900: #111827;
    --bg-gray-800: #1f2937;
}

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

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(186, 143, 48, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(186, 143, 48, 0.6);
    }
}

/* New Modern Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spinReverse {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

@keyframes slideText {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    50% {
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes countUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animation classes */
.fade-in-up {
    animation: fadeInUp 1s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 1s ease-out;
}

.fade-in-right {
    animation: fadeInRight 1s ease-out;
}

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

.floating-element:nth-child(2) {
    animation-delay: -2s;
}

.floating-element:nth-child(3) {
    animation-delay: -4s;
}

/* New Modern Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

.animate-slide-in-left {
    animation: slideInFromLeft 1s ease-out;
}

.animate-slide-in-right {
    animation: slideInFromRight 1s ease-out;
}

.animate-spin-slow {
    animation: spinSlow 20s linear infinite;
}

.animate-spin-reverse {
    animation: spinReverse 15s linear infinite;
}

.animate-slide-text {
    animation: slideText 0.8s ease-out;
}

.animate-count-up {
    animation: countUp 0.6s ease-out;
}

/* Particle animations */
.particle {
    animation: float 4s ease-in-out infinite;
}

.particle:nth-child(1) { animation-delay: 0s; }
.particle:nth-child(2) { animation-delay: 1s; }
.particle:nth-child(3) { animation-delay: 2s; }
.particle:nth-child(4) { animation-delay: 0.5s; }
.particle:nth-child(5) { animation-delay: 1.5s; }

/* Geometric shapes */
.geometric-shape {
    border-radius: 8px;
    opacity: 0.3;
}

/* Slide text container */
.slide-text-container {
    position: relative;
    overflow: hidden;
}

.slide-text {
    display: inline-block;
    animation: slideText 1s ease-out;
}

/* Counter animation */
.counter {
    transition: all 0.3s ease;
}

/* Stat item hover effects */
.stat-item:hover .counter {
    transform: scale(1.1);
    color: #fbbf24;
}

/* Navigation styles */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* CTA Button styles */
.cta-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cta-button::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;
}

.cta-button:hover::before {
    left: 100%;
}

/* Service card hover effects */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(186, 143, 48, 0.1), transparent);
    transition: left 0.5s;
}

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

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

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 4px;
}

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

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(186, 143, 48, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-gold);
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .fade-in-up,
    .fade-in-left,
    .fade-in-right {
        animation: none;
    }
    
    .floating-element {
        display: none;
    }
}

/* Text selection */
::selection {
    background-color: var(--primary-gold);
    color: white;
}

/* Focus styles for accessibility */
button:focus,
a:focus {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}

/* Custom gradient backgrounds */
.gradient-gold {
    background: linear-gradient(135deg, var(--primary-gold), #d4af37);
}

.gradient-dark {
    background: linear-gradient(135deg, var(--bg-black), var(--bg-darker));
}

/* Grid pattern overlay */
.grid-pattern {
    background-image: 
        linear-gradient(rgba(186, 143, 48, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(186, 143, 48, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    width: 100%;
    height: 100%;
}

/* Modern Grid Pattern */
.grid-pattern-modern {
    background-image: 
        linear-gradient(rgba(186, 143, 48, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(186, 143, 48, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    width: 100%;
    height: 100%;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

/* Floating Orbs */
.floating-orb {
    animation: floatOrb 8s ease-in-out infinite;
}

.animate-float-slow {
    animation: floatOrb 12s ease-in-out infinite;
}

.animate-float-reverse {
    animation: floatOrbReverse 10s ease-in-out infinite;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(-10px) translateX(-10px);
    }
    75% {
        transform: translateY(-30px) translateX(5px);
    }
}

@keyframes floatOrbReverse {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(20px) translateX(-10px);
    }
    50% {
        transform: translateY(10px) translateX(10px);
    }
    75% {
        transform: translateY(30px) translateX(-5px);
    }
}

/* Stat Cards */
.stat-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(186, 143, 48, 0.1), transparent);
    transition: left 0.5s;
}

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

/* Enhanced Slide Animations */
.animate-slide-in-left {
    animation: slideInFromLeft 1s ease-out forwards;
    opacity: 0;
    transform: translateX(-50px);
}

.animate-slide-in-right {
    animation: slideInFromRight 1s ease-out forwards;
    opacity: 0;
    transform: translateX(50px);
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Parallax effect for hero section */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

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

/* Glow effects */
.glow-gold {
    box-shadow: 0 0 20px rgba(186, 143, 48, 0.3);
}

.glow-gold:hover {
    box-shadow: 0 0 30px rgba(186, 143, 48, 0.6);
}

/* Typography improvements */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em;
}

/* Button group spacing */
.button-group .cta-button:not(:last-child) {
    margin-right: 1rem;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    opacity: 0;
    transform: translateY(-10px);
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

/* Intersection Observer animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Custom utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Success/Error states */
.success {
    color: #10b981;
}

.error {
    color: #ef4444;
}

/* Custom form styles */
.form-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(186, 143, 48, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

