/* Responsive CSS - Solution365 */

/* Tablet - Large (1024px and below) */
@media (max-width: 1024px) {
    .container {
        --container-padding: 2rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 4vw, 3.5rem);
    }
    
    .hero-stats {
        gap: var(--spacing-lg);
    }
    
    .about-content {
        gap: var(--spacing-2xl);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .certifications-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-2xl);
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* Tablet - Medium (768px and below) */
@media (max-width: 768px) {
    /* Prevent horizontal overflow */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    .hero {
        overflow: hidden;
    }
    /* Navigation */
    .mobile-menu-toggle {
        display: flex;
        z-index: var(--z-tooltip);
        width: 40px;
        height: 40px;
        padding: var(--spacing-sm);
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem;
        gap: var(--spacing-lg);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: transform var(--transition-base);
        z-index: var(--z-modal);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-link {
        font-size: var(--font-size-lg);
        width: 100%;
        padding: var(--spacing-sm) 0;
    }
    
    .cta-nav {
        width: 100%;
        text-align: center;
    }
    
    /* Hero */
    .hero {
        min-height: 100vh;
        padding-top: 80px;
    }
    
    .hero-content {
        padding: var(--spacing-2xl) 0;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
    
    .profile-photo {
        object-position: 35% center;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .footer-brand {
        margin-bottom: var(--spacing-sm);
    }
    
    .footer-links,
    .footer-contact {
        margin-bottom: var(--spacing-md);
    }
    
    .footer-links ul {
        display: flex;
        justify-content: center;
        gap: var(--spacing-lg);
    }
    
    .footer h4 {
        margin-bottom: var(--spacing-sm);
    }
}

/* Mobile - Large (640px and below) */
@media (max-width: 640px) {
    /* Typography */
    .section-title {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
        line-height: 1.2;
    }
    
    .section-subtitle {
        font-size: var(--font-size-lg);
        line-height: 1.5;
    }
    
    p {
        font-size: var(--font-size-base);
        line-height: 1.7;
    }
    
    /* Certifications */
    .certifications-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0;
        margin: 0;
    }
    
    .cert-badge {
        width: 80px;
        height: 80px;
    }

    .cert-icon {
        width: 60px;
        height: 60px;
        font-size: 60px;
    }
    
    .cert-card h3 {
        font-size: var(--font-size-lg);
        margin-top: var(--spacing-sm);
    }
    
    .cert-card p {
        font-size: var(--font-size-sm);
        display: none;
    }
    
    /* Blog */
    .blog-card {
        box-shadow: var(--shadow-sm);
    }
}

/* Mobile - Small (480px and below) */
@media (max-width: 480px) {
    /* Base */
    .container {
        --container-padding: 1rem;
    }
    
    /* Certifications specific fix */
    .certifications .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Logo adjustments */
    .logo-img {
        width: 200px;
        max-width: 70vw;
    }
    
    .footer-logo {
        width: 250px;
        max-width: 80vw;
    }
    
    /* Hero */
    .hero-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
        line-height: 1.6;
    }
    
    .stat-number {
        font-size: var(--font-size-3xl);
    }
    
    /* Sections */
    section {
        padding: var(--spacing-2xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-xl);
    }
    
    /* About */
    .about-text h3 {
        font-size: var(--font-size-2xl);
    }
    
    .highlight-item {
        font-size: var(--font-size-sm);
    }
    
    /* Services */
    .service-card {
        padding: var(--spacing-lg);
    }
    
    .service-card h3 {
        font-size: var(--font-size-xl);
        margin-top: var(--spacing-md);
    }
    
    .service-card p {
        font-size: var(--font-size-base);
        line-height: 1.6;
    }
    
    .service-icon {
        width: 56px;
        height: 56px;
        padding: var(--spacing-sm);
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }
    
    .footer-links ul {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* Mobile - Extra Small (360px and below) */
@media (max-width: 360px) {
    /* Hero */
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    /* Certifications */
    .certifications-grid {
        grid-template-columns: 1fr;
    }
    
    .cert-card {
        padding: var(--spacing-sm);
        margin: 0;
    }
}

/* Landscape Mode Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }
    
    .hero-content {
        padding: var(--spacing-xl) 0;
    }
    
    .hero-stats {
        display: none;
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Crisp borders and shadows */
    .service-card,
    .cert-card,
    .blog-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
                    0 4px 16px rgba(0, 0, 0, 0.08);
    }
    
    /* Thinner borders for retina */
    .form-group input,
    .form-group textarea {
        border-bottom-width: 1px;
    }
}

/* Print Styles */
@media print {
    /* Hide non-essential elements */
    .navbar,
    .hero-background,
    .hero-particles,
    .hero-cta,
    .contact,
    .footer-bottom {
        display: none !important;
    }
    
    /* Reset colors for print */
    body {
        color: #000;
        background: #fff;
    }
    
    .section-title,
    .service-card h3,
    .cert-card h3 {
        color: #000;
    }
    
    /* Ensure content breaks properly */
    .service-card,
    .cert-card {
        break-inside: avoid;
    }
    
    section {
        break-after: auto;
    }
}

/* Accessibility - Reduced Motion */
@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 {
        display: none;
    }
}

/* Dark Mode Support (if user prefers) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed in future */
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .nav-link,
    .btn {
        min-height: 48px;
        display: flex;
        align-items: center;
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    /* Remove hover effects on touch devices */
    .service-card:hover,
    .cert-card:hover,
    .blog-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    
    /* Active states instead of hover */
    .btn:active {
        transform: scale(0.98);
    }
    
    /* Better touch areas for cards */
    .service-card,
    .cert-card {
        min-height: 120px;
        cursor: pointer;
    }
}

/* Ultra-wide Screens */
@media (min-width: 1920px) {
    .container {
        --container-max-width: 1400px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
}