/* 1. Force the container into a 3-column grid */
.node__content .field--type-entity-reference-revisions > .field__items,
.node__content .field--name-field-page-sections > .field__items {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important; /* Force 3 equal columns */
  gap: 25px !important;
  width: 100% !important;
  max-width: 1140px !important;
  margin: 40px auto !important;
}

/* 2. On tablets (under 1000px), switch to 2 columns */
@media (max-width: 1000px) {
  .node__content .field--type-entity-reference-revisions > .field__items {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* 3. On phones (under 700px), switch to 1 column */
@media (max-width: 700px) {
  .node__content .field--type-entity-reference-revisions > .field__items {
    grid-template-columns: 1fr !important;
  }
}

/* 4. The Card Styling - Docuserves Engineered Look */
.paragraph--type--service-card {
  background: #ffffff !important;
  padding: 30px !important; /* Slightly more room for a premium feel */
  border-radius: 2px !important; /* Squaring off the corners for a sharper, technical look */
  border: 1px solid #e0e0e0 !important; /* Adding a subtle full border */
  border-top: 4px solid #001f3f !important; /* The Docuserves Navy signature line */
  box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important; /* Cleaner, more professional shadow */
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-top-color 0.3s ease !important;
}

/* 4.1 Card Hover Effect */
.paragraph--type--service-card:hover {
  transform: translateY(-5px) !important; /* The subtle lift */
  box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
  border-top-color: #004080 !important; /* Shifts to a slightly brighter blue on hover */
}

/* 4.2 Card Headline Styling */
.paragraph--type--service-card h3 {
  color: #001f3f !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  font-size: 1.1rem !important;
  margin-top: 0 !important;
  border-bottom: 1px solid #f0f0f0 !important;
  padding-bottom: 10px !important;
  margin-bottom: 15px !important;
}

/* 5. Remove Olivero's default item margins that break grids */
.field__item {
  margin: 0 !important;
  padding: 0 !important;
}

/* Custom Docuserves Button Style */
.docuserves-button {
    display: inline-block;
    padding: 10px 20px !important;
    background-color: #001f3f !important; /* Matches your Navy header */
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 2px !important;
    font-size: 0.9rem !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    margin-top: 15px !important;
    transition: background-color 0.3s ease !important;
}

.docuserves-button:hover {
    background-color: #004080 !important; /* Slight shift to lighter blue on hover */
    color: #ffffff !important;
}

/* This targets every card class individually */
.docuserves-card {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    height: 300px; /* Set a fixed height so all cards are identical */
}

/* This pushes the button to the bottom regardless of text length */
.docuserves-card p:last-of-type {
    margin-top: auto; 
}

.docuserves-button, 
.docuserves-button:hover, 
.docuserves-button:focus {
    /* Explicitly wipe out the theme's background styling */
    background-image: none !important;
    background-color: #001f3f !important;
    border: none !important;
    box-shadow: none !important;
    background: #001f3f !important; /* Force a solid fill */
}

/* Now apply your custom hover color */
.docuserves-button:hover {
    background-color: #004080 !important;
    background: #004080 !important;
}

/* Tighten up the CTA buttons to keep text on one line */
.docuserves-button {
    font-size: 0.8rem !important; /* Dropped from 0.9rem */
    padding: 10px 12px !important; /* Reduced horizontal padding from 20px */
    white-space: nowrap !important; /* Forces the text to stay on one line */
    text-align: center !important;
    width: 100% !important; /* Makes the button fill the card width for a uniform look */
    box-sizing: border-box !important;
}

/* --- Docuserves Accordion FAQ Styling --- */
.docuserves-faq-container {
    max-width: 800px;
    margin: 30px auto;
}
.faq-intro {
    text-align: center;
    margin-bottom: 30px;
    color: #555;
    font-size: 1.1rem;
}
.faq-item {
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    border-radius: 2px;
    overflow: hidden;
}
.faq-trigger {
    background-color: #f9f9f9;
    color: #001f3f; /* Docuserves Navy */
    font-weight: bold;
    cursor: pointer;
    padding: 18px 20px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    font-size: 1rem;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-trigger:hover {
    background-color: #f0f4f8;
}
/* Visual indicator arrow using pure CSS */
.faq-trigger::after {
    content: '\25BC'; /* Down arrow */
    font-size: 0.8rem;
    color: #001f3f;
    transition: transform 0.2s ease;
}
.faq-trigger.active::after {
    transform: rotate(180deg); /* Flips arrow up when open */
}
.faq-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    background-color: #ffffff;
}
.faq-panel p {
    padding: 20px;
    margin: 0;
    color: #333;
    line-height: 1.6;
    border-top: 1px solid #eee;
}