/* Prevent horizontal overflow */
html, body {
    /* overflow-x: hidden;
    max-width: 100vw; */
    font-size: clamp(12px, 1.5vw, 16px);
}

.container {
    max-width: 100%;
}

.pattern-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 1rem 1rem;
    z-index: -1;
}

.hero-shape-1 {
    position: absolute;
    top: 10%;
    right: 15%;
    width: 150px;
    height: 150px;
    background-color: var(--color-primary);
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(50px);
    z-index: -1;
}

.hero-shape-2 {
    position: absolute;
    bottom: 10%;
    left: 15%;
    width: 120px;
    height: 120px;
    background-color: var(--color-primary);
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(50px);
    z-index: -1;
}

.clip-circle {
    clip-path: circle(50% at 50% 50%);
}

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

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

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(-1deg);
    }
}

@keyframes floatFast {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-25px) rotate(1deg);
    }
}

.hero-shape-3 {
    position: absolute;
    top: 15%;
    right: -10%;
    width: 280px;
    height: 280px;
    background-color: #55b5e7;
    border-radius: 50%;
    opacity: 0.8;
    z-index: -2;
    animation: float 4s ease-in-out infinite;
}

.hero-shape-4 {
    position: absolute;
    bottom: -30%;
    right: -5%;
    width: 350px;
    height:350px;
    background-color: var(--color-primary);
    opacity: 0.3;
    border-radius: 50%;
    z-index: -2;
    animation: floatSlow 6s ease-in-out infinite;
}

.hero-shape-5 {
    position: absolute;
    bottom: 5%;
    left: 0%;
    width: 210px;
    height: 210px;
    background: repeating-linear-gradient(
        0deg,
        var(--color-subtle-light),
        var(--color-subtle-light) 4px,
        transparent 4px,
        transparent 8px
    );
    border-radius: 50%;
    z-index: -2;
    animation: floatFast 3s ease-in-out infinite;
}

/* Services Page Shapes - Same Design as Home Page */
.services-shape-1 {
    position: absolute;
    top: 10%;
    right: 15%;
    width: 150px;
    height: 150px;
    background-color: var(--color-primary);
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(50px);
}

.services-shape-2 {
    position: absolute;
    bottom: 10%;
    left: 15%;
    width: 120px;
    height: 120px;
    background-color: var(--color-primary);
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(50px);
}

.services-shape-3 {
    position: absolute;
    top: 15%;
    right: -10%;
    width: 280px;
    height: 280px;
    background-color: #55b5e7;
    border-radius: 50%;
    opacity: 0.8;
    animation: float 4s ease-in-out infinite;
}

.services-shape-4 {
    position: absolute;
    bottom: -20%;
    right: -5%;
    width: 250px;
    height: 250px;
    background-color: var(--color-primary);
    opacity: 0.3;
    border-radius: 50%;
    animation: floatSlow 6s ease-in-out infinite;
}

/* .career .services-shape-4 {
    position: absolute;
    bottom: -20%;
    right: -5%;
    width: 250px;
    height: 250px;
    background-color: var(--color-primary);
    opacity: 0.3;
    border-radius: 50%;
    animation: floatSlow 6s ease-in-out infinite;
} */

.services-shape-5 {
    position: absolute;
    bottom: 5%;
    left: 0%;
    width: 210px;
    height: 210px;
    background: repeating-linear-gradient(
        0deg,
        var(--color-subtle-light),
        var(--color-subtle-light) 4px,
        transparent 4px,
        transparent 8px
    );
    border-radius: 50%;
    animation: floatFast 3s ease-in-out infinite;
}

/* Mobile Menu Styles */
#mobile-drawer {
    backdrop-filter: blur(4px);
}

#drawer-panel {
    box-shadow: -10px 0 25px -5px rgba(0, 0, 0, 0.1), -4px 0 6px -2px rgba(0, 0, 0, 0.05);
}

/* Smooth scroll behavior for anchor links */
html {
    scroll-behavior: smooth;
}

/* Ensure header and sticky navigation stay fixed */
header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 50 !important;
}

/* Ensure sticky alphabet navigation stays visible */
section[class*="sticky"] {
    position: sticky !important;
    z-index: 40 !important;
}

/* Resources Dropdown Menu */
nav .group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

nav .group:hover .group-hover\:visible {
    visibility: visible;
}

/* Responsive improvements */
@media (max-width: 640px) {
    /* Ensure images don't overflow on mobile */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Better button spacing on mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Improve text readability on small screens */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    /* Reduce hero shapes on mobile */
    .hero-shape-1 {
        width: 60px;
        height: 60px;
        top: 5%;
        right: 10%;
        opacity: 0.15;
    }
    
    .hero-shape-2 {
        width: 50px;
        height: 50px;
        bottom: 5%;
        left: 10%;
        opacity: 0.15;
    }
    
    /* Hide larger hero shapes on mobile */
    .hero-shape-3,
    .hero-shape-4,
    .hero-shape-5 {
        display: none;
    }
    
    /* Reduce services shapes on mobile */
    .services-shape-1 {
        width: 60px;
        height: 60px;
        top: 5%;
        right: 10%;
        opacity: 0.15;
    }
    
    .services-shape-2 {
        width: 50px;
        height: 50px;
        bottom: 5%;
        left: 10%;
        opacity: 0.15;
    }
    
    /* Hide larger services shapes on mobile */
    .services-shape-3,
    .services-shape-4,
    .services-shape-5 {
        display: none;
    }
}

/* Tablet responsive styles for hero and services shapes */
@media (min-width: 641px) and (max-width: 1024px) {
    /* Adjust hero shapes for tablets */
    .hero-shape-1 {
        width: 100px;
        height: 100px;
    }
    
    .hero-shape-2 {
        width: 80px;
        height: 80px;
    }
    
    .hero-shape-3 {
        width: 200px;
        height: 200px;
        right: -5%;
    }
    
    .hero-shape-4 {
        width: 250px;
        height: 250px;
        bottom: -20%;
    }
    
    .hero-shape-5 {
        width: 150px;
        height: 150px;
    }
    
    /* Adjust services shapes for tablets */
    .services-shape-1 {
        width: 100px;
        height: 100px;
    }
    
    .services-shape-2 {
        width: 80px;
        height: 80px;
    }
    
    .services-shape-3 {
        width: 200px;
        height: 200px;
        right: -5%;
    }
    
    .services-shape-4 {
        width: 200px;
        height: 200px;
        bottom: -15%;
    }
    
    .services-shape-5 {
        width: 150px;
        height: 150px;
    }
}

/* Ensure tables are scrollable on mobile */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Keyboard accessibility improvements */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 0.375rem;
}

/* Ensure mobile menu button is always focusable */
#mobile-menu-button:focus,
#close-drawer:focus,
#mobile-resources-toggle:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Skip to main content link for keyboard users */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

/* Contact Form Enhancements */
input[type="email"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 87, 120, 0.1);
}

/* File upload area hover effect */
input[type="file"] + label:hover {
    background-color: rgba(0, 87, 120, 0.05);
}

/* Form input transitions */
input, textarea {
    transition: all 0.2s ease-in-out;
}

input:hover, textarea:hover {
    border-color: var(--color-primary);
}

/* Button hover effect */
button[type="submit"]:hover {
    background-color: var(--color-primary-dark);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* Prevent body scroll when drawer is open */
body.drawer-open {
    overflow: hidden;
}

/* Services Page Styles */
.service-list-item {
    transition: all 0.3s ease;
}

.service-list-item:hover {
    transform: translateX(8px);
}

.service-list-item .material-icons-outlined {
    transition: all 0.3s ease;
}

.service-list-item:hover .material-icons-outlined {
    transform: scale(1.1);
}

/* Plus Sign Animation */
.plus-divider {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Service Section Background Patterns */
.services-bg-pattern {
    background-image: radial-gradient(circle, rgba(58, 123, 185, 0.1) 1px, transparent 1px);
    background-size: 2rem 2rem;
}

/* FAQ Accordion Styles */
.faq-toggle {
    cursor: pointer;
    outline: none;
    border: none;
    background: transparent;
}

.faq-toggle:focus {
    outline: 0 !important;
    outline-offset: 0 !important;
    border-radius: 0 !important;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 0;
    padding-bottom: 0;
}

.faq-content.open {
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* FAQ Card Enhancements */
.faq-item {
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
}

#mobile-menu-button:focus, #close-drawer:focus, #mobile-resources-toggle:focus {
    outline: 0 !important;
    outline-offset: 0 !important;
    border: 0 !important;
    --tw-ring-offset-width: 0px !important;
    --tw-ring-color: transparent !important;
}

.secondary-text {
    color: #55b5e7;
}