/* Responsive Design */
/* Tablet and Mobile Optimization */

/* ===== Tablet (768px - 1024px) ===== */
@media (max-width: 1024px) {
    /* Container */
    .container {
        padding: 0 var(--space-md);
    }

    /* Navbar */
    .navbar-container {
        height: 70px;
    }

    .navbar-logo {
        font-size: var(--font-size-xl);
    }

    .navbar-menu {
        gap: var(--space-lg);
    }

    /* Hero */
    .hero {
        padding-top: 70px;
    }

    .hero-title {
        font-size: clamp(36px, 5vw, 48px);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

    .hero-cta-group .btn {
        min-width: 180px;
    }

    /* About */
    .about {
        padding: var(--space-3xl) 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .about-content {
        order: 2;
    }

    .about-image {
        order: 1;
    }

    .about-title {
        font-size: clamp(28px, 4vw, 40px);
    }

    /* Services */
    .services {
        padding: var(--space-3xl) 0;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .service-card {
        padding: var(--space-xl);
    }

    /* Portfolio */
    .portfolio {
        padding: var(--space-3xl) 0;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .portfolio-item-large {
        grid-column: span 1;
        grid-row: span 1;
    }

    .portfolio-item-large .portfolio-image {
        min-height: 400px;
    }

    /* Testimonials */
    .testimonials {
        padding: var(--space-3xl) 0;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    /* CTA */
    .cta {
        padding: var(--space-3xl) 0;
    }

    .cta-title {
        font-size: clamp(28px, 4vw, 40px);
    }

    .cta-contact {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Footer */
    .footer {
        padding: var(--space-2xl) 0 var(--space-lg);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }

    .footer-column:first-child {
        grid-column: span 2;
    }

    /* Section Header */
    .section-header {
        margin-bottom: var(--space-2xl);
    }

    .section-title {
        font-size: clamp(28px, 4vw, 40px);
    }

    /* Stats */
    .stat-number {
        font-size: clamp(28px, 4vw, 40px);
    }
}

/* ===== Mobile (< 768px) ===== */
@media (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 var(--space-md);
    }

    /* Navbar */
    .navbar {
        height: 70px;
    }

    .navbar-container {
        height: 70px;
    }

    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-background);
        flex-direction: column;
        justify-content: center;
        gap: var(--space-lg);
        padding: var(--space-xl);
        transform: translateX(100%);
        transition: transform var(--transition-base) ease;
    }

    .navbar-menu.active {
        transform: translateX(0);
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-link {
        font-size: var(--font-size-lg);
        text-align: center;
    }

    .navbar-cta {
        width: 100%;
        text-align: center;
    }

    /* Hero */
    .hero {
        min-height: 100vh;
        padding: var(--space-xl) 0;
        align-items: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(28px, 8vw, 42px);
        line-height: 1.2;
        margin-bottom: var(--space-md);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
        line-height: var(--line-height-relaxed);
        margin-bottom: var(--space-xl);
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .hero-cta-group .btn {
        width: 100%;
        min-width: auto;
    }

    .hero-scroll-indicator {
        display: none;
    }

    /* About */
    .about {
        padding: var(--space-3xl) 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .about-content {
        order: 2;
        text-align: center;
    }

    .about-image {
        order: 1;
    }

    .about-title {
        font-size: clamp(24px, 6vw, 32px);
        text-align: center;
    }

    .about-text {
        font-size: var(--font-size-base);
        text-align: center;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        margin-top: var(--space-xl);
    }

    .stat-number {
        font-size: clamp(28px, 8vw, 42px);
    }

    /* Services */
    .services {
        padding: var(--space-3xl) 0;
    }

    .section-header {
        text-align: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .service-card {
        padding: var(--space-lg);
        text-align: center;
    }

    .service-icon {
        margin: 0 auto var(--space-md);
    }

    .service-title {
        font-size: var(--font-size-xl);
        text-align: center;
    }

    .service-description {
        font-size: var(--font-size-base);
        text-align: center;
    }

    /* Portfolio */
    .portfolio {
        padding: var(--space-3xl) 0;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .portfolio-item-large {
        grid-column: span 1;
        grid-row: span 1;
    }

    .portfolio-item-large .portfolio-image {
        min-height: 300px;
    }

    .portfolio-cta {
        text-align: center;
    }

    .portfolio-cta .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Testimonials */
    .testimonials {
        padding: var(--space-3xl) 0;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .testimonial-card {
        padding: var(--space-lg);
        text-align: center;
    }

    .testimonial-text {
        font-size: var(--font-size-base);
    }

    /* CTA */
    .cta {
        padding: var(--space-3xl) 0;
    }

    .cta-content {
        text-align: center;
    }

    .cta-title {
        font-size: clamp(24px, 6vw, 32px);
        text-align: center;
    }

    .cta-subtitle {
        font-size: var(--font-size-base);
        text-align: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 100%;
    }

    .cta-contact {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        padding: var(--space-lg);
    }

    .contact-item {
        text-align: center;
    }

    /* Footer */
    .footer {
        padding: var(--space-2xl) 0 var(--space-lg);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-column {
        text-align: center;
    }

    .footer-tagline {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links {
        align-items: center;
    }

    .footer-copyright p {
        font-size: var(--font-size-xs);
    }

    /* Section Header */
    .section-header {
        margin-bottom: var(--space-xl);
    }

    .section-title {
        font-size: clamp(24px, 6vw, 32px);
    }

    .section-subtitle {
        font-size: var(--font-size-base);
    }

    /* Buttons */
    .btn {
        padding: var(--space-sm) var(--space-lg);
        font-size: var(--font-size-sm);
    }

    .btn-large {
        padding: var(--space-md) var(--space-xl);
        font-size: var(--font-size-base);
    }

    /* Typography */
    h1 {
        font-size: clamp(28px, 8vw, 42px);
    }

    h2 {
        font-size: clamp(24px, 6vw, 32px);
    }

    h3 {
        font-size: clamp(20px, 5vw, 28px);
    }

    h4 {
        font-size: var(--font-size-xl);
    }

    /* Spacing Adjustments */
    .py-3xl {
        padding-top: var(--space-2xl);
        padding-bottom: var(--space-2xl);
    }

    .mb-3xl {
        margin-bottom: var(--space-2xl);
    }

    /* Grid Adjustments */
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-6 {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    /* Flex Adjustments */
    .flex-col-mobile {
        flex-direction: column;
    }

    .items-center-mobile {
        align-items: center;
    }

    .justify-center-mobile {
        justify-content: center;
    }

    .text-center-mobile {
        text-align: center;
    }

    .mx-auto-mobile {
        margin-left: auto;
        margin-right: auto;
    }

    /* Hide elements on mobile */
    .hidden-mobile {
        display: none !important;
    }
}

/* ===== Small Mobile (< 480px) ===== */
@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 var(--space-sm);
    }

    /* Hero */
    .hero {
        padding: var(--space-lg) 0;
    }

    .hero-title {
        font-size: clamp(24px, 10vw, 36px);
    }

    /* About */
    .about {
        padding: var(--space-2xl) 0;
    }

    .about-title {
        font-size: clamp(20px, 8vw, 28px);
    }

    .about-text {
        font-size: var(--font-size-sm);
    }

    .about-stats {
        gap: var(--space-md);
    }

    .stat-number {
        font-size: clamp(24px, 10vw, 36px);
    }

    .stat-label {
        font-size: var(--font-size-xs);
    }

    /* Services */
    .services {
        padding: var(--space-2xl) 0;
    }

    .service-card {
        padding: var(--space-md);
    }

    .service-icon {
        width: 48px;
        height: 48px;
    }

    .service-icon svg {
        width: 36px;
        height: 36px;
    }

    .service-title {
        font-size: var(--font-size-lg);
    }

    .service-description {
        font-size: var(--font-size-sm);
    }

    /* Portfolio */
    .portfolio {
        padding: var(--space-2xl) 0;
    }

    .portfolio-grid {
        gap: var(--space-md);
    }

    /* Testimonials */
    .testimonials {
        padding: var(--space-2xl) 0;
    }

    .testimonial-card {
        padding: var(--space-md);
    }

    .testimonial-text {
        font-size: var(--font-size-sm);
    }

    /* CTA */
    .cta {
        padding: var(--space-2xl) 0;
    }

    .cta-title {
        font-size: clamp(20px, 8vw, 28px);
    }

    .cta-subtitle {
        font-size: var(--font-size-sm);
    }

    .cta-contact {
        padding: var(--space-md);
        gap: var(--space-md);
    }

    .contact-value {
        font-size: var(--font-size-sm);
    }

    /* Footer */
    .footer {
        padding: var(--space-xl) 0 var(--space-md);
    }

    .footer-grid {
        gap: var(--space-lg);
    }

    .footer-tagline {
        font-size: var(--font-size-sm);
    }

    /* Buttons */
    .btn {
        padding: var(--space-xs) var(--space-md);
        font-size: var(--font-size-xs);
    }

    .btn-large {
        padding: var(--space-sm) var(--space-lg);
        font-size: var(--font-size-sm);
    }

    /* Typography */
    h1 {
        font-size: clamp(20px, 10vw, 32px);
    }

    h2 {
        font-size: clamp(18px, 8vw, 28px);
    }

    h3 {
        font-size: clamp(16px, 6vw, 24px);
    }

    /* Section Label */
    .section-label {
        font-size: var(--font-size-xs);
    }

    /* Spacing */
    .section-header {
        margin-bottom: var(--space-lg);
    }

    .section-title {
        margin-bottom: var(--space-sm);
    }

    .section-subtitle {
        margin-bottom: 0;
    }
}

/* ===== Landscape Mobile (max-height: 500px) ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }

    .hero-title {
        font-size: clamp(24px, 4vw, 36px);
    }

    .hero-subtitle {
        font-size: var(--font-size-sm);
    }

    .hero-cta-group {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .hero-scroll-indicator {
        display: none;
    }

    .about,
    .services,
    .portfolio,
    .testimonials,
    .cta {
        padding: var(--space-xl) 0;
    }
}

/* ===== Print Styles ===== */
@media print {
    .navbar,
    .preloader,
    .hero-scroll-indicator,
    .cta,
    .footer-social {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: var(--space-xl) 0;
    }

    .hero-background,
    .hero-overlay {
        position: static;
    }

    body {
        font-size: 12pt;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    a {
        text-decoration: underline;
    }

    .btn {
        display: none;
    }
}

/* ===== High DPI/Retina Displays ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Enhance rendering for high DPI displays */
    .image-placeholder {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ===== Dark Mode Specific Adjustments ===== */
@media (prefers-color-scheme: dark) {
    @media (max-width: 768px) {
        .navbar-menu {
            background: var(--color-background-dark);
        }
    }
}