/* Custom styles for Red Queen Labs website */

/* General styles */
:root {
  --primary-color: #8B1538;
  --secondary-color: #C41E3A;
  --accent-color: #6b7280;
  --text-color: #333;
  --light-bg: #f5f5f5;
  --dark-bg: #3a3a3a;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lexend Deca', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  font-weight: 300;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Lexend Deca', sans-serif;
  font-weight: 600;
}

.section {
  padding: 80px 0;
}

/* Limit content width on large screens */
.container {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}

/* Navigation menu links */
.nav-menu-link {
  color: white !important;
  font-weight: 400;
  font-size: 1rem;
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
}

.nav-home:hover,
.nav-publications:hover,
.nav-podcasts:hover,
.nav-contact:hover {
  color: #6b7280 !important;
}

/* Hamburger to X animation */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.toggler-icon,
.toggler-bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: white;
  transition: all 0.3s ease;
}

.evpsych-navbar .toggler-bar {
  background-color: #6b7280;
}

.navbar-toggler[aria-expanded="true"] .top-bar {
  transform: translateY(7px) rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .middle-bar {
  opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .bottom-bar {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu alignment */
@media (max-width: 991.98px) {
  .navbar-nav {
    text-align: right;
    padding-right: 0;
  }
  
  .navbar-nav .nav-item {
    text-align: right;
  }
  
  .navbar-nav .nav-link {
    display: inline-block;
    width: auto;
  }
}

/* Hero section */
#hero {
  min-height: auto;
  padding: 120px 0 80px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #6a6a6a, #3a3a3a), url('../images/circuit-background.svg');
  background-size: cover;
  background-position: center;
  color: white;
}

/* Services section */
.service-card {
  height: 100%;
  transition: transform 0.3s ease-in-out;
  transform: skewX(-8deg);
  border: 2px solid #a0a0a0;
}

.service-card > * {
  transform: skewX(8deg);
}

.service-card:hover {
  transform: skewX(-8deg) translateY(-10px);
  box-shadow: 0 8px 25px rgba(232, 93, 93, 0.4);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #F19999;
}

.detail-content {
  transform: skewX(-8deg);
  text-align: left;
  padding: 10px 15px;
}

.detail-content p {
  margin: 0;
}

/* Expertise Quote */
.expertise-quote {
  border: none;
  padding: 0;
  margin: 0 0 1rem 0;
  text-align: right;
  background: transparent;
}

.expertise-quote .quote-text {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 300;
  color: var(--text-color);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.expertise-quote .quote-attribution {
  font-size: 1rem;
  font-weight: 400;
  color: white;
  font-style: normal;
  background: transparent;
  display: block;
}

/* Horizontal Expertise Card */
.expertise-card-horizontal {
  background: white;
  border: 2px solid #a0a0a0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.expertise-card-horizontal:hover {
  box-shadow: 0 8px 25px rgba(232, 93, 93, 0.4);
  transform: translateY(-5px);
}

.expertise-main {
  display: flex;
  align-items: center;
  padding: 25px 25px 25px 25px;
  gap: 20px;
}

.expertise-icon {
  font-size: 3rem;
  color: #F19999;
  flex-shrink: 0;
}

.expertise-content {
  flex-grow: 1;
  text-align: left;
}

.expertise-content h3 {
  color: #333;
  white-space: nowrap;
}

.expertise-content p {
  color: #666;
}

.expertise-arrow {
  font-size: 1.5rem;
  color: #F19999;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}

.expertise-card-horizontal:hover .expertise-arrow {
  transform: translateX(5px);
  color: var(--secondary-color);
}

.expertise-card-horizontal.expanded .expertise-arrow i {
  transform: rotate(90deg);
}

.expertise-details {
  max-height: 0;
  overflow: hidden;
  background: #f8f8f8;
  border-top: 0 solid #e0e0e0;
  transition: max-height 0.4s ease, padding 0.4s ease, border-top 0.4s ease;
  padding: 0 30px;
}

.expertise-card-horizontal.expanded .expertise-details {
  max-height: 300px;
  padding: 20px 30px 35px 30px;
  border-top: 1px solid #e0e0e0;
}

.expertise-details p {
  margin: 0;
  color: #555;
  text-align: left;
}

@media (max-width: 768px) {
  .expertise-main {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .expertise-content {
    text-align: center;
  }
  
  .expertise-arrow {
    transform: rotate(90deg);
  }
}

/* About section */
#about {
  background-color: #4a4a4a;
  color: white;
}

.about-img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Clients section */
.client-card {
  background-color: #d3d3d3;
  transform: skewX(-8deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid #a0a0a0;
}

.client-card > * {
  transform: skewX(8deg);
}

.client-card:hover {
  transform: skewX(-8deg) translateY(-5px);
  box-shadow: 0 12px 30px rgba(232, 93, 93, 0.4);
}

.client-logo {
  max-width: 150px;
  height: auto;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.client-logo:hover {
  filter: grayscale(0%);
}

/* Pricing section */
.price-card {
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.price-card:hover {
  transform: scale(1.03);
}

/* Contact section */
#contact {
  background-color: var(--dark-bg);
  color: white;
}

/* Navbar styles */
.navbar {
  background-color: var(--dark-bg) !important;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
  background-color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Custom animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer - only apply to page footer, not blockquote footers */
body > footer,
.bg-dark.text-white footer {
  background-color: var(--dark-bg);
  color: white;
  padding: 30px 0;
}

/* Custom responsive adjustments */
@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }
  
  #hero h1 {
    font-size: 2.5rem;
  }
  
  #about .col-md-8 {
    text-align: left;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Service highlight effect */
.highlight-box {
  border-left: 4px solid #2a5a96;
  padding-left: 15px;
}

#about .highlight-box {
  border-left-color: #2a5a96;
}

/* Testimonials */
.testimonial-card {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.testimonial-author {
  font-weight: bold;
  margin-top: 15px;
}

.testimonial-company {
  font-style: italic;
  color: #666;
}

/* Red Queen branding */
.brand-red {
  background: linear-gradient(135deg, #8B1538, #E85D5D);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-labs {
  color: white;
}

.brand-box {
  background-color: #000;
  padding: 20px 40px;
  border-radius: 15px;
  display: inline-block;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  transform: skewX(-8deg);
}

.brand-box > * {
  transform: skewX(8deg);
}

.pipe-black {
  color: #000;
}

.tagline-grey {
  color: #d3d3d3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Button styles with red gradient matching logo R and D colors */
.btn-primary {
  background: linear-gradient(135deg, #8B1538, #E85D5D);
  border: 2px solid #4a4a4a;
  color: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: skewX(-8deg);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #8B1538, #E85D5D);
  border-color: #E85D5D;
  color: white;
  transform: skewX(-8deg) translateY(-2px);
  box-shadow: 0 5px 15px rgba(232, 93, 93, 0.4);
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(232, 93, 93, 0.5);
}

.btn-outline-primary {
  border: 2px solid #F19999;
  color: #F19999;
  background: transparent;
  transition: all 0.3s ease;
  transform: skewX(-8deg);
}

.btn-outline-primary:hover {
  background: #F19999;
  border-color: #F19999;
  color: white;
  transform: skewX(-8deg);
}

.btn-outline-light {
  border: 2px solid white;
  color: white;
  background: transparent;
  transition: all 0.3s ease;
  transform: skewX(-8deg);
}

.btn-outline-light:hover {
  background: linear-gradient(135deg, #8B1538, #E85D5D);
  border-color: #E85D5D;
  color: white;
  transform: skewX(-8deg) translateY(-2px);
  box-shadow: 0 5px 15px rgba(232, 93, 93, 0.4);
}

/* Podcast Cards */
.podcast-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.podcast-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.podcast-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(232, 93, 93, 0.3);
}

.podcast-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}

.podcast-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podcast-info {
  padding: 0.75rem;
}

.podcast-show {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.15rem;
}

.podcast-date {
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 0.35rem;
}

.podcast-title {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-color);
  margin-bottom: 0;
  line-height: 1.3;
}

/* Red Accent Line */
.red-accent-line {
  width: 60px;
  height: 3px;
  background-color: #6b7280;
  margin: 0 auto 25px auto;
  position: relative;
  left: -15px;
}

/* Red Queen Quote Styles */
.red-queen-quote {
  margin: 20px 0 20px 0;
  padding: 0;
  border: none;
}

.quote-text-no-line {
  font-size: 1.4rem;
  font-style: italic;
  color: #ffffff;
  line-height: 1.6;
  margin-bottom: 15px;
}

.quote-attribution {
  font-size: 1rem;
  color: #E85D5D;
  font-style: normal;
  display: block;
  margin-top: 15px;
}

.quote-tagline {
  font-size: 1.1rem;
  color: #cccccc;
  margin-top: 25px;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .quote-text-no-line {
    font-size: 1.15rem;
  }
}

/* Publication Card Styles */
.publication-card {
  background-color: #fff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  height: 100%;
  border-left: 4px solid #6b7280;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.publication-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.publication-card.publication-article {
  padding: 20px 25px;
}

.publication-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.publication-authors {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 5px;
}

.publication-details {
  font-size: 0.9rem;
  color: #888;
  font-style: italic;
  margin-bottom: 12px;
}

.publication-article .publication-details {
  margin-bottom: 0;
}

.publication-description {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Publication Card with Image Overlay */
.pub-card-link {
  text-decoration: none;
  display: block;
}

.pub-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 3/4;
}

.pub-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.pub-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.pub-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.pub-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
  padding: 60px 15px 15px 15px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.pub-card-content {
  color: white;
}

.pub-card-journal {
  font-size: 0.7rem;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pub-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  margin-bottom: 6px;
  line-height: 1.3;
}

.pub-card-authors {
  font-size: 0.75rem;
  color: #ccc;
  margin-bottom: 0;
}

.section-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #6b7280;
  display: inline-block;
}

/* Op-Ed Card Style */
.oped-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: white;
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
}

.oped-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.oped-card-logo {
  padding: 30px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  background: white;
}

.oped-card-logo img {
  max-width: 80%;
  max-height: 60px;
  object-fit: contain;
}

.oped-card-logo img.psych-today-logo {
  width: 200px;
  height: 50px;
  object-fit: cover;
  object-position: center top;
}

/* Psychology Today full image cards */
.pub-card.psych-today-card {
  background: white;
}

.pub-card.psych-today-card .pub-card-image {
  width: 60%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  margin: 20px auto;
  display: block;
}

/* Cards with gradient fade to black footer overlay */
.pub-card.black-footer-card {
  background: white;
}

.pub-card.black-footer-card .pub-card-image {
  object-fit: contain;
  object-position: calc(50% - 12px) center;
}

.pub-card.black-footer-card .pub-card-overlay {
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 30%, #1a1a1a 100%);
  padding: 25px 15px 15px 15px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: auto;
}

.oped-card-content {
  padding: 25px 15px 15px 15px;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 30%, #1a1a1a 100%);
  color: white;
  margin-top: -30px;
  position: relative;
}

.oped-card-date {
  font-size: 0.7rem;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.oped-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  margin-bottom: 6px;
  line-height: 1.3;
}

.oped-card-author {
  font-size: 0.75rem;
  color: #ccc;
  margin-bottom: 0;
}

/* Hide journal/date text from all publication cards */
.pub-card-journal,
.oped-card-date {
  display: none;
}

/* EvPsych Solutions Homepage 2 Styles */
.evpsych-page {
  background-color: #ffffff !important;
}

.evpsych-page .section:not(.evpsych-hero) {
  background-color: #ffffff !important;
}

.evpsych-navbar {
  background-color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.evpsych-brand {
  color: #1a3c5a !important;
  font-weight: 700;
  font-size: 1.5rem;
}

.evpsych-nav-link {
  color: #1a3c5a !important;
  font-weight: 500;
}

.evpsych-nav-link:hover {
  color: #2a5a96 !important;
}

.evpsych-navbar .navbar-toggler {
  border-color: #6b7280;
}

.evpsych-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.evpsych-navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(107, 114, 128, 0.25);
}

.evpsych-hero {
  min-height: 300px;
  background: #e8f0f8 !important;
  padding: 140px 0 80px 0;
}

.evpsych-page #hero {
  background: #e8f0f8 !important;
}

/* Linen texture pattern for EvPsych page */
.evpsych-page {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23000000' fill-opacity='0.03' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
  background-color: #fafafa;
}

.evpsych-page section {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23000000' fill-opacity='0.03' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
}

.evpsych-page #hero {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23000000' fill-opacity='0.02' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"), linear-gradient(135deg, #e8f0f8 0%, #dce8f4 100%) !important;
  position: relative;
  overflow: hidden;
}

.evpsych-page #hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background-image: url('../images/savanna-hero.png');
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  opacity: 0.1;
  z-index: 0;
}

.evpsych-page #hero .container {
  position: relative;
  z-index: 1;
}

.evpsych-hero-headline {
  color: #1a3c5a;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.evpsych-hero-subtext {
  color: #333;
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

.evpsych-title {
  color: #1a3c5a;
  font-size: 3.5rem;
}

/* EvPsych About Section */
.evpsych-about {
  background-color: #ffffff;
  padding: 80px 0;
}

.evpsych-section-title {
  color: #1a1a1a;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 0;
}

.evpsych-section-title::before {
  content: '|';
  color: #2a5a96;
  font-weight: 700;
  margin-right: 10px;
}

.evpsych-services-list {
  color: #1a1a1a;
  font-size: 1.2rem;
}

.evpsych-services-list .service-divider {
  color: #6b7280;
  margin: 0 15px;
  font-weight: 700;
}

.evpsych-text {
  color: #333;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Blue accent for expertise cards */
.expertise-card-horizontal.blue-accent .expertise-icon {
  background: rgba(42, 90, 150, 0.15);
  color: #2a5a96;
}

.expertise-card-horizontal.blue-accent .expertise-arrow {
  color: #2a5a96;
}

.expertise-card-horizontal.blue-accent:hover {
  border-color: #2a5a96;
  box-shadow: 0 8px 25px rgba(42, 90, 150, 0.4);
}

/* PNAS card - position image at top to show journal name */
.pnas-card .pub-card-image img {
  object-position: top;
}

.pnas-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.3));
  pointer-events: none;
  z-index: 0;
}
