/*
Theme Name: MedLight Modern
Author: Raphael Aderinwale
Description: Lightweight modern responsive WordPress blog theme.
Version: 2.0
*/

/* RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    background: #f9fafb;
    color: #111827;
    line-height: 1.7;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: #0070f3;
    text-decoration: none;
    transition: 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

/* LAYOUT */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin: 40px auto;
}

@media (min-width: 992px) {
    .site-content {
        flex-direction: row;
    }

    .site-main {
        flex: 2;
    }

    .sidebar {
        flex: 1;
    }
}

/* HEADER */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 24px;
    height: 3px;
    background: #111827;
}

/* MOBILE MENU */
@media (max-width: 768px) {

    .main-navigation {
        display: none;
        position: absolute;
        top: 70px;
        right: 0;
        background: #fff;
        width: 100%;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 15px;
    }

    .main-navigation.active {
        display: block;
    }

    .menu-toggle {
        display: flex;
    }
}

/* ARTICLE */
article {
    background: #fff;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: 0.2s ease;
}

/* HOME HERO (latest post) */
.home-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    align-items: stretch;
    overflow: hidden;
}

.home-hero-thumb {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    min-height: 320px;
}

.home-hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-hero-title {
    font-size: 2rem;
    line-height: 1.2;
    margin: 0 0 10px;
}

.home-hero-excerpt {
    margin-top: 8px;
}

.btn {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #0070f3;
    color: #fff;
    font-weight: 600;
}

.btn:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .home-hero {
        grid-template-columns: 1fr;
    }
    .home-hero-thumb {
        min-height: 220px;
    }
    .home-hero-title {
        font-size: 1.5rem;
    }
}

/* POST GRID */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.post-card {
    padding: 18px;
}

.post-thumb {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.post-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.post-card-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    line-height: 1.3;
}

@media (max-width: 992px) {
    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
    .post-thumb img {
        height: 200px;
    }
}

article:hover {
    transform: translateY(-3px);
}

.entry-title {
    margin-top: 0;
}

.entry-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.entry-content p {
    margin-bottom: 1.4rem;
}

/* SIDEBAR */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

/* PROGRESS BAR */
.progress-container {
    position: fixed;
    top: 0;
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    z-index: 1001;
}

.progress-bar {
    height: 4px;
    background: #0070f3;
    width: 0%;
}

/* BLOCK ALIGNMENTS */
.alignwide {
    margin-left: -5%;
    margin-right: -5%;
}

.alignfull {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

/* Grid layout */
.post-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(280px,1fr));
    gap:30px;
    margin-top:40px;
}

.post-card{
    background:#fff;
    border-radius:14px;
    overflow:hidden;
    box-shadow:0 10px 25px rgba(0,0,0,0.05);
    transition:0.2s ease;
    display:flex;
    flex-direction:column;
}

.post-card:hover{
    transform:translateY(-4px);
}

.post-thumb img{
    width:100%;
    height:200px;
    object-fit:cover;
}

.post-card-content{
    padding:20px;
}

.post-card-title{
    margin-top:0;
    margin-bottom:8px;
    font-size:1.1rem;
}

.post-card-excerpt{
    font-size:0.95rem;
    color:#6b7280;
    margin-top:10px;
    line-height:1.5;
}

/* Author card */
.widget-author-card .author-card{
  display:flex;
  align-items:center;
  gap:12px;
}

.widget-author-card .author-avatar img{
  width:56px;
  height:56px;
  border-radius:999px;
  display:block;
}

.widget-author-card .author-name{
  font-weight:700;
  color:#111827;
  line-height:1.2;
}

.widget-author-card .author-qual{
  font-size:0.9rem;
  color:#6b7280;
  margin-top:3px;
}