/* MetaAdsWala - Global Responsive Styles */

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

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

/* Responsive headline sizing for very small screens */
@media (max-width: 374px) {
    h1 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.125rem !important;
    }
}

/* ==========================================================================
   Navigation Enhancements
   ========================================================================== */

/* Mobile link styling */
.mobile-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.mobile-link:hover,
.mobile-link:focus {
    background-color: #f1f5f9;
    color: #0F4C81;
}

/* Nav scroll state */
nav.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Background Blobs - Responsive
   ========================================================================== */

/* Limit blob sizes on mobile to prevent overflow */
@media (max-width: 640px) {
    .animate-blob,
    [class*="bg-"][class*="blur-3xl"] {
        max-width: 300px;
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .animate-blob,
    [class*="bg-"][class*="blur-3xl"] {
        max-width: 400px;
        max-height: 400px;
    }
}

/* ==========================================================================
   Hero Section Floating Elements
   ========================================================================== */

/* Make floating cards responsive */
.floating-card {
    position: absolute;
    z-index: 20;
}

@media (max-width: 1024px) {
    /* Hide floating elements on tablets and below for cleaner mobile experience */
    .floating-element {
        display: none;
    }
}

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

@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

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

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

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

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .animate-blob,
    .animate-pulse,
    [class*="animate-"] {
        animation: none !important;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   Text Gradient
   ========================================================================== */

.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(to right, #2B6CB0, #FF4757);
}

/* ==========================================================================
   Scroll Reveal Utility
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Cards & Components
   ========================================================================== */

/* Service cards responsive */
@media (max-width: 640px) {
    .service-card {
        padding: 1.5rem;
    }
}

/* Stats cards */
@media (max-width: 374px) {
    .stat-card h3 {
        font-size: 1.5rem !important;
    }
}

/* ==========================================================================
   Tables - Comparison Section Responsive
   ========================================================================== */

/* Make comparison tables scrollable on mobile */
.comparison-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .comparison-table {
        min-width: 600px;
    }
    
    /* Stack comparison table on very small screens */
    .comparison-row {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .comparison-row > div {
        text-align: left !important;
    }
}

/* ==========================================================================
   Forms - Contact Page
   ========================================================================== */

/* Better touch targets on mobile */
@media (max-width: 640px) {
    input,
    select,
    textarea,
    button {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

@media (max-width: 768px) {
    footer {
        text-align: center;
    }
    
    footer ul {
        margin-top: 1rem;
    }
}

/* ==========================================================================
   Mobile Sticky CTA
   ========================================================================== */

.mobile-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background-color: white;
    border-top: 1px solid #e2e8f0;
    padding: 0.75rem;
    display: flex;
    gap: 0.75rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .mobile-sticky-cta {
        display: none;
    }
}

/* ==========================================================================
   Container Padding Adjustments
   ========================================================================== */

@media (max-width: 374px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* ==========================================================================
   Image Optimization
   ========================================================================== */

/* Lazy loading placeholder */
img[loading="lazy"] {
    background-color: #f1f5f9;
}

/* Hero images */
@media (max-width: 640px) {
    .hero-image {
        max-width: 280px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Button Enhancements
   ========================================================================== */

/* Better touch feedback */
button,
a[role="button"],
.btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Full width buttons on mobile */
@media (max-width: 640px) {
    .btn-responsive {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Grid Fixes
   ========================================================================== */

/* Ensure grids don't break on small screens */
@media (max-width: 374px) {
    .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Partner Logos Section
   ========================================================================== */

@media (max-width: 640px) {
    .partner-logos {
        gap: 1.5rem;
    }
    
    .partner-logos img {
        height: 40px;
    }
}

/* ==========================================================================
   Floating Elements Animation Fix
   ========================================================================== */

/* Prevent floating elements from causing overflow */
@media (max-width: 1024px) {
    [class*="absolute"][class*="-right-"],
    [class*="absolute"][class*="-left-"] {
        right: 0 !important;
        left: 0 !important;
    }
}

/* ==========================================================================
   Services Grid on Mobile
   ========================================================================== */

@media (max-width: 640px) {
    .services-grid .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .services-grid .service-icon img {
        width: 36px;
        height: 36px;
    }
}

/* ==========================================================================
   Process Steps Timeline
   ========================================================================== */

@media (max-width: 768px) {
    .process-timeline::before {
        display: none;
    }
}

/* ==========================================================================
   Safe Areas for Notched Devices
   ========================================================================== */

@supports (padding: env(safe-area-inset-bottom)) {
    .mobile-sticky-cta {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }
    
    footer {
        padding-bottom: calc(3rem + env(safe-area-inset-bottom));
    }
}

/* ==========================================================================
   Focus States for Accessibility
   ========================================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0F4C81;
    outline-offset: 2px;
}

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

@media print {
    .mobile-sticky-cta,
    nav,
    .animate-blob {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}