/*
Theme Name: TechNoobToPro
Author: TechNoobToPro
Description: Black & Red modern tech WordPress theme
Version: 1.0
*/

/* =====================
   RESET & BASE
===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: #0b0b0b;
  color: #ffffff;
  line-height: 1.7;
}

/* =====================
   HEADER
===================== */
.header {
  position: relative;
  background: #000;
  border-bottom: 1px solid #ff1a1a;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.logo {
  font-size: 24px;
  font-weight: bold;
}
.logo span {
  color: #ff1a1a;
}

/* =====================
   HAMBURGER BUTTON
===================== */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 26px;
  height: 3px;
  background: #ff1a1a;
  border-radius: 2px;
}

/* =====================
   HEADER MENU (DESKTOP)
===================== */
.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav ul li {
  position: relative;
}

.main-nav ul li a {
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.main-nav ul li a:hover {
  color: #ff1a1a;
}

/* =====================
   DROPDOWN (DESKTOP)
===================== */
.main-nav ul li ul {
  position: absolute;
  top: 100%;
  left: 0;
  background: #0f0f0f;
  min-width: 220px;
  padding: 10px 0;
  border-radius: 10px;
  box-shadow: 0 12px 35px rgba(255, 0, 0, 0.25);
  display: none;
}

.main-nav ul li:hover > ul {
  display: block;
}

.main-nav ul li ul li a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
}

.main-nav ul li ul li a:hover {
  background: #ff1a1a;
  color: #fff;
}

/* =====================
   HERO
===================== */
.hero {
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(180deg, #000, #111);
}

.hero h1 {
  font-size: 36px;
}

.hero h1 span {
  color: #ff1a1a;
}

.hero p {
  margin-top: 12px;
  color: #cccccc;
}

/* =====================
   POSTS GRID
===================== */
.posts {
  padding: 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* =====================
   POST CARD
===================== */
.card {
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(255, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(255, 0, 0, 0.25);
}

.card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.card h2 {
  padding: 15px;
  font-size: 20px;
}

.card p {
  padding: 0 15px 15px;
  color: #bbbbbb;
}

.read-more {
  display: block;
  padding: 15px;
  color: #ff1a1a;
  text-decoration: none;
}

/* =====================
   SINGLE POST / PAGE
===================== */
.single-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.single-post {
  background: #0f0f0f;
  padding: 30px;
  border-radius: 12px;
}

/* =====================
   CONTENT
===================== */
.post-content,
.entry-content {
  font-size: 18px;
  line-height: 1.9;
  color: #e0e0e0;
}

.post-content h2,
.post-content h3,
.entry-content h2,
.entry-content h3 {
  margin-top: 30px;
  color: #ff1a1a;
}

.post-content p,
.entry-content p {
  margin-bottom: 20px;
}

/* =====================
   CONTENT LINKS ONLY (FINAL FIX)
===================== */
.post-content a,
.entry-content a,
.single-post .post-content a,
.page .entry-content a {
  color: #ff4d4d;
  text-decoration: none;
  font-weight: 500;
}

.post-content a:hover,
.entry-content a:hover,
.single-post .post-content a:hover,
.page .entry-content a:hover {
  color: #ff1a1a;
  text-decoration: underline;
}

.post-content a:visited,
.entry-content a:visited {
  color: #ff8080;
}

/* =====================
   FOOTER
===================== */
footer {
  text-align: center;
  padding: 25px;
  background: #000;
  color: #777;
}

/* =====================
   MOBILE FIXES (MENU + CONTENT)
   ADD AT END OF FILE
===================== */

@media (max-width: 768px) {

  .header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
  }

  /* Logo stays left */
  .logo {
    font-size: 20px;
    flex: 1;
  }

  /* Push hamburger fully to right */
  .menu-toggle {
    display: flex;
    margin-left: 20px;
    margin-right: 5px;
    margin-right: 5px;
    flex-shrink: 0;
  }

  .menu-toggle span {
    width: 24px;
  }

  /* ===== SMOOTH MOBILE MENU ===== */
  .main-nav {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
  }

  .main-nav.active {
    max-height: 500px;
    opacity: 1;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 12px;
    background: #000;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
  }

  .main-nav ul li {
    text-align: center;
  }

  .main-nav ul li ul {
    display: none;
    position: static;
    background: #111;
    margin-top: 8px;
    border-radius: 8px;
  }

  .main-nav ul li.open > ul {
    display: block;
  }

  /* ===== MOBILE TYPOGRAPHY FIX ===== */
  .post-content,
  .entry-content {
    font-size: 16px;
    line-height: 1.85;
  }

  .post-content h1,
  .entry-content h1 {
    font-size: 26px;
  }

  .post-content h2,
  .entry-content h2 {
    font-size: 22px;
  }

  .post-content h3,
  .entry-content h3 {
    font-size: 20px;
  }

  .post-content p,
  .entry-content p {
    margin-bottom: 18px;
  }

  /* ===== IMAGE RESPONSIVE FIX ===== */
  .post-content img,
  .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
  }

  /* ===== SINGLE POST PADDING FIX ===== */
  .single-container {
    padding: 0 15px;
  }

  .single-post {
    padding: 20px;
  }

  /* ===== HERO TITLE MOBILE ===== */
  .hero h1 {
    font-size: 28px;
  }
}

/* =====================
   LOGO LINK FIX
===================== */
.logo a {
  color: #ffffff;
  text-decoration: none;
  display: inline-block;
}

.logo a:hover {
  color: #ffffff;
}


/* =====================
   BLOG CARD CLICK FIX
===================== */

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.card .read-more {
  display: block;
  padding: 15px;
  color: #ff1a1a;
  font-weight: 500;
}


/* =====================
   FEATURED IMAGE FIX
===================== */

.featured-image img,
.post-thumbnail img,
.single-post img.wp-post-image {
  width: 100%;
  max-width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 20px;
  margin-bottom: 25px;
}


/* =====================
   GLOBAL IMAGE SAFETY
===================== */

img {
  max-width: 100%;
  height: auto;
}


/* =====================
   MOBILE IMAGE FIX
===================== */

@media (max-width: 768px) {

  .featured-image img,
  .post-thumbnail img,
  .single-post img.wp-post-image {
    height: 220px;
  }

}


/* =====================
LINK COLOR FIX (SITEWIDE)
===================== */

/* Breadcrumb links */
.breadcrumb a {
  color: #ff1a1a;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #ff4d4d;
  text-decoration: underline;
}

/* Categories under title */
.post-meta a {
  color: #ff1a1a;
  text-decoration: none;
}

.post-meta a:hover {
  color: #ff4d4d;
}

/* Tags section */
.post-tags a {
  color: #ff1a1a;
  text-decoration: none;
}

.post-tags a:hover {
  color: #ff4d4d;
}

/* Prevent blue default links anywhere */
a {
  color: #ff1a1a;
}

a:hover {
  color: #ff4d4d;
}


.breadcrumb{
font-size:14px;
margin-bottom:20px;
color:#aaa;
}

.breadcrumb a{
color:#ff1a1a;
text-decoration:none;
}

.breadcrumb a:hover{
text-decoration:underline;
}

.current-post{
color:#fff;
}


/* HOMEPAGE */

.home-container{
max-width:1200px;
margin:auto;
padding:30px;
}


/* FEATURED POST */

.featured-post{
display:grid;
grid-template-columns:1.2fr 1fr;
gap:30px;
background:#111;
border-radius:14px;
overflow:hidden;
margin-bottom:40px;
text-decoration:none;
color:white;
box-shadow:0 10px 30px rgba(255,0,0,.15);
}

.featured-post img{
width:100%;
height:420px;
object-fit:cover;
}

.featured-content{
padding:30px;
display:flex;
flex-direction:column;
justify-content:center;
}

.featured-content h1{
font-size:32px;
margin:10px 0;
}

.featured-content p{
color:#bbb;
}

.featured-category{
background:#ff1a1a;
padding:6px 12px;
border-radius:6px;
font-size:13px;
width:max-content;
}


/* CATEGORY BADGE */

.post-category{
background:#ff1a1a;
padding:5px 10px;
border-radius:6px;
font-size:12px;
display:inline-block;
margin:15px 15px 0;
}


/* MOBILE */

@media (max-width:768px){

.featured-post{
grid-template-columns:1fr;
}

.featured-post img{
height:240px;
}

.featured-content h1{
font-size:24px;
}

}


/* =====================
BLOG GRID FIX
===================== */

.posts{
max-width:1200px;
margin:auto;
padding:60px 20px;
display:grid;
grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
gap:40px;
}

/* =====================
CARD FIX
===================== */

.card{
background:#111;
border-radius:14px;
overflow:hidden;
transition:0.3s;
box-shadow:0 10px 30px rgba(255,0,0,0.15);
}

.card:hover{
transform:translateY(-6px);
box-shadow:0 20px 50px rgba(255,0,0,0.25);
}

.card-link{
text-decoration:none;
color:inherit;
display:block;
height:100%;
}

/* =====================
CARD IMAGE
===================== */

.card-image img{
width:100%;
height:220px;
object-fit:cover;
display:block;
}

/* =====================
CARD CONTENT
===================== */

.card-content{
padding:18px;
}

.card-title{
font-size:20px;
margin-bottom:10px;
line-height:1.4;
}

.card-excerpt{
color:#bbb;
font-size:15px;
margin-bottom:12px;
}

/* =====================
CATEGORY BADGE
===================== */

.card-category span{
display:inline-block;
background:#ff1a1a;
color:#fff;
font-size:12px;
padding:4px 10px;
border-radius:20px;
margin-bottom:10px;
}

/* =====================
READ MORE
===================== */

.read-more{
color:#ff1a1a;
font-weight:500;
}

/* =====================
FIX CATEGORY BREAKING
===================== */

.post-meta a,
.post-tags a{
color:#ff1a1a;
white-space:nowrap;
margin-right:6px;
}

/* =====================
MOBILE FIX
===================== */

@media(max-width:768px){

.posts{
grid-template-columns:1fr;
gap:25px;
}

.card-image img{
height:200px;
}

}

.card-title:hover{
color:#ff1a1a;
}



/* ===============================
PREMIUM BLOG IMPROVEMENTS
=============================== */


/* Limit site width */
.posts{
max-width:1200px;
margin:auto;
}


/* ===============================
CARD IMAGE HOVER ZOOM
=============================== */

.card-image{
overflow:hidden;
border-radius:12px 12px 0 0;
}

.card-image img{
transition: transform .45s ease;
}

.card:hover .card-image img{
transform: scale(1.08);
}


/* ===============================
CARD HOVER GLOW EFFECT
=============================== */

.card{
position:relative;
overflow:hidden;
}

.card::after{
content:"";
position:absolute;
inset:0;
border-radius:14px;
background: radial-gradient(circle at top, rgba(255,0,0,.15), transparent 60%);
opacity:0;
transition:.4s;
pointer-events:none;
}

.card:hover::after{
opacity:1;
}


/* ===============================
TITLE HEIGHT FIX
=============================== */

.card-title{
min-height:60px;
}


/* ===============================
READ MORE BUTTON IMPROVEMENT
=============================== */

.read-more{
display:inline-block;
margin-top:12px;
color:#ff2a2a;
font-weight:600;
transition:.25s;
}

.card:hover .read-more{
letter-spacing:1px;
}


/* ===============================
CATEGORY BADGE UPGRADE
=============================== */

.card-category span{
background: linear-gradient(135deg,#ff1a1a,#ff4d4d);
padding:5px 12px;
font-size:12px;
border-radius:20px;
display:inline-block;
margin-bottom:12px;
}


/* ===============================
CARD SHADOW IMPROVEMENT
=============================== */

.card{
box-shadow:0 10px 30px rgba(255,0,0,.12);
}

.card:hover{
box-shadow:0 25px 60px rgba(255,0,0,.25);
}


/* ===============================
BETTER SPACING
=============================== */

.card-content{
padding:20px;
}

.card-excerpt{
margin-top:8px;
margin-bottom:14px;
}


/* ===============================
SMOOTHER TRANSITIONS
=============================== */

.card,
.card img,
.read-more{
transition:all .3s ease;
}


/* ===============================
MOBILE IMPROVEMENTS
=============================== */

@media (max-width:768px){

.posts{
padding:40px 15px;
gap:25px;
}

.card-title{
min-height:auto;
font-size:20px;
}

.card-image img{
height:200px;
object-fit:cover;
}

}


/* ===============================
SUBTLE GLASS EFFECT
=============================== */

.card{
backdrop-filter: blur(6px);
background: rgba(17,17,17,0.9);
}