/*
Theme Name: My Metro Theme
Theme URI:  https://example.com/
Author:     Your Name
Author URI: https://example.com/
Description: A dynamic WordPress theme with multiple metro layout options.
Version:    1.0
License:    GPL-2.0-or-later
Text Domain: my-metro-theme
*/

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

a {
    text-decoration: none;
    color: #0073aa;
}

a:hover {
    color: #005a87;
}

/* ========== HEADER & FOOTER ========== */
.site-header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 30px;
}

.site-branding {
    text-align: center;
    margin-bottom: 15px;
}

.site-title {
    font-size: 2.5rem;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.main-navigation a {
    font-weight: 500;
}

.site-footer {
    background: #fff;
    padding: 20px;
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid #eaeaea;
}

/* ========== MAIN CONTAINER ========== */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== SECTION TITLES ========== */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    display: inline-block;
}

/* ========== DEFAULT GRID LAYOUT ========== */
.post-grid.default-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.grid-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.grid-item .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.grid-item .entry-content {
    padding: 20px;
}

.grid-item .entry-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.entry-meta {
    color: #777;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.entry-summary {
    color: #555;
    font-size: 0.95rem;
}

/* ========== FULL THUMBNAIL LAYOUT ========== */
.post-grid.full-grid {
    display: block;
}

.full-thumb {
    display: block;
    margin-bottom: 30px;
}

.full-thumb .post-thumbnail img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
}

/* ========== TICKER LAYOUT ========== */
.post-grid.ticker-grid {
    background: #fff;
    border-radius: 8px;
    padding: 5px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.ticker-item {
    display: flex;
    align-items: baseline;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.ticker-item:last-child {
    border-bottom: none;
}

.ticker-category {
    font-weight: 700;
    color: #d32f2f;
    min-width: 120px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.ticker-title {
    margin: 0 20px 0 0;
    flex-grow: 1;
    font-size: 1.1rem;
}

.ticker-title a {
    color: #333;
}

.ticker-time {
    color: #888;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ========== RECTANGLE LAYOUT ========== */
.post-grid.rectangle-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.rectangle-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.rectangle-item .post-thumbnail {
    flex: 0 0 40%;
}

.rectangle-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rectangle-item .entry-content {
    flex: 1;
    padding: 20px;
}

@media (max-width: 768px) {
    .post-grid.rectangle-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== SMALL SIDE BANNER LAYOUT ========== */
.post-grid.small-banner-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.banner-main .banner-item:first-child .post-thumbnail img {
    height: 300px;
}

.banner-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.banner-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.banner-item .post-thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.banner-item .entry-content {
    padding: 15px;
}

.banner-item .entry-title {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .post-grid.small-banner-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== EDITOR'S CHOICE LAYOUT ========== */
.post-grid.editor-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.editor-choice-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-top: 4px solid #d32f2f;
}

.editor-choice-item .post-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.editor-choice-badge {
    background: #d32f2f;
    color: #fff;
    font-size: 0.8rem;
    padding: 4px 10px;
    display: inline-block;
    margin-bottom: 10px;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: 700;
}

@media (max-width: 768px) {
    .post-grid.editor-choice-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== RECENT POSTS LAYOUT ========== */
.post-grid.recent-grid {
    display: block;
}

.recent-item {
    display: flex;
    gap: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.recent-thumb {
    flex: 0 0 100px;
}

.recent-thumb img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.recent-content {
    flex: 1;
}

.recent-title {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.recent-date {
    color: #888;
    font-size: 0.9rem;
}

/* ========== MOST VIEWED LAYOUT ========== */
.post-grid.most-viewed-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.most-viewed-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

.view-count {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 2;
}

.view-count i {
    margin-right: 5px;
}

.most-viewed-item .post-thumbnail {
    flex: 0 0 40%;
}

.most-viewed-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.most-viewed-item .entry-content {
    flex: 1;
    padding: 20px;
}

@media (max-width: 768px) {
    .post-grid.most-viewed-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== EXTRA CONTENT SECTION ========== */
.custom-homepage-content {
    margin-top: 40px;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}