/* ===== RESPONSIVE DESIGN ===== */

/* Large Devices (Desktops, 1200px and up) */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-cards {
        width: 350px;
        height: 350px;
    }
    
    .floating-card {
        padding: var(--spacing-md);
    }
}

/* Medium Devices (Tablets, 992px and up) */
@media (max-width: 992px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .nav-container {
        padding: 0 var(--spacing-md);
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
    
    .about-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-md);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Small Devices (Landscape phones, 768px and up) */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: var(--spacing-3xl);
        transition: var(--transition-normal);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: var(--spacing-lg) 0;
    }
    
    .nav-link {
        font-size: 1.25rem;
        font-weight: 600;
    }
    
    .nav-cta {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Mobile Dropdown */
    .dropdown-menu {
        position: static;
        width: 100%;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin: var(--spacing-sm) 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 300px;
    }
    
    .dropdown-link {
        padding: var(--spacing-md) var(--spacing-xl);
        border-left: 3px solid transparent;
    }
    
    .dropdown-link:hover {
        background: rgba(99, 102, 241, 0.1);
        border-left-color: var(--primary-color);
    }
    
    .dropdown-toggle::after {
        position: absolute;
        right: var(--spacing-lg);
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero {
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    .hero-visual {
        height: 300px;
    }
    
    .hero-visual-container {
        width: 400px;
        height: 300px;
    }
    
    .floating-image-1 {
        width: 80px;
    }
    
    .floating-image-2 {
        width: 70px;
    }
    
    .floating-image-3 {
        width: 60px;
    }
    
    .floating-image-4 {
        width: 75px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .service-card {
        padding: var(--spacing-lg);
    }
    
    .service-card.featured {
        transform: none;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
}

/* Extra Small Devices (Portrait phones, 576px and up) */
@media (max-width: 576px) {
    :root {
        --spacing-3xl: 3rem;
        --spacing-2xl: 2rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .nav-container {
        padding: 0 var(--spacing-sm);
        height: 70px;
    }
    
    .logo-img {
        height: 48px;
    }
    
    .footer-logo {
        height: 58px;
    }
    
    .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
        padding-top: var(--spacing-2xl);
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn-large {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 1rem;
    }
    
    .hero-visual {
        height: 200px;
        margin-top: var(--spacing-lg);
    }
    
    .hero-visual-container {
        width: 250px;
        height: 200px;
    }
    
    .floating-image-1 {
        width: 50px;
    }
    
    .floating-image-2 {
        width: 45px;
    }
    
    .floating-image-3 {
        width: 40px;
    }
    
    .floating-image-4 {
        width: 48px;
        min-width: 60px;
        min-height: 60px;
    }
    
    .floating-card span {
        font-size: 0.75rem;
    }
    
    .floating-card i {
        font-size: 1.25rem;
        margin-bottom: 0;
    }
    
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-2xl);
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .about-text h2 {
        font-size: 2rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .stat-item {
        padding: var(--spacing-lg);
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .feature-item i {
        align-self: center;
    }
    
    .service-card {
        padding: var(--spacing-md);
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
    }
    
    .service-icon i {
        font-size: 1.25rem;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
    }
    
    .portfolio-image {
        height: 150px;
    }
    
    .portfolio-info {
        padding: var(--spacing-lg);
    }
    
    .portfolio-tags {
        gap: var(--spacing-xs);
    }
    
    .tag {
        font-size: 0.75rem;
        padding: var(--spacing-xs);
    }
    
    .testimonial-card {
        padding: var(--spacing-lg);
    }
    
    .contact-info h2 {
        font-size: 2rem;
    }
    
    .contact-form {
        padding: var(--spacing-lg);
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Extra Extra Small Devices (Very small phones, 480px and below) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-cta {
        width: 100%;
    }
    
    .floating-card {
        min-width: 50px;
        min-height: 50px;
    }
    
    .floating-card i {
        font-size: 1rem;
    }
    
    .floating-card span {
        display: none;
    }
    
    .services-grid {
        gap: var(--spacing-md);
    }
    
    .service-features li {
        font-size: 0.875rem;
    }
    
    .contact-item i {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-scroll,
    .hamburger,
    .btn,
    .social-links,
    .contact-form {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black;
        page-break-after: avoid;
    }
    
    .section {
        page-break-inside: avoid;
        margin-bottom: 20pt;
    }
    
    .card,
    .service-card,
    .portfolio-card,
    .testimonial-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --text-primary: #000000;
        --text-secondary: #000000;
        --background: #ffffff;
        --border-color: #000000;
    }
    
    .btn-primary {
        background: #0000ff;
        border: 2px solid #000000;
    }
    
    .btn-secondary {
        background: #ffffff;
        color: #000000;
        border: 2px solid #000000;
    }
    
    .card,
    .service-card,
    .portfolio-card,
    .testimonial-card {
        border: 2px solid #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-card {
        animation: none;
    }
    
    .scroll-indicator i {
        animation: none;
    }
}

/* Light Theme Optimizations */
@media (prefers-color-scheme: light) {
    :root {
        --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
        --shadow-colored: 0 12px 40px rgba(99, 102, 241, 0.08);
    }
    
    .floating-card {
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(30px) saturate(200%);
    }
    
    .service-card {
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(35px) saturate(220%);
    }
    
    .contact-form {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(30px) saturate(200%);
    }
    
    .portfolio-card {
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(30px) saturate(200%);
    }
    
    .testimonial-card {
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(30px) saturate(200%);
    }
}

/* Dark Theme Preparation */
@media (prefers-color-scheme: dark) {
    .floating-card,
    .service-card,
    .portfolio-card,
    .testimonial-card {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .contact-form {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.15);
    }
}