/* ==========================================================================
   Claude GEO Optimizer — FAQ Tab & Category Content Public CSS
   v1.2.3
   ========================================================================== */

/* ----- FAQ Accordion (shared between products and categories) ----- */

.cgo-faq-tab-wrapper {
    padding: 8px 0 24px;
}

.cgo-faq-schema-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #27500A;
    background: #EAF3DE;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    line-height: 1;
}

.cgo-faq-schema-badge svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.cgo-faq-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #e0e0e0;
}

.cgo-faq-item {
    border-bottom: 1px solid #e0e0e0;
}

.cgo-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: inherit;
    line-height: 1.4;
    gap: 12px;
}

.cgo-faq-question:hover {
    color: #333;
}

.cgo-faq-question:focus {
    outline: 2px solid #4A90D9;
    outline-offset: 2px;
}

.cgo-faq-question-text {
    flex: 1;
}

.cgo-faq-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
    color: #666;
}

/* Open state */
.cgo-faq-item.is-open .cgo-faq-icon {
    transform: rotate(180deg);
}

/* Answer: hidden by default, shown on .is-open */
.cgo-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 0 0 0;
}

.cgo-faq-item.is-open .cgo-faq-answer {
    max-height: 600px;
    padding: 0 0 16px 0;
}

.cgo-faq-answer span {
    display: block;
    font-size: 14px;
    line-height: 1.75;
    color: #444;
}

/* First FAQ starts open */
.cgo-faq-item:first-child.is-open .cgo-faq-answer {
    max-height: 600px;
    padding-bottom: 16px;
}


/* ----- Category Content Section ----- */

.cgo-category-content {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.cgo-category-section-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 24px;
    color: inherit;
}

.cgo-category-long-description {
    margin-bottom: 48px;
}

.cgo-category-long-description-content {
    line-height: 1.75;
    font-size: 15px;
}

.cgo-category-long-description-content h2 {
    font-size: 1.25em;
    font-weight: 600;
    margin: 32px 0 12px;
}

.cgo-category-long-description-content h2:first-child {
    margin-top: 0;
}

.cgo-category-long-description-content h3 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 24px 0 8px;
}

/* Tables in long description */
.cgo-category-long-description-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.cgo-category-long-description-content table th,
.cgo-category-long-description-content table td {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    text-align: left;
    font-size: 14px;
}

.cgo-category-long-description-content table th {
    background: #f5f5f5;
    font-weight: 600;
}

.cgo-category-long-description-content table tr:nth-child(even) td {
    background: #fafafa;
}

/* Glossary (DL/DT/DD) */
.cgo-category-long-description-content dl {
    margin: 0;
}

.cgo-category-long-description-content dt {
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 14px;
}

.cgo-category-long-description-content dd {
    margin: 4px 0 0 0;
    color: #444;
    line-height: 1.7;
}

/* Glossary via strong first-child in paragraphs */
.cgo-category-long-description-content h2 + ul,
.cgo-category-long-description-content h3 + p {
    margin-top: 6px;
}

.cgo-category-long-description-content p strong:first-child {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 14px;
    margin-bottom: 2px;
}

.cgo-category-long-description-content ul li strong:first-child,
.cgo-category-long-description-content ol li strong:first-child {
    display: inline;
}

/* Category guide anchor link */
.cgo-guide-link {
    display: block;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #8B6914 !important; /* oro antico */
    text-decoration: none;
    transition: opacity .2s ease;
}
.cgo-guide-link:hover {
    opacity: .8;
    text-decoration: underline;
}

/* Sub-headings in long description: remove bold from p>strong:only-child pattern */
.cgo-category-long-description-content p > strong:only-child {
    font-weight: 600;
    display: block;
    margin-top: 1.2em;
}

/* Hide pipe-character dividers (||) sometimes generated by Claude */
.cgo-category-long-description-content p:empty,
.cgo-category-long-description-content p br:only-child {
    display: none;
}

/* Sub-headings converted from <p><strong>...</strong></p> in generated content */
.cgo-content-subheading {
    font-size: 1.05em;
    font-weight: 600;
    margin: 1.4em 0 .4em;
    color: inherit;
}

/* Internal links auto-generated by CGO_Internal_Linking */
a.cgo-internal-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(0,0,0,0.25);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s ease;
}
a.cgo-internal-link:hover {
    text-decoration-color: currentColor;
}
