/* Responsive Design - Mobile First Approach */

/* Desktop Large (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-text h1 {
        font-size: 3.5rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
        padding: 2.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop Medium (1024px - 1199px) */
@media (max-width: 1199px) and (min-width: 1024px) {
    .hero-content {
        gap: 3rem;
    }
    
    .hero-text h1 {
        font-size: 2.8rem;
    }
    
    .contact-content {
        gap: 3rem;
    }
}

/* Tablet (769px - 1023px) */
@media (max-width: 1023px) and (min-width: 769px) {
    /* Header adjustments */
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-phone {
        margin-right: 1rem;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    /* Hero section */
    .hero-section {
        min-height: 70vh;
        padding: 80px 0 40px;
    }
    
    .hero-content {
        max-width: 800px;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: clamp(3.5rem, 6vw, 4.5rem);
    }
    
    .hero-text h2 {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1.2rem, 3vw, 1.4rem);
        margin-bottom: 3rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        margin: 3rem auto;
        max-width: 600px;
    }
    
    .stat {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.4rem;
    }
    
    .hero-cta {
        gap: 2rem;
    }
    
    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        padding: 16px 32px;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Content grid tablet */
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form-container {
        order: 1;
    }
    
    .contact-info {
        order: 2;
        flex-direction: row;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Large (481px - 768px) */
@media (max-width: 768px) {
    /* Visibility toggles */
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    /* General adjustments */
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 30px 0 !important;
    }
    
    /* Reduce spacing between section elements */
    h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .section-intro {
        margin-bottom: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    /* Header - Mobile Navigation */
    .nav-container {
        position: relative;
    }
    
    /* Hide phone logo in navigation on mobile */
    .nav-phone {
        display: none !important;
    }
    
    /* Ensure hamburger is visible and positioned correctly */
    .hamburger {
        display: flex !important;
        position: relative;
        z-index: 1001;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--white-color);
        flex-direction: column;
        padding: 2rem 0;
        box-shadow: 0 5px 20px var(--shadow-medium);
        transform: translateX(-100%);
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Mobile call button positioning - Force visibility */
    .mobile-call-btn {
        display: block !important;
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        z-index: 99999 !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: none !important;
        transition: none !important;
    }
    
    .mobile-call-btn,
    .mobile-call-btn * {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .scroll-top-btn {
        bottom: 90px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    /* Hero section mobile */
    .hero-section {
        min-height: 70vh;
        padding: 80px 0 20px;
    }
    
    .hero-content {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .hero-text h1 {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
        line-height: 1.1;
        margin-bottom: 1rem;
    }
    
    .hero-text h2 {
        font-size: clamp(1.2rem, 4vw, 1.6rem);
        margin-bottom: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.2rem);
        margin-bottom: 2.5rem;
        line-height: 1.5;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        margin: 2.5rem auto;
        max-width: 280px;
    }
    
    .stat {
        padding: 1.2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        padding: 15px 30px;
        font-size: 1rem;
        width: 250px;
        text-align: center;
    }
    
    /* Carousels mobile */
    .carousel-row {
        height: 150px;
        margin-bottom: 15px;
    }
    
    .carousel-track img {
        height: 130px;
        width: 200px;
    }
    
    /* Services mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Content grid mobile */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Testimonials mobile */
    .testimonials-carousel {
        max-width: 100%;
        margin: 2rem auto 0;
    }
    
    .testimonial-card {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .quote-icon {
        font-size: 3rem;
    }
    
    .testimonial-content p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .testimonial-dots {
        gap: 0.6rem;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
    
    /* Portfolio modal mobile */
    .modal-content {
        max-width: 95vw;
        max-height: 85vh;
        margin: 0 10px;
    }
    
    .modal-image-container img {
        max-height: 50vh;
    }
    
    .modal-info {
        padding: 1rem;
    }
    
    .modal-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .modal-navigation {
        padding: 0 10px;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        font-size: 2.5rem;
    }
    
    /* Portfolio mobile */
    .portfolio-filters {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-item img {
        height: 250px;
    }
    
    /* Process mobile */
    .process-step {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .step-number {
        margin: 0 auto;
    }
    
    .step-content p {
        text-align: left;
    }
    
    /* Testimonials mobile */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    /* FAQ mobile */
    .faq-question {
        padding: 1rem;
    }
    
    .faq-question h3 {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .faq-answer {
        padding: 0 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 1rem;
    }
    
    /* Content grid mobile */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    /* Contact form mobile */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .btn-submit {
        width: 100%;
        padding: 15px;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .contact-card {
        padding: 1.5rem;
    }
    
    /* Footer mobile */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Mobile Small (320px - 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* Header */
    .nav-logo a {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        padding: 1.5rem 0;
    }
    
    /* Hero */
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text h2 {
        font-size: 1.2rem;
    }
    
    .hero-description p {
        font-size: 0.95rem;
    }
    
    .hero-stats {
        padding: 1rem;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    /* Buttons */
    .btn-primary {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    /* Cards */
    .service-card,
    .testimonial-card,
    .content-card,
    .contact-card {
        padding: 1rem;
    }
    
    /* Carousels */
    .carousel-row {
        height: 120px;
        margin-bottom: 10px;
    }
    
    .carousel-track img {
        height: 100px;
        width: 150px;
    }
    
    /* Portfolio */
    .portfolio-item img {
        height: 200px;
    }
    
    .portfolio-overlay {
        padding: 1rem;
    }
    
    /* Form */
    .contact-form-container {
        padding: 1rem;
    }
    
    
    .option-icon {
        font-size: 1.5rem;
    }
    
    .service-option h4 {
        font-size: 1rem;
    }
    
    .service-option p {
        font-size: 0.8rem;
    }
    
    /* FAQ */
    .faq-question {
        padding: 0.75rem;
    }
    
    .faq-question h3 {
        font-size: 0.95rem;
    }
    
    /* Mobile call button */
    .mobile-call-btn a {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .call-pulse {
        width: 55px;
        height: 55px;
    }
    
    .scroll-top-btn {
        width: 40px;
        height: 40px;
        bottom: 85px;
    }
}

/* Special adjustments for very small screens */
@media (max-width: 360px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        padding: 0.75rem;
    }
    
    .service-cards {
        gap: 0.75rem;
    }
    
    .service-option {
        padding: 0.5rem;
    }
    
    .portfolio-item img {
        height: 180px;
    }
    
    .contact-form-container {
        padding: 0.75rem;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0;
    }
    
    section {
        padding: 20px 0 !important;
    }
    
    .mobile-call-btn {
        bottom: 10px;
        right: 10px;
    }
    
    .scroll-top-btn {
        bottom: 70px;
        right: 10px;
    }
}

/* Print styles */
@media print {
    .header,
    .mobile-call-btn,
    .scroll-top-btn,
    .contact-section,
    .footer {
        display: none !important;
    }
    
    main {
        margin-top: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1 {
        font-size: 24pt;
    }
    
    h2 {
        font-size: 20pt;
    }
    
    h3 {
        font-size: 16pt;
    }
    
    .hero-grid,
    .carousel-section,
    .portfolio-grid {
        display: none !important;
    }
    
    .services-grid,
    .testimonials-grid,
    .content-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow-light: rgba(0, 0, 0, 0.3);
        --shadow-medium: rgba(0, 0, 0, 0.5);
    }
    
    .service-card,
    .testimonial-card,
    .content-card,
    .contact-card,
    .portfolio-item {
        border: 2px solid var(--primary-color);
    }
    
    .btn-primary {
        border: 2px solid var(--accent-color);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .carousel-track {
        animation: none !important;
    }
    
    .call-pulse {
        animation: none !important;
    }
    
    .scroll-top-btn,
    .mobile-call-btn,
    .service-card,
    .portfolio-item,
    .testimonial-card {
        transition: none !important;
    }
}

/* Focus management for accessibility */
@media (max-width: 768px) {
    .nav-menu.active .nav-link:first-child {
        margin-top: 1rem;
    }
    
    .nav-menu.active .nav-link {
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--light-color);
    }
    
    .nav-menu.active .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-menu.active .nav-link:hover,
    .nav-menu.active .nav-link:focus {
        background: var(--light-color);
    }
}