/**
 * ThetaVerse Theme - Enhanced Responsive Design
 * 
 * @package ThetaVerse
 * @version 1.0
 */

/* Mobile-First Responsive Design */

/* Extra Small Devices (phones, 320px and up) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.4rem;
    }
}

/* Small Devices (landscape phones, 481px and up) */
@media (min-width: 481px) and (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Medium Devices (tablets, 769px and up) */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Devices (desktops, 1025px and up) */
@media (min-width: 1025px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .site-header {
        padding: 0.5rem 0;
    }
    
    .header-content {
        position: relative;
    }
    
    .main-navigation {
        position: relative;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1001;
    }
    
    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background: #1e3a8a;
        margin: 3px 0;
        transition: 0.3s;
        border-radius: 2px;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 1rem 1rem;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
        text-align: center;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
        border-radius: 0.5rem;
        transition: background-color 0.3s ease;
    }
    
    .nav-menu a:hover {
        background-color: #f8fafc;
    }
    
    .language-switcher {
        justify-content: center;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #e5e7eb;
    }
}

/* Touch-Friendly Interactions */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 48px;
        padding: 1rem 2rem;
    }
    
    .nav-menu a {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .service-card {
        transition: none;
    }
    
    .service-card:active {
        transform: scale(0.98);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section::before {
        background-image: url('../images/hero-digital-transformation.jpg');
        background-size: cover;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        padding: 80px 0 40px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section {
        padding: 60px 0;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .hero-cta,
    .contact-form,
    .language-switcher {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        color: #000 !important;
        padding: 2rem 0;
    }
    
    .hero-title,
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
    }
    
    .service-card {
        border: 1px solid #ccc;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-section::before {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .site-header {
        background: rgba(17, 24, 39, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .site-logo,
    .nav-menu a {
        color: #f9fafb;
    }
    
    .nav-menu a:hover {
        color: #3b82f6;
    }
    
    .service-card {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .service-title {
        color: #60a5fa;
    }
    
    .service-description {
        color: #d1d5db;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.nav-menu a:focus,
.lang-link:focus,
input:focus,
textarea:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999999;
    padding: 8px 16px;
    background: #000;
    color: #fff;
    text-decoration: none;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Enhanced Hover Effects */
@media (hover: hover) {
    .service-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    }
    
    .btn:hover {
        transform: translateY(-2px);
    }
    
    .nav-menu a:hover::after {
        width: 100%;
    }
}

/* Grid Fallbacks for Older Browsers */
@supports not (display: grid) {
    .services-grid {
        display: flex;
        flex-wrap: wrap;
    }
    
    .service-card {
        flex: 1 1 300px;
        margin: 1rem;
    }
    
    .about-content,
    .contact-content {
        display: flex;
        flex-wrap: wrap;
    }
    
    .about-content > *,
    .contact-content > * {
        flex: 1 1 300px;
        margin: 1rem;
    }
}

/* Enhanced Typography for Better Readability */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    h2 {
        font-size: 3rem;
    }
    
    p {
        font-size: 1.125rem;
        line-height: 1.7;
    }
}

