/* ===========================
   GLOBAL STYLES & VARIABLES
   =========================== */

:root {
    --primary-color: #3b82f6;
    --secondary-color: #06b6d4;
    --accent-color: #8b5cf6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-3: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-1: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-2: 0 20px 60px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* ===========================
   ELEGANT TYPOGRAPHY
   =========================== */

.elegant-font {
    font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.hero-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* ===========================
   ANIMATIONS & TRANSITIONS
   =========================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===========================
   LOADING ANIMATION
   =========================== */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===========================
   NAVIGATION
   =========================== */


#navbar {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #3b82f6, #06b6d4);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}


/* ===========================
   BUTTONS & CTA
   =========================== */

.cta-button,
.cta-button-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.cta-button::before,
.cta-button-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before,
.cta-button-secondary:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:active,
.cta-button-secondary:active {
    transform: scale(0.95);
}

/* ===========================
   SERVICE CARDS
   =========================== */

.service-card {
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 1rem;
    z-index: -1;
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-icon {
    transform: rotate(12deg) scale(1.1);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.4);
}

/* ===========================
   PORTFOLIO ITEMS
   =========================== */

.portfolio-item {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.portfolio-item img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* ===========================
   FORM ELEMENTS
   =========================== */

input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

input,
textarea,
select {
    transition: all 0.3s ease;
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

/* ===========================
   SCROLL ANIMATIONS
   =========================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   BACKGROUND EFFECTS
   =========================== */

.bg-gradient-animated {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ===========================
   VIDEO BACKGROUND
   =========================== */

video {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Ensure video covers the entire container */
#home video {
    min-width: 100%;
    min-height: 100%;
}

/* ===========================
   ACCESSIBILITY
   =========================== */

/* Focus styles for keyboard navigation */
.keyboard-navigation *:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #3b82f6;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Ensure sufficient color contrast */
.text-low-contrast {
    color: #4b5563;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.125rem !important;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
    
    .service-card,
    .portfolio-item {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .cta-button,
    .cta-button-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* ===========================
   CUSTOM SCROLLBAR
   =========================== */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
}

/* ===========================
   UTILITY CLASSES
   =========================== */

.text-shadow {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===========================
   PERFORMANCE OPTIMIZATIONS
   =========================== */

/* GPU acceleration for animations */
.service-card,
.portfolio-item,
.cta-button,
.cta-button-secondary {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===========================
   PRINT STYLES
   =========================== */

@media print {
    video,
    .cta-button,
    .cta-button-secondary,
    #navbar,
    footer {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .service-card,
    .portfolio-item {
        page-break-inside: avoid;
    }
}

/* ===========================
   DELAY CLASSES FOR AOS
   =========================== */

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-700 {
    animation-delay: 0.7s;
}

.delay-1000 {
    animation-delay: 1s;
}

/* ===========================
   HOVER EFFECTS
   =========================== */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* ===========================
   GRADIENT TEXT
   =========================== */

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================
   FLOATING ANIMATION
   =========================== */

.float {
    animation: float 3s ease-in-out infinite;
}

/* ===========================
   SUCCESS INDICATOR
   =========================== */

.loaded {
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* ===========================
   CUSTOM SHAPES
   =========================== */

.shape-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.shape-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px;
}

/* ===========================
   PULSE ANIMATION
   =========================== */

.pulse-animation {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ===========================
   END OF STYLES
   =========================== */