/**
 * استایل‌های ریسپانسیو - طرهان وب
 *
 * @package TarhanWeb_News
 * @version 1.0.1
 */

/* ============================================
   TABLET (992px - 1200px)
   ============================================ */
@media (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }
    
    .content-grid {
        grid-template-columns: 1fr 280px;
        gap: 20px;
    }
    
    .ads-column {
        display: none;
    }
    
    .slider-wrapper {
        grid-template-columns: 1fr;
    }
    
    .popular-widget {
        display: none;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   TABLET SMALL (768px - 992px)
   ============================================ */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .widgets-column {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .post-wrapper {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-inner {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .header-search {
        order: 3;
        width: 100%;
        max-width: none;
    }
    
    .site-logo img {
        height: 50px !important;
    }
}

/* ============================================
   MOBILE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 10px;
    }
    
    /* Header */
    .site-header {
        position: relative;
    }
    
    .header-top {
        font-size: 12px;
        padding: 8px 0;
    }
    
    .header-top .header-top-links {
        display: none;
    }
    
    .header-main {
        padding: 10px 0;
    }
    
    .header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .site-logo img {
        height: 40px !important;
        max-width: 150px !important;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .header-search {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 15px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 100;
    }
    
    .header-search.active {
        display: block;
    }
    
    .header-social {
        display: none;
    }
    
    /* Mobile Menu Toggle */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        padding: 10px;
        background: var(--primary-color);
        border-radius: 8px;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }
    
    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: white;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Navigation */
    .main-navigation {
        position: relative;
    }
    
    .nav-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 0;
        margin: 0;
        z-index: 999;
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }
    
    .nav-menu.active {
        display: flex !important;
    }
    
    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-menu > li > a {
        padding: 15px;
        font-size: 14px;
    }
    
    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        box-shadow: none;
        background: rgba(255,255,255,0.05);
        min-width: auto;
        border-radius: 0;
    }
    
    .nav-menu .sub-menu.active {
        display: block;
    }
    
    .nav-menu .sub-menu a {
        padding: 12px 25px;
        font-size: 13px;
    }
    
    /* Breaking News */
    .breaking-inner {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .breaking-label {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .ticker-wrapper {
        width: 100%;
    }
    
    .ticker-item {
        font-size: 13px;
    }
    
    /* Slider */
    .slider-section {
        padding: 15px 0;
    }
    
    .main-slider {
        border-radius: 8px;
    }
    
    .slide-content {
        padding: 15px;
    }
    
    .slide-title {
        font-size: 16px !important;
        line-height: 1.4;
    }
    
    .slide-category {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .slide-meta {
        font-size: 12px;
        gap: 10px;
    }
    
    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .slider-dots {
        bottom: 10px;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
    
    /* Main Content */
    .main-content {
        padding: 15px 0;
    }
    
    .latest-news-column {
        padding: 15px;
        border-radius: 8px;
    }
    
    .section-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .section-title::before {
        height: 20px;
    }
    
    /* News Items */
    .news-item {
        flex-direction: column;
        gap: 12px;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    
    .news-image {
        width: 100%;
        height: 180px;
    }
    
    .news-category {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .news-title {
        font-size: 16px;
        line-height: 1.5;
    }
    
    .news-excerpt {
        font-size: 13px;
        line-height: 1.7;
        -webkit-line-clamp: 2;
    }
    
    .news-meta {
        font-size: 12px;
        gap: 10px;
    }
    
    /* Widgets Column */
    .widgets-column {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .widget-box {
        padding: 15px;
        border-radius: 8px;
    }
    
    .widget-title {
        font-size: 16px;
    }
    
    /* Media Gallery */
    .media-gallery-section {
        padding: 30px 0;
    }
    
    .media-gallery-title {
        font-size: 20px;
    }
    
    .media-tabs {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .media-tab {
        padding: 8px 20px;
        font-size: 14px;
    }
    
    .media-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .media-card {
        aspect-ratio: 16/9;
    }
    
    /* Footer */
    .site-footer {
        padding-top: 30px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .footer-widget {
        padding: 15px;
    }
    
    .footer-widget-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .footer-logo img {
        height: 40px;
    }
    
    .social-links {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .social-link {
        padding: 10px;
    }
    
    .social-icon {
        font-size: 20px;
    }
    
    .social-name {
        font-size: 11px;
    }
    
    /* Single Post */
    .single-post {
        padding: 15px 0;
    }
    
    .post-main {
        padding: 15px;
        border-radius: 8px;
    }
    
    .post-title {
        font-size: 20px !important;
        line-height: 1.4;
    }
    
    .post-subtitle {
        font-size: 14px;
        padding: 10px;
    }
    
    .post-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px;
    }
    
    .post-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .post-action-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .post-featured-image {
        margin-bottom: 20px;
    }
    
    .post-content {
        font-size: 15px;
        line-height: 1.9;
    }
    
    .post-content h2 {
        font-size: 20px;
    }
    
    .post-content h3 {
        font-size: 18px;
    }
    
    /* Reporter Card */
    .reporter-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 15px;
    }
    
    .reporter-avatar {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }
    
    .reporter-name {
        font-size: 18px;
    }
    
    /* Social Share */
    .social-share {
        padding: 15px;
    }
    
    .social-share-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .share-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .share-btn span:first-child {
        font-size: 16px;
    }
    
    /* Related Posts */
    .related-posts {
        margin-top: 30px;
        padding-top: 20px;
    }
    
    .related-title {
        font-size: 18px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .related-image {
        height: 150px;
    }
    
    /* Comments */
    .comments-section {
        margin-top: 30px;
        padding: 15px;
    }
    
    .comments-title {
        font-size: 18px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px;
    }
    
    .submit-comment {
        width: 100%;
        padding: 12px;
    }
    
    /* Comment Item */
    .comment {
        padding: 15px;
    }
    
    .comment-avatar {
        width: 40px;
        height: 40px;
    }
    
    .comment-author-name {
        font-size: 14px;
    }
    
    .comment-content {
        font-size: 14px;
    }
    
    /* Pagination */
    .pagination {
        margin-top: 20px;
    }
    
    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        padding: 10px;
        font-size: 12px;
        margin: 10px 0;
    }
    
    /* Scroll to Top */
    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 20px;
        left: 20px;
    }
    
    /* 404 Page */
    .error-404 {
        padding: 30px 0;
    }
    
    .error-404 div:first-child {
        font-size: 5rem !important;
    }
    
    .error-404 h1 {
        font-size: 20px !important;
    }
}

/* ============================================
   SMALL MOBILE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .site-logo img {
        height: 35px !important;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .slide-title {
        font-size: 14px !important;
    }
    
    .news-image {
        height: 150px;
    }
    
    .news-title {
        font-size: 15px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .post-title {
        font-size: 18px !important;
    }
    
    .media-tab {
        padding: 6px 15px;
        font-size: 13px;
    }
    
    .social-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom {
        padding: 15px 0;
    }
    
    .footer-copyright {
        font-size: 12px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .site-header,
    .breaking-news,
    .sidebar,
    .site-footer,
    .comments-section,
    .related-posts,
    .post-actions,
    .social-share,
    .scroll-to-top,
    .menu-toggle {
        display: none !important;
    }
    
    .post-main {
        box-shadow: none;
        padding: 0;
        max-width: 100%;
    }
    
    .post-title {
        font-size: 24pt;
    }
    
    .post-content {
        font-size: 12pt;
        line-height: 1.6;
    }
    
    a {
        text-decoration: none;
    }
    
    .post-content a::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
}
