/* ============================================
   PROJECTIVE METHOD (Shortcode Style)
   REFINED & DEFENSIVE (Fixes Theme Overrides)
   ============================================ */

.projective-method {
    --pm-bg: #fdfdfd;
    --pm-surface: #ffffff;
    --pm-border: rgba(0, 0, 0, 0.1);
    --pm-text: #1f2a2e;
    --pm-muted: #5a6a6f;
    --pm-accent: #006d77;
    --pm-inactive: #e9ecef;
    --pm-radius: 0px;

    font-family: inherit;
    padding: 60px 20px;
    background: var(--pm-bg);
    container-type: inline-size;
}

.projective-method__inner {
    max-width: 980px;
    margin: 0 auto 30px;
    text-align: center;
}

.projective-method__tagline {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--pm-accent);
    margin-bottom: 12px;
}

.projective-method__title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--pm-text);
    margin: 0 0 15px;
    line-height: 1.2;
}

.projective-method__subtitle {
    font-size: 1rem;
    color: var(--pm-muted);
    line-height: 1.6;
    margin: 0 auto;
    max-width: 850px;
}

/* --- Letter Navigation --- */
.projective-method__letters {
    display: flex !important;
    /* Force flex */
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    /* No wrapping on desktop */
    padding: 20px 0;
    margin: 0 auto 30px;
    max-width: 980px;
    list-style: none;
}

/* Defensive reset for buttons inherited from theme/elementor */
.projective-method__letter {
    /* Dimensions - Strict control */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 45px !important;
    height: 45px !important;
    min-width: 45px !important;
    max-width: 45px !important;
    aspect-ratio: 1 / 1 !important;
    flex: 0 0 auto !important;

    /* Reset theme styles */
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid var(--pm-border) !important;
    background: var(--pm-inactive) !important;
    /* Base color for inactive */
    color: var(--pm-text) !important;
    box-shadow: none !important;
    border-radius: var(--pm-radius) !important;

    /* Typography */
    font-family: inherit !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-transform: uppercase !important;

    cursor: pointer;
    transition: all 0.25s ease;
}

.projective-method__letter:hover {
    background: var(--pm-surface) !important;
    border-color: var(--pm-accent) !important;
    color: var(--pm-accent) !important;
    transform: translateY(-3px);
}

.projective-method__letter.is-active {
    background: var(--pm-accent) !important;
    color: #ffffff !important;
    border-color: var(--pm-accent) !important;
    transform: translateY(0);
}

/* --- Carousel Content --- */
.projective-method__carousel {
    max-width: 850px;
    margin: 0 auto;
    background: var(--pm-surface);
    overflow: hidden;
    border-radius: 0px;
    /* Square corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--pm-border);
}

.projective-method__track {
    display: grid;
    grid-template-columns: 1fr;
    /* Single column layout */
    align-items: center;
    /* Center vertically if needed */
    position: relative;
    width: 100%;
}

.projective-method__slide {
    /* HIDE BY DEFAULT - COMPLETELY REMOVE FROM FLOW */
    display: none !important;
    width: 100%;
    padding: 40px 50px;
    box-sizing: border-box;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.projective-method__slide.is-active {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.projective-method__slide h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--pm-text);
    margin: 0 0 12px;

    /* Prevent overflow issues */
    width: 100%;
    overflow-wrap: break-word;
    /* Allow break */
    word-break: normal;
    /* Don't break words unless necessary */
    line-height: 1.3;
}

.projective-method__slide p {
    margin: 0;
    color: var(--pm-muted);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 600px;
    /* Readability width */
}

/* --- Responsive --- */
@media (max-width: 850px) {
    .projective-method__letters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-left: 10px;
        padding-right: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
    }

    .projective-method__letters::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome/Safari */
    }

    .projective-method__title {
        font-size: 1.7rem;
    }

    .projective-method__track {
        min-height: 180px;
    }

    .projective-method__slide {
        padding: 30px 20px;
    }

    /* Smaller title on mobile to avoid wrapping too much */
    .projective-method__slide h3 {
        font-size: 1.35rem;
    }
}

/* --- Elementor Fixes (Parent Widget Overrides) --- */
/* Force Elementor widget to take full width */
.elementor-widget-shortcode {
    width: 100% !important;
}