/* Elementor Specific Styles */

/* Category Filter Buttons */
.category-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.category-filter-buttons .filter-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #666666;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.category-filter-buttons .filter-button:hover {
    background-color: #007cba;
    color: #ffffff;
    text-decoration: none;
}

/* Active state - this should override everything */
.category-filter-buttons .filter-button.active {
    background-color: #007cba !important;
    color: #ffffff !important;
}

.category-filter-buttons .filter-button.active:hover {
    background-color: #005a87 !important;
}

/* Navigation Menu Styles */
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-menu .menu-item {
    position: relative;
}

.nav-menu .menu-item a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu .menu-item a:hover {
    color: #ffffff;
}

/* Active menu item styles */
.nav-menu .current-menu-item a,
.nav-menu .current_page_item a,
.nav-menu .current-page-ancestor a {
    color: #ef6c35 !important;
    font-weight: 600;
}

/* Active menu item underline */
.nav-menu .current-menu-item a::after,
.nav-menu .current_page_item a::after,
.nav-menu .current-page-ancestor a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ef6c35;
    border-radius: 1px;
}

/* Hover effect for non-active items */
.nav-menu .menu-item:not(.current-menu-item):not(.current_page_item) a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    right: 50%;
    height: 2px;
    background-color: #ffffff;
    border-radius: 1px;
    transition: left 0.3s ease, right 0.3s ease;
}

.nav-menu .menu-item:not(.current-menu-item):not(.current_page_item) a:hover::after {
    left: 0;
    right: 0;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.mobile-menu-close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--foreground);
    font-size: 24px;
    cursor: pointer;
    z-index: 1002;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

.hamburger {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 18px;
    justify-content: space-between;
}

.hamburger-line {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Header Layout */
.site-header {
    background: var(--background);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Mobile navigation styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        order: 3;
    }
    
    .mobile-menu-close {
        display: flex;
    }
    
    .header-container {
        position: relative;
    }
    
    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        border: 1px solid var(--border);
        border-radius: 0 0 8px 8px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .main-navigation.mobile-active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0 !important;
        padding: 1rem 0;
        width:100%
    }
    
    .nav-menu .menu-item {
        border-bottom: 1px solid var(--border);
        width: 100%;
        text-align: center;
    }
    
    .nav-menu .menu-item:last-child {
        border-bottom: none;
    }
    
    .nav-menu .menu-item a {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 16px;
        color: var(--foreground);
        width: 100%;
        text-align: left;
    }
    
    .nav-menu .menu-item a:hover,
    .nav-menu .current-menu-item a,
    .nav-menu .current_page_item a {
        color: #ffffff;
    }
    
    /* Header Actions Mobile */
    .header-actions {
        order: 2;
    }
    
    .header-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 14px;
    }
    
    /* Site Branding Mobile */
    .site-branding {
        order: 1;
        flex: 1;
    }
    
    .custom-logo-container {
        width: 120px !important;
        height: 50px !important;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* FontAwesome Icon Fix */
.fas, .far, .fab, .fal, .fad, .fat, .fass {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.far {
    font-weight: 400;
}

.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

/* Ensure icons display properly in widgets */
.modul8-strength-icon i,
.modul8-contact-icon i {
    display: inline-block;
    font-size: 24px;
    line-height: 1;
}

/* Logo Styling */
.custom-logo-container {
    align-items: center;
    overflow: hidden;
}

.custom-logo-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    max-width: none !important;
    max-height: none !important;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--foreground);
    font-weight: 600;
    font-size: 1.25rem;
}

.site-logo .logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

/* Elementor Container Overrides */
.elementor-container {
    max-width: 1200px;
}

.elementor-container.elementor-container-xl {
    max-width: 1400px;
}

/* Elementor Widgets Styling */
.elementor-widget-heading .elementor-heading-title {
    color: var(--foreground);
    line-height: 1.2;
}

.elementor-widget-text-editor {
    color: var(--muted-foreground);
    line-height: 1.6;
}

.elementor-widget-text-editor p {
    margin-bottom: 1rem;
}

.elementor-widget-button .elementor-button {
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.elementor-widget-button .elementor-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Primary Button Style */
.elementor-button-primary {
    background: var(--primary) !important;
    color: var(--primary-foreground) !important;
    border: none !important;
}

.elementor-button-primary:hover {
    background: var(--accent) !important;
    box-shadow: 0 10px 25px rgba(239, 108, 53, 0.3) !important;
}

/* Secondary Button Style */
.elementor-button-secondary {
    background: transparent !important;
    color: var(--foreground) !important;
    border: 2px solid var(--border) !important;
}

.elementor-button-secondary:hover {
    background: var(--card) !important;
    border-color: var(--primary) !important;
}

/* Elementor Icon Styling */
.elementor-widget-icon .elementor-icon {
    color: var(--primary);
}

.elementor-widget-icon-box .elementor-icon-box-icon {
    color: var(--primary);
}

.elementor-widget-icon-box .elementor-icon-box-title {
    color: var(--foreground);
    font-weight: 600;
}

.elementor-widget-icon-box .elementor-icon-box-description {
    color: var(--muted-foreground);
}

/* Elementor Image Widget */
.elementor-widget-image img {
    border-radius: 0.75rem;
    transition: transform 0.3s ease;
}

.elementor-widget-image:hover img {
    transform: scale(1.02);
}

/* Elementor Spacer */
.elementor-widget-spacer {
    background: transparent;
}

/* Elementor Section Styling */
.elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 1200px;
}

.elementor-section[data-settings*="background_background"] {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hero Section Specific */
.hero-section {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiNmZmYiIGZpbGwtb3BhY2l0eT0iMC4wNSI+PHBhdGggZD0ibTM2IDM0IDYtMi02LTJ6Ii8+PC9nPjwvZz48L3N2Zz4=');
    opacity: 0.1;
    pointer-events: none;
    z-index: 1;
}

.hero-section .elementor-container {
    position: relative;
    z-index: 2;
}

/* Service Cards */
.service-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.service-icon {
    background: rgba(239, 108, 53, 0.1);
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Case Study Cards */
.case-study-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.case-study-image {
    height: 200px;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-study-content {
    padding: 1.5rem;
}

/* Stats Cards */
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Trust Indicators - Legacy styles removed - now handled by hero widget */

/* Form Styling */
.elementor-widget-form .elementor-field-group {
    margin-bottom: 1rem;
}

.elementor-widget-form .elementor-field {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: var(--foreground);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.elementor-widget-form .elementor-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(239, 108, 53, 0.1);
}

.elementor-widget-form .elementor-form-fields-wrapper label {
    color: var(--foreground);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

/* Accordion Styling */
.elementor-widget-accordion .elementor-accordion-item {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.elementor-widget-accordion .elementor-tab-title {
    background: var(--card);
    color: var(--foreground);
    padding: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.elementor-widget-accordion .elementor-tab-title:hover {
    background: var(--primary);
    color: var(--primary-foreground);
}

.elementor-widget-accordion .elementor-tab-content {
    background: var(--background);
    color: var(--muted-foreground);
    padding: 1rem;
}

/* Progress Bar */
.elementor-widget-progress .elementor-progress-wrapper {
    background: var(--border);
    border-radius: 0.25rem;
    overflow: hidden;
}

.elementor-widget-progress .elementor-progress-bar {
    background: var(--primary);
}

/* Testimonial Styling */
.elementor-widget-testimonial .elementor-testimonial-content {
    color: var(--muted-foreground);
    font-style: italic;
    margin-bottom: 1rem;
}

/* Comprehensive Mobile Support */
@media (max-width: 480px) {
    /* Small Mobile Devices */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Typography - Mobile */
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.875rem; }
    
    /* Buttons - Mobile */
    .btn {
        padding: 0.625rem 1rem;
        font-size: 14px;
        min-width: auto;
    }
    
    /* Logo - Small Mobile */
    .custom-logo-container {
        width: 100px !important;
        height: 40px !important;
    }
    
    /* Navigation Menu - Small Mobile */
    .nav-menu .menu-item a {
        padding: 0.875rem 1rem;
        font-size: 15px;
    }
    
    /* Category Filter Buttons - Mobile */
    .category-filter-buttons {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .category-filter-buttons .filter-button {
        padding: 0.5rem 0.75rem;
        font-size: 14px;
        flex: 1;
        text-align: center;
        min-width: auto;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets for mobile */
    .btn,
    .filter-button,
    .nav-menu .menu-item a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Remove hover effects on touch devices */
    .elementor-widget-modul8_service_card .service-card:hover,
    .elementor-widget-modul8_case_study_card .case-study-card:hover,
    .elementor-widget-modul8_stats_counter .stat-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Add touch-active states */
    .touch-active {
        background-color: var(--primary) !important;
        color: var(--primary-foreground) !important;
        transform: scale(0.98);
    }
}

/* iOS Safari specific fixes */
.is-mobile-device input[type="text"],
.is-mobile-device input[type="email"],
.is-mobile-device input[type="tel"],
.is-mobile-device textarea {
    font-size: 16px !important; /* Prevents zoom on iOS */
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* Dynamic viewport height for mobile browsers */
.mobile-full-height {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
}

/* Landscape Phone Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .site-header {
        padding: 0.5rem 0;
    }
    
    .header-container {
        min-height: 60px;
    }
    
    .modul8-hero-section {
        padding: 2rem 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .custom-logo-container img {
        image-rendering: crisp-edges;
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .mobile-menu-toggle,
    .header-actions,
    .btn {
        display: none !important;
    }
    
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
}

.elementor-widget-testimonial .elementor-testimonial-name {
    color: var(--foreground);
    font-weight: 600;
}

.elementor-widget-testimonial .elementor-testimonial-job {
    color: var(--primary);
    font-size: 0.875rem;
}

/* Counter Widget */
.elementor-widget-counter .elementor-counter-number-wrapper {
    color: var(--primary);
    font-weight: 700;
    font-size: 3rem;
}

.elementor-widget-counter .elementor-counter-title {
    color: var(--foreground);
    font-weight: 600;
}

/* Social Icons */
.elementor-widget-social-icons .elementor-social-icon {
    background: var(--card);
    color: var(--foreground);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.elementor-widget-social-icons .elementor-social-icon:hover {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Responsive Design for Elementor */
@media (max-width: 1024px) {
    .elementor-container {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 0;
    }
    
    .service-card,
    .case-study-card,
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* Animation Classes for Elementor */
.elementor-invisible {
    opacity: 0;
}

.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fadeInUp {
    animation-name: fadeInUp;
}

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

.fadeIn {
    animation-name: fadeIn;
}

/* Custom Gradient Classes */
.gradient-bg {
    background: var(--gradient-hero);
}

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Badge Styling */
.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(239, 108, 53, 0.1);
    border: 1px solid rgba(239, 108, 53, 0.2);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
}
