/* ======================
   Modern Design System - Integral Solutions
   Primary Color: #f37d21 (Tango Orange)
   ====================== */

/* ======================
   Global Styles
   ====================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #111827;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

/* ======================
   Modern Animations
   ====================== */

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

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

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Blob Animation for Modern Hero */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(50px, 50px) scale(1.05);
    }
}

.animate-blob {
    animation: blob 10s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-400 {
    animation-delay: 0.4s;
}

.animation-delay-600 {
    animation-delay: 0.6s;
}

.animate-fade-in {
    animation: fadeIn 0.7s ease-in-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-slide-in {
    animation: slideInFromTop 0.3s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out;
}

/* ======================
   Header Styles
   ====================== */

.header-scrolled {
    background-color: rgba(17, 24, 39, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 0 20px rgba(243, 125, 33, 0.1);
    padding: 0.75rem 0 !important;
}

.header-scrolled #logo {
    color: white !important;
}

.header-scrolled .nav-link {
    color: #e5e7eb !important;
}

.header-scrolled #mobile-menu-btn {
    color: #e5e7eb !important;
}

.nav-link.active span {
    width: 100% !important;
    background-color: #f37d21 !important;
}

.mobile-nav-link.active {
    background-color: rgba(243, 125, 33, 0.1);
    color: #f37d21;
}

/* ======================
   Hero Section
   ====================== */

.hero-slide {
    position: absolute;
    inset: 0;
    transition: all 1s ease-in-out;
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-overlay {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: brightness(0.75);
}

.gradient-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.8));
}

/* ======================
   Glass Effect
   ====================== */

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ======================
   Card Hover Effects
   ====================== */

.service-card, .product-card, .team-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.service-card:hover, .team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 30px -5px rgba(243, 125, 33, 0.3);
}

.product-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3), 0 0 40px -5px rgba(243, 125, 33, 0.4);
}

/* ======================
   Form Styles
   ====================== */

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: #f37d21;
    box-shadow: 0 0 0 3px rgba(243, 125, 33, 0.1);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

/* ======================
   Button Styles
   ====================== */

.btn-primary {
    background: linear-gradient(to right, #f37d21, #ff8c38);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(243, 125, 33, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(to right, #d96d1c, #f37d21);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(243, 125, 33, 0.4);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(243, 125, 33, 0.5);
    transform: translateY(-2px);
}

/* ======================
   Slider Dots
   ====================== */

.slider-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    padding: 0;
}

.slider-dot.active {
    background: linear-gradient(to right, #f37d21, #ff8c38);
    width: 2rem;
    border-radius: 0.375rem;
}

/* ======================
   Utility Classes
   ====================== */

.section-padding {
    padding: 6rem 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-gradient-orange {
    background: linear-gradient(to right, #f37d21, #ff8c38);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.divider {
    width: 6rem;
    height: 0.25rem;
    background: linear-gradient(to right, #f37d21, #ff8c38);
    margin: 0 auto;
}

/* ======================
   Scrollbar Styling
   ====================== */

::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #f37d21;
    border-radius: 5px;
}

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

/* ======================
   Loading States
   ====================== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ======================
   Responsive
   ====================== */

@media (max-width: 1024px) {
    /* Tablet optimizations */
    .service-card, .product-card {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    /* Tablet and mobile optimizations */
    .btn-primary, .btn-secondary {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    h1 {
        font-size: 2.5rem !important;
        line-height: 1.1 !important;
    }

    h2 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    h4 {
        font-size: 1.25rem !important;
    }

    /* Improve touch targets */
    button, a, input, select, textarea {
        min-height: 44px;
    }

    /* Service and product cards */
    .service-card, .product-card, .team-card {
        padding: 1rem;
    }

    /* Form elements larger for mobile */
    .form-input, .form-textarea, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 640px) {
    /* Mobile optimizations */
    .section-padding {
        padding: 3rem 0;
    }

    /* Reduce spacing on mobile */
    .container {
        padding: 0 0.75rem;
    }

    /* Adjust hero content */
    #home {
        min-height: 100vh;
        height: auto;
    }

    /* Stack grid items on mobile */
    .grid {
        gap: 1rem;
    }

    /* Chat bubbles */
    .chat-bubble {
        max-width: 85%;
        font-size: 0.875rem;
    }

    /* Reduce animation intensity on mobile for performance */
    .animate-blob {
        animation: none;
    }

    /* Simplify shadows on mobile */
    .shadow-2xl {
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    /* Reduce padding on small screens */
    .p-8 {
        padding: 1rem !important;
    }

    .p-6 {
        padding: 0.875rem !important;
    }
}

/* Landscape mobile */
@media (max-width: 896px) and (orientation: landscape) {
    #home {
        height: auto;
        min-height: 100vh;
    }

    .hero-content {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Already dark by default, but can add overrides if needed */
}

@media (max-width: 768px) {
    .btn-primary, .btn-secondary {
        width: 100%;
    }

    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 2rem !important;
    }
}

@media (max-width: 640px) {
    .section-padding {
        padding: 4rem 0;
    }
}

/* ======================
   Print Styles
   ====================== */

@media print {
    header, footer, #ai-chat-widget {
        display: none;
    }
}
/* ======================
   Chat Widget Styles
   ====================== */

#ai-chat-widget {
    display: block !important;
    visibility: visible !important;
}

#chat-button {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.bot {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    word-wrap: break-word;
    line-height: 1.5;
}

.chat-bubble.user {
    background: linear-gradient(to right, #f37d21, #ff8c38);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.chat-bubble.bot {
    background: #f3f4f6;
    color: #1f2937;
    border-bottom-left-radius: 0.25rem;
}

.typing-indicator {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Mobile chat optimizations */
@media (max-width: 640px) {
    #chat-button {
        width: 56px !important;
        height: 56px !important;
        bottom: 1.5rem !important;
        right: 1.5rem !important;
        display: flex !important;
        visibility: visible !important;
        z-index: 9999 !important;
    }

    #chat-window {
        width: calc(100vw - 2rem) !important;
        left: 1rem !important;
        right: 1rem !important;
        bottom: 1rem !important;
        max-width: calc(100vw - 2rem) !important;
    }

    .chat-bubble {
        max-width: 90%;
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
    }
}

/* ======================
   Touch Improvements for Mobile
   ====================== */

@media (hover: none) and (pointer: coarse) {
    /* Touch device optimizations */
    button, a, .clickable {
        -webkit-tap-highlight-color: rgba(243, 125, 33, 0.2);
    }

    /* Larger touch targets */
    button, a {
        min-height: 48px;
        min-width: 48px;
    }

    /* Remove hover effects on touch devices */
    .hover\:scale-110:hover,
    .group-hover\:scale-110:hover {
        transform: none;
    }
}