/*
 * Accessibility Fixes for Clear Enterprise Website
 * - Color contrast improvements
 * - Mobile search UX enhancements
 * - Focus indicators
 */

/* ====================
   Color Contrast Fixes
   ==================== */

/* Language switcher - preserve desktop styling */
.lang-link {
    color: #2c3e50 !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #34495e !important;
    font-weight: 500 !important;
}

.lang-link.active {
    color: #ffffff !important;
    background-color: #3F88C5 !important;
    border-color: #3F88C5 !important;
}

.lang-link:hover {
    color: #ffffff !important;
    background-color: #2c3e50 !important;
    border-color: #2c3e50 !important;
}

/* CTA Button - maintain original design while ensuring accessibility */
.cta-button {
    color: #ffffff !important;
    background-color: #F26D6D !important; /* Original coral color */
    border: 2px solid #F26D6D !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.cta-button:hover {
    background-color: transparent !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
}

/* Process steps - improve text contrast */
.process-step h3 {
    color: #2c3e50 !important; /* Dark blue for headings */
}

.process-step p {
    color: #34495e !important; /* Slightly lighter but still high contrast */
}

/* Team section - improve subtitle contrast */
.section-subtitle {
    color: #2c3e50 !important;
    font-weight: 500 !important;
}

.team-member-position {
    color: #34495e !important;
    font-weight: 500 !important;
}

/* Submit button - maintain original styling */
.submit-button {
    color: #ffffff !important;
    background-color: #3F88C5 !important;
    border: 2px solid #3F88C5 !important;
    font-weight: 600 !important;
}

.submit-button:hover {
    color: #3F88C5 !important;
    background-color: #ffffff !important;
    border-color: #3F88C5 !important;
}

/* ====================
   Mobile Search UX
   ==================== */

/* Mobile-first approach */
@media (max-width: 768px) {
    /* Hide search box by default on mobile */
    .atlassian-search-box {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: white;
        border: 1px solid #ddd;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    /* Show search box when expanded */
    .atlassian-search-box.search-expanded {
        display: block;
    }

    /* Make search trigger more prominent on mobile */
    .atlassian-search-trigger {
        padding: 12px;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        transition: background-color 0.3s ease;
    }

    .atlassian-search-trigger:hover,
    .atlassian-search-trigger:focus {
        background: rgba(255, 255, 255, 0.2);
        outline: 2px solid #3F88C5;
        outline-offset: 2px;
    }

    /* Full-width search input on mobile */
    .atlassian-search-input {
        width: 100%;
        padding: 12px 16px;
        border: none;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    /* Search button in mobile */
    .atlassian-search-button {
        padding: 12px 16px;
        background: #3F88C5;
        color: white;
        border: none;
        cursor: pointer;
    }
}

/* Desktop search remains visible */
@media (min-width: 769px) {
    .atlassian-search-box {
        display: block !important;
    }
}

/* ====================
   Focus Indicators
   ==================== */

/* Improve focus indicators for keyboard navigation */
.atlassian-nav-link:focus,
.lang-link:focus,
.cta-button:focus,
.submit-button:focus,
.atlassian-search-button:focus,
.atlassian-search-input:focus {
    outline: 3px solid #3F88C5 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 1px rgba(63, 136, 197, 0.3) !important;
}

/* Remove default focus outline and add custom */
button:focus,
a:focus,
input:focus {
    outline: none;
}

/* High contrast focus for search trigger */
.atlassian-search-trigger:focus {
    outline: 3px solid #3F88C5;
    outline-offset: 2px;
    background: rgba(63, 136, 197, 0.1);
}

/* ====================
   Mobile Touch Targets
   ==================== */

/* Improve touch target sizes for mobile accessibility */
@media (max-width: 768px) {
    /* Social profile links - minimum 44px touch target */
    .social-profile-link {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 10px 12px !important;
        font-size: 12px !important;
    }

    /* Language switcher links - minimum 44px touch target */
    .lang-link {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 10px 12px !important;
    }

    /* Mobile menu toggle - ensure sufficient touch target */
    .atlassian-mobile-toggle {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Navigation close button */
    .atlassian-nav-close {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Search trigger - sufficient touch target */
    .atlassian-search-trigger {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Form submit buttons */
    .submit-button,
    .cta-button {
        min-height: 44px !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
    }

    /* Navigation flyout items */
    .atlassian-flyout-link {
        min-height: 44px !important;
        padding: 12px 16px !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Main navigation links */
    .atlassian-nav-link {
        min-height: 44px !important;
        padding: 12px 16px !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Mobile logo - ensure proper square sizing */
    .atlassian-logo picture source,
    .atlassian-logo picture img {
        width: auto !important;
        height: 40px !important; /* Fixed height for mobile */
        max-width: none !important;
    }

    .footer-logo picture source,
    .footer-logo picture img {
        width: auto !important;
        height: 60px !important; /* Larger for footer visibility */
        max-width: none !important;
    }

    /* Mobile-specific contrast improvements */
    .lang-link {
        color: #1a252f !important; /* Darker for mobile */
        background-color: #ffffff !important;
        border: 2px solid #1a252f !important;
        font-weight: 600 !important;
    }

    .lang-link.active {
        color: #ffffff !important;
        background-color: #1a252f !important;
        border-color: #1a252f !important;
    }

    .cta-button {
        background-color: #d63031 !important; /* Darker red for mobile */
        border-color: #d63031 !important;
        font-weight: 700 !important;
    }

    .submit-button {
        background-color: #2c3e50 !important; /* Darker blue for mobile */
        border-color: #2c3e50 !important;
    }

    .review-cta-button span {
        font-weight: 700 !important;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
    }

    body {
        color: #1a252f !important; /* Darker text for mobile */
    }

    /* Mobile hexagon optimization - smaller, more compact */
    .hexagon-menu-section {
        padding: var(--space-2xl) 0 !important; /* Reduce section padding */
    }

    .hexagon-menu-container {
        padding: var(--space-md) var(--space-sm) !important; /* Reduce container padding */
    }

    .hexagon-menu {
        grid-gap: 15px !important; /* Smaller gaps between hexagons */
        max-width: 350px !important; /* Constrain width on mobile */
    }

    .hexagon-item {
        padding-bottom: 85% !important; /* Make hexagons smaller (was 100% in mobile) */
    }

    .hexagon-content {
        padding: 15px !important; /* Reduce internal padding */
    }

    .hexagon-content h3 {
        font-size: 0.9rem !important; /* Smaller text */
        line-height: 1.2 !important;
    }

    .hexagon-details {
        padding: 20px !important; /* Reduce overlay padding */
    }

    .hexagon-details p {
        font-size: 0.75rem !important; /* Smaller description text */
    }

    .hexagon-details .btn {
        padding: 6px 12px !important; /* Smaller button */
        font-size: 0.7rem !important;
    }
}

/* Desktop-only subtle contrast improvements */
@media (min-width: 769px) {
    .lang-link {
        color: #1a252f !important; /* Slightly darker while keeping modern look */
        font-weight: 600 !important;
    }

    .lang-link.active {
        background-color: #2c3e50 !important; /* Darker blue for better contrast */
        border-color: #2c3e50 !important;
    }

    .cta-button {
        background-color: #e74c3c !important; /* Slightly darker red */
        border-color: #e74c3c !important;
    }

    .submit-button {
        background-color: #2c3e50 !important; /* Darker blue */
        border-color: #2c3e50 !important;
    }

    .review-cta-button span {
        font-weight: 600 !important;
    }

    body {
        color: #2c3e50 !important; /* Darker but not harsh */
    }
}

/* ====================
   Skip Navigation
   ==================== */

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #3F88C5;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 9999;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}