/*
Theme Name: Befitnatic
Theme URI: http://befitnatech.blog/
Author: Befitnatic Team
Author URI: http://befitnatech.blog/
Description: Befitnatic is a modern, professional blogging theme built for technology publications. It features soft gradient backgrounds, glassmorphism cards, 3D-style illustrations, full widget support, custom page templates, and a clean typographic system designed for readability. Perfect for tech news, reviews, tutorials, and how-to blogs.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: befitnatic
Tags: blog, news, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, theme-options, wide-blocks
*/

/* =====================================================
   0. CSS VARIABLES / DESIGN TOKENS
===================================================== */
:root{
  --bef-purple:#6C5CE7;
  --bef-blue:#4C6FFF;
  --bef-teal:#00D2C6;
  --bef-pink:#FF6FB5;
  --bef-orange:#FFA36C;
  --bef-ink:#12131A;
  --bef-body:#4A4E5C;
  --bef-muted:#7A7F94;
  --bef-bg:#F6F7FC;
  --bef-card:#FFFFFF;
  --bef-border:#E9EBF5;
  --bef-radius-lg:28px;
  --bef-radius-md:18px;
  --bef-radius-sm:12px;
  --bef-shadow-soft:0 20px 60px -20px rgba(76,70,175,0.25);
  --bef-shadow-card:0 10px 30px -15px rgba(20,20,50,0.15);
  --bef-gradient-1:linear-gradient(135deg,#6C5CE7 0%,#4C6FFF 50%,#00D2C6 100%);
  --bef-gradient-2:linear-gradient(135deg,#FF6FB5 0%,#6C5CE7 100%);
  --bef-gradient-3:linear-gradient(135deg,#00D2C6 0%,#4C6FFF 100%);
  --bef-gradient-warm:linear-gradient(135deg,#FFA36C 0%,#FF6FB5 100%);
  --bef-font-head:'Poppins',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --bef-font-body:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --bef-maxw:1240px;
}

/* =====================================================
   1. RESET / BASE
===================================================== */
*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--bef-font-body);
  color:var(--bef-body);
  background:var(--bef-bg);
  font-size:17px;
  line-height:1.7;
  overflow-x:hidden;
}
img{max-width:100%;height:auto;display:block;}
a{color:var(--bef-purple);text-decoration:none;transition:color .2s ease;}
a:hover{color:var(--bef-blue);}
ul,ol{padding-left:1.3em;}
h1,h2,h3,h4,h5,h6{
  font-family:var(--bef-font-head);
  color:var(--bef-ink);
  line-height:1.25;
  font-weight:700;
  margin:0 0 .6em;
}
h1{font-size:2.6rem;}
h2{font-size:2rem;}
h3{font-size:1.5rem;}
h4{font-size:1.2rem;}
p{margin:0 0 1.3em;}
.screen-reader-text{position:absolute;left:-9999px;}
.container{max-width:var(--bef-maxw);margin:0 auto;padding:0 24px;}
.btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:14px 30px;border-radius:100px;font-weight:600;
  font-family:var(--bef-font-head);font-size:.95rem;
  border:none;cursor:pointer;transition:transform .25s ease,box-shadow .25s ease;
}
.btn-gradient{background:var(--bef-gradient-1);color:#fff;box-shadow:0 12px 30px -10px rgba(76,92,231,.55);}
.btn-gradient:hover{transform:translateY(-3px);box-shadow:0 18px 36px -10px rgba(76,92,231,.65);color:#fff;}
.btn-outline{background:transparent;color:var(--bef-ink);border:2px solid var(--bef-border);}
.btn-outline:hover{border-color:var(--bef-purple);color:var(--bef-purple);transform:translateY(-3px);}
.eyebrow{
  display:inline-block;text-transform:uppercase;letter-spacing:.14em;
  font-size:.75rem;font-weight:700;color:var(--bef-purple);
  background:rgba(108,92,231,.09);padding:6px 16px;border-radius:100px;margin-bottom:16px;
}

/* =====================================================
   2. LAYOUT / GRID
===================================================== */
.bef-wrap{position:relative;}
.site-main-grid{
  display:grid;grid-template-columns:1fr 340px;gap:56px;
  max-width:var(--bef-maxw);margin:0 auto;padding:64px 24px 100px;
  align-items:start;
}
.no-sidebar .site-main-grid{grid-template-columns:1fr;max-width:860px;}
@media (max-width:960px){
  .site-main-grid{grid-template-columns:1fr;padding:40px 20px 60px;}
}

/* =====================================================
   3. HEADER
===================================================== */
.site-header{
  position:sticky;top:0;z-index:999;
  background:rgba(246,247,252,.85);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--bef-border);
}
.site-header-inner{
  max-width:var(--bef-maxw);margin:0 auto;padding:18px 24px;
  display:flex;align-items:center;justify-content:space-between;gap:24px;
}
.site-branding{display:flex;align-items:center;gap:12px;}
.site-logo-mark{
  width:42px;height:42px;border-radius:14px;background:var(--bef-gradient-1);
  display:flex;align-items:center;justify-content:center;color:#fff;font-family:var(--bef-font-head);
  font-weight:800;font-size:1.1rem;box-shadow:0 8px 20px -6px rgba(76,92,231,.6);
  flex-shrink:0;
}
.site-title{font-family:var(--bef-font-head);font-size:1.35rem;font-weight:800;color:var(--bef-ink);margin:0;line-height:1;}
.site-title a{color:var(--bef-ink);}
.site-description{font-size:.72rem;color:var(--bef-muted);margin:2px 0 0;text-transform:uppercase;letter-spacing:.08em;}
.main-navigation{display:flex;align-items:center;gap:8px;}
.main-navigation ul{list-style:none;margin:0;padding:0;display:flex;gap:4px;align-items:center;}
.main-navigation li{position:relative;}
.main-navigation a{
  display:block;padding:10px 16px;border-radius:100px;color:var(--bef-ink);
  font-weight:600;font-size:.95rem;
}
.main-navigation a:hover,.main-navigation .current-menu-item>a{background:rgba(108,92,231,.09);color:var(--bef-purple);}
.header-actions{display:flex;align-items:center;gap:14px;}
.header-search-toggle,.menu-toggle{
  width:42px;height:42px;border-radius:50%;border:1px solid var(--bef-border);
  background:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;
}
.menu-toggle{display:none;}
@media (max-width:900px){
  .main-navigation{position:fixed;inset:0 0 0 auto;width:80%;max-width:340px;background:#fff;
    flex-direction:column;align-items:flex-start;padding:100px 28px 40px;transform:translateX(100%);
    transition:transform .3s ease;box-shadow:-20px 0 60px rgba(0,0,0,.15);}
  .main-navigation.is-open{transform:translateX(0);}
  .main-navigation ul{flex-direction:column;width:100%;gap:2px;}
  .main-navigation a{width:100%;}
  .menu-toggle{display:flex;}
}
.header-search-panel{
  max-width:var(--bef-maxw);margin:0 auto;padding:0 24px;max-height:0;overflow:hidden;transition:max-height .3s ease,padding .3s ease;
}
.header-search-panel.is-open{max-height:100px;padding-bottom:20px;}
.header-search-panel form{display:flex;gap:10px;}
.header-search-panel input[type="search"]{
  flex:1;padding:12px 18px;border-radius:100px;border:1px solid var(--bef-border);font-size:1rem;
}

/* =====================================================
   4. HERO / FRONT PAGE
===================================================== */
.hero{position:relative;padding:90px 0 60px;overflow:hidden;}
.hero-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:40px;align-items:center;max-width:var(--bef-maxw);margin:0 auto;padding:0 24px;}
.hero h1{font-size:3.1rem;margin-bottom:20px;}
.hero h1 span{background:var(--bef-gradient-1);-webkit-background-clip:text;background-clip:text;color:transparent;}
.hero-lead{font-size:1.15rem;color:var(--bef-body);max-width:520px;margin-bottom:32px;}
.hero-cta{display:flex;gap:16px;flex-wrap:wrap;margin-bottom:36px;}
.hero-stats{display:flex;gap:36px;flex-wrap:wrap;}
.hero-stats div{display:flex;flex-direction:column;}
.hero-stats strong{font-family:var(--bef-font-head);font-size:1.6rem;color:var(--bef-ink);}
.hero-stats span{font-size:.82rem;color:var(--bef-muted);}
.hero-art{position:relative;display:flex;align-items:center;justify-content:center;min-height:420px;}
.hero-art img{position:relative;z-index:2;filter:drop-shadow(0 30px 60px rgba(76,92,231,.35));animation:bef-float 6s ease-in-out infinite;}
.hero-blob-a,.hero-blob-b{position:absolute;border-radius:50%;filter:blur(10px);opacity:.55;z-index:1;}
.hero-blob-a{width:320px;height:320px;background:var(--bef-gradient-1);top:-30px;right:10px;}
.hero-blob-b{width:220px;height:220px;background:var(--bef-gradient-warm);bottom:-20px;left:20px;opacity:.35;}
@keyframes bef-float{0%,100%{transform:translateY(0px);}50%{transform:translateY(-18px);}}
@media (max-width:900px){
  .hero-grid{grid-template-columns:1fr;text-align:center;}
  .hero-lead{margin-left:auto;margin-right:auto;}
  .hero-cta,.hero-stats{justify-content:center;}
  .hero h1{font-size:2.3rem;}
}

/* =====================================================
   5. SECTIONS / CATEGORY TILES
===================================================== */
.section{padding:70px 0;}
.section-head{text-align:center;max-width:640px;margin:0 auto 48px;}
.cat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:24px;max-width:var(--bef-maxw);margin:0 auto;padding:0 24px;}
@media (max-width:960px){.cat-grid{grid-template-columns:repeat(2,1fr);}}
@media (max-width:560px){.cat-grid{grid-template-columns:1fr;}}
.cat-card{
  background:var(--bef-card);border-radius:var(--bef-radius-md);padding:28px 22px;
  text-align:center;box-shadow:var(--bef-shadow-card);border:1px solid var(--bef-border);
  transition:transform .25s ease,box-shadow .25s ease;
}
.cat-card:hover{transform:translateY(-8px);box-shadow:var(--bef-shadow-soft);}
.cat-card img{width:84px;height:84px;margin:0 auto 16px;}
.cat-card h3{font-size:1.05rem;margin-bottom:6px;}
.cat-card p{font-size:.85rem;color:var(--bef-muted);margin:0;}
.cat-card a{display:block;color:inherit;}

/* Posts grid & cards */
.posts-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:30px;max-width:var(--bef-maxw);margin:0 auto;padding:0 24px;}
@media (max-width:960px){.posts-grid{grid-template-columns:repeat(2,1fr);}}
@media (max-width:640px){.posts-grid{grid-template-columns:1fr;}}
.post-card{
  background:var(--bef-card);border-radius:var(--bef-radius-md);overflow:hidden;
  box-shadow:var(--bef-shadow-card);border:1px solid var(--bef-border);
  display:flex;flex-direction:column;transition:transform .25s ease,box-shadow .25s ease;
}
.post-card:hover{transform:translateY(-6px);box-shadow:var(--bef-shadow-soft);}
.post-card-thumb{position:relative;aspect-ratio:16/10;overflow:hidden;}
.post-card-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease;}
.post-card:hover .post-card-thumb img{transform:scale(1.06);}
.post-card-cat{
  position:absolute;top:14px;left:14px;background:rgba(18,19,26,.72);color:#fff;
  font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;
  padding:6px 14px;border-radius:100px;backdrop-filter:blur(6px);
}
.post-card-body{padding:22px;display:flex;flex-direction:column;gap:10px;flex:1;}
.post-card-body h3{font-size:1.15rem;margin:0;}
.post-card-body h3 a{color:var(--bef-ink);}
.post-card-body h3 a:hover{color:var(--bef-purple);}
.post-card-excerpt{font-size:.92rem;color:var(--bef-muted);margin:0;flex:1;}
.post-meta{display:flex;align-items:center;gap:10px;font-size:.78rem;color:var(--bef-muted);}
.post-meta .dot{width:4px;height:4px;background:var(--bef-muted);border-radius:50%;}

/* Newsletter / CTA band */
.cta-band{
  background:var(--bef-gradient-1);border-radius:var(--bef-radius-lg);
  max-width:var(--bef-maxw);margin:20px auto 0;padding:60px;position:relative;overflow:hidden;
  display:flex;align-items:center;justify-content:space-between;gap:40px;flex-wrap:wrap;
  color:#fff;
}
.cta-band h2{color:#fff;margin-bottom:8px;}
.cta-band p{color:rgba(255,255,255,.85);margin:0;max-width:420px;}
.cta-band form{display:flex;gap:10px;flex-wrap:wrap;}
.cta-band input[type="email"]{padding:14px 20px;border-radius:100px;border:none;min-width:260px;font-size:1rem;}
.cta-band .btn-white{background:#fff;color:var(--bef-purple);}

/* =====================================================
   6. SINGLE POST / PAGE CONTENT
===================================================== */
.entry-header{margin-bottom:28px;}
.entry-header .eyebrow-link a{color:var(--bef-purple);}
.entry-title{font-size:2.3rem;margin:14px 0;}
.entry-meta{display:flex;align-items:center;gap:14px;flex-wrap:wrap;color:var(--bef-muted);font-size:.9rem;margin-bottom:24px;}
.entry-meta .author-avatar{width:34px;height:34px;border-radius:50%;background:var(--bef-gradient-2);}
.entry-thumbnail{border-radius:var(--bef-radius-md);overflow:hidden;margin-bottom:36px;box-shadow:var(--bef-shadow-card);}
.entry-content{font-size:1.08rem;color:var(--bef-body);}
.entry-content h2{margin-top:1.6em;font-size:1.6rem;}
.entry-content h3{margin-top:1.4em;}
.entry-content ul,.entry-content ol{margin-bottom:1.3em;}
.entry-content li{margin-bottom:.4em;}
.entry-content blockquote{
  border-left:4px solid var(--bef-purple);background:rgba(108,92,231,.06);
  padding:18px 26px;border-radius:0 var(--bef-radius-sm) var(--bef-radius-sm) 0;font-style:italic;color:var(--bef-ink);margin:2em 0;
}
.entry-content img{border-radius:var(--bef-radius-sm);}
.entry-content pre{background:#161822;color:#e8e9f3;padding:20px;border-radius:var(--bef-radius-sm);overflow:auto;}
.entry-content code{background:rgba(108,92,231,.09);padding:2px 6px;border-radius:6px;font-size:.9em;}
.tags-links{margin-top:36px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.tags-links a{background:var(--bef-bg);border:1px solid var(--bef-border);padding:6px 16px;border-radius:100px;font-size:.85rem;color:var(--bef-body);}
.author-box{
  margin-top:48px;padding:28px;border-radius:var(--bef-radius-md);background:var(--bef-card);
  border:1px solid var(--bef-border);display:flex;gap:20px;align-items:flex-start;
}
.author-box .avatar-lg{width:64px;height:64px;border-radius:50%;background:var(--bef-gradient-1);flex-shrink:0;}
.related-posts{margin-top:56px;}
.pagination{display:flex;gap:8px;justify-content:center;margin-top:50px;flex-wrap:wrap;}
.pagination a,.pagination span{
  padding:10px 18px;border-radius:100px;border:1px solid var(--bef-border);color:var(--bef-ink);font-weight:600;font-size:.9rem;
}
.pagination .current{background:var(--bef-gradient-1);color:#fff;border:none;}

/* =====================================================
   7. SIDEBAR / WIDGETS
===================================================== */
.widget{background:var(--bef-card);border:1px solid var(--bef-border);border-radius:var(--bef-radius-md);padding:26px;margin-bottom:26px;box-shadow:var(--bef-shadow-card);}
.widget-title{font-size:1rem;text-transform:uppercase;letter-spacing:.06em;margin-bottom:18px;position:relative;padding-bottom:12px;}
.widget-title::after{content:"";position:absolute;left:0;bottom:0;width:36px;height:3px;background:var(--bef-gradient-1);border-radius:10px;}
.widget ul{list-style:none;margin:0;padding:0;}
.widget li{padding:10px 0;border-bottom:1px dashed var(--bef-border);font-size:.92rem;}
.widget li:last-child{border-bottom:none;}
.widget_search input[type=search]{width:100%;padding:12px 16px;border-radius:100px;border:1px solid var(--bef-border);}
.sidebar-profile{text-align:center;}
.sidebar-profile img{width:76px;height:76px;border-radius:50%;margin:0 auto 14px;}

/* =====================================================
   8. FOOTER
===================================================== */
.site-footer{background:var(--bef-ink);color:#c7c9db;margin-top:80px;padding-top:70px;position:relative;overflow:hidden;}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:40px;max-width:var(--bef-maxw);margin:0 auto;padding:0 24px 50px;}
@media (max-width:900px){.footer-grid{grid-template-columns:1fr 1fr;}}
@media (max-width:560px){.footer-grid{grid-template-columns:1fr;}}
.site-footer h4{color:#fff;font-size:.95rem;text-transform:uppercase;letter-spacing:.08em;margin-bottom:20px;}
.site-footer p{color:#9498b3;font-size:.92rem;}
.site-footer ul{list-style:none;padding:0;margin:0;}
.site-footer li{margin-bottom:12px;}
.site-footer a{color:#c7c9db;}
.site-footer a:hover{color:var(--bef-teal);}
.footer-social{display:flex;gap:10px;margin-top:18px;}
.footer-social a{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;}
.footer-bottom{border-top:1px solid rgba(255,255,255,.08);padding:24px;text-align:center;font-size:.85rem;color:#82869e;}
.footer-bottom a{color:#c7c9db;}

/* =====================================================
   9. FORMS (contact + comments)
===================================================== */
.bef-form-row{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px;}
@media (max-width:640px){.bef-form-row{grid-template-columns:1fr;}}
.bef-form label{display:block;font-weight:600;margin-bottom:8px;font-size:.9rem;color:var(--bef-ink);}
.bef-form input,.bef-form textarea,.bef-form select,.comment-form input,.comment-form textarea{
  width:100%;padding:14px 18px;border-radius:var(--bef-radius-sm);border:1px solid var(--bef-border);
  font-family:var(--bef-font-body);font-size:1rem;background:#fff;
}
.bef-form textarea{resize:vertical;min-height:150px;}
.form-success{background:rgba(0,210,198,.1);border:1px solid var(--bef-teal);padding:16px 20px;border-radius:var(--bef-radius-sm);margin-bottom:20px;color:#037a72;}

/* Contact page info cards */
.contact-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin:40px 0 50px;}
@media (max-width:800px){.contact-grid{grid-template-columns:1fr;}}
.contact-info-card{background:var(--bef-card);border:1px solid var(--bef-border);border-radius:var(--bef-radius-md);padding:26px;text-align:center;box-shadow:var(--bef-shadow-card);}
.contact-info-card .icon-badge{width:56px;height:56px;border-radius:16px;background:var(--bef-gradient-1);margin:0 auto 14px;display:flex;align-items:center;justify-content:center;}

/* 404 */
.error-404{text-align:center;padding:100px 24px;}
.error-404 img{max-width:340px;margin:0 auto 30px;}
.error-404 h1{font-size:6rem;background:var(--bef-gradient-1);-webkit-background-clip:text;background-clip:text;color:transparent;margin:0;}

/* Misc */
.wp-block-quote{border-left:4px solid var(--bef-purple);padding-left:20px;}
.alignwide{max-width:1000px;}
.alignfull{max-width:100%;}
::selection{background:var(--bef-purple);color:#fff;}
