/*
Theme Name: Zee Al Eid Ahmad
Theme URI: https://zeealeid.com
Author: Zee Al Eid Ahmad
Author URI: mailto:contact@zeealeid.com
Description: If you encounter any problem, contact me at contact@zeealeid.com
*/

/* =========================================
   1. VARIABLES & BASE SETUP
   ========================================= */
:root {
    /* --- Main Colors & Fonts --- */
    --primary: #2563eb; 
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --primary-hover: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    --dark-bg: #0f172a; 
    --bg-body: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    /* --- Spacing & Dimensions --- */
    --radius: 12px;
    --radius-pill: 50px; /* From Single Template */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    
    --space-md: 1.5rem;  /* From Single Template */
    --space-lg: 2rem;    /* From Single Template */
    --space-xl: 4rem;    /* From Single Template */
    
    /* --- Typography --- */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* --- Animation --- */
    --transition: all 0.3s ease; /* From Single Template */
}

/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: var(--font-body); 
    color: var(--text-main); 
    background: var(--bg-body); 
    -webkit-font-smoothing: antialiased; 
    line-height: 1.6; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-padding { padding: 80px 0; }
.bg-light { background: #f8fafc; }
.bg-white { background: var(--bg-white); }
a { text-decoration: none; transition: 0.2s; color: inherit; }

/* --- ANIMATIONS --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { opacity: 0; animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.scroll-animate { opacity: 0; transform: translateY(20px); transition: 0.6s ease-out; }
.scroll-animate.visible { opacity: 1; transform: translateY(0); }

/* =========================================
   2. NAVIGATION & FOOTER (SHARED)
   ========================================= */
.main-nav { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid rgba(0,0,0,0.05); }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.nav-logo { height: 32px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-link { font-weight: 600; font-size: 0.9rem; color: var(--text-muted); margin-right: 0; } 
.nav-link:hover, .current_page_item { color: var(--primary); }
.btn-nav { padding: 10px 24px; background: var(--dark-bg); color: white; border-radius: 50px; font-size: 0.85rem; font-weight: 600; transition: transform 0.2s; }
.btn-nav:hover { transform: translateY(-2px); background: #1e293b; color: white; }

/* --- COMPACT FOOTER --- */
.compact-footer { background: white; border-top: 1px solid var(--border); padding: 24px 0; margin-top: auto; }
.footer-row { display: flex; justify-content: space-between; align-items: center; }
.footer-logo { height: 24px; width: auto; }
.footer-right { font-size: 0.85rem; color: var(--text-muted); display: flex; gap: 24px; align-items: center; }
.contact-link { font-weight: 500; color: var(--text-main); }
.contact-link:hover { color: var(--primary); text-decoration: underline; }

/* =========================================
   3. COMPARE PAGE STYLES
   ========================================= */

/* --- HERO (COMPARE) --- */
.hero-section { position: relative; padding: 100px 0 120px; display: flex; align-items: center; justify-content: center; text-align: center; color: white; background: var(--dark-bg); overflow: hidden; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(37, 99, 235, 0.2) 100%), radial-gradient(circle at top right, #2563eb44, transparent 50%); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.badge { display: inline-block; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); padding: 6px 16px; border-radius: 50px; font-size: 0.85rem; font-weight: 500; margin-bottom: 24px; backdrop-filter: blur(4px); }
.hero-content h1 { font-family: var(--font-heading); font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 24px; letter-spacing: -1px; }
.text-gradient { background: linear-gradient(to right, #60a5fa, #ffffff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 1.15rem; color: #cbd5e1; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.btn-primary { background: var(--primary); color: white; padding: 14px 32px; border-radius: 50px; font-weight: 600; font-size: 1rem; box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4); display: flex; align-items: center; transition: 0.2s; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 6px 25px rgba(37, 99, 235, 0.5); color: white; }
.trust-pill { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #94a3b8; }
.trust-pill i { width: 16px; height: 16px; color: #4ade80; }

/* --- FEATURES --- */
.features-section { padding: 60px 0; background: white; border-bottom: 1px solid var(--border); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.feature-card { text-align: center; padding: 20px; }
.icon-box { width: 64px; height: 64px; background: #eff6ff; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 24px; }
.feature-card h3 { font-family: var(--font-heading); font-size: 1.25rem; margin-bottom: 10px; font-weight: 700; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

/* --- FILTERS --- */
.section-header { margin-bottom: 40px; }
.section-header h2 { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; margin-bottom: 10px; }
.filters-wrapper { 
    background: var(--bg-white); padding: 32px; border-radius: var(--radius); 
    box-shadow: var(--shadow-sm); margin-bottom: 24px; border: 1px solid var(--border);
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; align-items: end;
}
.filter-item label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; display: block; letter-spacing: 0.5px; }
.filter-item input, .filter-item select {
    width: 100%; padding: 0 20px; border: 1px solid var(--border); border-radius: 10px;
    font-size: 0.95rem; background: #f8fafc; color: var(--text-main); outline: none; height: 52px; transition: 0.2s;
}
.filter-item input:focus, .filter-item select:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }
.select-wrapper { position: relative; }
.select-wrapper::after { content: '▼'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 0.7rem; color: var(--text-muted); pointer-events: none; }
.filter-item select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.input-with-icon { position: relative; }
.search-icon { position: absolute; right: 20px; top: 16px; color: var(--text-muted); pointer-events: none; display: flex; align-items: center; }
.search-icon i { width: 18px; }

/* --- TABLE (DESKTOP) --- */
.table-card { background: var(--bg-white); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; border: 1px solid var(--border); margin-bottom: 30px; }
table { width: 100%; border-collapse: collapse; }
thead { background: #f1f5f9; border-bottom: 1px solid var(--border); }
thead th { padding: 20px 24px; text-align: left; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }
tbody td { padding: 20px 24px; vertical-align: middle; font-size: 0.95rem; color: #334155; }

.col-model { font-weight: 600; color: var(--text-main); }
.col-repair { color: var(--text-muted); }
.col-price-val { font-weight: 700; color: var(--text-main); }
.shop-logo { max-height: 28px; max-width: 120px; width: auto; height: auto; display: block; object-fit: contain; }

/* --- UNIFIED BUTTON SYSTEM --- */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px; /* Fixed height for consistency */
    padding: 0 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-sizing: border-box;
    min-width: 110px;
}

/* Active State (Blue) */
.btn-action.primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}
.btn-action.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* Disabled State (Gray) */
.btn-action.disabled {
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid var(--border);
    cursor: not-allowed;
    box-shadow: none;
}

/* --- BUTTON SECONDARY (SINGLE POST) --- */
.btn-secondary { background: transparent; border: 2px solid var(--primary); color: var(--primary); padding: 0.6rem 1.5rem; border-radius: var(--radius-pill); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.btn-secondary:hover { background: var(--primary); color: white; }

/* --- PAGINATION (COMPARE TABLE) --- */
.pagination-wrapper { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.page-btn { 
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; 
    background: white; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; 
    font-weight: 600; color: var(--text-main); transition: 0.2s; font-size: 0.9rem;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: #eff6ff; }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); pointer-events: none; }
.page-btn:disabled { opacity: 0.4; cursor: default; }
.page-dots { padding: 0 8px; color: #ccc; }

/* --- SKELETON LOADER --- */
#skeletonLoader { padding: 24px; }
.skeleton-row { height: 50px; margin-bottom: 16px; border-radius: 8px; background: #f1f5f9; background-image: linear-gradient(to right, #f1f5f9 0%, #e2e8f0 20%, #f1f5f9 40%, #f1f5f9 100%); background-repeat: no-repeat; background-size: 200% 100%; animation: shimmer 1.5s linear infinite forwards; }
#noResults { padding: 60px; text-align: center; color: var(--text-muted); background: white; border: 1px solid var(--border); border-radius: var(--radius); }

/* =========================================
   4. BLOG PAGE STYLES (HOME)
   ========================================= */

/* --- BLOG HERO --- */
.blog-hero {
    background: var(--dark-bg);
    color: white;
    padding: 80px 0;
    text-align: center;
}
.blog-hero h1 { font-family: var(--font-heading); font-size: 2.5rem; margin-bottom: 16px; }
.blog-hero p { color: #cbd5e1; max-width: 600px; margin: 0 auto; font-size: 1.1rem; }

/* --- BLOG GRID --- */
.blog-section { padding: 60px 0; }
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

/* --- BLOG CARDS --- */
.article-card {
    background: white; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); transition: transform 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column; height: 100%;
}
.article-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }

.card-img-wrap { height: 200px; overflow: hidden; position: relative; background: #f1f5f9; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.article-card:hover .card-img-wrap img { transform: scale(1.05); }

.card-content { padding: 24px; flex-grow: 1; display: flex; flex-direction: column; }
.card-meta { font-size: 0.75rem; color: var(--primary); font-weight: 700; text-transform: uppercase; margin-bottom: 12px; display: flex; justify-content: space-between; }
.card-date { color: var(--text-muted); font-weight: 500; }
.article-card h3 { font-family: var(--font-heading); font-size: 1.25rem; margin-bottom: 12px; line-height: 1.4; color: var(--text-main); }
.article-card p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; flex-grow: 1; }

.read-more { font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 6px; font-size: 0.9rem; }

/* --- BLOG PAGINATION --- */
.pagination { margin-top: 40px; text-align: center; }
.page-numbers { display: inline-block; padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; margin: 0 4px; color: var(--text-main); font-weight: 600; }
.page-numbers.current { background: var(--primary); color: white; border-color: var(--primary); }

/* =========================================
   5. SINGLE POST STYLES (NEW)
   ========================================= */

/* --- POST HERO SECTION --- */
.post-hero { 
    position: relative; height: 60vh; min-height: 450px; 
    display: flex; align-items: center; justify-content: center; text-align: center; color: white;
    background-size: cover; background-position: center; 
}
.post-hero .hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.9)); z-index: 1; }

.post-meta-top { margin-bottom: 1rem; font-size: 0.9rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; opacity: 0.9; }
.post-cat a { color: #60a5fa; margin-right: 10px; } /* Lighter blue for dark background */

.post-title { font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.2; margin-bottom: 1.5rem; font-weight: 700; }

.post-author { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1rem; }
.post-author strong { color: #60a5fa; }

/* --- CONTENT TYPOGRAPHY --- */
.content-container { max-width: 800px; }

.post-body { font-size: 1.125rem; color: var(--text-main); }
.post-body p { margin-bottom: 1.5rem; line-height: 1.8; }
.post-body h2 { font-family: var(--font-heading); font-size: 1.8rem; color: var(--text-main); margin: 2.5rem 0 1rem; font-weight: 700; }
.post-body h3 { font-family: var(--font-heading); font-size: 1.4rem; color: var(--text-main); margin: 2rem 0 1rem; font-weight: 600; }
.post-body ul, .post-body ol { margin-bottom: 1.5rem; padding-left: 20px; color: var(--text-main); }
.post-body li { margin-bottom: 0.5rem; }
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 2rem 0; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }

/* Updated Blockquote to match new theme */
.post-body blockquote { 
    border-left: 4px solid var(--primary); 
    background: #f1f5f9;
    padding: 24px; 
    border-radius: 0 12px 12px 0;
    font-style: italic; 
    color: var(--text-muted); 
    margin: 2rem 0; 
    font-size: 1.1rem; 
}

/* --- FOOTER META --- */
.post-footer-meta { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.tags-list a { display: inline-block; background: #f1f5f9; padding: 6px 16px; border-radius: 6px; font-size: 0.85rem; color: var(--text-muted); margin-right: 10px; font-weight: 500; }
.tags-list a:hover { background: var(--primary); color: white; }

/* =========================================
   6. RESPONSIVE QUERIES
   ========================================= */

@media (max-width: 900px) {
    .filters-wrapper { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.5rem; }
    .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* Footer & General */
    .footer-row { flex-direction: column; gap: 16px; }
    .hero-section { padding: 80px 0; }
    .container { padding: 0 20px; }
    
    /* Blog Grid */
    .blog-grid { grid-template-columns: 1fr; }
    
    /* Single Post */
    .nav-right { display: none !important; } /* Hidden on mobile per Single Template */
    .post-title { font-size: 2rem; }
    .post-footer-meta { flex-direction: column; align-items: flex-start; }
    
    /* Compare Table Logic */
    thead { display: none; }
    
    /* Card Container (Compare) */
    tbody tr { 
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "model shop"
            "repair button";
        gap: 16px; /* Increased gap for breathing room */
        background: white; 
        border: 1px solid var(--border); 
        border-radius: 12px; 
        margin-bottom: 16px; 
        padding: 20px; 
        box-shadow: 0 2px 4px rgba(0,0,0,0.02); 
        align-items: center; /* Vertically center all items */
    }

    /* 1. MODEL (Top Left) */
    tbody td.cell-model {
        grid-area: model; padding: 0; border: none; text-align: left; align-self: center;
    }
    .col-model { font-size: 1rem; color: var(--text-main); line-height: 1.3; }

    /* 2. SHOP LOGO (Top Right) */
    tbody td.cell-shop {
        grid-area: shop; padding: 0; border: none; 
        display: flex; justify-content: flex-end; align-items: center; align-self: center;
    }
    .shop-logo { max-height: 36px; max-width: 140px; } /* Larger logo on mobile */

    /* 3. REPAIR TYPE (Bottom Left) */
    tbody td.cell-repair {
        grid-area: repair; padding: 0; border: none; text-align: left; align-self: center;
    }
    .col-repair { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }

    /* 4. PRICE (Hidden standalone) */
    tbody td.cell-price { display: none; }

    /* 5. BUTTON (Bottom Right - Merged) */
    tbody td.cell-action {
        grid-area: button; padding: 0; border: none; text-align: right; align-self: center;
    }
    
    /* Mobile Button Overrides */
    .btn-action {
        width: 100%;
        font-size: 0 !important; /* Hide original text */
        height: 46px; /* Slightly taller for touch targets */
    }
    
    /* Inject Price via CSS */
    .btn-action::after {
        content: attr(data-price);
        font-size: 1rem;
        font-weight: 700;
    }
}