/*
 * Responsive Styles for Dhake & Associates
 * Mobile-first approach with breakpoints
 */

/* Base responsive utilities */
.container {
    max-width: 100%;
    padding: 0 1rem;
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
        padding: 0 1.5rem;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .section-padding {
        padding: 4rem 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .why-choose-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        right: 0 !important;
    }
    
    .nav-list {
        flex-direction: row;
        gap: 1.5rem;
        margin-bottom: 0;
    }
    
    .nav-cta {
        flex-direction: row;
        width: auto;
    }
    
    .nav-cta .btn {
        width: auto;
    }
    
    .nav-toggle {
        display: none;
    }
    
    .hero-content {
        grid-template-columns: 2fr 1fr;
        text-align: left;
    }
    
    .hero-stats {
        justify-content: flex-start;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .section-padding {
        padding: 5rem 0;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .why-choose-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero-content {
        grid-template-columns: 1.5fr 1fr;
    }
    
    .cta-content {
        grid-template-columns: 1fr 400px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .section-padding {
        padding: 6rem 0;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .why-choose-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hero-content {
        grid-template-columns: 2fr 1fr;
    }
    
    .cta-content {
        grid-template-columns: 1fr 400px;
    }
}

/* Extra extra large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Mobile-specific adjustments */
@media (max-width: 767px) {
    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }
    
    /* Hero section mobile optimizations */
    .hero {
        min-height: auto;
        padding: 8rem 0 4rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .stat-item {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Form card mobile optimizations */
    .form-card {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .consultation-form input,
    .consultation-form select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Services grid mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Why choose section mobile */
    .why-choose-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .why-choose-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .icon-wrapper {
        margin: 0 auto;
    }
    
    /* Testimonials mobile */
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    /* CTA section mobile */
    .cta-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cta-form {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Footer mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 2rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Navigation mobile */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-xl);
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2rem;
        width: 100%;
    }
    
    .nav-cta {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .nav-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    .nav-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        z-index: 1002;
    }
    
    .bar {
        width: 25px;
        height: 3px;
        background-color: var(--primary-navy);
        margin: 3px 0;
        transition: 0.3s;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Overlay for mobile menu */
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        display: none;
    }
    
    .overlay.active {
        display: block;
    }
    
    /* WhatsApp button mobile */
    .whatsapp-button {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        bottom: 15px;
        right: 15px;
    }
    
    /* Button mobile optimizations */
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero-buttons .btn-lg {
        padding: 1rem 1.5rem;
    }
    
    /* Section spacing mobile */
    .section-padding {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
}

/* Small mobile devices */
@media (max-width: 375px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .service-card {
        padding: 1.25rem;
    }
    
    .form-card {
        padding: 1.25rem;
    }
    
    .testimonial-card {
        padding: 1.25rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Tablet-specific adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .why-choose-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content {
        grid-template-columns: 1.2fr 1fr;
    }
    
    .cta-content {
        grid-template-columns: 1fr 350px;
    }
}

/* Large screen optimizations */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
}

/* Orientation-specific adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 6rem 0 3rem;
    }
    
    .hero-content {
        gap: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .form-card {
        margin-top: 1rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .service-icon,
    .icon-wrapper {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .service-card:hover,
    .btn:hover,
    .social-link:hover {
        transform: none !important;
    }
}