
/* Responsive Design for MonogrammedNapkins.com */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr 250px;
        gap: 2rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .comparison-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Tablets */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1000;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .nav-link {
        font-size: 1.25rem;
        margin: 1rem 0;
    }
    
    /* Hero Section */
    .hero {
        height: 60vh;
        min-height: 500px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .btn {
        padding: 10px 20px;
        width: 100%;
        max-width: 280px;
    }
    
    /* Content Layout */
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .content {
        padding: 2rem;
    }
    
    .sidebar {
        order: -1;
    }
    
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    /* Grids */
    .category-grid,
    .comparison-grid,
    .gallery-grid,
    .color-palette-grid,
    .occasion-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .trending-grid,
    .guide-steps,
    .resource-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .font-showcase {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    /* Pros/Cons Layout */
    .pros-cons {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Tables of Contents */
    .toc-container {
        padding: 1.5rem;
    }
    
    /* Sections */
    section {
        padding: 3rem 0;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
    }
    
    /* Shopping Guide */
    .shopping-steps {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .shop-links {
        grid-template-columns: 1fr;
    }
    
    /* Occasion Tabs */
    .occasion-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .tab-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    /* Navigation */
    .navbar .container {
        padding: 1rem 10px;
    }
    
    .nav-brand h1 {
        font-size: 1.5rem;
    }
    
    /* Hero Section */
    .hero {
        height: 50vh;
        min-height: 400px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-content p {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    /* Content */
    .content {
        padding: 1.5rem;
    }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .page-header p {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Cards and Components */
    .category-card,
    .comparison-card,
    .style-showcase,
    .palette-card,
    .design-idea {
        margin: 0 5px;
    }
    
    .category-card,
    .trend-item,
    .step,
    .resource-card {
        padding: 1.5rem;
    }
    
    .comparison-card {
        padding: 1.5rem;
    }
    
    /* Images */
    .category-card img,
    .trend-item img,
    .style-showcase img,
    .color-preview img,
    .design-idea img {
        height: 150px;
    }
    
    .comparison-card img {
        height: 120px;
    }
    
    /* Font Preview */
    .font-preview {
        font-size: 2rem;
        height: 60px;
    }
    
    /* Color Swatches */
    .swatch {
        width: 25px;
        height: 25px;
    }
    
    .dot {
        width: 15px;
        height: 15px;
    }
    
    /* Sidebar */
    .sidebar-section {
        padding: 1rem;
    }
    
    .product-item {
        flex-direction: column;
        text-align: center;
    }
    
    .product-item img {
        width: 50px;
        height: 50px;
        margin: 0 auto 0.5rem;
    }
    
    /* Newsletter Form */
    .newsletter-form input,
    .newsletter-form button {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Tables of Contents */
    .toc-container {
        padding: 1rem;
    }
    
    .toc a {
        font-size: 0.9rem;
    }
    
    /* Affiliate Sections */
    .affiliate-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .product-rec {
        padding: 0.75rem;
    }
    
    /* Ad Placeholders */
    .ad-placeholder {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Shopping Guide */
    .shopping-guide {
        padding: 2rem 1rem;
        margin: 2rem 0;
    }
    
    .shopping-steps {
        grid-template-columns: 1fr;
    }
    
    .shop-step {
        padding: 1rem;
    }
    
    .step-num {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 1rem;
    }
    
    .affiliate-shopping {
        padding: 1.5rem;
    }
    
    /* Breadcrumbs */
    .breadcrumbs {
        font-size: 0.9rem;
    }
    
    /* Sections */
    section {
        padding: 2rem 0;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
    
    /* Occasion Tabs */
    .tab-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        margin: 0.2rem;
    }
    
    /* Design Specs */
    .design-specs {
        padding: 0.75rem;
    }
    
    .design-specs span {
        font-size: 0.8rem;
    }
    
    /* Color Details */
    .color-details {
        padding: 0.75rem;
    }
    
    .color-details li {
        font-size: 0.8rem;
    }
    
    /* Style Tags */
    .style-tag,
    .font-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Very Small Mobile Phones */
@media (max-width: 320px) {
    .container {
        padding: 0 5px;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .content {
        padding: 1rem;
    }
    
    .category-card,
    .comparison-card,
    .trend-item,
    .step,
    .resource-card {
        padding: 1rem;
    }
    
    .sidebar-section {
        padding: 0.75rem;
    }
    
    .toc-container,
    .affiliate-section {
        padding: 1rem;
    }
    
    .shopping-guide {
        padding: 1.5rem 0.75rem;
    }
    
    .font-preview {
        font-size: 1.5rem;
        height: 50px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .breadcrumbs,
    .sidebar,
    .footer,
    .ad-placeholder,
    .affiliate-section,
    .shopping-guide,
    .newsletter-form,
    .social-links {
        display: none;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .content {
        box-shadow: none;
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black;
        page-break-after: avoid;
    }
    
    .page-header {
        background: none;
        border: none;
        padding: 1rem 0;
    }
    
    .category-card,
    .comparison-card,
    .style-showcase,
    .palette-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    a {
        color: black;
        text-decoration: none;
    }
    
    a:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure images and icons look crisp on high DPI displays */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Currently maintaining light theme only as specified */
    /* Future dark mode styles can be added here */
}

/* Landscape Orientation on Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: 70vh;
    }
    
    .nav-menu {
        padding-top: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .page-header {
        padding: 1.5rem 0;
    }
}

/* iPad Pro and Large Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 2fr 1fr;
    }
    
    .category-grid,
    .comparison-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trending-grid,
    .guide-steps {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .font-showcase {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Ultra-wide Screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .comparison-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .color-palette-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero-content h1 {
        font-size: 4.5rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .tab-button {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .category-card:hover,
    .style-showcase:hover,
    .palette-card:hover,
    .design-idea:hover {
        transform: none;
    }
    
    .category-card:active,
    .style-showcase:active,
    .palette-card:active,
    .design-idea:active {
        transform: scale(0.98);
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-transparency) {
    .affiliate-section,
    .shop-step,
    .product-item {
        background: solid colors instead of transparent overlays;
    }
}

/* Focus Styles for Keyboard Navigation */
@media (prefers-reduced-motion: no-preference) {
    .nav-link:focus,
    .btn:focus,
    .tab-button:focus,
    .affiliate-link:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}
