/*
Theme Name: AI-Recruiter
Theme URI: https://ai-recruiter.com
Author: AI-Recruiter Team
Author URI: https://ai-recruiter.com
Description: A custom WordPress theme for AI-Recruiter - Blog platform for educational content about bedtime stories, language learning, and child development. Features a dark theme with modern design, blog cards, and beautiful typography.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-recruiter
Tags: dark-theme, custom-menu, blogs, blog-list
*/

/* ============================================
   Font Face Declarations
   ============================================ */

@font-face {
  font-family: "GT-America";
  src:
    url("./fonts/GT-America/GT-America-Extended-Medium.woff2") format("woff2"),
    url("./fonts/GT-America/GT-America-Extended-Medium.woff") format("woff"),
    url("./fonts/GT-America/GT-America-Extended-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Work-Sans";
  src: url("./fonts/Work-Sans/WorkSans-VariableFont_wght.ttf")
    format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   CSS Variables - Color & Typography
   ============================================ */
:root {
  --ar-dark-color: #121212;
  --ar-primary-color: #5d25ff;
  --ar-secondary-color: #f2edff;
  --ar-white-color: #ffffff;
  --ar-text-muted: #282828;
  --ar-border: #333333;
  --font-family-base: "Work-Sans", sans-serif;
  --font-family-heading: "GT-America", sans-serif;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: var(--ar-white-color);
  color: var(--ar-dark-color);
  font-family: var(--font-family-base);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.bold {
  font-weight: 700;
}

.italics {
  font-style: italic;
}

img {
  max-width: 100%;
  height: auto;
}

hr {
  margin: 32px auto;
  border-color: #cccccc;
  border-width: 0px 0px thin;
  border-style: solid;
}

hr.vertical {
  margin: 0 0.5rem;
  border-color: transparent;
  border-width: 0px 0px thin;
  border-style: solid;
  box-shadow:
    var(--ar-secondary-color) -2px -5px 1px,
    var(--ar-primary-color) 2px 2px 1px;
  display: inline;
}

a {
  color: var(--ar-primary-color);
  text-decoration: underline solid var(--ar-dark-color);
  transition: all 0.3s ease;
  font-weight: 600;
}
a:hover {
  color: var(--ar-dark-color);
  text-decoration: underline solid var(--ar-primary-color);
}

button,
.button {
  color: var(--ar-white-color) !important;
  background-color: var(--ar-primary-color) !important;
  border: none;
  border-radius: 4px !important;
  padding: 6px 16px !important;
  font-size: 16px !important;
  text-decoration: none !important;
  font-family: var(--font-family-base);
  transition: all 0.3s ease;
}
button:hover,
.button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: var(--ar-white-color);
  text-decoration: none !important;
  background-color: var(--ar-primary-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Site Wrapper Container
   ============================================ */
.site-wrapper {
  width: 100%;
  margin: 0 auto;
  padding-top: 5.5rem !important;
}

/* ============================================
   Header Styles
   ============================================ */
.site-header {
  z-index: 1000;
  padding: 1rem 0;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;

  position: fixed;
  inset: 0.5rem 0 0 0;
  border-radius: 4px;
  min-height: 64px;
  max-height: 60px;
}

.header-container {
  z-index: 1000;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  max-width: 1500px;
  color: var(--ar-dark-color);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: bold;
  margin-right: 1rem;
}

.site-logo svg {
  width: 32px;
  height: 32px;
}

.site-logo .logo-image {
  width: 160px;
  height: 45px;
  object-fit: contain;
  display: block;
}

.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation a {
  display: flex;
  align-items: anchor-center;
  color: var(--ar-dark-color);
  font-size: 1.1rem;
  padding: 8px 16px;
  border-radius: 4px;
  gap: 4px;
  text-decoration: none;
  font-family: var(--font-family-base);
  font-weight: 400;
}

.main-navigation a:hover {
  color: var(--ar-primary-color);
}

.main-navigation a:hover .material-icons {
  color: var(--ar-secondary-color);
}

.filters-button {
  background: none;
  border: 1px solid var(--ar-primary-color);
  color: var(--ar-primary-color);
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.filters-button:hover {
  background-color: var(--ar-primary-color);
  color: var(--ar-dark-color);
}

/* Mobile Menu Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  background-color: transparent !important;
  color: var(--ar-primary-color) !important;
  cursor: pointer;
  padding: 8px;
  font-size: 24px;
  z-index: 1003;
  transition: transform 0.3s ease;
  position: relative;
}

/* Hide hamburger button when panel is open */
.mobile-menu-toggle.active {
  display: none;
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

.mobile-menu-toggle .close-icon {
  display: none;
}

/* Keep hamburger icon visible even when panel is open - panel has its own close button */
.mobile-menu-toggle.active .menu-icon {
  display: block;
}

.mobile-menu-toggle.active .close-icon {
  display: none;
}

/* Mobile Menu Panel */
.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: -200%;
  height: 100vh;
  background-color: rgb(18, 18, 18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1002;
  transition: right 0.3s ease;
  padding: 16px 8px 8px;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  max-width: 60%;
}

.mobile-menu-panel.active {
  right: 0;
}

.mobile-menu-panel .main-navigation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.mobile-menu-panel .main-navigation a {
  display: flex;
  width: 100%;
  padding: 6px 16px;
  font-size: 1.25rem;
  color: var(--ar-white-color);
  transition: all 0.3s ease;
}

.mobile-menu-panel .main-navigation a .material-icons {
  font-size: 24px;
  margin-right: 6px;
  color: var(--ar-primary-color);
  transition: color 0.3s ease;
}

.mobile-menu-panel .main-navigation a:hover {
  color: var(--ar-secondary-color);
}

.mobile-menu-panel .main-navigation a:hover .material-icons {
  color: var(--ar-secondary-color);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* ============================================
   Main Content Area
   ============================================ */
.site-main {
  width: 100%;
  margin: 0 auto;
}

/* MUI Container responsive max-widths for main content */
@media (min-width: 600px) {
  .site-main {
    max-width: 600px;
  }
}

@media (min-width: 900px) {
  .site-main {
    max-width: 900px;
  }
}

@media (min-width: 1200px) {
  .site-main {
    max-width: 1200px;
  }
}

.page-header {
  margin-bottom: 40px;
}

.page-title {
  font-size: 36px;
  margin-bottom: 10px;
  color: var(--ar-white-color);
}

/* ============================================
   Blog Cards Grid
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 60px;
}

.blog-card {
  box-shadow: var(--ar-secondary-color) 0px 2px 0px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid rgba(51, 51, 51, 0.5);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 260px;
}

.blog-card:hover {
  box-shadow: var(--ar-primary-color) 2px 2px 3px;
}

.blog-card h3 {
  margin-bottom: 15px;
  font-size: 22px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(1.3em * 2);
  height: calc(1.3em * 2);
  flex-shrink: 0;
}

.blog-card h3 a {
  color: var(--ar-dark-color);
  text-decoration: none;
}

.blog-card h3 a:hover {
  color: var(--ar-primary-color);
}

.blog-description {
  color: var(--ar-dark-color);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--ar-dark-color);
  padding-top: 15px;
  border-top: 1px solid var(--ar-border);
  margin-top: auto;
  flex-shrink: 0;
}

.blog-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.blog-meta-item svg {
  width: 16px;
  height: 16px;
}

.read-more-link {
  color: var(--ar-primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.read-more-link:hover {
  color: var(--ar-dark-color);
  text-decoration: underline;
}

/* ============================================
   Blog Pages (Archive & Detail)
   ============================================ */

/* Blog Archive/Listing Page */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.blog-post-card {
  box-shadow: var(--ar-secondary-color) 0px 2px 0px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid rgba(51, 51, 51, 0.5);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 320px;
}

.blog-post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--ar-primary-color) 2px 2px 3px;
}

.blog-post-card h2 {
  font-size: 20px;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(1.3em * 2);
  height: calc(1.3em * 2);
  flex-shrink: 0;
}

.blog-post-card h2 a {
  color: var(--ar-dark-color);
}

.blog-post-excerpt {
  color: var(--ar-text-muted);
  margin-bottom: 15px;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.blog-post-meta {
  font-size: 14px;
  color: var(--ar-text-muted);
  margin-top: auto;
  flex-shrink: 0;
}

/* Blog Post Detail Page */
.blog-detail {
  margin: 0 auto;
  padding: 1rem 2rem;
}

.direction-rtl {
  direction: rtl;
  text-align: right;
}
.direction-ltr {
  direction: ltr;
  text-align: left;
}

.blog-detail-header {
  margin-bottom: 40px;
}

.blog-detail-title {
  margin-bottom: 20px;
  color: var(--ar-primary-color);
}

.blog-author-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.author-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  border: 1px solid var(--ar-primary-color);
  padding: 2px;
  background: white;
  display: block;
  object-fit: cover;
}

.author-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.author-name {
  font-weight: 700;
  color: var(--ar-dark-color);
  font-size: 18px;
  line-height: 1.2;
}

.post-date {
  color: var(--ar-text-muted);
  font-size: 14px;
  line-height: 1.2;
}

.blog-detail-content-wrapper {
  margin-bottom: 2rem;
}

.blog-content {
  border-radius: 12px;
  line-height: 1.8;
  font-size: 18px;
  color: var(--ar-dark-color);
}

.blog-content p {
  margin-bottom: 20px;
}

.blog-navigation {
  margin-top: 40px;
}

/* ============================================
   404 Page
   ============================================ */
.error-404 {
  text-align: center;
  padding: 80px 20px;
}

.error-404 h1 {
  font-size: 120px;
  color: var(--ar-primary-color);
  margin-bottom: 20px;
  font-weight: bold;
}

.error-404 h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--ar-dark-color);
}

.error-404 p {
  font-size: 18px;
  color: var(--ar-text-muted);
  margin-bottom: 40px;
}

.error-404 .search-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}

.error-404 input[type="search"] {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid var(--ar-border);
  border-radius: 8px;
  color: var(--ar-dark-color);
  font-size: 16px;
}

.error-404 input[type="search"]:focus {
  outline: none;
  border-color: var(--ar-primary-color);
}

.error-404 button {
  padding: 12px 30px;
  background-color: var(--ar-primary-color);
  color: var(--ar-dark-color);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.error-404 button:hover {
  background-color: var(--ar-primary-color);
}

.error-404-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* ============================================
   Footer Styles
   ============================================ */
.site-footer {
  background-color: #151515;
  color: #ffffff;
  padding: 80px 0 40px;
  font-family: var(--font-family-base);
}

.site-footer a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 400;
  transition: opacity 0.3s ease;
}

.site-footer a:hover {
  opacity: 0.7;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-column h4 {
  color: var(--ar-white-color);
  font-size: 18px;
  margin-bottom: 25px;
  font-family: var(--font-family-heading);
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column ul li a {
  font-size: 14px;
  color: #cccccc;
}

.footer-info .footer-logo img {
  max-width: 180px;
  margin-bottom: 25px;
}

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  color: #cccccc;
  margin-bottom: 25px;
  max-width: 280px;
}

.footer-contact {
  margin-bottom: 25px;
}

.email-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #ffffff !important;
}

.email-icon {
  font-weight: bold;
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.footer-social a {
  color: var(--ar-white-color);
  opacity: 0.8;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-social a:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--ar-primary-color);
  color: var(--ar-primary-color);
}

.footer-social .material-icons {
  font-size: 20px;
}

/* Badges Column */
.footer-badges {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-badges img {
  max-width: 80px;
}

.trustpilot-badge {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.trustpilot-text {
  font-weight: bold;
  font-size: 14px;
}

.trustpilot-stars {
  color: #00b67a;
  font-size: 18px;
}

.trustscore {
  font-size: 12px;
  color: #999;
}

.gdpr-badge .gdpr-box {
  border: 1px solid #ffffff;
  border-radius: 4px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100px;
  text-align: center;
}

.gdpr-box span {
  font-size: 10px;
  font-weight: bold;
  line-height: 1.2;
}

/* Bottom Area */
.footer-divider {
  height: 1px;
  background-color: #333333;
  margin-bottom: 30px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #999999;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.footer-bottom-links a {
  color: #999999 !important;
}

.scroll-to-top {
  width: 40px;
  height: 40px;
  position: fixed;
  box-shadow: none;
  background-color: var(--ar-secondary-color) !important;
  color: var(--ar-dark-color) !important;
  bottom: 48px;
  right: 32px;
  border: none;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease;
  z-index: 1000;
}

.scroll-to-top:hover {
  background-color: var(--ar-primary-color) !important;
  color: var(--ar-white-color) !important;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1199px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
}

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-info {
    grid-column: span 2;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-info {
    grid-column: span 1;
  }
}
@media (max-width: 899px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 599px) {
  .header-container {
    padding: 0 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-menu-toggle {
    display: block;
  }

  /* Hide hamburger button when panel is open */
  .mobile-menu-toggle.active {
    display: none;
  }

  .main-navigation {
    display: none;
  }

  .site-main {
    padding: 16px 0;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .error-404 h1 {
    font-size: 80px;
  }

  .site-logo {
    font-size: 20px;
  }

  .site-logo svg {
    width: 28px;
    height: 28px;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

/* MUI Container responsive max-widths for utility container */
@media (min-width: 600px) {
  .container {
    max-width: 600px;
    padding: 0 24px;
  }
}

@media (min-width: 900px) {
  .container {
    max-width: 900px;
    padding: 0 24px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
    padding: 0 40px;
  }
}

.card {
  border-radius: 4px;
  background-color: transparent;
  background-image: linear-gradient(
    rgba(255, 255, 255, 0.051),
    rgba(255, 255, 255, 0.051)
  );
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
}

.text-center {
  text-align: center;
}

.mt-40 {
  margin-top: 40px;
}

.mb-40 {
  margin-bottom: 40px;
}
