@import url("https://fonts.googleapis.com/css2?family=Afacad:wght@400;500;600;700&family=DM+Sans:wght@400;500&display=swap");

:root {
  --primary-blue: #040172;
  --accent-red: #d20007;
  --bg-white: #ffffff;
  --text-dark: #000000;
  --text-muted: #00000099;
  --shadow: 4px 4px 16px 0px #00000040;
}

body {
  margin: 0;
  font-family: "Afacad", sans-serif;
  background-color: #fcfcfc;
}

/* Hero Section */
.expert-hero {
  width: 100%;
  height: 528px;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0) 0%, #040172 100%);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero-text {
  padding-left: 115px;
  color: #ffffff;
}

.hero-title {
  font-size: 100px;
  font-weight: 700;
  line-height: 100%;
  margin: 0 0 20px 0;
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 500;
  line-height: 100%;
  margin: 0;
}

/* Featured Section */
.featured-container {
  max-width: 1280px;
  margin: -128px auto 80px;
  background: var(--bg-white);
  border-radius: 35px;
  box-shadow: var(--shadow);
  display: flex;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.featured-content {
  flex: 1;
  padding: 66px 0 66px 86px;
}

.featured-name {
  font-size: 36px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 14px;
}

.featured-field {
  font-size: 16px;
  color: var(--primary-blue);
  margin-bottom: 5px;
}

.featured-loc {
  font-size: 16px;
  color: var(--primary-blue);
  margin-bottom: 29px;
}

.featured-bio {
  font-size: 24px;
  line-height: 120%;
  color: var(--text-muted);
  max-width: 653px;
  margin-bottom: 41px;
}

.btn-read {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-red);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 40px;
  text-decoration: none;
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 16px;
  box-shadow: 4px 4px 4px 0px #ff3d0040;
}

.featured-date {
  text-align: right;
  font-size: 20px;
  color: #000000;
  margin-top: 20px;
  padding-right: 20px;
}

.featured-img-box {
  width: 476px;
  height: 476px;
}

.featured-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 100px 20px 20px 100px;
}

/* Articles Section */
.articles-wrapper {
  max-width: 1280px;
  margin: 0 auto 100px;
  padding: 0 20px;
}

.art-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.art-title {
  font-size: 36px;
  font-weight: 700;
  margin: 0;
}

.art-subtitle {
  font-size: 16px;
  font-weight: 500;
  color: var(--primary-blue);
  margin-top: 14px;
}

.filter-group {
  display: flex;
  gap: 15px;
}

.filter-btn {
  padding: 10px 20px;
  border-radius: 40px;
  border: none;
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
}

.btn-recent {
  background: var(--primary-blue);
  color: white;
}
.btn-other {
  background: #f1f1f1;
  color: black;
}

.expert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.expert-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex;
  height: 225px;
  overflow: hidden;
}

.card-img-box {
  width: 218px;
  height: 100%;
}

.card-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 40px 40px 0;
}

.card-content {
  flex: 1;
  padding: 27px;
  position: relative;
}

.card-name {
  font-size: 20px;
  font-weight: 500;
  color: var(--primary-blue);
  margin: 0;
}

.card-field {
  font-size: 14px;
  color: var(--text-muted);
  margin: 6px 0 29px 0;
}

.card-quote {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.card-date {
  font-size: 12px;
  color: #000000;
  position: absolute;
  bottom: 27px;
}

.card-content .btn-read {
  position: absolute;
  bottom: 27px;
  right: 27px;
}

.load-more-box {
  display: flex;
  justify-content: center;
  margin-top: 60px;
}

.btn-load-more {
  background: var(--primary-blue);
  color: #ffffff;
  padding: 12px 32px;
  border-radius: 40px;
  border: none;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

/* added styles for form validation and admin panel */
.input-error {
  border-color: #d20007 !important;
  background-color: #fff5f5;
}

.error-text {
  color: #d20007;
  font-size: 12px;
  margin-top: 4px;
}

.admin-card {
  border-left: 4px solid var(--primary-blue);
  transition: all 0.3s ease;
}

.admin-card:hover {
  transform: translateX(5px);
}

@media (max-width: 1024px) {
  .hero-title {
    font-size: 60px;
  }
  .expert-grid {
    grid-template-columns: 1fr;
  }
  .featured-container {
    flex-direction: column;
  }
  .featured-img-box {
    width: 100%;
    height: 300px;
  }
}

/* New styles for professional content formatting */
.article-content {
  white-space: pre-line;
  word-wrap: break-word;
}

.article-content p {
  margin-bottom: 1.5rem;
}

/* Automatic formatting for numbered lists in plain text */
.article-content {
  display: block;
  counter-reset: article-counter;
}
