/* ========================================
   D3I.HU - Responsive Styles
   ======================================== */

/* Large Desktops (1280px and up) - Default styles in style.css */

/* Desktops (1024px - 1279px) */
@media (max-width: 1279px) {
    :root {
        --container-padding: 2rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .footer-grid > div:last-child {
        grid-column: 1 / -1;
    }
}

/* Tablets (768px - 1023px) */
@media (max-width: 1023px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    .section {
        padding: var(--spacing-2xl) 0;
    }

    /* Navigation */
    .nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: var(--spacing-xl);
        transform: translateX(100%);
        transition: transform var(--transition-normal);
        z-index: 999;
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: var(--spacing-md) 0;
        font-size: 1.25rem;
        border-bottom: 1px solid var(--gray-light);
        width: 100%;
    }

    .lang-switcher {
        margin-top: var(--spacing-lg);
    }

    .mobile-toggle {
        display: flex;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: calc(80px + var(--spacing-2xl)) 0 var(--spacing-2xl);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-shapes {
        display: none;
    }

    /* Service Detail */
    .service-detail,
    .service-detail:nth-child(even) {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .service-detail-image {
        order: -1;
    }

    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
}

/* Mobile Landscape & Small Tablets (576px - 767px) */
@media (max-width: 767px) {
    :root {
        --container-padding: 1rem;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.125rem; }

    .section {
        padding: var(--spacing-xl) 0;
    }

    .section-header {
        margin-bottom: var(--spacing-xl);
    }

    /* Header */
    .header-inner {
        height: 70px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav {
        top: 70px;
    }

    /* Hero */
    .hero {
        padding: calc(70px + var(--spacing-xl)) 0 var(--spacing-xl);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-badge {
        font-size: 0.75rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Service Cards */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: var(--spacing-lg);
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: 2.5rem;
    }

    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: var(--spacing-sm);
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        flex-shrink: 0;
    }

    /* Testimonials */
    .testimonial-card {
        padding: var(--spacing-lg);
    }

    .testimonial-quote {
        font-size: 1rem;
    }

    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }

    /* CTA */
    .cta-section {
        padding: var(--spacing-2xl) 0;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .cta-section p {
        font-size: 1rem;
    }

    /* Page Header */
    .page-header {
        padding: calc(70px + var(--spacing-2xl)) 0 var(--spacing-2xl);
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    /* Pricing */
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card {
        padding: var(--spacing-lg);
    }

    .pricing-price {
        font-size: 2.5rem;
    }

    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    /* Team */
    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-avatar {
        width: 120px;
        height: 120px;
    }

    /* Values */
    .values-grid {
        grid-template-columns: 1fr;
    }

    .value-item {
        padding: var(--spacing-lg);
    }

    .value-icon {
        width: 64px;
        height: 64px;
    }

    .value-icon svg {
        width: 32px;
        height: 32px;
    }

    /* Contact */
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Mobile Portrait (320px - 575px) */
@media (max-width: 575px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-2xl: 2rem;
        --spacing-3xl: 2.5rem;
    }

    body {
        font-size: 0.9375rem;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Portfolio overlay always visible on mobile */
    .portfolio-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(31, 41, 55, 0.9) 0%, rgba(31, 41, 55, 0.3) 100%);
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.75rem;
    }

    /* FAQ */
    .faq-question {
        padding: var(--spacing-md);
        font-size: 0.9375rem;
    }

    .faq-item.active .faq-answer {
        padding: var(--spacing-md);
    }
}

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

    html {
        scroll-behavior: auto;
    }

    .fade-in,
    .slide-up {
        opacity: 1;
        transform: none;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .mobile-toggle,
    .hero-shapes,
    .btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .hero {
        min-height: auto;
        padding: 0;
        background: none;
    }

    .hero h1,
    h1, h2, h3, h4, h5, h6 {
        color: #000;
    }

    a {
        text-decoration: underline;
    }

    .section {
        padding: 1rem 0;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #059669;
        --gray: #4B5563;
        --gray-light: #D1D5DB;
    }

    .btn-primary {
        border: 2px solid var(--dark);
    }

    .nav-link::after {
        height: 3px;
    }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /*
    Can be enabled by adding a .dark-mode class toggle
    :root.dark-mode {
        --dark: #F9FAFB;
        --light: #1F2937;
        --white: #111827;
        --gray: #9CA3AF;
        --gray-light: #374151;
    }
    */
}

/* Dark Mode - Mobile Navigation */
@media (max-width: 1023px) {
    [data-theme="dark"] .nav {
        background-color: #111827;
    }

    [data-theme="dark"] .nav-link {
        color: #E5E7EB;
        border-bottom-color: #374151;
    }

    [data-theme="dark"] .mobile-toggle span {
        background-color: #F9FAFB;
    }

    [data-theme="dark"] .header {
        background-color: #111827;
    }
}
