/* ===================================
   RESPONSIVE STYLES - CodeMentor.it
   =================================== */

/* Tablet Styles */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .code-window {
        max-width: 100%;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Navigation */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    /* Hero Section */
    .hero {
        padding: 6rem 0 3rem;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
    
    /* Sections */
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    /* Skills Grid */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
    
    /* Methodology */
    .methodology-steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .methodology-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-contact ul li {
        justify-content: center;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .code-content {
        font-size: 0.75rem;
        padding: 1rem;
    }
    
    .skill-tag {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 4rem 0 2rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-buttons,
    .contact-form,
    .footer {
        display: none;
    }
    
    .hero {
        padding: 2rem 0;
        min-height: auto;
    }
    
    .section {
        padding: 1rem 0;
    }
    
    .service-card,
    .skill-category {
        break-inside: avoid;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .service-icon,
    .step-number {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --border-color: #374151;
    }
    
    .navbar {
        background: rgba(17, 24, 39, 0.95);
    }
    
    .nav-links {
        background: rgba(17, 24, 39, 0.98);
    }
    
    .service-card,
    .skill-category,
    .contact-form {
        background: var(--bg-secondary);
    }
    
    .code-window {
        background: #0f172a;
    }
    
    .window-header {
        background: #1e293b;
    }
}

/* Focus Styles for Accessibility */
@media (max-width: 768px) {
    .nav-link:focus {
        background: var(--bg-secondary);
        padding: 0.5rem;
        border-radius: var(--border-radius);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}