/**
 * Responsive Styles for Nexus Pro
 *
 * @package Nexus Pro
 * @since 1.0.0
 */

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    .header-container {
        flex-wrap: wrap;
    }
    
    .main-navigation {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    .main-menu {
        flex-direction: column;
        display: none;
        width: 100%;
    }
    
    .main-menu.active {
        display: flex;
    }
    
    .main-menu li {
        margin: 0;
        width: 100%;
    }
    
    .main-menu a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--gray-light);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-menu .sub-menu {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background-color: transparent;
    }
    
    .main-menu .menu-item-has-children.active > .sub-menu {
        display: block;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    
    .hero-section {
        padding: 6rem 0 4rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .page-numbers {
        margin-bottom: 0.5rem;
    }
    
    /* Landing page adjustments */
    .landing-hero .hero-overlay h1 {
        font-size: 2rem;
    }
    
    /* Portfolio page */
    .portfolio-filters {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 1rem;
    }
    
    .filter-btn {
        margin-right: 0.5rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 15px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .header-search {
        width: 100%;
        margin-top: 1rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    /* Comments */
    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comment-author-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    /* Portfolio page */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    /* Forms */
    .comment-form-author,
    .comment-form-email,
    .comment-form-url {
        width: 100%;
        float: none;
        margin-right: 0;
    }
    
    /* Back to top button */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

/* Print styles */
@media print {
    .site-header,
    .main-navigation,
    .sidebar,
    .site-footer,
    .back-to-top,
    .comments-area,
    .pagination {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }
    
    img {
        max-width: 100% !important;
    }
    
    .entry-content {
        width: 100%;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    p, h2, h3 {
        orphans: 3;
        widows: 3;
    }
    
    pre, blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }
    
    thead {
        display: table-header-group;
    }
    
    tr, img {
        page-break-inside: avoid;
    }
}