/* Enhanced Mobile Responsive Design */

/* Landscape Mode Fixes */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .navbar {
        padding: 0.25rem 0 !important;
        min-height: 50px !important;
    }
    
    .navbar-brand img {
        width: 100px !important;
        height: auto !important;
    }
    
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 1rem;
    }
    
    .btn-primary-custom {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    .services-section,
    .about-section,
    .contact-section {
        padding: 40px 0;
    }
    
    .stats-section {
        padding: 30px 0;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .service-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .service-icon {
        width: 40px;
        height: 40px;
    }
    
    .service-icon i {
        font-size: 1.2rem;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .service-card p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .stat-item {
        padding: 1rem 0.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .contact-info {
        padding: 1.5rem;
    }
    
    .contact-item {
        margin-bottom: 1.5rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    /* Adjust navbar collapse for landscape */
    .navbar-collapse {
        margin-top: 0.5rem;
        padding: 0.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem !important;
    }
}

/* Landscape tablets and small laptops */
@media screen and (orientation: landscape) and (min-width: 768px) and (max-width: 1024px) {
    .navbar-brand img {
        width: 120px;
        height: auto;
    }
    
    .hero-section {
        min-height: 80vh;
		padding-top: 20vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .services-section,
    .about-section,
    .contact-section {
        padding: 50px 0;
    }
}

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .btn-primary-custom {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .about-text h2 {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .contact-info {
        padding: 2rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
    }
    
    .services-section,
    .about-section,
    .contact-section {
        padding: 60px 0;
    }
    
    .stats-section {
        padding: 50px 0;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    .section-title h2 {
        font-size: 2.25rem;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .about-content {
        flex-direction: column;
        gap: 3rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-title {
        font-size: 3.25rem;
    }
    
    .container {
        max-width: 960px;
    }
}

/* Navigation Responsive */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 10px;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover {
        transform: none;
    }
    
    .service-card:active {
        transform: scale(0.98);
    }
    
    .btn-primary-custom:hover {
        transform: none;
    }
    
    .btn-primary-custom:active {
        transform: scale(0.95);
    }
}

/* Improve text readability on mobile */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .service-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

/* Optimize images for mobile */
@media (max-width: 768px) {
    .hero-image img,
    .about-image img {
        border-radius: 15px;
    }
    
    .hero-section {
        min-height: 80vh;
        padding: 2rem 0;
    }
    
    .hero-content {
        text-align: center;
        margin-bottom: 2rem;
    }
}

/* Contact form improvements for mobile */
@media (max-width: 768px) {
    .contact-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 2.5rem;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Stats section mobile optimization */
@media (max-width: 768px) {
    .stat-item {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
}

/* Landscape phone specific fixes */
@media screen and (orientation: landscape) and (max-width: 896px) and (max-height: 414px) {
    /* iPhone landscape and similar devices */
    .navbar-brand img {
        width: 100px !important;
        height: auto !important;
    }

    
    .hero-section {
        min-height: 100vh;
        padding: 4rem 0 1rem;
    }
    
    .navbar {
        padding: 0.25rem 0 !important;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 1rem;
    }
    
    .services-section {
        padding: 30px 0;
    }
    
    .service-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .service-card h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .service-card p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .about-section,
    .contact-section {
        padding: 30px 0;
    }
    
    .stats-section {
        padding: 25px 0;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card {
        border: 2px solid var(--text-dark);
    }
    
    .btn-primary-custom {
        border: 2px solid var(--primary-green);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #1f2937;
        --white: #374151;
        --text-dark: #f9fafb;
        --text-light: #d1d5db;
    }
    
    .services-section,
    .contact-section {
        background: var(--bg-light);
    }
    
    .service-card,
    .contact-info {
        background: var(--white);
        color: var(--text-dark);
    }
    
    .about-section {
        background: var(--white);
    }
}

