/* ================= GLOBAL SETTINGS (BASE) ================= */
:root {
    --font-heading: 'Inter', sans-serif;
    --h5m-primary: #2563eb; /* Admin Blue */
    --h5m-dark: #1e293b;
    --radius-md: 12px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-heading);
    color: var(--h5m-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a { text-decoration: none; transition: 0.3s; }
img { max-width: 100%; height: auto; display: block; }

/* Global Buttons */
.btn-secondary {
    display: inline-block;
    padding: 10px 25px;
    border: 2px solid var(--h5m-primary);
    color: var(--h5m-primary);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
}
.btn-secondary:hover {
    background: var(--h5m-primary);
    color: #fff;
}

/* Sections */
section { padding: 60px 0; position: relative; }
.bg-light { background-color: #f9fafb; }

.sec-header { text-align: center; margin-bottom: 40px; }
.sec-header h2 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }

/* =========================================================
   AD OPTIMIZATION ENGINE (CRITICAL FOR SPEED & LAYOUT)
   ========================================================= */

/* 1. Main Ad Wrapper - Prevents Layout Shift (CLS) */
.h5m-ad-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-align: center;
    margin: 30px auto; /* Proper spacing from content */
    background: #f8fafc; /* Placeholder color */
    min-height: 90px; /* Layout Shift Protection: Minimum Ad height */
    position: relative;
    border-radius: 4px;
}

/* 2. Ad Label (AdSense Compliance & UX) */
.h5m-ad-wrapper::before {
    content: 'ADVERTISEMENT';
    display: block;
    font-size: 10px;
    color: #cbd5e1; /* Very light gray */
    text-align: center;
    padding: 4px 0;
    letter-spacing: 1px;
    font-weight: 600;
}

/* 3. Empty Ad Hiding Logic */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* 4. STICKY SIDEBARS (Left & Right - Desktop Only) */
.h5m-sticky-sidebar {
    position: fixed;
    top: 120px; /* Header ke neeche */
    width: 160px; /* Skyscraper Standard */
    z-index: 999;
    transition: opacity 0.3s ease;
}

.h5m-sticky-left { left: 10px; }
.h5m-sticky-right { right: 10px; }

/* Mobile/Tablet par Sticky Sidebar Hide karein (Important) */
@media (max-width: 1300px) {
    .h5m-sticky-sidebar { display: none !important; }
}

/* 5. STICKY FOOTER AD (Bottom Anchor) */
#h5m-sticky-footer {
    display: none; /* Default Hidden, JS will show */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 10px 0;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}
#h5m-sticky-footer.visible {
    display: block;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* 6. CLOSE BUTTONS (UI) */
.h5m-ad-close, .close-sticky {
    position: absolute;
    background: #ef4444; /* Red */
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: none;
    z-index: 1001;
}

/* Sticky Sidebar Close Position */
.h5m-sticky-sidebar .h5m-ad-close {
    top: -10px;
    right: -10px;
}

/* Sticky Footer Close Position */
#h5m-sticky-footer .close-sticky {
    top: -15px;
    right: 15px;
    width: 30px;
    height: 30px;
    line-height: 28px;
}

/* ================= COMPACT PROFESSIONAL FOOTER ================= */
.h5m-site-footer {
    background-color: #1e293b; 
    color: #f1f5f9;
    padding: 40px 0 20px;
    margin-top: auto;
    font-size: 0.9rem;
    position: relative;
    z-index: 10;
}

.h5m-site-footer .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col h3 { font-size: 1.5rem; margin: 0 0 10px; font-weight: 800; color: #fff; }
.footer-col h4 { font-size: 1rem; margin-bottom: 15px; font-weight: 700; text-transform: uppercase; color: #fff; letter-spacing: 1px; }

.brand-desc { font-size: 0.9rem; line-height: 1.5; margin-bottom: 20px; max-width: 280px; color: #94a3b8; }

.footer-col ul li { margin-bottom: 8px; list-style: none; }
.footer-col ul li a { color: #cbd5e1; transition: 0.2s; font-size: 0.9rem; }
.footer-col ul li a:hover { color: #fff; padding-left: 3px; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 15px; margin-top: 10px; }
.footer-bottom-content { font-size: 0.8rem; color: #64748b; display: flex; justify-content: space-between; }

@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-bottom-content { flex-direction: column; gap: 10px; align-items: center; }
}