/**
 * Responsive Styles
 * Italia Delight Theme
 */

/* ===== Mobile First Responsive Utilities ===== */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }

    /* Grid */
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Flex */
    .md\:flex {
        display: flex;
    }

    .md\:flex-row {
        flex-direction: row;
    }

    /* Display */
    .md\:hidden {
        display: none;
    }

    .md\:block {
        display: block;
    }

    /* Typography */
    .md\:text-left {
        text-align: left;
    }

    .md\:text-3xl {
        font-size: var(--font-size-3xl);
    }

    .md\:text-5xl {
        font-size: var(--font-size-5xl);
    }

    /* Spacing */
    .md\:py-16 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .md\:py-20 {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    .md\:gap-12 {
        gap: 3rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }

    /* Grid */
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Extra extra large devices (1280px and up) */
@media (min-width: 1280px) {
    .container {
        max-width: var(--container-max-width);
    }
}

/* ===== Component-Specific Responsive Styles ===== */

/* Header */
@media (max-width: 767px) {
    .site-header .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .site-logo {
        width: 150px;
        height: auto;
    }
}

/* Footer */
@media (max-width: 767px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .legal-bar .flex {
        flex-direction: column;
        text-align: center;
    }

    .footer-cta-button {
        width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Posts Grid */
@media (max-width: 767px) {
    .post-card {
        margin-bottom: 1.5rem;
    }

    .post-hero {
        height: 200px;
    }
}

/* Typography Responsive */
@media (max-width: 767px) {
    h1 {
        font-size: var(--font-size-3xl);
    }

    h2 {
        font-size: var(--font-size-2xl);
    }

    h3 {
        font-size: var(--font-size-xl);
    }
}

/* Container Padding */
@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .site-header,
    .mobile-menu,
    .social-share,
    .related-posts,
    .comments-area,
    .site-footer {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
        color: #000;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }

    .single-post-article {
        max-width: 100%;
    }

    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}

/* ===== Accessibility - Prefers 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;
    }
}

/* ===== Dark Mode Support (optional) ===== */
@media (prefers-color-scheme: dark) {
    /* This can be expanded if dark mode is needed in the future */
}

/* ===== Touch Device Optimization ===== */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch target sizes for mobile */
    .nav-link,
    .footer-link,
    .mobile-menu-link,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Remove hover effects on touch devices */
    .post-card:hover,
    .blog-card:hover {
        transform: none;
    }
}
