/* Mobile First Responsive Design */

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .hero-section {
        min-height: -webkit-fill-available;
    }
}

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Global adjustments */
    body {
        font-size: 14px;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Grid spacing for 2 columns */
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
    
    /* Navigation Mobile */
    .navbar-custom {
        padding: 1rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
    }
    
    .navbar-collapse {
        background: var(--white);
        margin-top: 1rem;
        padding: 1rem;
        border: 1px solid var(--gray-200);
    }
    
    .navbar-custom.scrolled .navbar-collapse {
        background: var(--black);
        border-color: var(--gray-800);
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.75rem 0;
        margin: 0;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .navbar-custom.scrolled .nav-link {
        border-bottom-color: var(--gray-800);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        padding-top: 80px;
        padding-bottom: 60px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .btn-hero {
        padding: 0.75rem 1.5rem;
        font-size: 0.85rem;
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .hero-image-container {
        height: 250px;
        margin-top: 2rem;
        border-width: 2px;
    }
    
    .floating-shape {
        display: none;
    }
    
    /* Services Section Mobile */
    .services-section {
        padding: 60px 0;
    }
    
    .services-section::before {
        font-size: 3rem;
        top: 20px;
        left: 15px;
    }
    
    .section-title {
        font-size: 1.75rem !important;
        margin-bottom: 0.75rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }
    
    /* Services Grid 2x2 on mobile */
    .services-section .row {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    .services-section .col-lg-4 {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .service-card {
        padding: 1.25rem 1rem;
        margin-bottom: 1rem;
    }
    
    .service-image-placeholder {
        height: 120px;
        margin-bottom: 0.75rem;
    }
    
    .service-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .service-card h4 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .service-card p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .service-card a {
        font-size: 0.75rem;
        margin-top: 0.5rem;
    }
    
    .service-card a i {
        font-size: 0.7rem;
    }
    
    /* About Section Mobile */
    .about-section {
        padding: 60px 0;
    }
    
    .about-section::after {
        font-size: 4rem;
        right: -30px;
    }
    
    .about-image {
        height: 300px;
        margin-bottom: 2rem;
    }
    
    .ps-lg-5 {
        padding-left: 0 !important;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Stats Section Mobile */
    .stats-section {
        padding: 60px 0;
    }
    
    .stat-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Testimonials Mobile */
    .testimonials-section {
        padding: 60px 0;
    }
    
    .testimonial-card {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .testimonial-card::before {
        font-size: 4rem;
        top: -10px;
        left: 15px;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
        margin-top: 1rem;
    }
    
    /* CTA Section Mobile */
    .cta-section {
        padding: 80px 0;
    }
    
    .cta-section::before {
        width: 150px;
        height: 150px;
        border-width: 2px;
    }
    
    .cta-section h2 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem;
    }
    
    .cta-section .lead {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .cta-section .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.85rem;
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    /* Contact Form Mobile */
    .contact-form .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
    }
    
    .contact-form .btn-dark {
        width: 100%;
        padding: 1rem 2rem;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-brand {
        font-size: 1.25rem;
    }
    
    .footer h6 {
        font-size: 0.75rem;
        margin-top: 1.5rem;
    }
    
    .footer-links {
        margin-bottom: 1.5rem;
    }
    
    .footer-links a {
        font-size: 0.85rem;
    }
    
    .social-icons {
        margin-bottom: 2rem;
    }
    
    .social-icons a {
        font-size: 1rem;
        margin: 0 0.5rem;
        padding: 0.35rem;
    }
    
    .text-md-end {
        text-align: left !important;
        margin-top: 1rem;
    }
    
    /* Utility classes for mobile */
    .mt-5 {
        margin-top: 2rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .px-5 {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

/* Small Devices (landscape phones and small tablets, 576px to 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero adjustments */
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-image-container {
        height: 300px;
    }
    
    /* Services */
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    /* Stats */
    .stat-number {
        font-size: 2.5rem !important;
    }
    
    /* CTA */
    .cta-section h2 {
        font-size: 2rem !important;
    }
}

/* Medium Devices (tablets, 768px to 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Navigation */
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    /* Hero */
    .hero-title {
        font-size: 3rem !important;
    }
    
    .hero-image-container {
        height: 400px;
    }
    
    /* Services */
    .services-section::before {
        font-size: 6rem;
    }
    
    /* About */
    .about-section::after {
        font-size: 10rem;
        right: -80px;
    }
    
    /* Stats */
    .stat-number {
        font-size: 3rem !important;
    }
    
    /* CTA */
    .cta-section h2 {
        font-size: 2.5rem !important;
    }
}

/* Large Devices (desktops, 992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* Fix for mobile menu toggle button */
@media (max-width: 991.98px) {
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .navbar-toggler {
        border-color: var(--black);
    }
    
    .navbar-custom.scrolled .navbar-toggler {
        border-color: var(--white);
    }
}

/* Very Small Devices (less than 360px - single column) */
@media (max-width: 359.98px) {
    .services-section .col-6 {
        width: 100%;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-image-placeholder {
        height: 150px;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .service-card h4 {
        font-size: 1.1rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 60px 0;
    }
    
    .min-vh-100 {
        min-height: auto !important;
    }
}
