/* ==========================================================================
   OASK Publishers - Home Page Styles
   ========================================================================== */

/* Hero Section */
.hero-section {
  position: relative;
  background: radial-gradient(circle at 85% 30%, #E6F0FA 0%, #FFFFFF 65%);
  padding: 60px 0 100px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--dark-navy-blue);
  line-height: 1.18;
  margin-bottom: 20px;
}

.hero-title span {
  color: var(--accent-orange);
}

.hero-description {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 32px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}

.hero-visual img {
  width: 100%;
  max-width: 520px;
  height: auto;
  mix-blend-mode: darken;
}

/* Home Search Section */
.home-search-section {
  position: relative;
  margin-top: -75px;
  margin-bottom: 45px;
  z-index: 20;
}

.search-bar-wrapper {
  background-color: var(--white);
  border-radius: 50px;
  box-shadow: 0 10px 35px rgba(27, 42, 74, 0.09);
  padding: 8px 12px 8px 24px;
  display: flex;
  align-items: center;
  border: 1px solid var(--border-light);
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}

.search-icon-left {
  color: #7E93B0;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.search-input-field {
  flex-grow: 1;
  border: none;
  outline: none;
  font-size: 0.9375rem;
  color: var(--text-dark);
  background: transparent;
}

.search-input-field::placeholder {
  color: #94A3B8;
}

.search-field-select {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--dark-navy-blue);
  padding: 8px 16px;
  border-left: 1px solid var(--border-color);
  cursor: pointer;
}

.search-submit-btn {
  background-color: var(--navy-background);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 11px 28px;
  border-radius: 40px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.search-submit-btn:hover {
  background-color: var(--primary-blue);
}

/* Benefit Strip */
.benefit-strip-section {
  padding: 20px 0 45px;
}

.benefit-strip-wrapper {
  background-color: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-light);
  padding: 24px 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.benefit-strip-item {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.benefit-strip-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background-color: var(--border-color);
}

.benefit-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #FEF3E8;
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.benefit-icon-circle.blue-tint {
  background-color: #EBF3FC;
  color: var(--primary-blue);
}

.benefit-text-box h4 {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--dark-navy-blue);
  margin-bottom: 2px;
}

.benefit-text-box p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Section Header Bar */
.section-header-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

/* Discipline Tabs */
.discipline-tabs-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 28px;
  scrollbar-width: none;
}

.discipline-tabs-nav::-webkit-scrollbar {
  display: none;
}

.discipline-tab-btn {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  background-color: var(--bg-pill);
  color: #5A6A80;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.discipline-tab-btn:hover {
  background-color: #E2E8F0;
  color: var(--dark-navy-blue);
}

.discipline-tab-btn.active {
  background-color: var(--navy-background);
  color: var(--white);
}

.carousel-nav-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Home Journals Cards Grid */
.home-journals-section {
  padding: 40px 0 60px;
}

.journals-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.home-journals-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  padding: 8px 4px 14px;
}

.home-journals-grid::-webkit-scrollbar {
  display: none;
}

.home-journal-card {
  flex: 0 0 calc((100% - 80px) / 5);
  min-width: 210px;
  max-width: calc((100% - 80px) / 5);
  scroll-snap-align: start;
  background-color: var(--white);
  border-radius: 10px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.home-journal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.home-journal-cover {
  width: 100%;
  height: 145px;
  background-color: #0A1C38;
  overflow: hidden;
}

.home-journal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-journal-info {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.home-journal-title {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--dark-navy-blue);
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-journal-discipline {
  font-size: 0.71875rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.home-journal-issn {
  font-size: 0.71875rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.home-journal-issn strong {
  color: #D32F2F;
}

.home-journal-actions {
  margin-top: auto;
}

.carousel-prev-btn {
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-navy-blue);
  font-size: 0.875rem;
  z-index: 5;
  border: 1px solid #E2E8F0;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-prev-btn:hover {
  background-color: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
}

.carousel-next-btn {
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-navy-blue);
  font-size: 0.875rem;
  z-index: 5;
  border: 1px solid #E2E8F0;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-next-btn:hover {
  background-color: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
}

/* Why Publish With OASK */
.why-publish-section {
  padding: 50px 0 65px;
  background-color: #FCFDFE;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.why-publish-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 36px;
}

.why-publish-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px;
}

.why-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: #FEF2E6;
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 20px;
}

.why-icon-circle.blue-tint {
  background-color: #EBF3FC;
  color: var(--primary-blue);
}

.why-publish-card h3 {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--dark-navy-blue);
  margin-bottom: 10px;
}

.why-publish-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Latest Research Section */
.latest-research-section {
  padding: 55px 0 65px;
}

.research-table-card {
  background-color: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  margin-top: 24px;
}

.research-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.research-table th:nth-child(1),
.research-table td:nth-child(1) {
  width: 38%;
}

.research-table th:nth-child(2),
.research-table td:nth-child(2) {
  width: 32%;
}

.research-table th:nth-child(3),
.research-table td:nth-child(3) {
  width: 15%;
}

.research-table th:nth-child(4),
.research-table td:nth-child(4) {
  width: 15%;
}

.research-table th {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  background-color: #F8FAFC;
}

.research-table td {
  padding: 18px 20px;
  font-size: 0.84375rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-dark);
  vertical-align: top;
}

.research-table tr:last-child td {
  border-bottom: none;
}

.research-table tr:hover td {
  background-color: #F8FBFF;
}

.research-title-cell {
  font-family: var(--font-subheading);
  font-weight: 600;
  color: var(--dark-navy-blue);
  max-width: 320px;
}

.research-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.research-title-wrap span {
  display: block;
  line-height: 1.5;
  word-break: break-word;
}

.research-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-blue);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  width: fit-content;
}

.research-pdf-link:hover {
  color: var(--primary-orange);
}

.research-authors-cell {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.research-journal-cell {
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
  word-break: break-word;
}

.research-date-cell {
  color: var(--text-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
  text-align: center;
}

.research-type-cell {
  text-align: center;
}

.research-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-blue), #0e56a6);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 0.71875rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.research-doi-btn {
  background: linear-gradient(135deg, #F68213, #E56A00);
}

.research-doi-btn:hover {
  background: linear-gradient(135deg, #E56A00, #F68213);
}

.research-view-btn:hover {
  background: linear-gradient(135deg, #0b3d78, var(--primary-blue));
  transform: translateY(-1px);
}

/* Publishing Process */
.process-section {
  padding: 55px 0 70px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 36px;
  position: relative;
}

.process-card {
  background-color: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 24px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  position: relative;
  display: flex;
  flex-direction: column;
}

.process-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.process-number-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--primary-blue);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-icon {
  font-size: 1.5rem;
  color: var(--primary-blue);
}

.process-card h4 {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--dark-navy-blue);
  margin-bottom: 8px;
}

.process-card p {
  font-size: 0.78125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Process connector lines on desktop */
.process-card:not(:last-child)::after {
  content: '............';
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  color: #CBD5E1;
  letter-spacing: 2px;
  font-size: 1rem;
  z-index: -2;
}

/* Home CTA Banner */
.home-cta-section {
  padding: 10px 0 70px;
}

.home-cta-banner {
  background: linear-gradient(135deg, #0C2142 0%, #153A70 100%);
  border-radius: 16px;
  padding: 44px 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  box-shadow: 0 15px 40px rgba(12, 33, 66, 0.2);
  position: relative;
  overflow: hidden;
}

.cta-banner-content {
  display: flex;
  align-items: center;
  gap: 30px;
}

.cta-banner-art {
  width: 110px;
  height: auto;
  flex-shrink: 0;
  opacity: 0.85;
  filter: brightness(10);
}

.cta-text-box h2 {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.cta-text-box p {
  font-size: 0.875rem;
  color: #B0C4DE;
}

.cta-action-box {
  flex-shrink: 0;
}

/* Responsive Styles for Home */
@media (max-width: 1100px) {
  .home-journals-section {
    padding: 32px 0 50px;
  }

  .home-journals-grid {
    gap: 16px;
  }

  .home-journal-card {
    flex: 0 0 calc((100% - 32px) / 3);
    min-width: 200px;
    max-width: calc((100% - 32px) / 3);
  }

  .carousel-prev-btn {
    left: -10px;
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .carousel-next-btn {
    right: -10px;
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .hero-content {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-visual {
    justify-content: center;
  }

  .hero-title {
    font-size: 2.125rem;
  }

  .benefit-strip-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .benefit-strip-item::after {
    display: none !important;
  }

  .why-publish-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-card::after {
    display: none !important;
  }

  .home-cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 36px 24px;
  }

  .cta-banner-content {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 850px) {

  /* 2 cards per view on small tablet */
  .home-journal-card {
    flex: 0 0 calc((100% - 16px) / 2);
    min-width: 180px;
    max-width: calc((100% - 16px) / 2);
  }
}

@media (max-width: 768px) {
  .home-journals-section {
    padding: 24px 0 36px;
  }

  .discipline-tabs-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .discipline-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .discipline-tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .journals-carousel-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .home-journals-grid {
    gap: 12px;
    padding: 4px 2px 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
  }

  /* 1 card per view on mobile */
  .home-journal-card {
    flex: 0 0 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Hide carousel buttons on mobile to prevent horizontal overflow and rely on touch-swipe */
  .carousel-prev-btn,
  .carousel-next-btn {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .benefit-strip-wrapper {
    grid-template-columns: 1fr;
  }

  .why-publish-grid {
    grid-template-columns: 1fr;
  }

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

  .search-bar-wrapper {
    flex-direction: column;
    border-radius: 16px;
    padding: 16px;
  }

  .search-field-select {
    border-left: none;
    border-top: 1px solid var(--border-color);
    width: 100%;
  }

  .search-submit-btn {
    width: 100%;
  }

  /* Mobile table to cards */
  .research-table,
  .research-table tbody,
  .research-table tr,
  .research-table td {
    display: block;
    width: 100%;
  }

  .research-table thead {
    display: none;
  }

  .research-table tr {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
  }

  .research-table td {
    padding: 4px 0;
    border: none;
  }
}