/*
Theme Name: PDF Hub
Version: 1.2.0
*/

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --telegram: #0088cc;
    --facebook: #1877f2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #334155;
    background: var(--light);
}

a { color: var(--primary); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ========================================== */
/* MAIN WRAPPER — SAME STYLE ALL SCREENS      */
/* ========================================== */
.main-wrapper-1200 {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 30px rgba(0,0,0,0.05);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================== */
/* HEADER — SAME STYLE, RESPONSIVE PADDING    */
/* ========================================== */
.site-header {
    background: #fff;
    border-bottom: 2px solid var(--border);
    position: relative;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    gap: 20px;
    position: relative;
    min-height: 72px;           /* 🔥 CLS fix */
}
.site-logo { font-size: 24px; font-weight: 800; color: var(--dark); }
.site-logo a { color: var(--dark); text-transform: uppercase; }
.site-logo a:hover { color: var(--primary); }

/* HEADER MENU */
.main-nav ul { display: flex; list-style: none; gap: 20px; }
.main-nav a {
    color: var(--dark);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}
.main-nav a:hover { color: var(--primary); }

/* HAMBURGER */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #fff;
    border: 2px solid #2563eb;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 3px;
    background: #2563eb;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.menu-toggle.active { background: #2563eb; }
.menu-toggle.active span { background: #fff; }
.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ========================================== */
/* HERO — SAME STYLE, SCALED SIZES            */
/* ========================================== */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    min-height: 280px;           /* 🔥 CLS fix */
    contain: layout;             /* 🔥 CLS fix */
}
.hero h1 {
    font-size: 40px;
    margin-bottom: 12px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    text-transform: uppercase;
    min-height: 46px;            /* 🔥 CLS fix */
}
.hero h1 span { color: #60a5fa; }
.hero p {
    font-size: 16px;
    opacity: 0.85;
    margin-bottom: 30px;
    min-height: 26px;            /* 🔥 CLS fix */
}

/* SEARCH BAR */
.hero-search {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    background: #fff;
    border-radius: 12px;
    min-height: 48px;            /* 🔥 CLS fix */
}
.hero-search input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    outline: none;
    border-radius: 8px;
    color: var(--dark);
    background: transparent;
}
.hero-search input::placeholder { color: #94a3b8; }
.hero-search button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    text-transform: uppercase;
}
.hero-search button svg { width: 18px; height: 18px; stroke-width: 2.5; }
.hero-search button:hover { background: var(--primary-dark); }

/* HERO STATS */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
    flex-wrap: wrap;
    min-height: 70px;            /* 🔥 CLS fix */
}
.hero-stat strong {
    display: block;
    font-size: 32px;
    color: #60a5fa;
    font-weight: 800;
    line-height: 1.1;
}
.hero-stat span {
    font-size: 13px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================== */
/* SECTIONS — SAME STYLE                      */
/* ========================================== */
.section {
    padding: 50px 20px;
    min-height: 400px;           /* 🔥 CLS fix */
    contain: layout;             /* 🔥 CLS fix */
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    min-height: 34px;            /* 🔥 CLS fix */
}
.section-title {
    font-size: 24px;
    color: var(--dark);
    font-weight: 800;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
    text-transform: uppercase;
}
.view-all { color: var(--primary); font-weight: 700; font-size: 14px; }

/* ========================================== */
/* PDF CARDS — CLS-PROOF + SAME STYLE         */
/* ========================================== */
.pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    min-height: 300px;           /* 🔥 CLS fix */
    contain: layout;             /* 🔥 CLS fix */
}
.pdf-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid var(--border);
    contain: layout paint;       /* 🔥 perf */
}
.pdf-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
    border-color: var(--primary);
}

/* 🔥 CLS-PROOF THUMBNAIL */
.pdf-card-thumb {
    position: relative;
    background: var(--light);
    aspect-ratio: 3 / 4;
    overflow: hidden;
    contain: layout paint;               /* 🔥 perf */
    content-visibility: auto;            /* 🔥 perf */
    contain-intrinsic-size: 300px 400px; /* 🔥 CLS fix */
}
.pdf-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s ease;
    aspect-ratio: 3 / 4;         /* 🔥 CLS fix */
}
.pdf-card:hover .pdf-card-thumb img { transform: scale(1.05); }
.pdf-card-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--primary);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
}

.pdf-card-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 90px;            /* 🔥 CLS fix */
}
.pdf-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    line-height: 1.3;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-transform: uppercase;
    min-height: 36px;            /* 🔥 CLS fix */
}
.pdf-card-title a { color: var(--dark); }
.pdf-card-title a:hover { color: var(--primary); }

.pdf-card-btn {
    display: block;
    text-align: center;
    padding: 8px;
    background: var(--primary-light);
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    color: var(--primary);
    transition: 0.2s;
    border: 1px solid var(--primary-light);
}
.pdf-card:hover .pdf-card-btn { background: var(--primary); color: #fff; }

/* ========================================== */
/* CATEGORY GRID                              */
/* ========================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    min-height: 200px;           /* 🔥 CLS fix */
    contain: layout;
}
.category-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 15px;
    transition: 0.3s;
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 75px;
    gap: 12px;
}
.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.05);
    border-color: var(--primary);
}
.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--primary-light);
    border-radius: 50%;
    color: var(--primary);
    flex-shrink: 0;
}
.category-icon svg { width: 22px; height: 22px; stroke-width: 2; }
.category-info { display: flex; flex-direction: column; justify-content: center; }
.category-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2px;
    line-height: 1.2;
    text-transform: uppercase;
}
.category-count { font-size: 11px; color: var(--gray); font-weight: 600; }

/* ========================================== */
/* HOME TEXT BLOCKS                           */
/* ========================================== */
.home-text-blocks-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
}
.home-text-block {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    overflow: hidden;
    width: 100%;
}
.htb-header {
    background: var(--primary-light);
    padding: 14px 20px;
    text-align: center;
    border-bottom: 2px solid var(--primary);
}
.htb-header h2 {
    color: var(--primary-dark);
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}
.htb-body {
    padding: 20px;
    font-size: 15px;
    line-height: 1.8;
    color: #475569;
    min-height: 100px;
}
.htb-body p { margin-bottom: 15px; }
.htb-body ul, .htb-body ol { margin-left: 20px; margin-bottom: 15px; }
.htb-body li { margin-bottom: 8px; }
.htb-body p:last-child, .htb-body ul:last-child { margin-bottom: 0; }

/* ========================================== */
/* CATEGORY PAGE                              */
/* ========================================== */
.category-page-wrapper { padding: 40px 20px; }
.category-page-header {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
    min-height: 100px;           /* 🔥 CLS fix */
}
.category-page-header .section-title {
    font-size: 28px;
    color: var(--dark);
    font-weight: 800;
    padding-left: 14px;
    border-left: 5px solid var(--primary);
    margin-bottom: 18px;
    line-height: 1.2;
    display: inline-block;
    text-transform: uppercase;
}
.category-description {
    font-size: 15px;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 12px;
    max-width: 800px;
}
.category-post-count {
    font-size: 13px;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}
.category-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 10px;
    margin-bottom: 45px;
    min-height: 300px;
    contain: layout;
}

/* PAGINATION */
.category-pagination-wrap { display: flex; justify-content: center; margin-bottom: 50px; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    background: #fff;
    transition: 0.2s;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }

.no-posts-found { text-align: center; padding: 70px 20px; }
.no-posts-found p { font-size: 16px; color: var(--gray); margin-bottom: 25px; }

/* ========================================== */
/* SINGLE PAGE                                */
/* ========================================== */
.single-wrapper { display: block; padding: 40px 20px; width: 100%; flex: 1; }
.single-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 18px;
    line-height: 1.3;
    text-transform: uppercase;
}
.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--gray);
    font-size: 14px;
    padding-bottom: 22px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}
.single-excerpt {
    font-size: 16px;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 25px;
    padding: 0;
}

/* PDF MAIN BOX — SAME STYLE ALL SCREENS */
.pdf-main-box {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.pdf-top-part {
    display: grid;
    grid-template-columns: 1fr 150px;   /* 🔥 Same desktop + mobile */
    border-bottom: 1px solid var(--border);
    gap: 0;
    min-height: 200px;          /* 🔥 CLS fix */
}
.pdf-table-top {
    background: #fff;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    width: 100%;
}
.pdf-table-top table { height: 100%; width: 100%; border-collapse: collapse; table-layout: fixed; }
.pdf-image-top {
    background: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0;
    margin: 0;
    height: 100%;
    overflow: hidden;
}
.pdf-image-top img {
    height: auto;
    width: auto;
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease-in-out;
    cursor: zoom-in;
    aspect-ratio: 3 / 4;         /* 🔥 CLS fix */
}
.pdf-image-top img:hover { transform: scale(2.5); cursor: zoom-out; }

.pdf-bottom-part { background: #fff; width: 100%; }
.pdf-details-table {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.pdf-details-table th {
    background: var(--light);
    font-weight: 600;
    color: var(--dark);
    width: 150px;
    border-bottom: 1px solid var(--border);
}
.pdf-details-table td {
    color: #475569;
    width: calc(100% - 150px);
    word-wrap: break-word;
    white-space: normal;
    border-bottom: 1px solid var(--border);
}
.pdf-details-table th,
.pdf-details-table td {
    padding: 10px 12px;
    text-align: left;
    font-size: 14px;
    vertical-align: top;
}
.pdf-details-table tr:last-child th,
.pdf-details-table tr:last-child td { border-bottom: none; }

/* POST CONTENT & READ MORE */
.pdf-content-part { background: var(--light); padding: 20px; position: relative; }
.entry-content {
    font-size: 15px;
    line-height: 1.8;
    color: #475569;
    max-height: 150px;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
    padding-bottom: 30px;
}
.entry-content.expanded { max-height: 5000px; }

.read-more-btn {
    position: absolute;
    bottom: 10px;
    right: 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 15px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(37,99,235,0.3);
    z-index: 2;
}
.read-more-btn:hover { background: var(--primary-dark); }

/* DOWNLOAD & SOCIAL BOX */
.pdf-download-box {
    text-align: center;
    padding: 25px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin: 0 0 40px 0;
}
.pdf-download-text { color: var(--gray); font-size: 14px; margin-bottom: 15px; }
.action-buttons-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pdf-download-btn {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    transition: 0.3s;
}
.pdf-download-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(37,99,235,0.4); }

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #fff !important;
    transition: 0.3s;
    text-decoration: none;
}
.social-btn svg { width: 16px; height: 16px; }
.telegram-btn { background: var(--telegram); box-shadow: 0 4px 12px rgba(0,136,204,0.3); }
.telegram-btn:hover { background: #0077b3; transform: translateY(-2px); }
.facebook-btn { background: var(--facebook); box-shadow: 0 4px 12px rgba(24,119,242,0.3); }
.facebook-btn:hover { background: #0d65d9; transform: translateY(-2px); }

/* ========================================== */
/* RELATED POSTS                              */
/* ========================================== */
.related-posts-section { margin-top: 40px; margin-bottom: 40px; }
.related-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid var(--primary);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    min-height: 200px;
    contain: layout;
}
.related-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    transition: 0.3s;
}
.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: var(--primary);
}
.related-thumb {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--light);
    contain: layout paint;
    content-visibility: auto;
    contain-intrinsic-size: 300px 400px;
}
.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: 0.3s;
    aspect-ratio: 3 / 4;
}
.related-card:hover .related-thumb img { transform: scale(1.05); }
.related-body { padding: 8px; }
.related-card-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-transform: uppercase;
    margin: 0;
    min-height: 32px;
}
.related-card-title a { color: var(--dark); }
.related-card-title a:hover { color: var(--primary); }

/* ========================================== */
/* FOOTER                                     */
/* ========================================== */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 35px 20px 15px;
    margin-top: auto;
    border-top: 3px solid var(--primary);
    min-height: 300px;           /* 🔥 CLS fix */
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}
.footer-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
}
.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: var(--primary);
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
    color: #cbd5e1;
    font-size: 13px;
    transition: 0.3s;
    display: inline-block;
    text-transform: uppercase;
}
.footer-links a:hover { color: #fff; transform: translateX(3px); }

.footer-social { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none;
    background: #1e293b;
    transition: 0.3s;
    border: 1px solid #334155;
    text-transform: uppercase;
}
.footer-social-btn:hover { background: #334155; color: #fff !important; border-color: #475569; }
.footer-social-btn svg { width: 13px; height: 13px; }

.footer-bottom {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #1e293b;
    font-size: 12px;
    color: #64748b;
}

/* ========================================== */
/* INSTAPDF DOWNLOAD PAGE                     */
/* ========================================== */
body.ip-fullscreen-body { background: #fff !important; margin: 0; padding: 0; }

.ip-fullscreen-wrapper {
    background: #fff;
    width: 100%;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    padding: 30px 5%;
    margin: 0;
}
.ip-header-section { text-align: left; margin-bottom: 10px; }
.thank-you {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}
.ip-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.ip-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--gray);
}
.dot { font-size: 16px; }

.ip-middle-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    padding: 20px 0;
}
.ip-thumbnail-box {
    width: 120px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin-right: auto;
}
.ip-thumbnail-box img { width: 100%; height: auto; display: block; aspect-ratio: 3 / 4; }

.ip-timer-box { position: relative; width: 120px; height: 120px; margin-right: 10%; }
.circular-progress { width: 120px; height: 120px; transform: rotate(-90deg); }
.bg-circle { fill: none; stroke: var(--border); stroke-width: 8; }
.progress-circle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}
.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
}
.timer-text span { font-size: 36px; font-weight: 800; color: var(--dark); line-height: 1; }
.timer-text small { font-size: 12px; font-weight: 700; color: var(--gray); letter-spacing: 1px; }

.ip-bottom-section {
    background: var(--light);
    padding: 20px;
    border-top: 1px solid var(--border);
    border-radius: 0;
    margin: 0 -5%;
    width: calc(100% + 10%);
    margin-top: auto;
}
.ip-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 5%;
}
.ip-step { flex: 1; text-align: center; display: flex; flex-direction: column; align-items: center; }
.step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--primary);
    color: #fff;
}
.ip-step.inactive .step-icon {
    background: #fff;
    color: var(--gray);
    border: 2px solid var(--border);
}
.ip-step p { font-size: 13px; color: var(--dark); font-weight: 600; line-height: 1.3; }
.ip-step.inactive p { color: var(--gray); }
.status-text { text-align: center; font-size: 16px; font-weight: 600; color: var(--dark); margin-top: 10px; }

/* ========================================== */
/* MOBILE ≤768px — SAME STYLE, SCALED SIZES   */
/* ========================================== */
@media (max-width: 768px) {

    /* Header */
    .header-inner { padding: 12px 16px; min-height: 64px; }
    .menu-toggle { display: flex; }

    /* NAV DROPDOWN */
    .main-nav {
        display: block !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: #fff !important;
        border-bottom: 2px solid var(--border) !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.35s ease !important;
        z-index: 999 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .main-nav.open { max-height: 600px !important; overflow-y: auto !important; }
    .main-nav ul {
        display: block !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        background: #fff !important;
        width: 100% !important;
    }
    .main-nav li {
        display: block !important;
        border-bottom: 1px solid var(--border) !important;
        background: #fff !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    .main-nav li:last-child { border-bottom: none !important; }
    .main-nav a {
        display: block !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #1e293b !important;
        background: #fff !important;
        text-decoration: none !important;
        line-height: 1.4 !important;
        visibility: visible !important;
        opacity: 1 !important;
        border: none !important;
        text-shadow: none !important;
        -webkit-text-fill-color: #1e293b !important;
        text-transform: uppercase !important;
    }
    .main-nav a:hover,
    .main-nav a:focus,
    .main-nav a:active {
        color: #2563eb !important;
        background: #eff6ff !important;
        -webkit-text-fill-color: #2563eb !important;
    }

    /* Hero — SAME STYLE, SMALLER */
    .hero { padding: 32px 16px; min-height: 240px; }
    .hero h1 { font-size: 26px; letter-spacing: -0.5px; min-height: 32px; }
    .hero p { font-size: 14px; margin-bottom: 24px; }
    .hero-search {
        flex-direction: row;
        gap: 0;
        padding: 0;
        border-radius: 8px;
        overflow: hidden;
        width: 100%;
        max-width: 100%;
        min-height: 44px;
    }
    .hero-search input { padding: 12px 14px; font-size: 14px; border-radius: 0; border: none; }
    .hero-search button {
        width: auto;
        padding: 12px 18px;
        font-size: 13px;
        border-radius: 0;
        gap: 4px;
        flex-shrink: 0;
    }
    .hero-search button svg { width: 16px; height: 16px; }

    /* Hero Stats — SAME STYLE 3-in-row */
    .hero-stats {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
        margin-top: 24px;
        flex-wrap: nowrap;
        width: 100%;
        min-height: 44px;
    }
    .hero-stat { flex: 1; text-align: center; min-width: 0; }
    .hero-stat strong { font-size: 20px; line-height: 1.1; display: block; }
    .hero-stat span {
        font-size: 9px;
        letter-spacing: 0.3px;
        display: block;
        margin-top: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Sections */
    .section { padding: 40px 12px; min-height: 300px; }
    .section-title { font-size: 18px; }
    .single-title { font-size: 24px; }

    /* PDF Cards — SAME STYLE 3-col */
    .pdf-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        min-height: 200px;
    }
    .pdf-card-body { padding: 6px; min-height: 70px; }
    .pdf-card-title { font-size: 11px; line-height: 1.25; margin-bottom: 6px; min-height: 28px; }
    .pdf-card-btn {
        font-size: 10px;
        padding: 5px 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
    }
    .pdf-card-btn svg { width: 11px; height: 11px; margin-right: 2px !important; }
    .pdf-card-badge { font-size: 8px; padding: 1px 4px; top: 4px; right: 4px; }

    /* Category Grid — SAME STYLE 3-col */
    .category-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        min-height: 150px;
    }
    .category-card {
        height: auto !important;
        min-height: 78px;
        padding: 8px 6px !important;
        flex-direction: column !important;
        text-align: center;
        gap: 5px !important;
        justify-content: center;
    }
    .category-icon { width: 34px !important; height: 34px !important; margin: 0 auto; }
    .category-icon svg { width: 17px !important; height: 17px !important; }
    .category-info { align-items: center; text-align: center; width: 100%; }
    .category-name {
        font-size: 10px !important;
        line-height: 1.2 !important;
        margin-bottom: 2px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
    }
    .category-count { font-size: 9px !important; }

    /* Single Page — SAME STYLE, scaled */
    .single-wrapper { padding: 30px 15px; }
    .pdf-top-part {
        display: grid !important;
        grid-template-columns: 1fr 100px !important;  /* 🔥 SAME style, thoda chhota */
        gap: 0 !important;
        min-height: 150px;
    }
    .pdf-table-top { border-right: 1px solid var(--border) !important; border-bottom: none !important; }
    .pdf-image-top {
        width: 100% !important;
        min-height: auto !important;
        justify-content: center !important;
        align-items: flex-start !important;
        padding: 4px !important;
    }
    .pdf-image-top img { width: 100% !important; max-height: 140px !important; object-fit: contain !important; }
    .pdf-details-table th { width: 90px !important; font-size: 11px !important; padding: 6px 5px !important; }
    .pdf-details-table td { width: calc(100% - 90px) !important; font-size: 11px !important; padding: 6px 5px !important; }
    .pdf-details-table a[style] { font-size: 10px !important; padding: 2px 4px !important; display: inline-block; }

    .read-more-btn {
        font-size: 10px !important;
        padding: 5px 10px !important;
        bottom: 8px !important;
        right: 12px !important;
    }
    .pdf-content-part { padding: 15px !important; padding-bottom: 40px !important; }

    /* Buttons — 3-in-row SAME STYLE */
    .action-buttons-wrapper {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 5px !important;
        width: 100% !important;
        justify-content: space-between !important;
    }
    .pdf-download-btn, .social-btn {
        flex: 1 !important;
        padding: 8px 4px !important;
        font-size: 10px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 3px !important;
        width: auto !important;
    }
    .pdf-download-btn svg,
    .social-btn svg { width: 11px !important; height: 11px !important; margin: 0 !important; }

    /* Related Posts — SAME STYLE */
    .related-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; min-height: 150px; }
    .related-card-title { font-size: 10px; min-height: 26px; }

    /* Footer — SAME STYLE 3-col */
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 16px; text-align: left; }
    .footer-title { font-size: 13px; margin-bottom: 12px; }
    .footer-title::after { left: 0; transform: none; }
    .footer-links a { font-size: 12px; }
    .footer-links a:hover { transform: none; }
    .footer-social { justify-content: flex-start; gap: 6px; }
    .footer-social-btn { font-size: 11px; padding: 5px 10px; }

    /* Text blocks */
    .htb-header h2 { font-size: 14px; }
    .htb-body { padding: 15px; font-size: 14px; }

    /* InstaPDF */
    .ip-fullscreen-wrapper { padding: 20px; }
    .ip-bottom-section { margin: 0 -20px; width: calc(100% + 40px); }
    .ip-title { font-size: 22px; }
    .ip-middle-section { flex-direction: column; gap: 20px; }
    .ip-timer-box { margin-right: 0; }
    .ip-steps { flex-direction: column; align-items: flex-start; gap: 10px; padding: 0 20px; }
    .ip-step { flex-direction: row; gap: 10px; text-align: left; }
    .step-icon { margin-bottom: 0; width: 24px; height: 24px; font-size: 11px; }
    .ip-step p { font-size: 13px; }

    /* Category Page */
    .category-page-wrapper { padding: 30px 12px; }
    .category-page-header { margin-bottom: 25px; padding-bottom: 18px; min-height: 80px; }
    .category-page-header .section-title {
        font-size: 20px;
        padding-left: 10px;
        border-left-width: 4px;
        margin-bottom: 12px;
    }
    .category-description { font-size: 14px; }
    .category-posts-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 30px;
        min-height: 200px;
    }
    .category-pagination-wrap { margin-bottom: 35px; }
    .pagination a, .pagination span { min-width: 36px; height: 36px; font-size: 13px; }
    .no-posts-found { padding: 50px 15px; }
}

/* ========================================== */
/* EXTRA SMALL ≤480px                         */
/* ========================================== */
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
    .hero h1 { font-size: 20px; min-height: 26px; }
    .hero-search input { padding: 10px 10px; font-size: 13px; }
    .hero-search button { padding: 10px 12px; font-size: 12px; }
    .hero-search button span { display: inline !important; }

    .pdf-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 6px !important; }
    .pdf-card-title { font-size: 10px; min-height: 24px; }
    .pdf-card-btn { font-size: 9px; padding: 4px 3px; }

    .category-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 6px !important; }
    .category-name { font-size: 9px !important; }
    .category-count { font-size: 8px !important; }
    .category-icon { width: 30px !important; height: 30px !important; }
    .category-icon svg { width: 15px !important; height: 15px !important; }

    .related-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 6px !important; }
    .related-card-title { font-size: 9px; min-height: 22px; }
    .category-posts-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 6px !important; }

    .hero-stat strong { font-size: 17px; }
    .hero-stat span { font-size: 8px; }

    /* Single Page — same style, chhoti image */
    .pdf-top-part { grid-template-columns: 1fr 80px !important; }
    .pdf-image-top img { max-height: 110px !important; }
    .pdf-details-table th { width: 75px !important; font-size: 10px !important; padding: 5px 3px !important; }
    .pdf-details-table td { width: calc(100% - 75px) !important; font-size: 10px !important; padding: 5px 3px !important; }

    .read-more-btn {
        font-size: 9px !important;
        padding: 4px 8px !important;
        bottom: 6px !important;
        right: 10px !important;
    }
    .pdf-content-part { padding: 12px !important; padding-bottom: 35px !important; }

    .action-buttons-wrapper { gap: 3px !important; padding: 0 !important; margin: 0 !important; }
    .pdf-download-btn, .social-btn {
        font-size: 8px !important;
        padding: 6px 0px !important;
        gap: 1px !important;
        letter-spacing: -0.2px !important;
        border-radius: 4px !important;
    }
    .pdf-download-btn svg,
    .social-btn svg { width: 8px !important; height: 8px !important; margin: 0 !important; }
}