/*
Theme Name: FileDown Theme
Author: Team TM
Description: A clean software download theme layout (FileDown).
Version: 1.2
Text Domain: filedown
*/

/* --- 1. VARIABLES & RESET --- */
:root {
    --primary-green: #00bfa5; /* Signature Green */
    --primary-dark: #00897b;  
    --accent-orange: #ff9800; 
    --text-main: #333333;
    --text-light: #666666;
    --bg-light: #f5f7fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; }

/* --- 2. LAYOUT UTILITIES --- */
.filedown-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Flex Wrapper for Columns */
.filedown-layout-wrapper, 
.main-container,
.dl-layout-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 30px;
    margin-bottom: 50px;
}

/* Main Content Column */
.home-main-column, 
.content-col,
.dl-main-col {
    flex: 1;
    min-width: 0;
}

/* Sidebar Column */
.home-sidebar, 
.sidebar-col,
.dl-sidebar-col {
    width: 350px;
    flex-shrink: 0;
}

/* --- 3. HEADER & BREADCRUMBS --- */
header.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: relative;
    z-index: 10;
}

/* Post/Page Header Bar (Cyan Gradient) */
.post-head-bar {
    background: linear-gradient(90deg, #00d2d3 0%, #00e5ff 100%);
    color: #fff;
    padding: 15px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.head-inner {
    max-width: 1300px; 
    margin: 0 auto; 
    padding: 0 15px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}
.head-title { font-size: 18px; font-weight: 600; margin: 0; }
.head-breadcrumb { font-size: 13px; opacity: 0.9; }
.head-breadcrumb a { color: #fff; text-decoration: none; }
.head-breadcrumb span { margin: 0 5px; opacity: 0.6; }

/* --- 4. SOFTWARE LIST ITEM (Grid Layout) --- */
.section-head-card {
    background: #fff;
    padding: 15px 20px;
    border-radius: 4px;
    border-left: 5px solid var(--primary-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.section-head-title { margin: 0; font-size: 20px; font-weight: 700; color: #222; }
.section-view-btn { font-size: 13px; color: #555; background: #fff; border: 1px solid #ddd; padding: 6px 16px; border-radius: 4px; transition: 0.2s; }
.section-view-btn:hover { border-color: var(--primary-green); color: var(--primary-green); }

.software-item {
    display: grid;
    grid-template-columns: 74px 1fr 120px 160px 90px; 
    gap: 15px;
    align-items: center;
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e1e4e8;
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}
.software-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

/* Item Details */
.sw-icon img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid #f0f0f0; }
.sw-info { min-width: 0; }
.sw-title { margin: 0 0 4px 0; font-size: 16px; font-weight: 700; line-height: 1.3; color: #222; }
.sw-excerpt { font-size: 13px; color: #6c757d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-cat-link { font-size: 12px; color: var(--primary-green); font-weight: 600; display: inline-block; margin-top: 4px; }

/* Meta & Badges */
.sw-meta { display: flex; align-items: center; border-left: 1px solid #f0f0f0; padding-left: 15px; height: 100%; }
.os-badge { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #333; font-weight: 600; }

.sw-reputation { display: flex; flex-direction: column; align-items: center; gap: 4px; border-left: 1px solid #f0f0f0; border-right: 1px solid #f0f0f0; height: 100%; justify-content: center; }
.rep-label { font-size: 12px; color: #333; font-weight: 600; }
.stars-wrap i, .star-icon { font-size: 14px; color: #ffc107; }

.sw-size { text-align: right; font-size: 16px; font-weight: 700; color: #333; }

/* --- 5. SINGLE POST CONTENT --- */
.content-col {
    background: #fff;
    padding: 40px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.post-h1 { font-size: 28px; font-weight: 700; color: #2c3e50; margin-bottom: 20px; line-height: 1.3; }
.entry-content { font-size: 16px; line-height: 1.7; color: #444; }
.entry-content h2 { font-size: 22px; margin-top: 30px; margin-bottom: 15px; color: #222; font-weight: 700; }
.entry-content p { margin-bottom: 15px; }

/* Comments Separator */
.comments-separator {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #f0f2f5;
}

/* --- 6. SIDEBAR WIDGETS --- */
.side-widget, .widget-card, .widget { 
    background: #fff; 
    padding: 20px; 
    border-radius: 4px; 
    border: 1px solid #e1e4e8; 
    margin-bottom: 20px; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.widget-title, .widgettitle { 
    margin: 0 0 15px 0; 
    font-size: 18px; 
    border-bottom: 2px solid #f0f0f0; 
    padding-bottom: 10px; 
    color: #333; 
    font-weight: 700;
}

.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid #f9f9f9; }
.widget ul li a { text-decoration: none; color: #555; font-size: 14px; }
.widget ul li a:hover { color: var(--primary-green); }

/* Info Table in Sidebar */
.info-title { font-size: 18px; font-weight: 700; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; display: block; text-align: left; }
.info-row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; border-bottom: 1px solid #f9f9f9; }
.info-label { color: #777; width: 40%; text-align:left; }
.info-val { font-weight: 600; color: #333; text-align: right; width: 60%; }

/* Download Buttons */
.btn-dl {
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 14px; margin-bottom: 12px;
    border-radius: 4px; font-weight: 700; font-size: 15px;
    text-decoration: none; color: #fff; transition: 0.2s;
}
.btn-dark { background-color: #263238; }
.btn-dark:hover { background-color: #1a2327; }
.btn-green { background-color: var(--primary-green); }
.btn-green:hover { background-color: var(--primary-dark); }
.btn-dl i { margin-right: 8px; font-size: 16px; }

/* Large Number Font */
.fs-number { font-size: 38px; font-weight: 800; color: #2c3e50; line-height: 1; }
.rating-score { background: #8e44ad; color: #fff; font-size: 12px; font-weight: bold; padding: 2px 5px; border-radius: 3px; margin-right: 5px; }

/* --- 7. DOWNLOAD PAGE --- */
.dl-card {
    background: #fff;
    padding: 50px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    text-align: center;
    border: 1px solid #e1e4e8;
}
.dl-icon { font-size: 60px; color: #333; margin-bottom: 20px; }
.timer-box { background: #f9f9f9; border: 1px solid #eee; padding: 30px; border-radius: 6px; margin: 20px auto; max-width: 500px; }
.spinner { border: 4px solid #f3f3f3; border-top: 4px solid var(--primary-green); border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; margin: 0 auto 15px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- 8. FOOTER --- */
footer {
    background: #fff;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #ddd;
    margin-top: 50px;
    color: #777;
    font-size: 14px;
}

/* --- 9. RESPONSIVE --- */
@media (max-width: 991px) {
    .filedown-layout-wrapper, .main-container, .dl-layout-wrapper { flex-direction: column; }
    .home-sidebar, .sidebar-col, .dl-sidebar-col { width: 100%; }
    .software-item { grid-template-columns: 64px 1fr 100px; padding: 12px; }
    .sw-meta, .sw-reputation { display: none; }
}