/* PostExchange Custom Styles */

/* Accessibility: visible focus indicators (WCAG 2.4.7) */
:focus { outline: none; }
:focus-visible {
    outline: 2px solid #003366;
    outline-offset: 2px;
    border-radius: 4px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.35);
}

/* Screen-reader only utility (matches Tailwind sr-only) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}


/* Google Font */
html {
    overflow-x: hidden;
}
body {
    font-family: 'IBM Plex Serif', serif;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Defensive: prevent flex/grid item intrinsic content (esp. images, long words) from
   busting the viewport on tablet/mobile. Reported in audit at 664–768px and 375px. */
img, video, iframe, svg, picture {
    max-width: 100%;
    height: auto;
}
.min-w-0-children > * { min-width: 0; }
main .grid > *,
main .flex > * {
    min-width: 0;
}

/* Floating Orbs Animation */
@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-10px) translateX(-10px); }
    75% { transform: translateY(-30px) translateX(5px); }
}

@keyframes float-reverse {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(20px) translateX(-10px); }
    50% { transform: translateY(10px) translateX(10px); }
    75% { transform: translateY(30px) translateX(-5px); }
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    pointer-events: none;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: #fbbf24;
    top: 10%;
    left: -5%;
    animation: float 8s ease-in-out infinite;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: #003366;
    top: 60%;
    right: -5%;
    animation: float-reverse 10s ease-in-out infinite;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: #60a5fa;
    bottom: 10%;
    left: 30%;
    animation: float 12s ease-in-out infinite;
}

/* Navigation */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #003366;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

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

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #003366;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #003366;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* FAQ Accordion */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    border-top: 0 solid #f3f4f6;
    opacity: 0;
    transition: max-height 0.3s ease, padding-top 0.3s ease, padding-bottom 0.3s ease, border-top 0.3s ease, opacity 0.3s ease;
}

.faq-answer.open {
    max-height: 500px;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-top: 1px solid #f3f4f6;
    opacity: 1;
}

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

.faq-icon.rotated {
    transform: rotate(180deg);
}

/* Live Chat */
.chat-modal {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.chat-modal.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Gradient backgrounds */
.gradient-hero {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 50%, #f5f0ff 100%);
}

.gradient-dark {
    background: linear-gradient(135deg, #003366 0%, #001a33 50%, #002244 100%);
}

/* Blog category filter */
.category-btn {
    transition: all 0.3s ease;
}

.category-btn.active {
    background-color: #003366;
    color: white;
}

/* Testimonial cards */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* Step connector line */
.step-connector {
    position: absolute;
    top: 50%;
    left: 100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #fbbf24, #003366);
}

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

/* Counter animation */
.counter-value {
    transition: all 0.3s ease;
}

/* Page transitions */
.page-enter {
    opacity: 0;
    transform: translateY(10px);
}

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

/* Pricing table hover */
.pricing-card {
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: scale(1.02);
}

/* Form styling */
.form-input:focus {
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* Hide scrollbar for slider */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
