/*
Theme Name: SecOne4All Dark Premium
Author: You
Description: Professional dark cybersecurity blog theme — green/yellow accent blocks
Version: 1.3
Text Domain: secone4all
*/

:root {
  --bg: #1e1e1e;
  --fg: #e0e0e0;
  --header-bg: #141414;
  --accent-green: #00ff7f;
  --accent-yellow: #ffd700;
  --base-border: #333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  transition: background .3s, color .3s;
}
a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color .2s;
}
a:hover {
  color: var(--accent-yellow);
}
header {
  background: var(--header-bg);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header .logo {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-menu a {
  padding: .5rem 1rem;
  border-radius: 4px;
  transition: background .2s;
}
.nav-menu a:hover {
  background: var(--base-border);
}
button#secone-toggle {
  background: var(--base-border);
  border: none;
  padding: .5rem;
  border-radius: 4px;
  cursor: pointer;
  color: var(--accent-yellow);
  font-size: 1.2rem;
}
.hero {
  margin: 2rem auto;
  max-width: 1200px;
  padding: 2rem;
  background: #2a2a2a;
  border-left: 5px solid var(--accent-green);
}
.hero h2 {
  color: var(--accent-yellow);
  margin-bottom: .5rem;
}
.hero p {
  opacity: .85;
}
main {
  max-width: 1350px;
  margin: 0 auto;
  
  padding: 1rem 0 2rem;
  border-color: #19536e;
}
.article-list article {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #2a2a2a;
  border-radius: 6px;
  border-left: 4px solid var(--accent-green);
}
article h2 {
  color: var(--accent-yellow);
  margin-bottom: .5rem;
}
.entry-meta {
  color: #999;
  margin-bottom: .8rem;
}
.btn-readmore {
  display: inline-block;
  background: var(--accent-green);
  color: var(--bg);
  padding: .5rem 1rem;
  border-radius: 4px;
  margin-top: .8rem;
}

.widget {
  margin-bottom: 2rem;
  background: #2a2a2a;
  border-radius: 6px;
  padding: 1rem;
}
.widget h3 {
  margin-bottom: .5rem;
  color: var(--accent-yellow);
}
footer {
  background: var(--header-bg);
  color: #888;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 4rem;
}
footer a {
  color: var(--accent-green);
}
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  header {
    flex-direction: column;
    align-items: flex-start;
  }
}

aside#sidebar {
  margin-top: 1rem;
}

.widget {
  border: 1px solid #333;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: #2a2a2a;
  border-radius: 4px;
  font-size: 0.95rem;
}
.widget h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: var(--accent-yellow);
}
.widget ul {
  list-style: none;
  padding-left: 0;
}
.widget ul li {
  margin-bottom: 0.5rem;
}
.widget input[type="text"] {
  width: 100%;
  padding: 0.5rem;
  background: #1a1a1a;
  border: 1px solid #444;
  color: var(--fg);
}

@media (max-width: 768px) {
  #sidebar {
    flex: 1 1 100%;
    margin-top: 2rem;
  }
}

.homepage-heading {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--accent-yellow);
  border-bottom: 2px solid var(--accent-green);
  padding-bottom: .5rem;
}

.post-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-link-list li {
  padding: 1rem;
  margin-bottom: .8rem;
  background: #2a2a2a;
  border-left: 4px solid var(--accent-green);
  border-radius: 5px;
  transition: background 0.3s;
}

.post-link-list li:hover {
  background: #333;
}

.post-link-list a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-yellow);
}

.post-link-list .post-date {
  display: block;
  font-size: .85rem;
  color: var(--comment);
  margin-top: .3rem;
}

#ajax-post-content {
  animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


.layout-container {
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  align-items: flex-start;
  margin-left: 150px;
}
.content-main {
  flex: 1 1 70%;
  max-width: 70%;
  margin: 0 auto;
  border-radius: 3px;
  border-color:#00ff7f;
}
#sidebar {
  flex: 1 1 50%;
  max-width: 50%;
}
@media (max-width: 768px) {
  #sidebar {
    flex: 1 1 100%;
    margin-top: 2rem;
  }
}
.wp-block-search__button {
  background-color: #0073aa;
  color: #fff;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.wp-block-search__button:hover {
  background-color: #005177;
}


.homepage-heading {
  font-size: 1.8rem;
  color: var(--accent-yellow);
  border-bottom: 2px solid var(--accent-green);
  margin-bottom: 1rem;
}
.post-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-link-list li {
  margin-bottom: .8rem;
  padding: 1rem;
  background: #2a2a2a;
  border-left: 4px solid var(--accent-green);
  border-radius: 5px;
  transition: background .3s ease;
}
.post-link-list li:hover {
  background: #333;
}
.ajax-post-link {
  color: var(--accent-yellow);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  transition: color .3s ease;
}
.ajax-post-link:hover {
  color: var(--accent-green);
}
.post-date {
  display: block;
  font-size: .85rem;
  color: var(--comment);
  margin-top: .3rem;
}
#ajax-post-content {
  animation: fadeIn 0.5s ease-in-out;
  margin-top: 2rem;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.post-thumbnail {
  width: 300px;
  height: 180px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  margin-left: auto;   /* center horizontally */
  margin-right: auto;  /* center horizontally */
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;

}
.post-content {
  margin-top: 1.5rem;
  line-height: 1.8;
  border-radius: 2px;
  border-color: #19536e;
}


#main.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.archive-post {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #333;
}


/* Responsive Enhancements for Professional Layout */
@media (max-width: 1024px) {
  .layout-container {
    flex-direction: column;
    gap: 1.5rem;
    margin-left: 0;
    padding: 0 1rem;
  }

  .content-main,
  #sidebar {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .post-thumbnail {
    width: 100%;
    height: auto;
    margin-left: 0;
    margin-right: 0;
  }

  .post-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center center;
  }

  .homepage-heading {
    font-size: 1.6rem;
    text-align: center;
  }

  .post-link-list li {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .hero {
    padding: 1rem;
    border-left: 4px solid var(--accent-green);
  }

  .article-list article {
    padding: 1rem;
    border-left: 4px solid var(--accent-green);
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .nav-menu {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
  }

  .nav-menu a {
    padding: 0.75rem 1rem;
    background: var(--base-border);
    border-radius: 4px;
  }
}

@media (max-width: 576px) {
  .homepage-heading {
    font-size: 1.4rem;
  }

  .post-link-list a {
    font-size: 1rem;
  }

  .btn-readmore {
    width: 100%;
    text-align: center;
    font-size: 1rem;
    padding: 0.75rem;
  }

  .post-thumbnail {
    border-radius: 6px;
  }

  .hero h2 {
    font-size: 1.3rem;
  }
}

/* Responsive styles for single post layout */
@media (max-width: 768px) {
  .single-post-wrapper,
  .single-post-content {
    padding: 1rem;
  }

  article {
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .post-author-avatar {
    margin: 0 auto;
  }

  .post-author-avatar img,
  .post-author-avatar .avatar {
    display: block;
    width: 49px !important;
    height: 49px !important;
    border-radius: 50%;
    object-fit: cover;
  }

  #sidebar {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    margin-top: 2rem;
  }

  .entry-meta {
    font-size: 0.9rem;
    color: #aaa;
    margin-top: 0.5rem;
  }

  .single-post-content h1 {
    font-size: 1.5rem;
  }
}

.single-post-body {
  padding: 2rem;
  border: 1px solid #19536e;
  border-radius: 8px;
  background-color: #1a1a1a;
  margin-top: 1rem;
  line-height: 1.8;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
}

/* Dark mode adjustments */
body.dark-mode .single-post-body {
  background-color: #181818;
  border-color: var(--accent-green);
}

/* ✅ Responsive for smaller screens */
@media (max-width: 768px) {
  .single-post-body {
    padding: 1.2rem;
    font-size: 0.95rem;
  }

  .single-post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
  }
}

.single-post-wrapper {
  padding: 2rem;
  margin: 2rem auto;
  max-width: 900px;
  background-color: black;
  border-radius: 12px;
  border: 5px solid #19536e;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

body.dark-mode .single-post-wrapper {
  background-color: #121212;
  border-color: var(--accent-green);
}

@media (max-width: 768px) {
  .single-post-wrapper {
    padding: 1rem;
    margin: 1rem;
  }
}

.post-author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(0, 255, 127, 0.7); /* green glow */
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  cursor: default;
}

.post-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  border-radius: 50%;
}

/* Hover effect: subtle scale & stronger glow */
.post-author-avatar:hover {
  box-shadow: 0 0 12px rgba(0, 255, 127, 1);
  transform: scale(1.1);
}

.post-author-avatar:hover img {
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 480px) {
  .post-author-avatar {
    width: 48px;
    height: 48px;
  }
}
