/* ============================================================
   InstaSafe — Public Stylesheet
   Preserves the original UI exactly + adds blog, page, footer
   ============================================================ */

/* --- Reset & Variables --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:root {
    --primary-blue: #007bff; --primary-hover: #0056b3;
    --gradient-bg: linear-gradient(90deg, #3a7bd5 0%, #c53c9b 50%, #f54a4f 100%);
    --text-dark: #333; --text-light: #666;
    --btn-pink: #E1306C; --btn-pink-hover: #c1275d;
    --bg-light: #f8f9fa; --white: #ffffff;
    --border: #eee; --shadow: 0 5px 15px rgba(0,0,0,0.08);
}
body { font-family: 'Outfit', sans-serif; margin: 0; padding: 0; background-color: var(--bg-light); color: var(--text-dark); }
a { color: var(--primary-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* --- Navigation --- */
.main-nav { background: var(--gradient-bg); padding: 0 20px; position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; height: 56px; }
.logo { font-size: 1.4rem; font-weight: 700; color: white !important; text-decoration: none !important; display: flex; align-items: center; gap: 10px; }
.logo img { border-radius: 6px; }
.nav-links { font-weight: 500; display: flex; gap: 20px; font-size: 0.9rem; }
.nav-links a { color: rgba(255,255,255,0.9) !important; text-decoration: none !important; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; color: white !important; }
.mobile-menu-btn { display: none; background: none; border: none; color: white; cursor: pointer; padding: 4px; }

/* --- Hero Section --- */
.hero-section { background: var(--gradient-bg); padding: 15px 20px 50px 20px; text-align: center; color: white; display: flex; flex-direction: column; align-items: center; }

/* Tabs */
.tabs-wrapper { background: rgba(255,255,255,0.15); padding: 4px; border-radius: 10px; display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0; margin-bottom: 20px; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.2); max-width: 95%; }
.tab { padding: 10px 20px; color: white; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.95rem; border-right: 1px solid rgba(255,255,255,0.2); }
.tab:last-child { border-right: none; }
.tab svg { width: 16px; height: 16px; fill: white; }

h1 { font-size: 2.2rem; margin: 0 0 10px 0; font-weight: 700; }
.subtitle { font-size: 1.05rem; opacity: 0.95; margin-bottom: 25px; max-width: 700px; line-height: 1.4; }

/* --- Search Box --- */
.search-container { background: white; padding: 5px; border-radius: 8px; display: flex; width: 100%; max-width: 750px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); position: relative; }
.input-wrapper { position: relative; flex: 1; display: flex; align-items: center; }
input[type="text"]:not(.form-group input) { width: 100%; border: none; padding: 15px 80px 15px 20px; font-size: 1rem; outline: none; border-radius: 6px; color: #333; background: transparent; }
.input-action-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: #e9ecef; border: 1px solid #ced4da; padding: 5px 12px; border-radius: 4px; font-size: 0.85rem; font-weight: 600; color: #495057; cursor: pointer; display: flex; align-items: center; gap: 5px; z-index: 10; }
#pasteBtn { border: 1px solid #c53c9b; color: #333; }
button.main-btn, a.main-btn { background-color: var(--primary-blue); color: white; border: none; padding: 10px 30px; border-radius: 6px; font-weight: 600; font-size: 1rem; cursor: pointer; margin-left: 5px; white-space: nowrap; text-decoration: none !important; display: inline-block; text-align: center; font-family: inherit; }
button.main-btn:hover { background-color: var(--primary-hover); }

/* --- Result Card --- */
.result-section { display: flex; justify-content: center; padding: 20px; }
.result-card { display: none; background: white; padding: 20px; border-radius: 16px; box-shadow: var(--shadow); width: 100%; max-width: 400px; text-align: center; margin-bottom: 40px; overflow: hidden; }
.thumb-box { width: 100%; height: 300px; background: #f0f0f0; border-radius: 8px; overflow: hidden; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; }
.thumb-box img { width: 100%; height: 100%; object-fit: contain; }
.download-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px; background: var(--btn-pink); color: white !important; text-decoration: none !important; border-radius: 8px; font-weight: 700; font-size: 1.1rem; transition: all 0.2s ease; border: none; cursor: pointer; }
.download-btn:hover { background: var(--btn-pink-hover); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(225, 48, 108, 0.3); }
.download-btn svg { width: 20px; height: 20px; }

/* --- Features --- */
.features-section { padding: 50px 20px; background: #fff; text-align: center; }
.features-title { color: #6a3093; font-size: 1.8rem; font-weight: 700; margin-bottom: 40px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1100px; margin: 0 auto; }
.feature-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 30px 20px; text-align: left; transition: transform 0.2s, box-shadow 0.2s; box-shadow: var(--shadow); }
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.feature-icon-wrapper { margin-bottom: 20px; height: 80px; width: 80px; display: flex; align-items: center; justify-content: center; }
.feature-card h3 { font-size: 1.2rem; margin-bottom: 10px; color: #000; font-weight: 700; }
.feature-card p { font-size: 0.95rem; color: var(--text-light); line-height: 1.6; margin: 0; }

/* --- FAQ --- */
.faq-section { padding: 60px 20px 80px 20px; background: #fff; max-width: 900px; margin: 0 auto; }
.faq-title { text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 10px; color: var(--text-dark); }
.faq-title span { color: var(--btn-pink); }
.faq-subtitle { text-align: center; color: var(--text-light); margin-bottom: 50px; font-size: 1rem; }
.faq-item { border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.faq-question { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; cursor: pointer; font-weight: 600; font-size: 1.1rem; color: var(--text-dark); transition: color 0.2s; }
.faq-question:hover { color: var(--btn-pink); }
.faq-icon { width: 24px; height: 24px; border: 2px solid var(--text-dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; flex-shrink: 0; margin-left: 15px; }
.faq-icon svg { width: 12px; height: 12px; fill: var(--text-dark); transition: all 0.3s; }
.faq-item.active .faq-question { color: var(--btn-pink); }
.faq-item.active .faq-icon { border-color: var(--btn-pink); transform: rotate(45deg); }
.faq-item.active .faq-icon svg { fill: var(--btn-pink); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; color: var(--text-light); line-height: 1.6; font-size: 0.95rem; }
.faq-answer p { margin: 0 0 20px 0; }

/* --- Modal --- */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 999; justify-content: center; align-items: center; }
.modal { background: white; padding: 2.5rem; border-radius: 16px; text-align: center; max-width: 320px; }
.lock-icon { font-size: 3.5rem; margin-bottom: 1rem; display: block; }

/* --- CMS Content --- */
.cms-content-section { padding: 40px 20px; background: #fff; }
.cms-content-inner { max-width: 800px; margin: 0 auto; line-height: 1.8; }
.cms-body { line-height: 1.8; font-size: 1.05rem; }
.cms-body h2 { font-size: 1.6rem; margin: 2rem 0 1rem; color: var(--text-dark); }
.cms-body h3 { font-size: 1.3rem; margin: 1.5rem 0 0.75rem; }
.cms-body p { margin: 0 0 1.2rem; }
.cms-body ul, .cms-body ol { margin: 0 0 1.2rem 1.5rem; }
.cms-body img { border-radius: 8px; margin: 1rem 0; }
.cms-body blockquote { border-left: 4px solid var(--btn-pink); padding: 1rem 1.5rem; margin: 1.5rem 0; background: #f9f9f9; border-radius: 0 8px 8px 0; }
.cms-body a { color: var(--btn-pink); }

/* --- Page Hero --- */
.page-hero { background: var(--gradient-bg); padding: 40px 20px; text-align: center; color: white; }
.page-hero h1 { margin: 0; font-size: 2rem; }
.page-hero-blog { padding: 20px 20px; text-align: left; }
.page-hero-blog .breadcrumb a { color: rgba(255,255,255,0.8); }
.page-hero-blog .breadcrumb { color: rgba(255,255,255,0.6); }
.page-content { max-width: 800px; margin: 0 auto; padding: 40px 20px; }
.page-content-inner { background: white; padding: 40px; border-radius: 12px; box-shadow: var(--shadow); }
.page-updated { color: var(--text-light); font-size: 0.9rem; margin-top: 2rem; border-top: 1px solid var(--border); padding-top: 1rem; }

/* --- Breadcrumb --- */
.breadcrumb { font-size: 0.9rem; color: var(--text-light); margin-bottom: 1rem; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--text-dark); }
.breadcrumb .sep { margin: 0 8px; }

/* --- Blog --- */
.blog-page { max-width: 1200px; margin: 0 auto; padding: 30px 20px 60px; }
.blog-layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; }
.blog-grid { display: flex; flex-direction: column; gap: 24px; }
.blog-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; }
.blog-card:hover { transform: translateY(-3px); }
.blog-card-image { display: block; height: 220px; overflow: hidden; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 20px; }
.blog-card-body h2 { font-size: 1.3rem; margin: 8px 0; }
.blog-card-body h2 a { color: var(--text-dark); text-decoration: none; }
.blog-card-body h2 a:hover { color: var(--btn-pink); }
.blog-category { display: inline-block; background: #f0e6f6; color: #6a3093; padding: 3px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; text-decoration: none !important; }
.blog-excerpt { color: var(--text-light); font-size: 0.95rem; line-height: 1.6; margin: 8px 0 12px; }
.blog-meta { font-size: 0.85rem; color: #999; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dot { margin: 0 4px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }

/* Sidebar */
.blog-sidebar {}
.sidebar-widget { background: white; border-radius: 12px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.sidebar-widget h3 { font-size: 1.1rem; margin: 0 0 15px; }
.category-list { list-style: none; padding: 0; margin: 0; }
.category-list li { margin-bottom: 8px; }
.category-list a { color: var(--text-dark); display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f5f5f5; text-decoration: none; }
.category-list a:hover, .category-list a.active { color: var(--btn-pink); }
.category-list .count { color: #bbb; font-size: 0.85rem; }

/* Single Post */
.blog-single { max-width: 800px; margin: 0 auto; padding: 30px 20px 60px; }
.blog-single-inner { background: white; border-radius: 12px; padding: 40px; box-shadow: var(--shadow); }
.blog-header { margin-bottom: 24px; }
.blog-header h1 { font-size: 2rem; margin: 12px 0; line-height: 1.3; }
.blog-featured-image { margin: 0 0 30px; border-radius: 8px; overflow: hidden; }
.blog-featured-image img { width: 100%; display: block; }
.blog-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); }
.tag { background: #f5f5f5; color: var(--text-light); padding: 4px 14px; border-radius: 20px; font-size: 0.85rem; }

/* Related Posts */
.related-posts { background: #fff; padding: 40px 20px 60px; }
.related-inner { max-width: 800px; margin: 0 auto; }
.related-inner h2 { font-size: 1.4rem; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card { background: var(--bg-light); border-radius: 10px; overflow: hidden; text-decoration: none !important; transition: transform .2s; }
.related-card:hover { transform: translateY(-3px); }
.related-card img { width: 100%; height: 140px; object-fit: cover; }
.related-card h3 { font-size: 1rem; margin: 12px; color: var(--text-dark); }
.related-card time { font-size: 0.8rem; color: #999; margin: 0 12px 12px; display: block; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.page-link { padding: 8px 14px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-dark); font-weight: 500; font-size: 0.9rem; text-decoration: none; }
.page-link:hover { background: var(--bg-light); }
.page-link.active { background: var(--btn-pink); color: white; border-color: var(--btn-pink); }

/* --- Footer --- */
.site-footer { background: #1a1a2e; color: rgba(255,255,255,0.8); padding: 50px 20px 20px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-col h4 { color: white; font-size: 1.1rem; margin-bottom: 15px; }
.footer-col p { font-size: 0.9rem; line-height: 1.7; margin: 0; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: rgba(255,255,255,0.7); font-size: 0.9rem; text-decoration: none; }
.footer-col ul a:hover { color: white; }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.footer-bottom p { margin: 0; font-size: 0.85rem; color: rgba(255,255,255,0.5); }

/* --- 404 --- */
.error-page { display: flex; justify-content: center; align-items: center; min-height: 60vh; text-align: center; padding: 40px 20px; }
.error-code { font-size: 8rem; font-weight: 700; color: var(--btn-pink); margin: 0; line-height: 1; }
.error-content h2 { margin: 10px 0; }
.error-content p { color: var(--text-light); margin-bottom: 20px; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-layout { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 650px) {
    .mobile-menu-btn { display: block; }
    .nav-links { display: none; position: absolute; top: 56px; left: 0; right: 0; background: rgba(58,123,213,0.98); flex-direction: column; padding: 20px; gap: 16px; }
    .nav-links.open { display: flex; }
    h1 { font-size: 1.8rem; }
    .tabs-wrapper { display: flex; flex-wrap: wrap; width: 100%; padding: 0; border: none; background: transparent; }
    .tab { width: 48%; margin: 2px; border-radius: 6px; background: rgba(255,255,255,0.2); border: none; padding: 8px 0; font-size: 0.9rem; }
    .search-container { flex-direction: column; background: transparent; box-shadow: none; padding: 0; width: 100%; }
    .input-wrapper { background: white; width: 100%; border-radius: 6px; margin-bottom: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
    input[type="text"]:not(.form-group input) { width: 100%; text-align: left; padding-left: 15px; height: 50px; }
    button.main-btn { width: 100%; margin: 0; box-shadow: 0 5px 15px rgba(0,0,0,0.1); height: 50px; }
    .features-grid { grid-template-columns: 1fr; padding: 0 10px; }
    .blog-single-inner { padding: 20px; }
    .page-content-inner { padding: 20px; }
    .related-grid { grid-template-columns: 1fr; }
}
