/* ===== RESPONSIVE DESIGN ===== */

/* ===== TABLET BREAKPOINT (768px and below) ===== */
@media (max-width: 768px) {
    /* Container adjustments */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--light-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: var(--spacing-3xl);
        transition: left var(--transition-normal);
        box-shadow: var(--shadow-xl);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu .nav-link {
        padding: var(--spacing-lg) var(--spacing-xl);
        font-size: 1.125rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .nav-menu .nav-link.cta-nav {
        margin-top: var(--spacing-lg);
        width: auto;
        border: none;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .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);
    }
    
    /* Hero Section */
    .hero .container {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
        text-align: center;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-visual {
        order: 1;
    }
    
    .hero-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-cta {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-image {
        transform: none;
    }
    
    .hero-image:hover {
        transform: scale(1.02);
    }
    
    /* Typography */
    .section-title {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .section-subtitle {
        font-size: 1.125rem;
        margin-bottom: var(--spacing-xl);
    }
    
    .section-header {
        margin-bottom: var(--spacing-2xl);
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .feature-card {
        padding: var(--spacing-xl);
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        margin-bottom: var(--spacing-2xl);
    }
    
    .service-card {
        padding: var(--spacing-xl);
    }
    
    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        margin-bottom: var(--spacing-2xl);
    }
    
    .portfolio-image {
        height: 250px;
    }
    
    /* CTA Section */
    .cta-title {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .cta-subtitle {
        font-size: 1.125rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
        text-align: center;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    /* Spacing adjustments */
    .features,
    .services-preview,
    .portfolio-preview,
    .cta-section {
        padding: var(--spacing-3xl) 0;
    }
    
    .footer {
        padding: var(--spacing-3xl) 0 var(--spacing-xl);
    }
}

/* ===== MOBILE BREAKPOINT (480px and below) ===== */
@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Navigation */
    .nav-container {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .brand-text {
        font-size: 1.25rem;
    }
    
    /* Hero */
    .hero {
        padding-top: 60px;
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        margin-bottom: var(--spacing-md);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-xl);
    }
    
    .hero-scroll {
        bottom: var(--spacing-lg);
    }
    
    /* Buttons */
    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    /* Typography */
    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: var(--spacing-sm);
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .section-header {
        margin-bottom: var(--spacing-xl);
    }
    
    /* Cards */
    .feature-card,
    .service-card {
        padding: var(--spacing-lg);
    }
    
    .feature-title,
    .service-title,
    .portfolio-title {
        font-size: 1.25rem;
    }
    
    .feature-description,
    .service-description,
    .portfolio-description {
        font-size: 0.875rem;
    }
    
    .service-number {
        font-size: 2.5rem;
    }
    
    /* Portfolio */
    .portfolio-image {
        height: 200px;
    }
    
    .portfolio-content {
        padding: var(--spacing-lg);
    }
    
    .portfolio-tags {
        gap: var(--spacing-xs);
    }
    
    .tag {
        font-size: 0.75rem;
        padding: 2px var(--spacing-sm);
    }
    
    /* CTA */
    .cta-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: var(--spacing-md);
    }
    
    .cta-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-xl);
    }
    
    /* Footer */
    .footer-content {
        gap: var(--spacing-xl);
    }
    
    .footer-title {
        font-size: 1.125rem;
    }
    
    .footer-heading {
        font-size: 1rem;
    }
    
    .footer-contact p,
    .footer-description,
    .footer-links {
        font-size: 0.875rem;
    }
    
    .footer-legal {
        font-size: 0.75rem;
    }
    
    /* Spacing adjustments */
    .features,
    .services-preview,
    .portfolio-preview,
    .cta-section {
        padding: var(--spacing-2xl) 0;
    }
    
    .footer {
        padding: var(--spacing-2xl) 0 var(--spacing-lg);
    }
}

/* ===== LARGE DESKTOP BREAKPOINT (1400px and above) ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: clamp(3rem, 4vw, 4.5rem);
    }
    
    .section-title {
        font-size: clamp(2.5rem, 3vw, 3.5rem);
    }
    
    .features-grid,
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-particles {
        animation: none;
    }
    
    .scroll-indicator::after {
        animation: none;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #FF6600;
        --secondary-color: #006699;
        --dark-color: #000000;
        --light-color: #FFFFFF;
        --gray-600: #333333;
        --gray-400: #666666;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .feature-card,
    .service-card,
    .portfolio-card {
        border: 2px solid var(--gray-400);
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #FFFFFF;
        --light-color: #1A1A1A;
        --gray-100: #2A2A2A;
        --gray-200: #3A3A3A;
        --gray-300: #4A4A4A;
        --gray-400: #5A5A5A;
        --gray-500: #6A6A6A;
        --gray-600: #CCCCCC;
        --gray-700: #DDDDDD;
        --gray-800: #EEEEEE;
        --gray-900: #F8F9FA;
    }
    
    .hero,
    .services-preview {
        background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 100%);
    }
    
    .navbar {
        background: rgba(26, 26, 26, 0.95);
    }
    
    .navbar.scrolled {
        background: rgba(26, 26, 26, 0.98);
    }
    
    .nav-menu {
        background: var(--light-color);
    }
    
    .feature-card,
    .service-card,
    .portfolio-card {
        background: var(--gray-100);
        border-color: var(--gray-300);
    }
    
    .cta-section {
        background: linear-gradient(135deg, #0A0A0A 0%, #1A1A1A 100%);
    }
    
    .footer {
        background: #0A0A0A;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .navbar,
    .hero-scroll,
    .nav-toggle,
    .cta-section,
    .footer-social {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 0;
    }
    
    .btn {
        border: 1px solid black;
        text-decoration: none;
    }
    
    .section-title,
    .hero-title {
        page-break-after: avoid;
    }
    
    .feature-card,
    .service-card,
    .portfolio-card {
        page-break-inside: avoid;
        border: 1px solid #ccc;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* ===== FOCUS STYLES FOR ACCESSIBILITY ===== */
.btn:focus,
.nav-link:focus,
.social-link:focus,
.footer-links a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--border-radius);
}

/* ===== UTILITY CLASSES FOR RESPONSIVE ===== */
.hidden-mobile {
    display: block;
}

.visible-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hidden-mobile {
        display: none;
    }
    
    .visible-mobile {
        display: block;
    }
}

/* ===== LOADING ANIMATIONS ===== */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--gray-300);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}