/* Company Name Font - Masque */
@font-face {
    font-family: 'Masque';
    /* Ensure the file name matches exactly (case-sensitive on some servers) */
    src: url('../Assets/Fonts/masque.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: #f8fafc; /* bg-slate-50 */
    background-image: radial-gradient(circle at top left, rgba(30, 58, 138, 0.03), transparent 30%),
                      radial-gradient(circle at bottom right, rgba(217, 119, 6, 0.03), transparent 40%);
}
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
/* Improve tap responsiveness on mobile */
a, button, input, select, textarea {
    touch-action: manipulation;
}
/* Animations for Company Name */
@keyframes roll-across {
    0% { left: -10%; }
    100% { left: 110%; }
}
@keyframes fly-across {
    0% { left: -10%; transform: translateY(0); }
    100% { left: 110%; transform: translateY(-20px); }
}
.animate-roll {
    position: absolute;
    animation: roll-across 15s linear infinite;
}
.animate-vibrate {
    animation: vibrate-machine 0.1s linear infinite;
}
.animate-fly {
    position: absolute;
    animation: fly-across 25s linear infinite;
}
@keyframes total-flash {
  50% {
    transform: scale(1.1);
    color: #d97706; /* secondary color */
  }
}
.flash-animation {
  animation: total-flash 0.5s ease-in-out;
}
@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.animate-bounce-subtle {
    animation: bounce-subtle 2s infinite ease-in-out;
}

/* Scroll-triggered animation styles */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Megamenu Styles */
.megamenu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* 12px */
    padding: 10px 14px; /* Optimized padding for mobile */
    border-radius: 6px;
    font-weight: 500;
    color: #4b5563; /* text-gray-600 */
    transition: all 0.2s ease-in-out;
}

.megamenu-link:hover {
    background-color: #f3f4f6; /* bg-gray-100 */
    color: #1e3a8a; /* text-primary */
    transform: translateX(4px);
}

/* Mobile Submenu Styles */
.mobile-submenu-link {
    display: block;
    padding: 10px 14px; /* Optimized padding for mobile */
    min-height: 44px;   /* Adjusted touch target size */
    border-radius: 6px;
    font-size: 0.9rem;
    color: #4b5563; /* text-gray-600 */
    transition: background-color 0.2s, color 0.2s;
}
.mobile-submenu-link:hover {
    background-color: #f9fafb; /* bg-gray-50 */
    color: #d97706; /* text-secondary */
}

/* Cart Animation */
@keyframes cart-bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: #d97706; }
    100% { transform: scale(1); }
}
.cart-animate {
    animation: cart-bump 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- High-Tech Modern UI Additions --- */

/* 1. Tech Grid Background (CSS only, no images) */
.bg-tech-grid {
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    pointer-events: none;
}

/* 2. Modern Slim Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 3. Gradient Text */
.text-gradient-primary {
    /* Reverted to solid color for WCAG AA compliance on contrast */
    color: #1e3a8a;
}

/* 4. Glassmorphism Service Card */
.service-card {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); /* shadow-lg */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card:hover {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); /* shadow-2xl */
    border-color: #1e3a8a; /* border-primary */
    transform: translateY(-4px);
}

/* --- High-Tech Modern UI Additions --- */

/* 1. Tech Grid Background (CSS only, no images) */
.bg-tech-grid {
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    pointer-events: none;
}

/* Subtle Dot Pattern for Grey Sections */
.bg-pattern-dots {
    background-image: radial-gradient(#e5e7eb 1.5px, transparent 1.5px);
    background-size: 24px 24px;
}

/* 2. Modern Slim Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Accessibility: Respect Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Fix for Mobile Navbar Overlap */
@media (max-width: 768px) {
    .animate-roll {
        display: none !important; /* Hide scrolling text on mobile to prevent overlap with buttons */
    }
}

#company-name {
    font-family: 'Masque', sans-serif;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    /* Fix for Hero Banner Text being too large on mobile */
    h1 {
        font-size: 1.75rem !important; /* Approx 28px */
        line-height: 1.2 !important;
    }
}

/* --- Loading Screen Styles --- */

#loader-wrapper {
    position: fixed;
    inset: 0;
    z-index: 99999; /* Highest priority */
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px; /* Creates the 3D depth */
    pointer-events: auto; /* Block clicks while loading */
}

/* The Lids (Background Split) */
.loader-section {
    position: fixed;
    left: 0;
    width: 100%;
    height: 51%; /* Slight overlap to prevent gap */
    /* Theme Background: Tech Grid + Blue Gradient */
    background-color: #111827;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at center, #1e3a8a 0%, #111827 100%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    z-index: 10000;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1); /* Smooth ease-in-out */
    will-change: transform;
}

.loader-section.section-top {
    top: 0;
    transform-origin: top;
}

.loader-section.section-bottom {
    bottom: 0;
    transform-origin: bottom;
}

.loaded #loader-wrapper {
    pointer-events: none; /* Allow clicks to pass through after animation */
}

/* Loaded State: Open Lids */
.loaded .loader-section.section-top {
    transform: translateY(-100%);
}

.loaded .loader-section.section-bottom {
    transform: translateY(100%);
}

/* The Logo Container (Elevated 3D Effect) */
#loader-logo-container {
    position: relative;
    z-index: 10001;
    width: 180px;
    height: auto;
    transition: opacity 0.3s ease-out, transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    transform-style: preserve-3d;
    /* Elevated towards user */
    transform: translateZ(50px) scale(1);
}

.loaded #loader-logo-container {
    opacity: 0;
    transform: translateZ(0) scale(0.5); /* Shrink away when opening */
}

/* Revolving Light Border Effect */
.logo-light-container {
    position: absolute;
    inset: 0;
    z-index: 10; /* Behind the main logo */
    transform: scale(1.05); /* Slightly larger to create border effect */
    
    /* Mask to the logo shape */
    -webkit-mask-image: url('../Assets/Others/logo.png');
    mask-image: url('../Assets/Others/logo.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    
    /* Glow effect */
    filter: drop-shadow(0 0 8px #d97706);
}

.logo-light-spinner {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 85%, #d97706 100%);
    animation: spin-light 2s linear infinite;
}

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

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 90vw;
    align-items: center;
}

.toast {
    background: rgba(30, 58, 138, 0.95); /* Primary color */
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    pointer-events: auto;
    backdrop-filter: blur(4px);
}

@media (max-width: 640px) {
    .toast-container {
        bottom: 16px;
        max-width: 80vw;
    }
    .toast {
        padding: 6px 12px;
        font-size: 0.75rem;
        gap: 5px;
        width: fit-content;
    }
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-left: 4px solid #22c55e; }
.toast.error { border-left: 4px solid #ef4444; background: rgba(17, 24, 39, 0.95); }
.toast.info { border-left: 4px solid #d97706; }

/* Ensure product card action buttons are always visible */
.product-actions-container {
    opacity: 1 !important;
    visibility: visible !important;
}