/* ============================================
   Mobile & Tablet Responsive Design
   ============================================ */

/* Mobile First Approach */
/* Base styles are for mobile, then we scale up */

/* ============================================
   Breakpoints:
   - Mobile: 0px - 575px
   - Tablet: 576px - 768px  
   - Desktop: 769px+
   ============================================ */

/* ============================================
   GLOBAL MOBILE FIXES
   ============================================ */
* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ============================================
   HEADER - Mobile & Tablet
   ============================================ */
@media (max-width: 768px) {
    .arvan-header {
        padding: 0.75rem 0;
    }
    
    .arvan-header nav {
        padding: 0 1rem;
        flex-wrap: wrap;
    }
    
    .arvan-logo {
        font-size: 1.25rem;
        gap: 0.5rem;
    }
    
    .arvan-logo img {
        width: 100px;
        height: 35px;
    }
    
    .arvan-logo span {
        font-size: 1.1rem;
    }
    
    /* Show mobile menu button */
    #mobileMenuBtn {
        display: inline-flex !important;
    }
    
    /* Hide desktop menu */
    #desktopMenu {
        display: none !important;
    }
    
    #desktopOrderBtn {
        display: none !important;
    }
    
    /* Mobile menu button styling */
    #mobileMenuBtn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
        font-size: 1.2rem;
    }
    
    /* Call button on mobile */
    .arvan-btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .arvan-btn-primary i {
        font-size: 0.9rem;
    }
}

/* Mobile menu */
@media (max-width: 768px) {
    #mobileMenu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
    
    #mobileMenu.show {
        max-height: 500px;
        display: block !important;
    }
    
    #mobileMenu a {
        padding: 1rem !important;
        font-size: 1rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}

/* ============================================
   HERO BANNER - Mobile & Tablet
   ============================================ */
@media (max-width: 768px) {
    .hero-banner-section {
        height: 60vh !important;
        min-height: 400px !important;
        max-height: 600px !important;
    }
    
    .arvan-hero-content {
        padding: 1.5rem 1rem !important;
    }
    
    .arvan-hero-content > div {
        padding: 1rem !important;
        max-width: 100% !important;
    }
    
    .arvan-badge {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem !important;
    }
    
    .arvan-hero-title {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
        margin-top: 0.75rem !important;
    }
    
    .arvan-hero-content p {
        font-size: 1rem !important;
        margin-top: 0.75rem !important;
        margin-bottom: 1.5rem !important;
        padding: 0.75rem !important;
    }
    
    .arvan-hero-buttons {
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }
    
    .arvan-hero-buttons a {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.875rem 1rem !important;
        font-size: 0.95rem !important;
        min-height: 48px !important;
    }
}

@media (max-width: 480px) {
    .hero-banner-section {
        height: 55vh !important;
        min-height: 350px !important;
    }
    
    .arvan-hero-title {
        font-size: 1.25rem !important;
    }
    
    .arvan-hero-content p {
        font-size: 0.9rem !important;
    }
}

/* ============================================
   SECTIONS - Mobile & Tablet
   ============================================ */
@media (max-width: 768px) {
    .arvan-section {
        padding: 2rem 1rem !important;
    }
    
    .arvan-container {
        padding: 0 1rem !important;
    }
    
    .arvan-section-header {
        margin-bottom: 1.5rem !important;
        padding: 0 0.5rem !important;
    }
    
    .arvan-section-title {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    .arvan-section-description {
        font-size: 0.95rem !important;
        margin-top: 0.5rem !important;
    }
}

/* ============================================
   GRID LAYOUT - Mobile & Tablet
   ============================================ */
@media (max-width: 768px) {
    .arvan-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .arvan-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
    }
}

/* ============================================
   CARDS - Mobile & Tablet
   ============================================ */
@media (max-width: 768px) {
    .arvan-card {
        padding: 1.25rem !important;
        margin: 0 !important;
    }
    
    .arvan-card-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .arvan-card-title {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .arvan-card-description {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem !important;
    }
    
    .arvan-card-link,
    .arvan-card a {
        font-size: 0.875rem !important;
        padding: 0.625rem 1rem !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Service cards buttons */
    .arvan-card > div:last-child {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .arvan-card > div:last-child a {
        width: 100% !important;
    }
}

/* ============================================
   BUTTONS - Mobile & Tablet
   ============================================ */
@media (max-width: 768px) {
    .arvan-btn-primary,
    .arvan-btn-secondary {
        padding: 0.875rem 1.25rem !important;
        font-size: 0.95rem !important;
        min-height: 48px !important;
        min-width: 120px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }
    
    .arvan-btn-primary i,
    .arvan-btn-secondary i {
        font-size: 0.9rem !important;
    }
}

/* ============================================
   FOOTER - Mobile & Tablet
   ============================================ */
@media (max-width: 768px) {
    .arvan-footer {
        padding: 2rem 1rem 1rem !important;
    }
    
    .arvan-footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 !important;
    }
    
    .arvan-footer-column {
        text-align: center !important;
    }
    
    .arvan-footer-column h3 {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }
    
    .arvan-footer-column ul {
        align-items: center !important;
    }
    
    .arvan-footer-column ul li {
        margin-bottom: 0.75rem !important;
    }
    
    .arvan-footer-bottom {
        margin-top: 2rem !important;
        padding-top: 1.5rem !important;
        text-align: center !important;
        font-size: 0.875rem !important;
    }
}

/* ============================================
   TYPOGRAPHY - Mobile & Tablet
   ============================================ */
@media (max-width: 768px) {
    body {
        font-size: 15px !important;
    }
    
    h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
    }
    
    p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
}

/* ============================================
   SPACING - Mobile & Tablet
   ============================================ */
@media (max-width: 768px) {
    /* Reduce padding and margins */
    section {
        padding: 2rem 0 !important;
    }
    
    .container {
        padding: 0 1rem !important;
    }
    
    /* Service detail page */
    .service-detail-content,
    .service-detail-image {
        width: 100% !important;
        padding: 1rem !important;
    }
}

/* ============================================
   SERVICES PAGE - Mobile & Tablet
   ============================================ */
@media (max-width: 768px) {
    /* Open layout services */
    .service-item {
        flex-direction: column !important;
        padding: 1.5rem 1rem !important;
    }
    
    .service-item-image {
        width: 100% !important;
        margin-bottom: 1rem !important;
        margin-left: 0 !important;
    }
    
    .service-item-content {
        width: 100% !important;
        padding: 0 !important;
    }
    
    .service-item-content h2 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .service-item-content p {
        font-size: 0.95rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    .service-item-content .arvan-btn-primary {
        width: 100% !important;
    }
}

/* ============================================
   FORMS - Mobile & Tablet
   ============================================ */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 1.25rem !important;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        width: 100% !important;
        padding: 0.875rem !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
        min-height: 48px !important;
    }
    
    textarea {
        min-height: 120px !important;
    }
    
    button[type="submit"],
    .btn-primary {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1rem !important;
        min-height: 48px !important;
    }
}

/* ============================================
   TABLET SPECIFIC (577px - 768px)
   ============================================ */
@media (min-width: 577px) and (max-width: 768px) {
    .arvan-hero-title {
        font-size: 1.75rem !important;
    }
    
    .arvan-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .arvan-footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .arvan-hero-buttons {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }
    
    .arvan-hero-buttons a {
        width: auto !important;
        flex: 1 1 calc(50% - 0.5rem) !important;
        min-width: 150px !important;
    }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-banner-section {
        height: 80vh !important;
        min-height: 400px !important;
    }
    
    .arvan-hero-title {
        font-size: 1.5rem !important;
    }
    
    .arvan-hero-content p {
        font-size: 0.95rem !important;
    }
}

/* ============================================
   TOUCH OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .arvan-card:hover {
        transform: none !important;
    }
    
    /* Active states instead of hover */
    .arvan-btn-primary:active,
    .arvan-btn-secondary:active {
        transform: scale(0.97);
        opacity: 0.9;
    }
}

/* ============================================
   PREVENT HORIZONTAL SCROLL
   ============================================ */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

* {
    max-width: 100%;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* ============================================
   UTILITY CLASSES FOR MOBILE
   ============================================ */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
    
    .text-center-mobile {
        text-align: center !important;
    }
    
    .full-width-mobile {
        width: 100% !important;
    }
    
    .no-padding-mobile {
        padding: 0 !important;
    }
    
    .small-padding-mobile {
        padding: 1rem !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
    
    .show-desktop {
        display: block !important;
    }
}

