/**
 * Responsive CSS
 * Mobile-first responsive styles
 *
 * @package Emine_Copuroglu_Theme
 */

/* ==========================================================================
   MOBILE STYLES (max-width: 767px)
   ========================================================================== */

@media (max-width: 767px) {
    /* Header - Mobile */
    .site-header__inner {
        flex-wrap: wrap;
    }

    .main-navigation {
        width: 100%;
        order: 3;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: none;
        border: none;
        cursor: pointer;
        order: 2;
    }

    .primary-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: var(--space-4) 0;
        background-color: var(--color-white);
        border-top: 1px solid var(--color-border);
    }

    .primary-menu.is-open {
        display: flex;
    }

    .primary-menu li {
        width: 100%;
    }

    .primary-menu a {
        padding: var(--space-3) 0;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-cta {
        display: none;
    }

    /* Footer - Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .footer-bottom__inner {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
    }

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

    /* Stats - Mobile */
    .stats-counter {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    /* Certifications - Mobile */
    .certifications-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    /* Testimonials Masonry - Mobile */
    .testimonials-masonry {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* Typography adjustments */
    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }

    h3 {
        font-size: var(--text-xl);
    }

    /* Section padding */
    .section {
        padding: var(--space-12) 0;
    }

    /* Container */
    .container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }

    /* Grid resets */
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

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

    .stat-item__number {
        font-size: var(--text-3xl);
    }

    /* Hero */
    .hero {
        padding: var(--space-12) 0;
    }

    .hero__buttons {
        flex-direction: column;
    }

    .hero__buttons .btn {
        width: 100%;
    }

    /* Service Cards */
    .services-grid {
        gap: var(--space-6);
    }

    /* Testimonials */
    .testimonials-grid {
        gap: var(--space-6);
    }

    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* About */
    .about-intro {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .about-credentials {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    /* Service Detail */
    .service-detail__header {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    /* Footer */
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .footer-bottom__content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

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

    .pricing-card--featured {
        transform: none;
    }

    /* Process Steps */
    .process-steps {
        flex-direction: column;
    }

    /* Team */
    .team-member {
        flex-direction: column;
        text-align: center;
    }

    .team-member__image {
        width: 150px;
        margin: 0 auto;
    }

    .team-member__social {
        justify-content: center;
    }

    /* WhatsApp Button */
    .whatsapp-float {
        bottom: var(--space-4);
        right: var(--space-4);
    }

    .whatsapp-float__tooltip {
        display: none;
    }

    /* Cookie Consent */
    .cookie-consent__content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-consent__buttons {
        width: 100%;
        flex-direction: column;
    }

    .cookie-consent__buttons .btn {
        width: 100%;
    }

    /* Buttons */
    .btn--lg {
        padding: var(--space-4) var(--space-8);
        font-size: var(--text-base);
    }

    /* Forms */
    .form-group {
        margin-bottom: var(--space-4);
    }

    /* Tabs */
    .tabs__nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs__nav::-webkit-scrollbar {
        display: none;
    }

    /* Modal */
    .modal__container {
        margin: var(--space-4);
        max-height: calc(100vh - var(--space-8));
    }
}

/* ==========================================================================
   TABLET (768px - 1023px)
   ========================================================================== */

@media (min-width: 768px) {
    /* Header - Tablet */
    .site-header__inner {
        flex-wrap: nowrap;
    }

    .main-navigation {
        width: auto;
        order: 2;
    }

    .menu-toggle {
        display: none;
    }

    .primary-menu {
        display: flex;
        flex-direction: row;
        width: auto;
        padding: 0;
        background-color: transparent;
        border-top: none;
        gap: var(--space-6);
    }

    .primary-menu li {
        width: auto;
    }

    .primary-menu a {
        padding: var(--space-2) 0;
        border-bottom: none;
    }

    .nav-cta {
        display: block;
        order: 3;
    }

    /* Footer - Tablet */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }

    .footer-bottom__inner {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
    }

    .footer-legal {
        justify-content: flex-end;
    }

    /* Typography */
    h1 {
        font-size: var(--text-4xl);
    }

    h2 {
        font-size: var(--text-3xl);
    }

    /* Section padding */
    .section {
        padding: var(--space-16) 0;
    }

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

    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .stat-item__number {
        font-size: var(--text-4xl);
    }

    /* Hero */
    .hero {
        padding: var(--space-16) 0;
    }

    .hero__buttons {
        flex-direction: row;
    }

    .hero__buttons .btn {
        width: auto;
    }

    /* About */
    .about-credentials {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Footer */
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom__content {
        flex-direction: row;
        text-align: left;
    }

    /* Pricing */
    .pricing-table {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Process Steps */
    .process-steps {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .process-step {
        flex: 0 0 calc(50% - var(--space-4));
    }

    /* Team */
    .team-member {
        flex-direction: row;
        text-align: left;
    }

    .team-member__image {
        margin: 0;
    }

    .team-member__social {
        justify-content: flex-start;
    }

    /* Cookie Consent */
    .cookie-consent__content {
        flex-direction: row;
        text-align: left;
    }

    .cookie-consent__buttons {
        width: auto;
        flex-direction: row;
    }

    .cookie-consent__buttons .btn {
        width: auto;
    }
}

/* ==========================================================================
   DESKTOP (1024px - 1439px)
   ========================================================================== */

@media (min-width: 1024px) {
    /* Header - Desktop */
    .primary-menu {
        gap: var(--space-8);
    }

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

    /* Typography */
    h1 {
        font-size: var(--text-5xl);
    }

    h2 {
        font-size: var(--text-4xl);
    }

    /* Section padding */
    .section {
        padding: var(--space-20) 0;
    }

    /* Container */
    .container {
        padding-left: var(--space-6);
        padding-right: var(--space-6);
    }

    /* Grid */
    .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Hero */
    .hero {
        padding: var(--space-20) 0;
    }

    /* About */
    .about-intro {
        grid-template-columns: 1fr 1fr;
    }

    .about-credentials {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Service Detail */
    .service-detail__header {
        grid-template-columns: 1fr 1fr;
    }

    /* Blog */
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Footer */
    .footer-widgets {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Pricing */
    .pricing-table {
        grid-template-columns: repeat(3, 1fr);
    }

    .pricing-card--featured {
        transform: scale(1.05);
    }

    .pricing-card--featured:hover {
        transform: scale(1.05) translateY(-8px);
    }

    /* Process Steps */
    .process-step {
        flex: 1;
        min-width: auto;
    }

    /* WhatsApp */
    .whatsapp-float__tooltip {
        display: block;
    }
}

/* ==========================================================================
   LARGE DESKTOP (1440px+)
   ========================================================================== */

@media (min-width: 1440px) {
    /* Container */
    .container {
        max-width: var(--container-2xl);
    }

    /* Section */
    .section {
        padding: var(--space-24) 0;
    }
}

/* ==========================================================================
   HEIGHT-BASED ADJUSTMENTS
   ========================================================================== */

/* Short screens */
@media (max-height: 600px) {
    .hero {
        padding: var(--space-8) 0;
    }

    .modal__container {
        max-height: calc(100vh - var(--space-4));
    }
}

/* ==========================================================================
   LANDSCAPE MOBILE
   ========================================================================== */

@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        padding: var(--space-8) 0;
        min-height: auto;
    }

    .hero__title {
        font-size: var(--text-2xl);
    }
}

/* ==========================================================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================================================== */

@media (hover: none) {
    /* Remove hover effects on touch devices */
    .card:hover,
    .service-card:hover,
    .testimonial-card:hover,
    .blog-card:hover {
        transform: none;
    }

    /* Make touch targets larger */
    .btn {
        min-height: 48px;
    }

    .social-links__item {
        min-width: 48px;
        min-height: 48px;
    }

    /* Disable tooltip on touch */
    .tooltip:hover .tooltip__content {
        opacity: 0;
        visibility: hidden;
    }
}

/* ==========================================================================
   HIGH DPI SCREENS
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Use higher resolution images where needed */
    .logo img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ==========================================================================
   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;
    }
}

/* ==========================================================================
   DARK MODE SUPPORT (Future)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    /*
     * Dark mode styles can be added here when needed
     * Currently using light mode only as per design requirements
     */
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    /* Hide non-essential elements */
    .site-header,
    .site-footer,
    .whatsapp-float,
    .cookie-consent,
    .btn,
    nav,
    .social-links,
    .sidebar {
        display: none !important;
    }

    /* Reset colors */
    body {
        color: #000;
        background: #fff;
    }

    /* Reset shadows and borders */
    .card,
    .service-card,
    .testimonial-card,
    .blog-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    /* Page breaks */
    .section {
        page-break-inside: avoid;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    /* Links */
    a {
        text-decoration: underline;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }

    /* Images */
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}
