/* 
 * Salesgh - Fully Responsive Website Styles
 * Mobile-First Design Approach
 */

/* =================================
   GLOBAL STYLES & RESETS
   ================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for sticky header */
}

body {
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Prevent horizontal scrolling */
body, html {
    max-width: 100%;
    overflow-x: hidden;
}

/* =================================
   RESPONSIVE IMAGES
   ================================= */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =================================
   FLUID TYPOGRAPHY
   Mobile-first approach with scaling
   ================================= */

/* Base mobile typography */
h1 {
    font-size: clamp(1.75rem, 5vw, 3rem);
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.3;
}

h3 {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    line-height: 1.4;
}

p {
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.6;
}

/* =================================
   CONTAINER RESPONSIVE PADDING
   ================================= */

.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* =================================
   HEADER & NAVIGATION
   ================================= */

/* Add padding to body for fixed header */
body {
    padding-top: 100px;
}

@media (min-width: 640px) {
    body {
        padding-top: 90px;
    }
}

@media (min-width: 768px) {
    body {
        padding-top: 85px;
    }
}

@media (min-width: 1024px) {
    body {
        padding-top: 80px;
    }
}

/* Header responsive adjustments */
header {
    transition: box-shadow 0.3s ease;
}

header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Mobile menu z-index layering */
#mobile-menu {
    z-index: 9999;
}

#mobile-menu-panel {
    z-index: 10000;
}

/* =================================
   BUTTONS - TOUCH OPTIMIZED
   ================================= */

/* Minimum touch target size for mobile (44x44px) */
button,
a.button,
.btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Mobile-specific button adjustments */
@media (max-width: 640px) {
    button,
    a.button,
    .btn {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
}

/* =================================
   HERO SECTION - RESPONSIVE
   ================================= */

/* Mobile-first hero section */
section.hero,
section:first-of-type {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

@media (min-width: 768px) {
    section.hero,
    section:first-of-type {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

@media (min-width: 1024px) {
    section.hero,
    section:first-of-type {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* Hero image responsive */
.hero img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* =================================
   GRID SYSTEMS - RESPONSIVE
   ================================= */

/* Features grid responsive */
.grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grid {
        gap: 2rem;
    }
}

/* =================================
   CARDS - RESPONSIVE
   ================================= */

/* Feature cards mobile optimization */
.feature-card,
[class*="bg-gray-50"] {
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .feature-card,
    [class*="bg-gray-50"] {
        padding: 1.5rem;
    }
}

/* =================================
   PRICING CARDS - RESPONSIVE
   ================================= */

/* Pricing section mobile adjustments */
.pricing-card {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .pricing-card {
        padding: 2rem;
    }
}

/* =================================
   FORMS - MOBILE OPTIMIZED
   ================================= */

/* Form inputs touch-friendly sizing */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    min-height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    width: 100%;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* =================================
   TESTIMONIALS - RESPONSIVE
   ================================= */

.testimonial-card {
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .testimonial-card {
        padding: 1.5rem;
    }
}

/* Star ratings responsive */
.star-rating i {
    width: 1rem;
    height: 1rem;
}

@media (min-width: 768px) {
    .star-rating i {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* =================================
   FAQ SECTION - RESPONSIVE
   ================================= */

.faq-item {
    transition: all 0.3s ease;
}

.faq-item button {
    width: 100%;
    text-align: left;
    padding: 1rem;
}

@media (min-width: 768px) {
    .faq-item button {
        padding: 1.25rem;
    }
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-content.active {
    max-height: 500px;
}

/* =================================
   INTEGRATION LOGOS - RESPONSIVE
   ================================= */

.integration-logo {
    max-width: 120px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .integration-logo {
        max-width: 150px;
    }
}

/* =================================
   CONTACT SECTION - RESPONSIVE
   ================================= */

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* =================================
   FOOTER - RESPONSIVE
   ================================= */

footer {
    padding: 3rem 0 1.5rem;
}

@media (min-width: 768px) {
    footer {
        padding: 4rem 0 2rem;
    }
}

/* Footer social icons */
.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* =================================
   UTILITY CLASSES - RESPONSIVE
   ================================= */

/* Responsive spacing utilities */
.section-padding {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 4rem 0;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding: 5rem 0;
    }
}

/* Responsive text alignment */
.text-center-mobile {
    text-align: center;
}

@media (min-width: 768px) {
    .text-center-mobile {
        text-align: left;
    }
}

/* =================================
   ANIMATIONS & TRANSITIONS
   ================================= */

/* Smooth transitions */
.transition-all {
    transition: all 0.3s ease;
}

/* Hover effects (disabled on touch devices) */
@media (hover: hover) {
    .hover-lift:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
}

/* =================================
   PERFORMANCE OPTIMIZATIONS
   ================================= */

/* GPU acceleration for animations */
.animate {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* =================================
   ACCESSIBILITY
   ================================= */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #6A00F4;
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: #6A00F4;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* =================================
   PRINT STYLES
   ================================= */

@media print {
    header,
    footer,
    .no-print {
        display: none;
    }
    
    body {
        padding-top: 0;
    }
}

/* =================================
   BREAKPOINT-SPECIFIC ADJUSTMENTS
   ================================= */

/* Small Mobile (320px - 480px) */
@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-buttons a {
        width: 100%;
    }
}

/* Tablet Portrait (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        max-width: 720px;
    }
}

/* Tablet Landscape (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
}

/* Desktop (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
    .container {
        max-width: 1200px;
    }
}

/* Large Desktop (1441px+) */
@media (min-width: 1441px) {
    .container {
        max-width: 1400px;
    }
}

/* =================================
   LANDSCAPE ORIENTATION
   ================================= */

@media (orientation: landscape) and (max-height: 600px) {
    #mobile-menu-panel {
        max-height: 100vh;
        overflow-y: auto;
    }
}

/* =================================
   HIGH DPI DISPLAYS
   ================================= */

@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Sharper borders and shadows for retina displays */
    .card,
    .btn,
    input,
    textarea {
        -webkit-font-smoothing: antialiased;
    }
}

/* =================================
   DARK MODE SUPPORT (Optional)
   ================================= */

@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* =================================
   REDUCED MOTION
   ================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =================================
   CUSTOM SCROLLBAR (Desktop only)
   ================================= */

@media (min-width: 1024px) {
    ::-webkit-scrollbar {
        width: 10px;
    }
    
    ::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    ::-webkit-scrollbar-thumb {
        background: #6A00F4;
        border-radius: 5px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: #3A0CA3;
    }
}

/* =================================
   LOADING STATES
   ================================= */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* =================================
   MOBILE MENU ENHANCEMENTS
   ================================= */

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Mobile menu backdrop blur effect */
#mobile-menu {
    backdrop-filter: blur(4px);
}

/* Mobile menu slide animation enhancement */
@media (max-width: 1023px) {
    #mobile-menu-panel {
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
    }
}

/* =================================
   RESPONSIVE TABLES
   ================================= */

@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* =================================
   SECTION ID ANCHORS
   ================================= */

section[id] {
    scroll-margin-top: 80px;
}

/* =================================
   RESPONSIVE EMBED (Videos, Maps)
   ================================= */

.responsive-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.responsive-embed iframe,
.responsive-embed object,
.responsive-embed embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =================================
   BACK TO TOP BUTTON
   ================================= */

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #6A00F4;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(106, 0, 244, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #D902EE;
    box-shadow: 0 6px 16px rgba(217, 2, 238, 0.5);
    transform: translateY(-3px);
}

.back-to-top:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(106, 0, 244, 0.4);
}

/* Mobile optimization */
@media (max-width: 640px) {
    .back-to-top {
        width: 48px;
        height: 48px;
        bottom: 16px;
        right: 16px;
    }
}

/* Ensure it doesn't overlap with important content */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 70px; /* Higher position on mobile to avoid blocking footer content */
    }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
    .back-to-top {
        width: 52px;
        height: 52px;
        bottom: 24px;
        right: 24px;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .back-to-top {
        width: 56px;
        height: 56px;
        bottom: 30px;
        right: 30px;
    }
}

/* Accessibility - Focus state */
.back-to-top:focus-visible {
    outline: 3px solid #D902EE;
    outline-offset: 3px;
}

/* Smooth animation for page scroll */
html {
    scroll-behavior: smooth;
}

