/* Sultan Singh Website - Professional Corporate Animations */
/* Clean, modern, business-appropriate effects */

/* ============================================
   1. SMOOTH SCROLL BEHAVIOR
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   2. GEOMETRIC BACKGROUND ANIMATION
   ============================================ */
#corporate-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow: hidden;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
}

.corporate-shape {
    position: absolute;
    opacity: 0.08;
    animation: corporateFloat linear infinite;
    margin: 0;
    padding: 0;
}

.corporate-shape.circle {
    border-radius: 50%;
    background: linear-gradient(135deg, #C26148, #AC5039);
}

.corporate-shape.square {
    background: linear-gradient(135deg, #1D1F25, #2C2E35);
}

.corporate-shape.line {
    height: 3px;
    background: linear-gradient(90deg, transparent, #C26148, transparent);
}

@keyframes corporateFloat {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.08;
    }
    50% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg) scale(1.5);
        opacity: 0;
    }
}

/* ============================================
   3. GRID OVERLAY
   ============================================ */
#grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
    background-image: 
        linear-gradient(rgba(194, 97, 72, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(194, 97, 72, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 30s linear infinite;
}

/* Prevent animation containers from affecting layout */
body {
    margin: 0;
    padding: 0;
}

#corporate-bg,
#grid-overlay {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

/* ============================================
   4. FADE-IN ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

body > * {
    animation: fadeIn 0.6s ease-out forwards;
}

.wp-block-group,
.wp-block-columns,
.wp-block-media-text {
    animation: fadeInUp 0.8s ease-out forwards;
}

.wp-block-group:nth-child(2) { animation-delay: 0.1s; }
.wp-block-group:nth-child(3) { animation-delay: 0.2s; }
.wp-block-group:nth-child(4) { animation-delay: 0.3s; }

/* ============================================
   5. PROFESSIONAL HOVER EFFECTS
   ============================================ */
.wp-block-button__link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.wp-block-button__link:hover::before {
    left: 100%;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

a {
    transition: color 0.3s ease;
}

a:hover {
    color: var(--wp--preset--color--raft-accent, #C26148);
}

/* Navigation underline effect */
.wp-block-navigation-item__content {
    position: relative;
}

.wp-block-navigation-item__content::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--wp--preset--color--raft-accent, #C26148);
    transition: width 0.3s ease;
}

.wp-block-navigation-item__content:hover::after {
    width: 100%;
}

/* ============================================
   6. IMAGE EFFECTS
   ============================================ */
.wp-block-image {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-block-image:hover {
    transform: scale(1.02);
}

.wp-block-image img {
    transition: filter 0.3s ease;
}

.wp-block-image:hover img {
    filter: brightness(1.05);
}

/* ============================================
   7. CARD ELEVATION
   ============================================ */
.wp-block-media-text,
.wp-block-columns .wp-block-column {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-block-media-text:hover,
.wp-block-columns .wp-block-column:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

/* ============================================
   8. SCROLL REVEAL
   ============================================ */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   9. SEPARATOR SHINE
   ============================================ */
.wp-block-separator {
    position: relative;
    overflow: hidden;
}

.wp-block-separator::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(194, 97, 72, 0.3), transparent);
    animation: separatorShine 4s ease-in-out infinite;
}

@keyframes separatorShine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

/* ============================================
   10. RESPONSIVE CONTROLS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile Optimization - Reduce spacing */
@media (max-width: 768px) {
    /* Disable background animations on mobile */
    #corporate-bg,
    #grid-overlay {
        display: none;
    }
    
    /* Reduce container padding */
    .wp-block-group.has-background,
    .wp-block-group.alignfull {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Reduce navigation padding */
    header .wp-block-group {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    
    /* Reduce logo size on mobile */
    .wp-block-image img {
        max-width: 150px !important;
        height: auto !important;
    }
    
    /* Reduce section padding */
    .wp-block-group[style*="padding-top"] {
        padding-top: 1rem !important;
    }
    
    .wp-block-group[style*="padding-bottom"] {
        padding-bottom: 1rem !important;
    }
    
    /* Reduce spacer heights */
    .wp-block-spacer {
        height: 15px !important;
    }
    
    /* Reduce heading font sizes */
    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.3rem !important; }
    h4 { font-size: 1.1rem !important; }
    
    /* Reduce paragraph margins */
    p {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
        font-size: 0.95rem !important;
    }
    
    /* Optimize columns for mobile */
    .wp-block-columns {
        flex-direction: column !important;
    }
    
    .wp-block-column {
        flex-basis: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    /* Reduce button padding */
    .wp-block-button__link {
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem !important;
    }
    
    /* Optimize images */
    .wp-block-image img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Reduce separator margins */
    .wp-block-separator {
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }
}

/* Extra Small Mobile - Further optimizations */
@media (max-width: 480px) {
    /* Even tighter spacing */
    .wp-block-group.has-background,
    .wp-block-group.alignfull {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Smaller headings */
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.1rem !important; }
    
    /* Smaller logo */
    .wp-block-image img {
        max-width: 120px !important;
    }
    
    /* Reduce all margins */
    * {
        margin-left: 0.25rem !important;
        margin-right: 0.25rem !important;
    }
}

/* ============================================
   11. UTILITY CLASSES
   ============================================ */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
