/* ===== MOBILE RESPONSIVE FIXES ===== */
/* Ensures perfect alignment and layout on all mobile devices */

/* ===== 1. GENERAL MOBILE FIXES ===== */

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
}

/* Ensure all containers are mobile-friendly */
.container {
    width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
}

/* Fix any overflowing elements */
* {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Remove max-width from images to prevent overflow */
img {
    max-width: 100% !important;
    height: auto !important;
}

/* ===== 2. MOBILE BREAKPOINTS ===== */

/* Large Mobile Devices (430px - 575px) */
@media (max-width: 575px) {
    
    /* HEADER - Not sticky on mobile */
    .header {
        position: relative !important;
        padding: 0.8rem 0 !important;
    }
    
    .navbar {
        padding: 0.5rem 0 !important;
    }
    
    /* Hide logo image on mobile */
    .logo img {
        display: none !important;
    }
    
    .logo {
        gap: 0 !important;
    }
    
    .logo a {
        gap: 0 !important;
    }
    
    .logo-text-main {
        font-size: 1.2rem !important;
    }
    
    .logo-text-sub {
        font-size: 0.75rem !important;
    }
    
    .logo-tagline {
        font-size: 0.6rem !important;
    }
    
    /* Navigation - Mobile Menu */
    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 280px !important;
        height: 100vh !important;
        background: #FFFFFF !important;
        flex-direction: column !important;
        padding: 60px 20px 20px !important;
        transition: left 0.3s ease !important;
        z-index: 9998 !important;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1) !important;
        overflow-y: auto !important;
    }
    
    .nav-menu.active {
        left: 0 !important;
    }
    
    .nav-menu li {
        width: 100% !important;
        margin: 0 0 1rem 0 !important;
    }
    
    .nav-link {
        font-size: 1.1rem !important;
        padding: 0.8rem 1rem !important;
        display: block !important;
    }
    
    /* Hamburger Menu */
    .hamburger {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        width: 30px !important;
        height: 25px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        padding: 0 !important;
    }
    
    .hamburger span {
        width: 100% !important;
        height: 3px !important;
        background: #DC143C !important;
        transition: all 0.3s ease !important;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px) !important;
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0 !important;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px) !important;
    }
    
    /* Hide desktop buttons on mobile */
    .nav-buttons .btn {
        display: none !important;
    }
    
    /* HERO SECTION - Adjusted padding since header is not sticky */
    .hero {
        min-height: 100vh !important;
        padding-top: 2rem !important;
    }
    
    .hero-content {
        text-align: center !important;
        padding: 2rem 0 !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
        text-align: center !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        text-align: center !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-buttons {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
    }
    
    .hero-buttons .btn {
        width: 100% !important;
        max-width: 280px !important;
        padding: 0.9rem 1.5rem !important;
        font-size: 1rem !important;
        text-align: center !important;
        justify-content: center !important;
    }
    
    /* Hero Stats - Stack vertically */
    .hero-stats {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
        margin-top: 2rem !important;
    }
    
    .stat-item {
        width: 100% !important;
        max-width: 280px !important;
        padding: 1.2rem !important;
        text-align: center !important;
    }
    
    .stat-icon {
        font-size: 2rem !important;
    }
    
    .stat-item h3 {
        font-size: 2rem !important;
    }
    
    .stat-item p {
        font-size: 0.9rem !important;
    }
    
    /* Hero Slider Controls */
    .hero-slider-dots {
        right: 1rem !important;
        top: 50% !important;
    }
    
    .slider-dot {
        width: 8px !important;
        height: 8px !important;
    }
    
    .scroll-indicator {
        left: 1rem !important;
        bottom: 2rem !important;
        font-size: 0.8rem !important;
    }
    
    /* PAGE HEADERS - Adjusted since header is not sticky on mobile */
    .page-header {
        padding: 3rem 0 2rem 0 !important;
    }
    
    .page-header h1 {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
    }
    
    .page-header p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        text-align: center !important;
        padding: 0 1rem !important;
    }
    
    /* SECTIONS */
    section {
        padding: 3rem 0 !important;
    }
    
    .section-title {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
    }
    
    .section-badge {
        font-size: 0.85rem !important;
        padding: 0.4rem 1rem !important;
        display: inline-block !important;
        margin-bottom: 1rem !important;
    }
    
    /* WHY CHOOSE US SECTION */
    .why-choose-wrapper {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .why-choose-content h2 {
        font-size: 1.8rem !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
    }
    
    .why-choose-content > p {
        font-size: 1rem !important;
        text-align: center !important;
        line-height: 1.7 !important;
        margin-bottom: 2rem !important;
    }
    
    .features-list {
        gap: 1.2rem !important;
    }
    
    .feature-item {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 1rem !important;
    }
    
    .feature-icon {
        width: 60px !important;
        height: 60px !important;
    }
    
    .feature-text h4 {
        font-size: 1.1rem !important;
        text-align: center !important;
    }
    
    .feature-text p {
        font-size: 0.95rem !important;
        text-align: center !important;
        line-height: 1.6 !important;
    }
    
    /* ABOUT PAGE */
    .about-wrapper {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .about-text {
        text-align: center !important;
    }
    
    .about-text h2 {
        font-size: 1.8rem !important;
        text-align: center !important;
    }
    
    .about-text p {
        font-size: 0.95rem !important;
        text-align: center !important;
        line-height: 1.7 !important;
    }
    
    /* VALUES SECTION */
    .values-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .value-card {
        padding: 2rem 1.5rem !important;
    }
    
    .value-icon {
        width: 70px !important;
        height: 70px !important;
    }
    
    .value-card h3 {
        font-size: 1.3rem !important;
    }
    
    .value-card p {
        font-size: 0.95rem !important;
    }
    
    /* STATS SECTION */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .stat-box {
        padding: 1.5rem !important;
    }
    
    .stat-box h3 {
        font-size: 2.5rem !important;
    }
    
    .stat-box p {
        font-size: 1rem !important;
    }
    
    /* CONTACT PAGE */
    .contact-wrapper {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .contact-info-cards h2 {
        font-size: 1.8rem !important;
        text-align: center !important;
    }
    
    .contact-info-cards > p {
        font-size: 0.95rem !important;
        text-align: center !important;
    }
    
    .info-cards {
        gap: 1rem !important;
    }
    
    .info-card {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 1.5rem !important;
    }
    
    .info-icon {
        width: 50px !important;
        height: 50px !important;
    }
    
    .info-content {
        text-align: center !important;
    }
    
    .info-content h4 {
        font-size: 1.1rem !important;
        text-align: center !important;
    }
    
    .info-content a,
    .info-content p {
        text-align: center !important;
    }
    
    /* CONTACT FORM */
    .contact-form-wrapper {
        padding: 2rem 1.5rem !important;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 1rem !important;
        padding: 0.9rem 1.2rem !important;
    }
    
    .form-group label {
        font-size: 0.9rem !important;
    }
    
    /* SOCIAL CONNECT */
    .social-connect {
        text-align: center !important;
    }
    
    .social-connect h4 {
        text-align: center !important;
        font-size: 1.1rem !important;
    }
    
    .social-connect .social-links {
        justify-content: center !important;
    }
    
    .social-connect .social-links a {
        width: 45px !important;
        height: 45px !important;
    }
    
    /* CTA SECTION */
    .cta-content h2 {
        font-size: 1.8rem !important;
        text-align: center !important;
        line-height: 1.3 !important;
    }
    
    .cta-content p {
        font-size: 1rem !important;
        text-align: center !important;
    }
    
    .cta-buttons {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
    }
    
    .cta-buttons .btn {
        width: 100% !important;
        max-width: 280px !important;
    }
    
    /* FOOTER */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center !important;
    }
    
    .footer-column {
        text-align: center !important;
    }
    
    .footer-logo {
        justify-content: center !important;
    }
    
    .footer-column h4 {
        text-align: center !important;
        margin-bottom: 1rem !important;
    }
    
    .footer-column ul {
        text-align: center !important;
    }
    
    .footer-column ul li {
        text-align: center !important;
    }
    
    .social-links {
        justify-content: center !important;
    }
    
    .contact-info {
        text-align: center !important;
    }
    
    .contact-info li {
        justify-content: center !important;
        text-align: center !important;
    }
    
    .footer-bottom {
        text-align: center !important;
        padding: 1.5rem 0 !important;
    }
    
    .footer-bottom p {
        text-align: center !important;
        font-size: 0.85rem !important;
    }
    
    /* FLOATING BUTTONS */
    .floating-buttons {
        bottom: 1rem !important;
        right: 1rem !important;
        gap: 0.5rem !important;
    }
    
    .float-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
    }
    
    /* SCROLL TO TOP BUTTON */
    .scroll-top {
        width: 45px !important;
        height: 45px !important;
        bottom: 1rem !important;
        right: 1rem !important;
        font-size: 1.1rem !important;
    }
}

/* ===== 3. EXTRA SMALL DEVICES (320px - 430px) ===== */

@media (max-width: 430px) {
    
    /* Even more compact spacing */
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    .hero-title {
        font-size: 1.6rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
    }
    
    .page-header h1 {
        font-size: 1.5rem !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .hero-buttons .btn,
    .cta-buttons .btn {
        font-size: 0.9rem !important;
        padding: 0.8rem 1.2rem !important;
    }
    
    .stat-item {
        padding: 1rem !important;
    }
    
    .feature-icon,
    .value-icon {
        width: 55px !important;
        height: 55px !important;
    }
    
    .info-icon {
        width: 45px !important;
        height: 45px !important;
    }
}

/* ===== 4. LANDSCAPE MODE FIXES ===== */

@media (max-height: 600px) and (orientation: landscape) {
    
    .hero {
        min-height: auto !important;
        padding: 2rem 0 !important;
    }
    
    .page-header {
        padding: 3rem 0 2rem 0 !important;
    }
    
    .hero-title {
        font-size: 1.8rem !important;
    }
    
    .hero-stats {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 1rem !important;
    }
    
    .stat-item {
        width: calc(50% - 0.5rem) !important;
    }
}

/* ===== 5. TEXT ALIGNMENT FIXES ===== */

/* Ensure center alignment for headings on mobile */
@media (max-width: 767px) {
    h1, h2, h3, h4, h5, h6 {
        text-align: center !important;
    }
    
    .page-header h1,
    .page-header p,
    .section-title,
    .section-badge,
    .hero-title,
    .hero-subtitle,
    .cta-content h2,
    .cta-content p {
        text-align: center !important;
    }
    
    /* But keep form labels left-aligned */
    .form-group label {
        text-align: left !important;
    }
    
    /* And info card content when in column layout */
    .info-card .info-content {
        text-align: center !important;
    }
    
    .info-content h4,
    .info-content a,
    .info-content p {
        text-align: center !important;
    }
}

/* ===== 6. PREVENT OVERLAPPING ===== */

@media (max-width: 991px) {
    /* Ensure proper spacing between sections */
    section {
        padding: 3rem 0 !important;
    }
    
    /* Prevent content overflow */
    .hero-content,
    .about-text,
    .contact-info-cards {
        width: 100% !important;
        overflow: hidden !important;
    }
    
    /* Ensure buttons don't overflow */
    .btn {
        white-space: normal !important;
        word-wrap: break-word !important;
    }
}

/* ===== 7. TOUCH-FRIENDLY ELEMENTS ===== */

@media (max-width: 767px) {
    /* Make all clickable elements larger */
    a, button, .btn {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    /* Larger tap targets */
    .nav-link {
        padding: 1rem !important;
    }
    
    .social-links a {
        width: 48px !important;
        height: 48px !important;
    }
}

/* ===== 8. HIDE DESKTOP-ONLY ELEMENTS ===== */

@media (max-width: 991px) {
    /* Hide scroll indicators on mobile */
    .section-scroll-indicator {
        display: none !important;
    }
    
    /* Hide complex animations that might lag */
    .floating-element {
        display: none !important;
    }
    
    .central-circle {
        display: none !important;
    }
}
