/*
Theme Name: TechMKSasmy
Theme URI: https://techmksasmy.blogspot.com
Author: Shaik Md Saiful Raheman
Description: Professional tech review blog theme — Blue + Orange, Magazine homepage with slider, 2 side boxes, 3-column grid, dropdown nav, fully responsive, Elementor + Gutenberg compatible.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: techmksasmy
*/

/* =============================================
   CSS VARIABLES
============================================= */
:root {
    --primary:      #0d5eaf;
    --primary-dark: #0a4a8c;
    --accent:       #ff6b00;
    --accent-hover: #e05a00;
    --bg:           #f0f2f5;
    --white:        #ffffff;
    --text:         #1a1a1a;
    --text-muted:   #666666;
    --text-light:   #999999;
    --border:       #e8e8e8;
    --shadow:       0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 6px 20px rgba(0,0,0,0.14);
    --radius:       8px;
    --radius-lg:    12px;
    --font:         'Segoe UI', -apple-system, Arial, sans-serif;
}

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); font-size: 15px; line-height: 1.75; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* =============================================
   TOP BAR
============================================= */
.tmks-topbar { background: var(--primary-dark); padding: 6px 0; font-size: 12px; color: rgba(255,255,255,0.8); }
.tmks-topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.tmks-topbar-social a { color: rgba(255,255,255,0.8); margin-left: 14px; font-size: 12px; }
.tmks-topbar-social a:hover { color: var(--accent); }

/* =============================================
   HEADER
============================================= */
.tmks-header { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); padding: 16px 0 0; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.tmks-header-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px 14px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tmks-logo-wrap a { display: flex; align-items: center; gap: 12px; color: #fff; }
.tmks-logo-wrap img { height: 50px; width: auto; }
.tmks-site-title { font-size: 24px; font-weight: 700; color: #fff; letter-spacing: -0.5px; line-height: 1.2; }
.tmks-site-tagline { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.tmks-header-search { display: flex; align-items: center; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; padding: 8px 12px; min-width: 200px; max-width: 280px; flex: 1; }
.tmks-header-search input { background: none; border: none; outline: none; color: #fff; font-size: 13px; width: 100%; font-family: var(--font); }
.tmks-header-search input::placeholder { color: rgba(255,255,255,0.6); }
.tmks-header-search button { background: none; border: none; color: #fff; cursor: pointer; padding: 0; margin-left: 6px; font-size: 15px; }

/* =============================================
   NAVIGATION WITH DROPDOWNS
============================================= */
.tmks-nav-wrap { border-top: 1px solid rgba(255,255,255,0.12); }
.tmks-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.tmks-nav-inner > ul { display: flex; gap: 2px; flex-wrap: wrap; }
.tmks-nav-inner > ul > li { position: relative; }
.tmks-nav-inner > ul > li > a { display: flex; align-items: center; gap: 4px; color: rgba(255,255,255,0.85); font-size: 13px; font-weight: 500; padding: 10px 14px; border-radius: 6px 6px 0 0; transition: all 0.2s; white-space: nowrap; }
.tmks-nav-inner > ul > li > a:hover,
.tmks-nav-inner > ul > li.current-menu-item > a,
.tmks-nav-inner > ul > li.current_page_item > a { background: rgba(255,255,255,0.2); color: #fff; }
.tmks-nav-inner > ul > li > a .dropdown-arrow { font-size: 9px; opacity: 0.7; }

/* DROPDOWN */
.tmks-nav-inner > ul > li > ul.sub-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; border-radius: 0 6px 6px 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); min-width: 180px; z-index: 1000; border: 1px solid #e8e8e8; overflow: hidden; }
.tmks-nav-inner > ul > li:hover > ul.sub-menu { display: block; }
.tmks-nav-inner > ul > li > ul.sub-menu li a { display: block; padding: 9px 16px; font-size: 13px; color: var(--text); border-bottom: 1px solid #f5f5f5; white-space: nowrap; }
.tmks-nav-inner > ul > li > ul.sub-menu li:last-child a { border-bottom: none; }
.tmks-nav-inner > ul > li > ul.sub-menu li a:hover { background: #e6f1fb; color: var(--primary); }

/* MOBILE TOGGLE */
.tmks-menu-toggle { display: none; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; font-family: var(--font); margin: 0 16px 10px; }

/* =============================================
   MAIN LAYOUT
============================================= */
.tmks-container { max-width: 1200px; margin: 24px auto; padding: 0 16px; display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }

/* =============================================
   SECTION HEADING — orange accent
============================================= */
.tmks-section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.tmks-section-heading h2 { font-size: 17px; font-weight: 700; color: var(--text); padding-left: 12px; border-left: 4px solid var(--accent); }
.tmks-section-heading .view-all { font-size: 13px; color: var(--primary); font-weight: 500; }
.tmks-section-heading .view-all:hover { color: var(--accent); }

/* =============================================
   HERO SECTION — Slider + 2 Side Boxes
============================================= */
.tmks-hero { display: grid; grid-template-columns: 1fr 260px; gap: 16px; margin-bottom: 24px; }

/* SLIDER */
.tmks-slider-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; height: 380px; }
.tmks-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; }
.tmks-slide.active { opacity: 1; }
.tmks-slide img { width: 100%; height: 100%; object-fit: cover; }
.tmks-slide-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(0,0,0,0.85) 100%); }
.tmks-slide-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px; }
.tmks-slide-badge { display: inline-block; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.tmks-slide-title { font-size: 18px; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 8px; }
.tmks-slide-title a { color: #fff; }
.tmks-slide-title a:hover { color: rgba(255,255,255,0.85); }
.tmks-slide-meta { font-size: 12px; color: rgba(255,255,255,0.75); display: flex; gap: 14px; flex-wrap: wrap; }
.tmks-slide-rating { color: #ffcc00; }
.tmks-slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.45); color: #fff; border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; z-index: 10; transition: background 0.2s; }
.tmks-slider-btn:hover { background: rgba(0,0,0,0.7); }
.tmks-slider-btn.prev { left: 10px; }
.tmks-slider-btn.next { right: 10px; }
.tmks-slider-dots { position: absolute; bottom: 12px; right: 14px; display: flex; gap: 5px; z-index: 10; }
.tmks-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.45); cursor: pointer; transition: all 0.2s; border: none; padding: 0; }
.tmks-dot.active { background: var(--accent); width: 18px; border-radius: 4px; }

/* SIDE BOXES */
.tmks-side-boxes { display: flex; flex-direction: column; gap: 12px; }
.tmks-side-box { position: relative; border-radius: var(--radius); overflow: hidden; flex: 1; min-height: 180px; }
.tmks-side-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.tmks-side-box:hover img { transform: scale(1.04); }
.tmks-side-box-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,0.82) 100%); }
.tmks-side-box-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px; }
.tmks-side-box-cat { display: inline-block; background: var(--accent); color: #fff; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 3px; text-transform: uppercase; margin-bottom: 5px; }
.tmks-side-box-title { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.3; }
.tmks-side-box-title a { color: #fff; }
.tmks-side-box-title a:hover { color: rgba(255,255,255,0.85); }

/* =============================================
   3-COLUMN POST GRID
============================================= */
.tmks-post-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.tmks-post-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow 0.2s, transform 0.2s; display: flex; flex-direction: column; }
.tmks-post-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.tmks-post-card-thumb { overflow: hidden; height: 160px; flex-shrink: 0; }
.tmks-post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.tmks-post-card:hover .tmks-post-card-thumb img { transform: scale(1.05); }
.tmks-post-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.tmks-post-card-cat { display: inline-block; background: #e6f1fb; color: var(--primary); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; }
.tmks-post-card-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 8px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tmks-post-card-title a { color: var(--text); }
.tmks-post-card-title a:hover { color: var(--primary); }
.tmks-post-card-meta { font-size: 12px; color: var(--text-light); display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.tmks-post-card-price { font-size: 14px; font-weight: 700; color: var(--primary); }

/* POST LIST STYLE */
.tmks-post-list-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.tmks-post-list-item:last-child { border-bottom: none; }
.tmks-post-list-thumb { width: 100px; height: 76px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.tmks-post-list-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.tmks-post-list-item:hover .tmks-post-list-thumb img { transform: scale(1.05); }
.tmks-post-list-cat { display: inline-block; background: #e6f1fb; color: var(--primary); font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 3px; text-transform: uppercase; margin-bottom: 5px; }
.tmks-post-list-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 4px; }
.tmks-post-list-title a { color: var(--text); }
.tmks-post-list-title a:hover { color: var(--primary); }
.tmks-post-list-meta { font-size: 12px; color: var(--text-light); }

/* =============================================
   SINGLE POST
============================================= */
.tmks-post-wrap { background: var(--white); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.tmks-post-cats { margin-bottom: 10px; }
.tmks-post-cat-badge { display: inline-block; background: #e6f1fb; color: var(--primary); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 4px; text-transform: uppercase; margin-right: 6px; }
.tmks-post-title { font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--text); margin-bottom: 12px; }
.tmks-post-meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tmks-post-featured-img { margin-bottom: 20px; border-radius: var(--radius); overflow: hidden; }
.tmks-post-featured-img img { width: 100%; border-radius: var(--radius); }
.tmks-post-content { line-height: 1.8; }
.tmks-post-content h2 { font-size: 20px; font-weight: 700; color: var(--primary); margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 2px solid #e6f1fb; }
.tmks-post-content h3 { font-size: 17px; font-weight: 600; color: var(--text); margin: 20px 0 10px; }
.tmks-post-content p { margin-bottom: 16px; color: #333; }
.tmks-post-content ul, .tmks-post-content ol { margin: 12px 0 16px 20px; list-style: disc; }
.tmks-post-content li { margin-bottom: 6px; color: #333; }
.tmks-post-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tmks-post-content table th { background: var(--primary); color: #fff; padding: 11px 14px; text-align: left; font-weight: 600; }
.tmks-post-content table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: #333; }
.tmks-post-content table tr:nth-child(even) td { background: #f7fafd; }
.tmks-post-content img { border-radius: var(--radius); margin: 16px auto; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.tmks-post-content a { color: var(--primary); }
.tmks-post-content a:hover { color: var(--accent); }
.tmks-post-content blockquote { border-left: 4px solid var(--primary); padding: 12px 16px; background: #e6f1fb; border-radius: 0 6px 6px 0; margin: 16px 0; color: #333; }
.tmks-post-content hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.tmks-author-box { background: #f7fafd; border: 1px solid #dce8f5; border-radius: var(--radius); padding: 20px; margin: 24px 0; display: flex; gap: 16px; align-items: flex-start; }
.tmks-author-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; font-weight: 700; flex-shrink: 0; }
.tmks-author-name { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.tmks-author-bio { font-size: 13px; color: #555; line-height: 1.6; }

/* =============================================
   SIDEBAR
============================================= */
.tmks-sidebar { position: sticky; top: 20px; }
.tmks-widget { background: var(--white); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow); }
.tmks-widget-title { background: var(--primary); color: #fff; font-size: 13px; font-weight: 600; padding: 11px 16px; text-transform: uppercase; letter-spacing: 0.5px; }
.tmks-widget-body { padding: 14px 16px; }
.tmks-search-wrap { display: flex; gap: 8px; }
.tmks-search-wrap input { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; outline: none; font-family: var(--font); color: var(--text); }
.tmks-search-wrap input:focus { border-color: var(--primary); }
.tmks-search-wrap button { background: var(--accent); color: #fff; border: none; padding: 9px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; font-family: var(--font); transition: background 0.2s; }
.tmks-search-wrap button:hover { background: var(--accent-hover); }
.tmks-cat-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.tmks-cat-list li:last-child { border-bottom: none; }
.tmks-cat-list li a { color: var(--text); font-weight: 500; }
.tmks-cat-list li a:hover { color: var(--primary); }
.tmks-cat-count { background: #fff0e6; color: #cc5500; font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.tmks-recent-post { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tmks-recent-post:last-child { border-bottom: none; }
.tmks-recent-thumb { width: 64px; height: 50px; border-radius: 5px; overflow: hidden; flex-shrink: 0; }
.tmks-recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tmks-recent-title { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4; }
.tmks-recent-title a { color: var(--text); }
.tmks-recent-title a:hover { color: var(--primary); }
.tmks-recent-date { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* =============================================
   PAGINATION
============================================= */
.tmks-pagination { display: flex; justify-content: center; gap: 6px; margin: 24px 0; flex-wrap: wrap; }
.tmks-pagination a, .tmks-pagination span { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 6px; font-size: 14px; font-weight: 500; border: 1px solid var(--border); background: var(--white); color: var(--text); transition: all 0.2s; }
.tmks-pagination a:hover, .tmks-pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* =============================================
   BREADCRUMB
============================================= */
.tmks-breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tmks-breadcrumb a { color: var(--primary); }

/* =============================================
   FOOTER
============================================= */
.tmks-footer { background: linear-gradient(135deg, #0a3d7a 0%, #061f40 100%); margin-top: 40px; padding: 40px 0 0; }
.tmks-footer-grid { max-width: 1200px; margin: 0 auto; padding: 0 16px 30px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.tmks-footer-brand h3 { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.tmks-footer-brand p { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.7; }
.tmks-footer-col h4 { font-size: 13px; font-weight: 600; color: #fff; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.15); }
.tmks-footer-col ul li { margin-bottom: 8px; }
.tmks-footer-col ul li a { font-size: 13px; color: rgba(255,255,255,0.65); }
.tmks-footer-col ul li a:hover { color: var(--accent); }
.tmks-footer-bottom { background: rgba(0,0,0,0.25); padding: 14px 0; }
.tmks-footer-bottom-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.tmks-footer-copyright { font-size: 12px; color: rgba(255,255,255,0.55); }
.tmks-footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.tmks-footer-links a { font-size: 12px; color: rgba(255,255,255,0.55); }
.tmks-footer-links a:hover { color: var(--accent); }

/* =============================================
   BUTTONS
============================================= */
.tmks-btn { display: inline-block; background: var(--primary); color: #fff; font-size: 14px; font-weight: 600; padding: 10px 20px; border-radius: 6px; transition: background 0.2s; border: none; cursor: pointer; font-family: var(--font); }
.tmks-btn:hover { background: var(--primary-dark); color: #fff; }
.tmks-btn-accent { background: var(--accent); }
.tmks-btn-accent:hover { background: var(--accent-hover); }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1024px) {
    .tmks-container { grid-template-columns: 1fr; }
    .tmks-sidebar { position: static; }
    .tmks-footer-grid { grid-template-columns: 1fr 1fr; }
    .tmks-hero { grid-template-columns: 1fr 200px; }
    .tmks-post-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .tmks-hero { grid-template-columns: 1fr; }
    .tmks-side-boxes { flex-direction: row; }
    .tmks-side-box { min-height: 140px; }
    .tmks-slider-wrap { height: 280px; }
    .tmks-post-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .tmks-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .tmks-header-inner { flex-direction: column; align-items: flex-start; }
    .tmks-header-search { min-width: unset; max-width: 100%; width: 100%; }
    .tmks-menu-toggle { display: block; }
    .tmks-nav-inner > ul { display: none; flex-direction: column; padding: 8px 0; }
    .tmks-nav-inner > ul.active { display: flex; }
    .tmks-nav-inner > ul > li > a { border-radius: 0; padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .tmks-nav-inner > ul > li > ul.sub-menu { position: static; box-shadow: none; border: none; border-radius: 0; background: rgba(255,255,255,0.08); }
    .tmks-nav-inner > ul > li > ul.sub-menu li a { color: rgba(255,255,255,0.8); background: none; border-bottom: 1px solid rgba(255,255,255,0.06); padding-left: 28px; }
    .tmks-nav-inner > ul > li > ul.sub-menu { display: none; }
    .tmks-post-grid-3 { grid-template-columns: 1fr; }
    .tmks-side-boxes { flex-direction: column; }
    .tmks-post-wrap { padding: 16px; }
    .tmks-post-title { font-size: 19px; }
    .tmks-footer-grid { grid-template-columns: 1fr; }
    .tmks-footer-bottom-inner { flex-direction: column; text-align: center; }
    .tmks-slider-wrap { height: 220px; }
    .tmks-slide-title { font-size: 14px; }
    .tmks-topbar-inner { flex-direction: column; align-items: flex-start; }
    .tmks-author-box { flex-direction: column; }
}
