
/* Mobile-First Responsive Design */

/* Base styles for mobile */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Container responsiveness */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

@media (min-width: 576px) {
    .container {
        padding: 0 20px;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 0 30px;
    }
}

@media (min-width: 992px) {
    .container {
        padding: 0 40px;
    }
}

/* Grid system fixes */
.grid {
    display: grid;
    gap: 1rem;
}

@media (max-width: 640px) {
    .grid-cols-1 {
        grid-template-columns: 1fr;
    }
    
    .md\:grid-cols-2,
    .lg\:grid-cols-3,
    .lg\:grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lg\:grid-cols-3,
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Card responsiveness */
.package-card,
.benefit-card,
.testimonial-card,
.service-card,
.value-card,
.stat-card,
.team-member {
    margin-bottom: 20px;
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .package-card,
    .benefit-card,
    .testimonial-card,
    .service-card,
    .value-card,
    .stat-card,
    .team-member {
        margin-bottom: 15px;
        transform: none !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    }

    .package-header,
    .member-info {
        padding: 20px 15px;
    }

    .package-name,
    .value-title,
    .member-name {
        font-size: 20px;
    }

    .stat-number {
        font-size: 36px;
    }

    .benefit-icon,
    .service-icon,
    .value-icon {
        font-size: 36px;
    }
}

/* Text responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
        line-height: 1.2;
    }

    h2 {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    h3 {
        font-size: clamp(1.2rem, 4vw, 1.5rem) !important;
        line-height: 1.3;
    }

    p {
        font-size: clamp(0.9rem, 3.5vw, 1rem);
        line-height: 1.4;
    }

    .text-xl {
        font-size: 1.1rem !important;
    }

    .text-lg {
        font-size: 1rem !important;
    }

    .text-4xl {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
    }

    .text-5xl {
        font-size: clamp(2rem, 6vw, 2.5rem) !important;
    }
}

/* Button responsiveness */
@media (max-width: 768px) {
    .cta-button,
    .animated-button,
    button,
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        margin: 10px 5px;
        width: auto;
        min-width: 120px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .block {
        display: block !important;
        width: 100%;
    }
}

/* Section spacing */
@media (max-width: 768px) {
    .py-16 {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

    .mb-16 {
        margin-bottom: 30px !important;
    }

    .mb-12 {
        margin-bottom: 25px !important;
    }

    .gap-8 {
        gap: 20px !important;
    }

    .space-x-12 > :not([hidden]) ~ :not([hidden]) {
        margin-left: 20px !important;
    }
}

/* Partner logos responsiveness */
@media (max-width: 768px) {
    .partner-logo-container {
        margin: 5px;
        padding: 10px;
        min-width: 80px;
    }

    .partner-logo-container img {
        max-height: 40px;
    }

    .partner-logo-container p {
        font-size: 10px;
        margin-top: 5px;
    }

    .flex.justify-center.items-center.space-x-12 {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .flex.justify-center.items-center.space-x-12 > * {
        margin: 0;
    }
}

/* Feature items mobile fix */
@media (max-width: 768px) {
    .feature-item {
        margin-bottom: 8px;
        padding: 8px 0;
        align-items: flex-start;
    }

    .feature-icon {
        margin-right: 10px;
        margin-top: 2px;
        font-size: 14px;
    }

    .feature-item span {
        font-size: 14px;
        line-height: 1.3;
    }
}

/* Testimonial fixes */
@media (max-width: 768px) {
    .testimonial-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .testimonial-card p {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 15px;
    }

    .flex.items-center {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .w-12.h-12 {
        width: 40px;
        height: 40px;
    }
}

/* Fix overlapping issues */
@media (max-width: 768px) {
    /* Ensure proper stacking context */
    .top-header {
        z-index: 1002;
    }

    .nav {
        z-index: 1001;
    }

    .mobile-nav {
        z-index: 9999;
    }

    .mobile-nav-overlay {
        z-index: 9998;
    }

    /* Fix content margins */
    main {
        margin-top: 0;
        padding-top: 0;
    }

    /* Ensure sections don't overlap */
    section {
        position: relative;
        z-index: 1;
        clear: both;
    }

    /* Fix any absolute positioned elements */
    .absolute {
        position: relative;
    }

    /* Fix flex items wrapping */
    .flex {
        flex-wrap: wrap;
    }

    .space-x-4 > :not([hidden]) ~ :not([hidden]) {
        margin-left: 0 !important;
        margin-top: 10px;
    }

    /* Fix grid layouts */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
}

/* Ultra-small screens */
@media (max-width: 375px) {
    .container {
        padding: 0 10px;
    }

    .header-content {
        padding: 0 10px;
    }

    .top-header-content {
        padding: 0 10px;
    }

    .nav-container {
        padding: 0 10px;
    }

    .logo-section img {
        height: 30px;
    }

    .company-info h1 {
        font-size: 16px;
    }

    .badge {
        font-size: 9px;
    }

    .years-badge {
        font-size: 9px;
        padding: 3px 6px;
    }
}

/* Fix for specific elements */
.overflow-hidden {
    overflow: hidden;
}

.text-center {
    text-align: center;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Fix any remaining layout issues */
@media (max-width: 768px) {
    .flex-col {
        flex-direction: column;
    }
    
    .md\:flex-row {
        flex-direction: column;
    }
    
    .md\:w-1\/2 {
        width: 100%;
    }
    
    .items-center {
        align-items: center;
    }
    
    .justify-center {
        justify-content: center;
    }
}
