/*
* RESPONSIVE.CSS - ENHANCED VERSION
* ==================================
* Mobile-first approach with improved breakpoints: 480px, 640px, 768px, 992px, 1200px
* All boxes now properly responsive on mobile
*/

/* ===== LARGE DESKTOPS (1200px and below) ===== */
@media (max-width: 1200px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2.5rem;
    }
    
    .container {
        max-width: 960px;
        padding: 0 1.5rem;
    }
    
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.3rem; }
    h3 { font-size: 1.8rem; }
    
    .section-title {
        font-size: 2.3rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
}

/* ===== DESKTOPS (992px and below) ===== */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
        padding: 0 1.25rem;
    }
    
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.6rem; }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-cta, .hero-social {
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .profile-image-wrapper {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }
    
    .card,
    .service-item,
    .project-item,
    .testimonial-item {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

/* ===== TABLETS (768px and below) ===== */
@media (max-width: 768px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1.25rem;
        --spacing-lg: 2rem;
    }
    
    .container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    h1 { font-size: 2rem; line-height: 1.2; }
    h2 { font-size: 1.8rem; line-height: 1.2; }
    h3 { font-size: 1.5rem; line-height: 1.2; }
    h4 { font-size: 1.25rem; }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 0.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .header-wrapper {
        height: 80px;
        gap: 15px;
        padding: 0 1rem;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .logo-tagline {
        font-size: 0.7rem;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .desktop-cta {
        display: none;
    }
    
    .hero-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .profile-image-wrapper {
        width: 250px;
        height: 250px;
        margin: 0 auto 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-form {
        order: 2;
    }
    
    .contact-info {
        order: 1;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-control {
        padding: 0.75rem;
        font-size: 16px;
        min-height: 44px;
    }
    
    .card {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
        border-radius: 8px;
    }
    
    .service-item,
    .project-item,
    .testimonial-item {
        padding: 1.25rem;
    }
    
    .btn {
        min-height: 44px;
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .projects-grid,
    .services-grid,
    .testimonials-grid {
        gap: 1rem;
    }
    
    .project-card {
        max-width: 100%;
        margin: 0 auto;
    }
}

/* ===== SMALL TABLETS (640px and below) - NEW BREAKPOINT ===== */
@media (max-width: 640px) {
    :root {
        --spacing-sm: 0.65rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
    }
    
    .container {
        padding: 0 0.875rem;
    }
    
    body {
        font-size: 15px;
        line-height: 1.5;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.4rem; }
    h4 { font-size: 1.1rem; }
    
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 0.5rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .profile-image-wrapper {
        width: 220px;
        height: 220px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 0.75rem;
        text-align: center;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-control {
        padding: 0.625rem;
        font-size: 16px;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===== MOBILE (576px and below) ===== */
@media (max-width: 576px) {
    :root {
        --spacing-sm: 0.5rem;
        --spacing-md: 0.75rem;
        --spacing-lg: 1.25rem;
    }
    
    .container {
        max-width: 100%;
        padding: 0 0.75rem;
    }
    
    body {
        font-size: 14px;
    }
    
    h1 { font-size: 1.6rem; line-height: 1.3; }
    h2 { font-size: 1.4rem; line-height: 1.3; }
    h3 { font-size: 1.2rem; line-height: 1.3; }
    h4 { font-size: 1rem; }
    
    .section-title {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-section {
        padding: 30px 0;
        min-height: auto;
    }
    
    .hero-wrapper {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-description {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .hero-cta .btn,
    .cta-buttons .btn {
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .profile-image-wrapper {
        width: 180px;
        height: 180px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .form-control {
        padding: 0.5rem;
        font-size: 16px;
        min-height: 44px;
        width: 100%;
    }
    
    .card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .btn {
        padding: 0.55rem 0.9rem;
        font-size: 0.85rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .service-item,
    .project-item,
    .testimonial-item {
        padding: 0.75rem;
    }
    
    .projects-grid,
    .services-grid,
    .testimonials-grid {
        gap: 0.5rem;
    }
    
    .popup-modal {
        padding: 1rem;
    }
}

/* ===== SMALL MOBILE (480px and below) ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 0.625rem;
    }
    
    body {
        font-size: 13px;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }
    h4 { font-size: 0.95rem; }
    
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
    }
    
    .section-subtitle {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .header-wrapper {
        height: 70px;
        gap: 8px;
        padding: 0 0.625rem;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .logo-tagline {
        font-size: 0.6rem;
    }
    
    .hamburger-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    
    .hamburger-btn span {
        height: 2px;
    }
    
    .hero-section {
        padding: 25px 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .hero-description {
        font-size: 0.8rem;
    }
    
    .profile-image-wrapper {
        width: 160px;
        height: 160px;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .form-control {
        padding: 0.45rem;
        font-size: 16px;
    }
    
    .card {
        padding: 0.6rem;
        margin-bottom: 0.6rem;
    }
    
    .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ===== LANDSCAPE MODE ===== */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        padding: 20px 0;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .header-wrapper {
        height: 60px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    #chatbotWidget,
    .back-to-top,
    .chat-widget,
    nav,
    footer {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    a {
        text-decoration: underline;
    }
}
