/* FAQ Page Styles */

/* --------------------
 * FAQ Header Section (based on features header)
 * -------------------- */
.faq-header-container {
  position: relative;
  width: 700px;
  height: 80px;
  margin: 0 auto 50px auto;
}

.faq-header-text {
  position: absolute;
  width: 700px;
  height: 80px;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-header-text h1 {
  position: relative;
  z-index: 1;
  text-align: center;
  font-family: var(--font-family-secondary);
  font-size: 2rem;
  text-transform: uppercase;
  color: var(--light-navy);
  font-weight: 800;
  letter-spacing: 1px;
  display: inline-block;
  width: auto;
  margin: 0;
}

.faq-header-text h1::before,
.faq-header-text h1::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 280px;
  height: 3px;
  background: var(--light-navy);
  transform: translateY(-50%);
}

.faq-header-text h1::before {
  left: -300px;
}

.faq-header-text h1::after {
  right: -300px;
}

/* Ornaments as separate elements */
.faq-header-ornaments {
  position: absolute;
  width: 700px;
  height: 80px;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  z-index: 1;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  image-rendering: -moz-crisp-edges;
  opacity: 0.9;
  
  /* Include CSS variables for ornament sizing */
  --corner-base: 12px;
  --edge-base: 3px;
  --orn-top-base: 11px;
  --orn-btm-w-base: 13px;
  --orn-btm-h-base: 3px;
  --scale: 4;
  --corner: calc(var(--corner-base) * var(--scale));
  --edge: calc(var(--edge-base) * var(--scale));
  --orn-top: calc(var(--orn-top-base) * var(--scale));
  --orn-btm-w: calc(var(--orn-btm-w-base) * var(--scale));
  --orn-btm-h: calc(var(--orn-btm-h-base) * var(--scale));
}

.faq-ornament-top {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -36px;
  width: var(--orn-top);
  height: var(--orn-top);
  background: url("../assets/backgrounds/framemiddle.svg") center/contain no-repeat;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  image-rendering: -moz-crisp-edges;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.faq-ornament-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(-1 * var(--orn-btm-h) / 2);
  width: var(--orn-btm-w);
  height: var(--orn-btm-h);
  background: url("../assets/backgrounds/bottom-ornament-navy.svg") center/contain no-repeat;
  image-rendering: pixelated;
}

/* --------------------
 * FAQ Container
 * -------------------- */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Remove old h1 styles since we're using the new header structure */

.faq-item {
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.faq-question {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--off-white);
    padding: 20px 25px;
    cursor: pointer;
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    text-align: left;
    width: 100%;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-question:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.faq-question:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.faq-question::after {
    content: '+';
    font-size: 1.5em;
    font-weight: bold;
    transition: all 0.3s ease;
    color: var(--off-white);
    margin-left: 15px;
}

.faq-question.active::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.faq-answer.show {
    max-height: 500px;
    padding: 25px;
}

.faq-answer p {
    margin: 0 0 15px 0;
    line-height: 1.7;
    color: #495057;
    font-size: 1em;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .faq-container {
        padding: 20px 15px;
    }

    .faq-container h1 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .faq-question {
        padding: 18px 20px;
        font-size: 1em;
    }

    .faq-answer.show {
        padding: 20px;
    }

    .faq-answer p {
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .faq-container h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .faq-question {
        padding: 15px 18px;
        font-size: 0.95em;
    }

    .faq-answer.show {
        padding: 18px;
    }
}

/* Animation for smooth transitions */
.faq-item {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }
.faq-item:nth-child(6) { animation-delay: 0.6s; }
.faq-item:nth-child(7) { animation-delay: 0.7s; }
.faq-item:nth-child(8) { animation-delay: 0.8s; }
.faq-item:nth-child(9) { animation-delay: 0.9s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}