/**
 * PLANK FAQ - Styles (Reference: pilatesreformstudio.co.uk/faqs)
 * Each category section: Left title (1/3) + Right questions (2/3)
 */

/* ============================================
   VARIABLES
   ============================================ */
:root {
    --plank-faq-primary: #e63946;
    --plank-faq-dark: #1f2937;
    --plank-faq-gray: #6b7280;
    --plank-faq-light-gray: #f9fafb;
    --plank-faq-border: #d1d5db;
    --plank-faq-white: #ffffff;
    --plank-faq-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   FAQ WRAPPER
   ============================================ */
.plank-faq-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
}

/* ============================================
   FAQ SECTION (Each category)
   ============================================ */
.plank-faq-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    margin-bottom: 80px;
    align-items: start;
}

.plank-faq-section:last-child {
    margin-bottom: 0;
}

/* ============================================
   LEFT COLUMN: Category Title (1/3)
   ============================================ */
.plank-faq-section-left {
    position: sticky;
    top: 120px;
}

.plank-faq-category-title {
    font-weight: 400;
    margin: 0 0 20px 0;
    font-family: 'Gloock', serif;
    /* font-size, color i line-height se definiraju kroz WPBakery postavke */
}

.plank-faq-divider {
    width: 60px;
    border-radius: 2px;
    /* height i background se definiraju kroz WPBakery postavke */
}

/* ============================================
   RIGHT COLUMN: Questions (2/3)
   ============================================ */
.plank-faq-section-right {
    display: flex;
    flex-direction: column;
}

/* ============================================
   FAQ ITEM (ACCORDION)
   ============================================ */
.plank-faq-item {
    padding: 24px 0;
    /* border-bottom se definira kroz WPBakery postavke */
}

.plank-faq-item:first-child {
    padding-top: 0;
}

/* FAQ Question Button */
.plank-faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    display: block;
    cursor: pointer;
    text-align: left;
    transition: color var(--plank-faq-transition);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--plank-faq-dark);
    font-family: inherit;
}

.plank-faq-question:hover {
    color: var(--plank-faq-primary);
}

/* FAQ Answer */
.plank-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--plank-faq-transition);
}

.plank-faq-item.active .plank-faq-answer {
    max-height: 2000px;
}

.plank-faq-answer-content {
    padding-top: 20px;
    font-size: 18px;
    line-height: 1.6;
    /* color se definira kroz WPBakery postavke */
}

.plank-faq-answer-content p {
    margin: 0 0 16px 0;
}

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

.plank-faq-answer-content a {
    color: var(--plank-faq-primary);
    text-decoration: none;
    transition: opacity var(--plank-faq-transition);
}

.plank-faq-answer-content a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Large Tablets */
@media (max-width: 1200px) {
    .plank-faq-wrapper {
        padding: 50px 30px;
    }

    .plank-faq-section {
        gap: 60px;
    }

    .plank-faq-category-title {
        font-size: 32px;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .plank-faq-section {
        grid-template-columns: 1fr 2fr;
        gap: 40px;
        margin-bottom: 60px;
    }

    .plank-faq-section-left {
        top: 100px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .plank-faq-wrapper {
        padding: 40px 20px;
    }

    .plank-faq-section {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 50px;
    }

    .plank-faq-section-left {
        position: relative;
        top: 0;
    }

    .plank-faq-category-title {
        margin-bottom: 16px;
    }

    .plank-faq-divider {
        width: 50px;
    }

    .plank-faq-question {
        font-size: 16px;
    }

    .plank-faq-answer-content {
        font-size: 15px;
        padding-top: 16px;
    }

    .plank-faq-item {
        padding: 20px 0;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .plank-faq-wrapper {
        padding: 30px 15px;
    }

    .plank-faq-question {
        font-size: 15px;
    }

    .plank-faq-answer-content {
        font-size: 14px;
        line-height: 1.7;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.plank-faq-question:focus {
    outline: 2px solid var(--plank-faq-primary);
    outline-offset: 4px;
}

.plank-faq-question:focus:not(:focus-visible) {
    outline: none;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   FAQ HOMEPAGE - KATEGORIJE S PITANJIMA
   Moderni, čisti dizajn
   ============================================ */
.plank-faq-home-wrapper {
    width: 100%;
}

/* Category Level - Accordion trigger */
.plank-faq-home-category {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.plank-faq-home-category:last-child {
    border-bottom: none;
}

.plank-faq-home-category-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: none;
    border: none;
    padding: 24px 0;
    cursor: pointer;
    text-align: left;
    font-family: 'Gloock', serif;
    font-weight: 400;
    line-height: 1.3;
    transition: opacity 0.2s ease;
}

.plank-faq-home-category-header:hover {
    opacity: 0.7;
}

.plank-faq-home-category-header:focus {
    outline: none;
}

.plank-faq-home-category-header:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.plank-faq-home-category-title {
    flex: 1;
}

/* Category Content - Expandable container */
.plank-faq-home-category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.plank-faq-home-category.is-expanded .plank-faq-home-category-content {
    max-height: 10000px;
}

/* Questions container */
.plank-faq-home-questions {
    padding: 0 0 30px 0;
}

/* Individual FAQ Item */
.plank-faq-home-item {
    margin-bottom: 28px;
    padding-left: 24px;
    border-left: 3px solid #DD3333;
}

.plank-faq-home-item:last-child {
    margin-bottom: 0;
}

/* Question Title */
.plank-faq-home-question-title {
    margin: 0 0 8px 0;
    font-family: inherit;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

/* Answer */
.plank-faq-home-answer {
    line-height: 1.7;
    padding-left: 0;
}

.plank-faq-home-answer p {
    margin: 0 0 12px 0;
}

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

.plank-faq-home-answer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s ease;
}

.plank-faq-home-answer a:hover {
    opacity: 0.7;
}

/* Icon (+/-) */
.plank-faq-home-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.plank-faq-home-icon svg {
    width: 100%;
    height: 100%;
}

.plank-faq-home-icon .plank-icon-horizontal,
.plank-faq-home-icon .plank-icon-vertical {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Vertical line disappears when expanded */
.plank-faq-home-category.is-expanded > .plank-faq-home-category-header .plank-icon-vertical {
    opacity: 0;
    transform: scaleY(0);
}

/* ============================================
   FAQ HOMEPAGE - RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .plank-faq-home-category-header {
        padding: 20px 0;
    }

    .plank-faq-home-questions {
        padding: 0 0 24px 0;
    }

    .plank-faq-home-item {
        margin-bottom: 24px;
        padding-left: 16px;
        border-left-width: 2px;
    }

    .plank-faq-home-question-title {
        margin-bottom: 6px;
    }

    .plank-faq-home-answer {
        line-height: 1.6;
    }

    .plank-faq-home-icon {
        width: 14px;
        height: 14px;
    }
}
