/* Mobile First Enhancements */
/* Touch-Friendly Elements - Minimum 44x44px for touch targets */

/* Universal Touch Target */
a, button, .btn, input[type="submit"], input[type="button"] {
    min-height: 44px;
    min-width: 44px;
}

/* Smooth Scrolling for Mobile */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Prevent Text Selection on Touch */
.navbar-toggler,
.btn,
button {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

/* Mobile-Optimized Typography */
body {
    font-size: 16px; /* Prevents zoom on iOS */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Input Fields - Mobile First */
input, textarea, select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px 15px;
    border-radius: 8px;
}

/* Form Controls - Touch Friendly */
.form-control {
    min-height: 44px;
    font-size: 16px;
    padding: 12px 15px;
}

textarea.form-control {
    min-height: 120px;
}

/* Mobile Navigation Improvements */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(33, 62, 123, 0.98);
        padding: 20px;
        margin-top: 15px;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    
    .navbar-nav {
        align-items: stretch;
    }
    
    .navbar-nav .nav-link {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 15px 10px;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Card Spacing - Mobile */
.service-card,
.vision-mission-card,
.branch-card {
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .service-card,
    .vision-mission-card,
    .branch-card {
        margin-bottom: 0;
    }
}

/* Container Padding - Mobile First */
.container {
    padding-left: 15px;
    padding-right: 15px;
}

@media (min-width: 768px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Image Optimization for Mobile */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Tables */
@media (max-width: 767px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Footer - Mobile First */
.footer {
    padding: 30px 0 15px;
    text-align: center;
}

@media (min-width: 768px) {
    .footer {
        padding: 40px 0 20px;
        text-align: right;
    }
}

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .footer h4 {
        font-size: 1.25rem;
        margin-bottom: 20px;
    }
}

/* Contact Info Cards - Mobile */
.contact-info-card {
    background: linear-gradient(135deg, #213e7b 0%, #00afdd 100%);
    color: white;
    padding: 30px 20px;
    border-radius: 20px;
    margin-top: 30px;
}

@media (min-width: 768px) {
    .contact-info-card {
        margin-top: 0;
        padding: 40px 30px;
    }
}

.contact-info-item {
    margin-bottom: 25px;
    text-align: center;
}

@media (min-width: 768px) {
    .contact-info-item {
        text-align: right;
    }
}

/* Social Icons - Mobile Spacing */
.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .social-icons {
        gap: 15px;
    }
}

/* Hero CTA Buttons - Mobile Stack */
.hero-content .mt-4 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 768px) {
    .hero-content .mt-4 {
        flex-direction: row;
        gap: 15px;
    }
}

/* Branch Actions - Mobile Stack */
.branch-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .branch-actions {
        flex-direction: row;
        gap: 15px;
    }
}

/* Loading States */
.btn:disabled,
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Hamburger Menu - Better Touch Target */
.navbar-toggler {
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    min-width: 44px;
    min-height: 44px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(0, 175, 221, 0.3);
}

/* Accessibility - Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--sigal-primary-cyan);
    outline-offset: 2px;
}

/* Performance - Hardware Acceleration */
.service-card,
.vision-mission-card,
.branch-card,
.btn,
.nav-link {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Landscape Phone Optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0;
    }
    
    .navbar-sigal {
        padding: 0.5rem 0;
    }
}

/* Small Phones (<375px) */
@media (max-width: 374px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn-sigal-primary,
    .btn-sigal-secondary {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}

/* Touch Gesture Support */
.swipeable {
    touch-action: pan-y pinch-zoom;
}

/* Prevent Horizontal Scroll */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Phone Links - Enhanced for Mobile */
a[href^="tel:"] {
    color: inherit;
    font-weight: 600;
    direction: ltr;
    unicode-bidi: embed;
}

/* Phone Icon Before Number - Disabled */
/* a[href^="tel:"]::before {
    content: "📞 ";
    margin-right: 5px;
}

[dir="ltr"] a[href^="tel:"]::before {
    margin-right: 0;
    margin-left: 5px;
} */

/* Touch-Friendly Phone Links */
a[href^="tel:"] {
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
    transition: background 0.3s ease;
}

a[href^="tel:"]:hover,
a[href^="tel:"]:active {
    background: rgba(0, 175, 221, 0.1);
}

/* Remove icon from specific contexts if needed */
.contact-info-card a[href^="tel:"]::before {
    content: none;
}

/* ============================================
   Hero Section Mobile Enhancements
   ============================================ */

/* Hero Slider - Mobile Optimization */
@media (max-width: 768px) {
    .hero-slider-container {
        height: 60vh !important;
        max-height: 500px !important;
        min-height: 400px !important;
        background: #f8f9fa !important;
    }
    
    .hero-slide {
        background-size: contain !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
    }
}

@media (max-width: 480px) {
    .hero-slider-container {
        height: 50vh !important;
        max-height: 400px !important;
        min-height: 350px !important;
        background: #f8f9fa !important;
    }
    
    .hero-slide {
        background-size: contain !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
    }
}

/* Hero Image Card - Mobile Responsive */
@media (max-width: 768px) {
    .hero-image-container {
        padding: 0.5rem !important;
        margin-top: 2rem !important;
    }
    
    .hero-image-card {
        border-radius: 15px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    }
    
    .hero-image-card img {
        max-height: 400px !important;
        object-fit: cover !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .hero-image-container {
        padding: 0 !important;
        margin-top: 1.5rem !important;
    }
    
    .hero-image-card {
        border-radius: 12px !important;
    }
    
    .hero-image-card img {
        max-height: 300px !important;
    }
}

/* Hero Content - Mobile Typography */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.3 !important;
    }
    
    .title-main {
        font-size: 1.6rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    .title-main {
        font-size: 1.4rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
    }
}

/* Hero Buttons - Mobile Stack */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column !important;
        gap: 0.8rem !important;
        width: 100% !important;
    }
    
    .btn-hero {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 24px !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .btn-hero {
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
    }
}

/* Floating Stats - Mobile Hide/Adjust */
@media (max-width: 768px) {
    .floating-stat {
        position: relative !important;
        margin: 10px auto !important;
        max-width: 300px !important;
    }
    
    .stat-1, .stat-2, .stat-3 {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        animation: none !important;
    }
}

@media (max-width: 480px) {
    .floating-stat {
        display: none !important;
    }
}

/* Hero Decorations - Mobile Hide */
@media (max-width: 768px) {
    .hero-decoration,
    .decoration-1,
    .decoration-2,
    .decoration-3 {
        display: none !important;
    }
}
