/* Custom Styles */
html {
    scroll-behavior: smooth;
    overflow-x: hidden !important;
    scrollbar-gutter: stable;
    width: 100%;
    max-width: 100vw;
}

/* Accessibility - Skip to content link */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
    position: fixed;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: #22c55e;
    color: white;
    z-index: 9999;
    border-radius: 0.5rem;
    text-decoration: none;
}

body {
    scroll-behavior: smooth;
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Prevent horizontal overflow from hover scale effects */
* {
    box-sizing: border-box;
}

/* Contain scaled elements to prevent overflow */
section {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* Ensure all containers prevent horizontal overflow */
.container {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Prevent horizontal scroll on main content */
main {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Hero section - prevent scrollbars */
#home {
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
}

#home .container,
#home .grid {
    overflow: hidden;
}

/* Ensure orbiting elements don't cause overflow */
/* Hero section orbiting animation - no scroll reveal, animate immediately */
/* Note: animate-spin-slow needs transform for rotation, so it's excluded from transform: none */
#home .aspect-square,
#home .aspect-square > div:first-child {
    animation-play-state: running !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Disable AOS animations for hero section animation container */
#home .aspect-square,
#home .aspect-square *,
#home [class*="animate-spin"] {
    pointer-events: none !important;
}

#home .aspect-square[data-aos],
#home .aspect-square [data-aos] {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    visibility: visible !important;
}

#home .aspect-square {
    overflow: visible !important;
    position: relative;
    isolation: isolate;
}

/* Clip only the background circle, not the orbiting elements */
#home .aspect-square > div:first-child {
    overflow: hidden;
    border-radius: 50%;
}

#home .animate-spin-slow {
    overflow: visible !important;
    position: absolute;
    inset: 0;
    contain: none;
    z-index: 5;
    pointer-events: none;
    /* Ensure animation runs immediately on page load, not on scroll */
    animation: spin 20s linear infinite !important;
    animation-play-state: running !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure orbiting elements are visible and properly positioned */
#home .animate-spin-slow > div {
    position: absolute;
    will-change: transform;
    z-index: 10;
    visibility: visible !important;
    opacity: 1 !important;
    /* Children shouldn't animate themselves, parent rotates them */
    animation: none !important;
}

/* Ensure orbiting icons are visible and properly styled */
#home .animate-spin-slow > div > div {
    position: relative;
    z-index: 10;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure icons inside are visible */
#home .animate-spin-slow i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #22c55e !important;
}

#home .floating-element {
    overflow: visible;
}

.container {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Ensure grid containers don't overflow */
.grid {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Prevent scale transforms from causing horizontal scroll */
[class*="scale"] {
    contain: layout style paint;
}

/* Custom cursor styles - prevent overflow */
.custom-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
    display: none; /* Hide by default - can be enabled if styled properly */
}

.custom-cursor.cursor-hover {
    width: 40px;
    height: 40px;
}

/* Particles.js container */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 0;
}

/* Grid Pattern Background */
.bg-grid-pattern {
    background-image: linear-gradient(to right, rgba(34, 197, 94, 0.1) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(34, 197, 94, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Floating Elements Animation */
.floating-element {
    position: absolute;
    left: var(--x);
    top: var(--y);
    animation: float 6s ease-in-out infinite;
    animation-delay: var(--delay);
}

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

/* Slow Spin Animation */
.animate-spin-slow {
    animation: spin 20s linear infinite;
}

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

/* Counter Animation */
.counter {
    position: relative;
    display: inline-block;
}

.counter::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #22c55e;
    animation: counter-line 2s ease-out forwards;
}

@keyframes counter-line {
    to {
        width: 100%;
    }
}


/* Service icon animations */
.service-icon-wrapper {
    position: relative;
    display: inline-block;
}

.service-icon {
    transition: transform 0.3s ease;
}

.service-icon-wrapper:hover .service-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Services horizontal scroll - only show scrollbar when content overflows */
.services-scroll-container {
    scrollbar-width: thin;
    scrollbar-color: #22c55e #1a1a1a;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Hide scrollbar when not needed */
.services-scroll-container:not(:hover)::-webkit-scrollbar {
    height: 0;
}

.services-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.services-scroll-container::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}

.services-scroll-container::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 10px;
}

.services-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #16a34a;
}

.services-wrapper {
    padding-bottom: 1rem;
}

.service-card {
    min-width: 320px;
    max-width: 320px;
}

/* Gradient animation */
.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 5s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Project image hover effect */
.project-image {
    position: relative;
    overflow: hidden;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(34, 197, 94, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Font display optimization */
@font-face {
    font-family: 'Font Awesome';
    font-display: swap;
}

/* Custom scrollbar - Hidden */
::-webkit-scrollbar {
    width: 0;
    display: none;
    background: transparent;
}

::-webkit-scrollbar-track {
    display: none;
    background: transparent;
}

::-webkit-scrollbar-thumb {
    display: none;
    background: transparent;
}

::-webkit-scrollbar-thumb:hover {
    display: none;
    background: transparent;
}

/* Hide scrollbar for Firefox */
* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Prevent layout shift from scrollbar - space is reserved even when scrollbar is hidden */

/* Hide browser extension overlays that might appear */
[class*="extension"],
[class*="browser-extension"],
[id*="extension"],
[id*="browser-extension"] {
    display: none !important;
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(45deg, #22c55e, #16a34a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hover effects for cards */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: visible;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.1);
}

/* Prevent scale hover effects from causing horizontal overflow */
[class*="hover:scale"] {
    transform-origin: center;
}

/* Ensure scaled elements don't overflow */
.transform {
    will-change: transform;
}

/* Custom focus styles */
.custom-focus:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

/* Loading animation */
.loading-dots::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

/* Mobile menu animation */
.mobile-menu-enter {
    transform: translateY(-100%);
    opacity: 0;
}

.mobile-menu-enter-active {
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-exit {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-exit-active {
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(45deg, #22c55e, #16a34a);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.3);
}

/* Section transitions */
.section-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom form styles */
.form-input {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(34, 197, 94, 0.2);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }

    /* Hero section adjustments */
    #home {
        padding-top: 6rem;
    }

    /* Adjust button sizes and spacing */
    .btn-primary {
        width: 100%;
        margin-bottom: 1rem;
    }

    /* Adjust stats section */
    .counter {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    /* Adjust floating elements */
    .floating-element {
        display: none;
    }

    /* Adjust 3D animation container */
    .aspect-square {
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Additional responsive adjustments */
@media (max-width: 640px) {
    /* Further text size adjustments */
    h1 {
        font-size: clamp(1.875rem, 7vw, 2.5rem);
    }

    p {
        font-size: clamp(1rem, 4vw, 1.125rem);
    }

    /* Adjust spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Adjust button padding */
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
    }
}

/* Ensure smooth transitions between breakpoints */
@media (min-width: 641px) and (max-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .aspect-square {
        max-width: 400px;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
}

/* Hero Heading Styles */
h1 {
    position: relative;
}

h1 > div {
    position: relative;
    overflow: hidden;
}

h1 > div > span {
    display: inline-block;
    position: relative;
    transform: translateY(100%);
    opacity: 0;
    animation: slideUp 0.5s forwards;
}

h1 > div:nth-child(1) > span {
    animation-delay: 0.2s;
}

h1 > div:nth-child(2) > span {
    animation-delay: 0.4s;
}

h1 > div:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hover effects for heading words */
h1 > div > span {
    transition: transform 0.3s ease, color 0.3s ease;
}

h1 > div:hover > span {
    transform: translateY(-2px);
}

h1 > div:hover > span.text-green-500 {
    color: #4ade80;
}

/* Gradient text effect for specific words */
h1 > div > span.text-white {
    background: linear-gradient(45deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 > div {
        justify-content: center;
    }
    
    h1 > div > span {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }
}

/* Meet the Team Section - Responsive */
#team {
    overflow-x: hidden !important;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
    /* Ensure no scrollbar appears during transitions */
    isolation: isolate;
}
#team .container {
    overflow-x: hidden !important;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    /* Clip any overflow during transitions */
    position: relative;
}
#team .grid {
    grid-template-columns: 1fr;
    overflow-x: hidden !important;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem 1.5rem;
    margin: 0;
    /* Add padding to accommodate scale effect during transitions */
    box-sizing: border-box;
    /* Ensure no horizontal scrollbar appears */
    position: relative;
    /* Reduce gap slightly to prevent overflow during scale */
    gap: 1.5rem !important;
}
@media (min-width: 640px) {
    #team .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 768px) {
    #team .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1024px) {
    #team .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
#team .rounded-lg {
    min-width: 0;
    overflow: visible;
    transform-origin: center;
}
#team a {
    will-change: transform;
    contain: layout style paint;
    box-sizing: border-box;
    /* Ensure scale effect is contained */
    transform-origin: center center;
}
#team a:hover {
    /* Ensure hover scale doesn't exceed container */
    z-index: 1;
    position: relative;
}
/* Prevent overflow during AOS animations */
#team [data-aos] {
    overflow: hidden;
    contain: layout style paint;
    /* Ensure animations don't cause overflow */
    transform-origin: center center;
    /* Prevent scrollbar during animation transitions */
    will-change: transform, opacity;
}

/* Prevent scrollbars during AOS animations on all pages */
/* Services page - sections with AOS animations */
section.py-20.bg-gray-900,
section.py-20.bg-gradient-to-br {
    overflow-x: hidden !important;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
}

section.py-20.bg-gray-900 .container,
section.py-20.bg-gradient-to-br .container {
    overflow-x: hidden !important;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
}

section.py-20.bg-gray-900 .grid,
section.py-20.bg-gradient-to-br .grid {
    overflow-x: hidden !important;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
}

/* Hero sections with AOS animations */
section.min-h-\[60vh\] {
    overflow-x: hidden !important;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
}

section.min-h-\[60vh\] .container {
    overflow-x: hidden !important;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
}

/* About page and team member page content sections */
section.bg-gray-900.relative,
section[class*="bg-gradient"].relative {
    overflow-x: hidden !important;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
}

section.bg-gray-900.relative .container,
section[class*="bg-gradient"].relative .container {
    overflow-x: hidden !important;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
}

section.bg-gray-900.relative .grid,
section[class*="bg-gradient"].relative .grid {
    overflow-x: hidden !important;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
}

/* All AOS animated elements should not cause overflow */
[data-aos] {
    overflow: hidden;
    contain: layout style paint;
    transform-origin: center center;
    will-change: transform, opacity;
}

/* Ensure team cards are properly contained during all transitions */
#team a,
#team a * {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

/* Additional overflow prevention for the entire section during any transition */
#team * {
    max-width: 100%;
}

/* Ensure grid items don't overflow */
#team .grid > * {
    min-width: 0;
    overflow: visible;
    contain: layout style paint;
}
#team img {
    width: 5rem;
    height: 5rem;
}
@media (min-width: 640px) {
    #team img {
        width: 6rem;
        height: 6rem;
    }
}

/* Simple Mobile Menu - Most Efficient Method */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none !important;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
}

.mobile-menu.open {
    display: block !important;
    pointer-events: all;
    visibility: visible;
    opacity: 1;
}

.mobile-menu-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu.open .mobile-menu-bg {
    opacity: 1;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 80%;
    background: #1f2937;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow-y: auto;
}

.mobile-menu.open .mobile-menu-panel {
    transform: translateX(0);
}

.mobile-menu-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.mobile-menu-close-btn:hover {
    color: #22c55e;
}

.mobile-menu-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #22c55e;
    margin: 2rem 0 2rem 0;
    text-align: center;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu-links a {
    display: block;
    padding: 0.875rem 1rem;
    color: #e5e7eb;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.mobile-menu-links a:hover {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.mobile-menu-contact {
    background: #22c55e;
    color: #fff !important;
    font-weight: 600;
    margin-top: 0.5rem;
    text-align: center;
}

.mobile-menu-contact:hover {
    background: #16a34a !important;
    color: #fff !important;
}

/* Services card sizes - reduced for both desktop and mobile */
.service-card {
    min-width: 256px; /* w-64 = 16rem = 256px */
    max-width: 256px;
}

/* Smooth scrolling for services container */
.services-scroll-container {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Services page grid cards - no fixed width, let grid handle it */
#services .service-card,
.services-grid .service-card {
    min-width: auto;
    max-width: 100%;
}

/* Services page - ensure proper spacing between cards */
section.py-20.bg-gray-900 .grid {
    gap: 2rem !important; /* 32px on mobile - gap-8 */
}

@media (min-width: 768px) {
    section.py-20.bg-gray-900 .grid {
        gap: 2.5rem !important; /* 40px on medium screens - gap-10 */
    }
}

@media (min-width: 1024px) {
    section.py-20.bg-gray-900 .grid {
        gap: 3rem !important; /* 48px on large screens - gap-12 */
    }
}

@media (max-width: 768px) {
    nav .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    nav .text-2xl {
        font-size: 1.5rem;
    }
    
    /* Services responsive - smaller cards for mobile */
    .service-card {
        min-width: 200px !important;
        max-width: 200px !important;
        padding: 0.875rem !important;
    }
    
    .service-card h3 {
        font-size: 0.95rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .service-card p {
        font-size: 0.7rem !important;
        line-height: 1.4 !important;
    }
    
    .service-icon-wrapper {
        margin-bottom: 0.75rem !important;
    }
    
    .service-icon-wrapper i {
        font-size: 1.75rem !important;
    }
}

/* SweetAlert Dark Theme Styling */
.swal-dark {
    background-color: #1f2937 !important;
    border: 1px solid #374151;
}

.swal-title-dark {
    color: #ffffff !important;
}

.swal-html-dark {
    color: #e5e7eb !important;
}

.swal2-popup {
    background-color: #1f2937 !important;
    color: #ffffff !important;
}

.swal2-title {
    color: #ffffff !important;
}

.swal2-content {
    color: #e5e7eb !important;
}

.swal2-confirm {
    background-color: #22c55e !important;
    border: none !important;
}

.swal2-confirm:hover {
    background-color: #16a34a !important;
}

.swal2-cancel {
    background-color: #6b7280 !important;
    border: none !important;
    color: #ffffff !important;
}

.swal2-cancel:hover {
    background-color: #4b5563 !important;
}

/* Marquee Container Styles - GSAP handles animations */
.services-scroll-container {
    position: relative;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-services,
.marquee-products {
    display: flex;
    gap: 1.5rem;
    will-change: transform;
    /* GSAP will handle the transform animation */
}

/* Smooth transitions for service cards */
.service-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(34, 197, 94, 0.1), 0 10px 10px -5px rgba(34, 197, 94, 0.04);
}

/* Ensure cards maintain their size during animation */
.marquee-services .service-card,
.marquee-products .service-card {
    flex-shrink: 0;
}

/* Page Loader styles are now in head.php as critical inline CSS to prevent FOUC */ 