/* ==========================================================================
   1. ΚΑΤΗΓΟΡΙΑ - ΒΑΣΙΚΕΣ ΡΥΘΜΙΣΕΙΣ
   ========================================================================== */
.category-page {
    padding-block: 2rem 4rem;
}

.category-page .section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eaeaea;
}

/* ==========================================================================
   2. TOP GRID (Τα Πρώτα 5 Άρθρα + 1 Διαφήμιση)
   ========================================================================== */
.category-top-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Στήλες αυστηρά */
    gap: 1.5rem; 
    margin-bottom: 4rem;
}

/* 1η Γραμμή: Το 1ο και 2ο παιδί (Άρθρα) πιάνουν από 2 στήλες (50% - 50%) */
.category-top-grid > *:nth-child(1),
.category-top-grid > *:nth-child(2) { 
    grid-column: span 2;
	aspect-ratio: 5 / 3;
    width: 100%;
}

@media screen and (max-width:584px){
	/* 1η Γραμμή: Το 1ο και 2ο παιδί (Άρθρα) πιάνουν από 2 στήλες (50% - 50%) */
.category-top-grid > *:nth-child(1),
.category-top-grid > *:nth-child(2) { 
	aspect-ratio: inherit;
	}
}

/* 2η Γραμμή: Όλα τα επόμενα (3ο, 4ο, 5ο Άρθρο + Διαφήμιση) πιάνουν 1 στήλη (25%) */
.category-top-grid > *:nth-child(n+3) { 
    grid-column: span 1; 
}

/* Μεγαλώνουμε τους τίτλους ΜΟΝΟ στα 2 πρώτα (μεγάλα) άρθρα */
.category-top-grid > *:nth-child(1) .card-title,
.category-top-grid > *:nth-child(2) .card-title { 
    font-size: 2rem; 
}

.category-top-ad {
    background-color: transparent;
    width: 100%;
    height: 100%;
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
	min-width:300px;
}

/* Σπάσιμο του Top Grid στα Media Queries */
@media screen and (max-width: 980px) {
    .category-top-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    .category-top-grid > * { 
        grid-column: span 1 !important; 
    }
    .category-top-grid > *:nth-child(1) .card-title,
    .category-top-grid > *:nth-child(2) .card-title { 
        font-size: 1.5rem; 
    }
}

@media screen and (max-width: 584px) {
    .category-top-grid { 
        grid-template-columns: 1fr; 
    }
}

/* ==========================================================================
   3. MAIN GRID (Τα υπόλοιπα 21 άρθρα - 1fr 320px)
   ========================================================================== */
.category-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.5rem;
}

.category-main-column {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* 3άδες στο Desktop */
.category-articles-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 1.5rem;
}

/* Κρύβουμε τις mobile in-text διαφημίσεις στο Desktop */
.mobile-inline-ad {
    display: none;
}

/* ==========================================================================
   4. ΔΕΞΙΑ ΣΤΗΛΗ & STICKY ADS 
   ========================================================================== */
.category-sidebar {
    position: relative;
    height: 100%;
}

.sidebar-sticky-wrapper {
    position: sticky;
    top: 75px; /* Το ύψος κάτω από το fixed header */
    display: flex;
    flex-direction: column;
    gap: 2rem; 
    width: 100%;
}

.box.rect { 
    width: 100%;
    max-width: 300px; 
    min-height: 250px; 
    margin: 0 auto; 
    display: flex;
    justify-content: center;
}

.box.rect > div[style*="display: none"] { 
    display: none !important; 
}

/* ==========================================================================
   5. PAGINATION (Σελιδοποίηση)
   ========================================================================== */
.pagination {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eaeaea;
    display: flex;
    justify-content: center;
}
.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.pagination .nav-links a, 
.pagination .nav-links span {
    padding: 0.5rem 1rem;
    background-color: #f2f2f2;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.pagination .nav-links a:hover {
    background-color: var(--colorGold);
    color: #fff;
}
.pagination .nav-links .current {
    background-color: #000;
    color: var(--colorGold);
}

.screen-reader-text {display:none;}

/* ==========================================================================
   ΣΤΑΘΕΡΟ ΠΛΑΤΟΣ 300px ΓΙΑ ΤΗ ΔΙΑΦΗΜΙΣΗ ΣΤΟ TOP GRID (DESKTOP)
   ========================================================================== */
@media screen and (min-width: 981px) {
    .category-top-grid > :last-child {
        width: 300px;
        max-width: 300px;
        margin-inline: auto; /* Κεντράρει το κουτί αν υπάρχει διαθέσιμος χώρος */
        /* Αν το category-top-grid χρησιμοποιεί display: grid, ίσως χρειαστεί και: */
        justify-self: center; 
    }
}

/* ==========================================================================
   6. RESPONSIVE MEDIA QUERIES (Βάσει οδηγιών)
   ========================================================================== */

/* Breakpoint 1: Μέχρι 1220px (Προσαρμογή κενών) */
@media screen and (max-width: 1220px) {
    .category-top-grid { gap: 1.5rem; }
    .category-layout-grid { gap: 2rem; }
    .category-articles-list { gap: 1.5rem; }
}

/* Breakpoint 2: Από 980px και κάτω (Σπάσιμο Layout) */
@media screen and (max-width: 980px) {
    
    /* 1. Εξαφανίζουμε πλήρως τη δεξιά στήλη (sidebar) */
    .category-sidebar { display: none !important; }
    .category-layout-grid { grid-template-columns: 1fr; }

    /* 2. Το Top Grid γίνεται 2 στήλες. ΟΛΑ τα στοιχεία πιάνουν από 1 στήλη */
    .category-top-grid { grid-template-columns: repeat(2, 1fr); }
    
    .category-top-grid > div:nth-of-type(1),
    .category-top-grid > div:nth-of-type(2) { 
        grid-column: span 1; 
    }
    
    /* Μικραίνουμε τους τίτλους στα 2 πρώτα (επειδή πλέον είναι μικρά) */
    .category-top-grid > div:nth-of-type(1) .card-title,
    .category-top-grid > div:nth-of-type(2) .card-title { 
        font-size: 1.5rem; 
    }
    
    /* 3. Τα 21 άρθρα γίνονται 2άδες (δυάδες) */
    .category-articles-list { grid-template-columns: repeat(2, 1fr); }

    /* 4. Εμφανίζουμε τις In-Text διαφημίσεις και τις κάνουμε να πιάνουν ΟΛΟ το πλάτος */
    .mobile-inline-ad {
        display: flex;
        justify-content: center;
        grid-column: 1 / -1; /* Κάνει τη διαφήμιση full-width μέσα στο grid */
        margin-block: 1rem;
        width: 100%;
        overflow: hidden;
    }
}

/* Breakpoint 3: Κάτω από 584px (Κινητά) */
@media screen and (max-width: 584px) {
    
    /* Ένα - ένα άρθρο ανά σειρά στο κινητό παντού */
    .category-top-grid { 
        grid-template-columns: 1fr; 
        gap: 1.25rem;
    }
    
    .category-articles-list { 
        grid-template-columns: 1fr; 
        gap: 1.25rem;
    }
    
    /* Στοίχιση της σελιδοποίησης στο κέντρο */
    .pagination .nav-links { 
        justify-content: center; 
    }
}

/* ==========================================================================
   8. AUTHOR PAGE HEADER (Σελίδα Συντάκτη - Βελτιωμένο)
   ========================================================================== */
.author-page-header {
    margin-block: 2rem 4rem; /* Δίνουμε λίγο αέρα πάνω-κάτω */
    padding-bottom: 3rem;
    text-align: center;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Φωτογραφία Προφίλ --- */
.author-page-image {
    margin-bottom: 1.5rem;
}

.author-page-image img {
    width: 150px; 
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #fff;
    /* Premium Effect: Περίγραμμα με "αέρα" (padding) */
    border: 3px solid var(--colorGold); 
    padding: 4px; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.08); /* Απαλή σκιά για βάθος */
    margin: 0 auto;
}

/* --- Όνομα Συντάκτη --- */
/* Κάνουμε override το κεντρικό .section-header για να φύγει η περίεργη γραμμή */
.author-page-title {
    border: none !important;
    margin-bottom: 1rem;
    padding: 0 !important;
    justify-content: center;
}

.author-page-title h1 {
    font-family: "Fira Sans Extra Condensed", sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: #000;
    text-transform: uppercase;
    margin: 0;
}

/* --- Βιογραφικό --- */
.author-page-bio {
    max-width: 700px; /* Λίγο πιο στενό για να μη διαβάζεται σαν "σεντόνι" */
    margin: 0 auto 1.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
    color: #555; /* Απαλό γκρι για να κάνει αντίθεση με το μαύρο όνομα */
}

/* --- Social Icons --- */
.author-social-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.author-social-links ul {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
}

.author-social-links ul li {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f2f2f2;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    
    /* Κεντράρισμα των SVG εικονιδίων */
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 20px !important; /* Λίγο μεγαλύτερα εικονίδια */
}

.author-social-links ul li a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Hover Effect */
.author-social-links ul li:hover {
    background-color: var(--colorGold);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    filter: invert(1) brightness(200%); 
}

/* * Σωστά paths από τον φάκελο CSS προς τον φάκελο Icons 
 * Υποθέτουμε ότι η δομή είναι: assets/css/category.css ΚΑΙ assets/icons/...
 */
.author-social-links .fb { background-image: url('../icons/fb.svg'); }
.author-social-links .ig { background-image: url('../icons/ig.svg'); }
.author-social-links .tw { background-image: url('../icons/x.png'); } 
.author-social-links .tk { background-image: url('../icons/tk.svg'); }
.author-social-links .ln { background-image: url('../icons/in.svg'); } 


/* --- Mobile Αναλογίες --- */
@media screen and (max-width: 620px) {
    .author-page-title h1 { font-size: 2rem; }
    .author-page-image img { width: 120px; height: 120px; }
    .author-page-bio { font-size: 1rem; padding-inline: 1rem; }
}

/* ==========================================================================
   BLOGGERS ARCHIVE PAGE (category-blog.php)
   ========================================================================== */
.blog-archive-page {
    padding-bottom: 4rem;
}

.bloggers-archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2rem;
    margin-bottom: 3rem;
}

/* --- Η Οριζόντια Κάρτα (Λευκή με σκιά) --- */
.blog-horizontal-card {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06); /* Πολύ απαλή σκιά */
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-horizontal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Το αόρατο link πάνω από όλη την κάρτα */
.blog-horizontal-card .card-main-link {
    position: absolute;
    inset: 0;
    z-index: 10;
}

/* --- Φωτογραφία Blogger (Αριστερά) --- */
.blog-card-avatar {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    margin-right: 1.5rem;
}

.blog-card-avatar img {
    width: 100%;
    height: 100%;
    /* Squircle effect όπως στη φωτογραφία σου */
    border-radius: 25px; 
    object-fit: cover;
    display: block;
}

/* --- Περιεχόμενο Κάρτας (Δεξιά) --- */
.blog-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 11; /* Πάνω από το link για να πιάνει κλικ αν χρειαστεί */
}

/* Όνομα Blogger */
.blog-card-author {
    font-size: 1.1rem;
    color: #555;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

/* Τίτλος Άρθρου (Italic) */
.blog-card-title {
    font-family: "Fira Sans Extra Condensed", sans-serif; /* Ή όποια είναι η βασική σου */
    font-size: 1.4rem;
    line-height: 1.3;
    color: #111;
    font-weight: 600;
    font-style: italic; /* Το χαρακτηριστικό italic του screenshot */
    margin: 0;
    
    /* Περιορισμός στις 3 σειρές αν είναι τεράστιος τίτλος */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ημερομηνία (Κάτω δεξιά) */
.blog-card-date {
    text-align: right;
    font-size: 0.85rem;
    color: var(--colorGold, #c6a260);
    font-weight: 600;
    margin-top: 1rem;
}

/* --- Κλάση για τις Full-Width Διαφημίσεις μέσα στο Grid --- */
.full-width-grid-ad {
    grid-column: 1 / -1; /* Αναγκάζει τη διαφήμιση να πιάσει όλο το πλάτος */
    margin-block: 1rem;
    display: flex;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media screen and (max-width: 980px) {
    .bloggers-archive-grid {
        grid-template-columns: 1fr; /* Γίνεται 1 στήλη σε μικρές οθόνες */
        gap: 1.5rem;
    }
}

@media screen and (max-width: 584px) {
    .blog-horizontal-card {
        flex-direction: column; /* Στα κινητά η φώτο πάει πάνω και το κείμενο κάτω */
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .blog-card-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .blog-card-date {
        text-align: center; /* Κεντράρισμα της ημερομηνίας στα κινητά */
    }
}

/* ==========================================================================
   ΓΕΝΙΚΟ STYLE ΣΕΛΙΔΟΠΟΙΗΣΗΣ (PAGINATION)
   ========================================================================== */
.pagination .nav-links a.page-numbers, 
.pagination .nav-links span.page-numbers {
    padding: 0.5rem 1rem;
    background-color: #f2f2f2;
    border-radius: 6px;
    font-weight: 600;
    color: #111;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pagination .nav-links a.page-numbers:hover {
    background-color: var(--colorGold, #c6a260);
    color: #fff;
}

/* Το ενεργό (τρέχον) νούμερο σελίδας */
.pagination .nav-links span.page-numbers.current {
    background-color: #000;
    color: var(--colorGold, #c6a260);
}

/* ==========================================================================
   MATCH CENTER GRID LAYOUT (1fr 320px)
   ========================================================================== */
.match-center-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 3rem;
    margin-top: 3rem;
}

.match-center-main-column {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Δεξιά Στήλη */
.match-center-sidebar {
    position: relative;
    height: 100%;
}

.sidebar-sticky-wrapper {
    position: sticky;
    top: 140px; 
    display: flex;
    flex-direction: column;
    gap: 2rem; 
    width: 100%;
}

.match-center-sidebar .box.rect { 
    width: 100%;
    max-width: 300px; 
    min-height: 250px; 
    margin: 0 auto; 
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media screen and (max-width: 1120px) {
    .match-center-layout-grid { gap: 2rem; }
}

@media screen and (max-width: 980px) {
    /* Εξαφανίζουμε τις Sidebars στα κινητά */
    .match-center-sidebar { display: none !important; }
    .match-center-layout-grid { grid-template-columns: 1fr; }
}

/* Εμφάνιση των mobile ads ΜΟΝΟ κάτω από 980px */
.mobile-inline-ad { display: none; }
@media screen and (max-width: 980px) {
    .mobile-inline-ad { display: flex; justify-content: center; width: 100%; }
}

/* ==========================================================================
   MATCH CENTER PAGE (category-match-center.php)
   ========================================================================== */

/* --- 1. Μαύρο Header (Τίτλος MATCH CENTER) --- */
.match-center-header {
    background-color: #000;
    color: var(--colorGold, #c6a260);
    text-align: center;
    padding-block: 3rem;
    margin-bottom: 0;
}

.match-center-header h2 {
    font-size: 3.5rem;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- 2. Σκούρο Γκρι Μενού Αθλημάτων --- */
.match-categories {
    background-color: #222;
    padding-block: 0;
}

.match-categories-list {
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.match-category {
    padding: 1.25rem 2rem;
    transition: background-color 0.3s ease;
}

.match-category a {
    color: #fff;
    font-family: 'Fira Sans Extra Condensed', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.match-category:hover,
.match-category.on {
    background-color: #000;
}

.match-category.on a {
    color: var(--colorGold, #c6a260);
}

/* --- 3. Μενού Επιλογής (Αγώνες, Αποτελέσματα, Βαθμολογίες) --- */
.match-list-type {
    justify-content: flex-start;
    gap: 1rem;
    margin-block: 3rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eaeaea;
}

.match-list-type-option {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 2px solid #ccc;
    background-color: #fff;
    color: #333;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.match-list-type-option:hover {
    border-color: #000;
    color: #000;
}

.match-list-type-option.on {
    background-color: #000;
    border-color: #000;
    color: var(--colorGold, #c6a260);
}

/* --- 4. Λίστα Αγώνων (Match Items) --- */
.match-list-container {
    width: 100%;
}

.match-item {
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.match-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.match-item-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    color: #000;
    text-decoration: none;
}

/* Εικονίδιο αθλήματος στα αριστερά */
.match-icon {
    width: 40px;
    height: 40px;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.match-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Πληροφορίες αγώνα (Ημερομηνία, Ώρα) */
.match-item .top {
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    margin-right: auto; /* Σπρώχνει το σκορ/ομάδες στο κέντρο */
}

.match-item .competition {
    color: var(--colorGold, #c6a260);
    text-transform: uppercase;
}

/* Ομάδες & Σκορ */
.match-item .home,
.match-item .away {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.match-item .home {
    justify-content: flex-end;
    text-align: right;
}

.match-item .away {
    justify-content: flex-start;
    text-align: left;
}

.match-item .team-name {
    font-family: 'Fira Sans Extra Condensed', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
}

.match-item .team-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.match-item .dash {
    font-size: 1.5rem;
    color: #ccc;
    font-weight: 800;
}

.match-item .score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #000;
    color: var(--colorGold, #c6a260);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 1.5rem;
    font-weight: 800;
    min-width: 80px;
    justify-content: center;
    position: relative;
}

.match-item .score .dash {
    color: #fff;
}

/* --- 5. Empty State (Όταν δεν υπάρχουν αγώνες) --- */
.empty-state {
    font-size: 1.2rem;
    color: #666;
    background: #f9f9f9;
    padding: 3rem;
    text-align: center;
    border-radius: 8px;
    font-weight: 500;
}

/* ==========================================================================
   MATCH CENTER RESPONSIVE
   ========================================================================== */
@media screen and (max-width: 980px) {
    .match-categories-list {
        flex-wrap: nowrap;
        overflow-x: auto; /* Scroll αν δεν χωράνε τα αθλήματα */
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .match-category {
        white-space: nowrap;
    }
}

@media screen and (max-width: 768px) {
    .match-center-header h2 {
        font-size: 2.5rem;
    }
    
    .match-list-type {
        justify-content: center;
        flex-wrap: wrap;
    }

    .match-item {
        flex-direction: column;
        padding: 1rem;
    }

    .match-icon {
        margin: 0 auto 1rem;
    }

    .match-item .top {
        margin: 0 auto 1.5rem;
        align-items: center;
        text-align: center;
    }

    .match-item-info {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
    }

    .match-item .home,
    .match-item .away {
        justify-content: center;
        text-align: center;
        flex-direction: column-reverse; /* Το logo πάει πάνω από το όνομα */
    }

    .match-item .away {
        flex-direction: column;
    }
}