/**
 * Gazete Manşetleri Page CSS
 * Template: page-templates/gazete-mansetleri.php
 * Layout: Grid (4 sütun)
 *
 * @package News_Theme
 * @version 1.2.0
 */

/* ===== SCROLL FIX - MASAÜSTÜ ===== */
html {
    height: 100%;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
}

body {
    min-height: 100vh !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
}

body .site-main {
    flex: 1 1 auto !important;
    display: block !important;
    min-height: 70vh !important;
    width: 100% !important;
}

body .site-footer {
    flex-shrink: 0 !important;
    margin-top: 0 !important;
    width: 100% !important;
}

.gm-container {
    min-height: 600px;
    padding-bottom: 80px;
}

/* ===== Layout Overrides ===== */
body .site-breadcrumb,
body .breadcrumb,
body .page-header,
body .entry-header,
body .entry-title,
body h1.entry-title,
body .page-title,
body header.entry-header,
body .ast-archive-description,
body .archive-header,
body .page-banner,
body .hero-section {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

body .site-content,
body .ast-container,
body #content,
body .content-wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body .sidebar,
body aside,
body #secondary,
body .widget-area {
    display: none !important;
}

body .content-area,
body main,
body #primary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body .site-main {
    flex: 1 1 auto !important;
}

body .entry-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* ===== Page Header ===== */
.gm-page-header {
    background: linear-gradient(135deg, #c0392b 0%, #8e2b1f 100%);
    color: #fff;
    padding: 15px 0;
    margin: 0 0 30px 0;
    box-sizing: border-box;
}

.gm-page-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-sizing: border-box;
}

.gm-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.gm-title-icon {
    font-size: 20px;
}

/* ===== Filters ===== */
.gm-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gm-filter-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.gm-filter-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.gm-filter-btn.active {
    background: #fff;
    color: #c0392b;
    border-color: #fff;
}

/* ===== Container ===== */
.gm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

/* ===== Grid Container ===== */
.gm-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* ===== Newspaper Card ===== */
.gm-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gm-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.gm-card-image {
    position: relative;
    width: 100%;
    padding-top: 141.42%; /* A4 oranı (297/210) */
    background: #f5f5f5;
    overflow: hidden;
}

.gm-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gm-no-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    color: #ccc;
}

.gm-card-content {
    padding: 12px;
}

.gm-card-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
}

.gm-card-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12px;
}

.gm-category {
    padding: 3px 8px;
    background: #c0392b;
    color: #fff;
    border-radius: 3px;
    font-weight: 500;
}

.gm-date {
    color: #7f8c8d;
}

/* ===== Loading State ===== */
.gm-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

/* ===== Update Info ===== */
.gm-update-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
}

.update-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Lightbox ===== */
.gm-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gm-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
}

.gm-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.gm-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.gm-lightbox-close:hover {
    transform: scale(1.2);
}

.gm-lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 80px);
    object-fit: contain;
    border-radius: 8px;
}

.gm-lightbox-info {
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 15px 20px;
    margin-top: 10px;
    border-radius: 8px;
    text-align: center;
}

.gm-lightbox-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

.gm-lightbox-info p {
    margin: 0;
    font-size: 13px;
    opacity: 0.8;
}

/* ===== Dark Mode ===== */
body.dark-mode .gm-page-header {
    background: linear-gradient(135deg, #8e2b1f 0%, #5c1a13 100%);
}

body.dark-mode .gm-card {
    background: var(--dark-bg-secondary, #1a1a1a);
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

body.dark-mode .gm-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.6);
}

body.dark-mode .gm-card-image {
    background: #2a2a2a;
}

body.dark-mode .gm-card-title {
    color: var(--dark-text-primary, #e0e0e0);
}

body.dark-mode .gm-category {
    background: #c0392b;
}

body.dark-mode .gm-date {
    color: var(--dark-text-secondary, #888);
}

body.dark-mode .gm-update-info {
    background: var(--dark-bg-primary, #0d0d0d);
    border-color: var(--dark-border, #2a2a2a);
    color: var(--dark-text-secondary, #888);
}

body.dark-mode .update-dot {
    background: #4ade80;
}

body.dark-mode .gm-loading {
    color: var(--dark-text-secondary, #888);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .gm-page-header-inner,
    .gm-container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .gm-grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .gm-page-header {
        padding: 12px 0;
        margin: 0 0 15px 0;
    }
    
    .gm-page-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .gm-title {
        font-size: 16px;
    }
    
    .gm-title-icon {
        font-size: 18px;
    }
    
    .gm-filters {
        width: 100%;
        justify-content: flex-start;
    }
    
    .gm-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .gm-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .gm-card-content {
        padding: 10px;
    }
    
    .gm-card-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .gm-card-meta {
        font-size: 11px;
        gap: 6px;
    }
    
    .gm-category {
        padding: 2px 6px;
        font-size: 10px;
    }
    
    .gm-update-info {
        padding: 10px 15px;
        font-size: 11px;
    }
    
    .gm-lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .gm-lightbox-close {
        top: -35px;
        font-size: 32px;
    }
    
    .gm-lightbox-image {
        max-height: calc(95vh - 60px);
    }
}

@media (max-width: 480px) {
    .gm-page-header {
        padding: 10px 0;
    }
    
    .gm-page-header-inner,
    .gm-container {
        padding: 0 12px !important;
    }
    
    .gm-title {
        font-size: 14px;
    }
    
    .gm-title-icon {
        font-size: 16px;
    }
    
    .gm-filter-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .gm-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .gm-card-content {
        padding: 8px;
    }
    
    .gm-card-title {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .gm-lightbox-info h3 {
        font-size: 16px;
    }
    
    .gm-lightbox-info p {
        font-size: 12px;
    }
}

/* ===== Tek sütun için özel stil (çok küçük ekranlar) ===== */
@media (max-width: 360px) {
    .gm-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .gm-card-title {
        font-size: 11px;
    }
    
    .gm-card-content {
        padding: 6px;
    }
}