/* Responsive CSS for Advanced WP Theme */

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    .col-lg-8,
    .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .sidebar {
        margin-top: 2rem;
    }
    
    .woocommerce ul.products li.product {
        flex: 0 0 calc(50% - 30px);
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    .site-branding {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .main-navigation {
        justify-content: center;
    }
    
    .menu-toggle {
        display: block;
        margin: 0 auto;
    }
    
    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    
    .main-navigation.toggled ul {
        display: flex;
    }
    
    .main-navigation li {
        margin: 0;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .main-navigation li:last-child {
        border-bottom: none;
    }
    
    .post-navigation .nav-links {
        flex-direction: column;
    }
    
    .post-navigation .nav-previous,
    .post-navigation .nav-next {
        flex: 0 0 100%;
        margin-bottom: 1rem;
    }
    
    .post-navigation .nav-next {
        text-align: left;
    }
    
    .comment-form-author,
    .comment-form-email,
    .comment-form-url {
        float: none;
        width: 100%;
    }
    
    .woocommerce .cart-collaterals .cart_totals,
    .woocommerce-page .cart-collaterals .cart_totals {
        float: none;
        width: 100%;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        max-width: 100%;
        padding-right: 15px;
        padding-left: 15px;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .site-description {
        font-size: 0.875rem;
    }
    
    .entry-title {
        font-size: 1.5rem;
    }
    
    .entry-meta {
        font-size: 0.75rem;
    }
    
    .entry-content {
        font-size: 0.875rem;
    }
    
    .woocommerce ul.products li.product {
        flex: 0 0 calc(100% - 30px);
    }
    
    .woocommerce-page table.cart td.actions .coupon .input-text,
    .woocommerce-page table.cart td.actions .coupon .button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* RTL Support */
html[dir="rtl"] .main-navigation {
    justify-content: flex-start;
}

html[dir="rtl"] .post-navigation .nav-previous {
    text-align: left;
}

html[dir="rtl"] .post-navigation .nav-next {
    text-align: right;
}

html[dir="rtl"] .entry-content ul,
html[dir="rtl"] .entry-content ol {
    padding-right: 1.5rem;
    padding-left: 0;
}

html[dir="rtl"] .entry-content blockquote {
    border-left: none;
    border-right: 4px solid var(--bs-primary);
}

/* Print Styles */
@media print {
    .site-header,
    .main-navigation,
    .site-footer,
    .comments-area,
    .widget-area,
    .post-navigation {
        display: none;
    }
    
    .site-content {
        margin: 0;
        padding: 0;
    }
    
    .entry-content a {
        word-wrap: break-word;
    }
    
    .entry-content a:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        font-weight: normal;
    }
    
    .entry-content img {
        page-break-inside: avoid;
    }
    
    .entry-content p,
    .entry-content h2,
    .entry-content h3 {
        orphans: 3;
        widows: 3;
    }
    
    .entry-content h2,
    .entry-content h3 {
        page-break-after: avoid;
    }
}
