/**
 * Where Does It Hurt Section Styles
 * Synergy Health Theme
 * Interactive body pain selector with hover effects
 */

/* ========================================
   SECTION BASE
   ======================================== */

.where-does-it-hurt-section {
    position: relative;
    width: 100%;
    min-height: 800px;
    background-image: url('../images/where-does-it-hurt-bg.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Gradient Overlay - Fades from #F9F9F7 to transparent */
.wdih-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, #F9F9F7 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* Container */
.wdih-container {
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
    padding: 80px 20px 0 20px;
    z-index: 2;
}

/* Content Wrapper - Two Column Layout */
.wdih-content-wrapper {
    display: flex;
    gap: 60px;
    align-items: stretch;
    min-height: 600px;
}

/* ========================================
   LEFT COLUMN - SILHOUETTE
   ======================================== */

.wdih-silhouette-column {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wdih-silhouette-container {
    width: 100%;
    max-width: 600px;
}

.wdih-silhouette-image {
    position: relative;
    width: 80%;
    margin: 0 auto 100px;
}

/* Silhouette image — drives the container height so dots are always anchored */
.wdih-body-image {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    pointer-events: none;
}

/* Dots on Silhouette */
.wdih-dot {
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: var(--red);
    border: 3px solid var(--white);
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wdih-dot:hover,
.wdih-dot.active {
    background-color: var(--red);
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 4px 16px rgba(230, 64, 64, 0.4);
    z-index: 11;
}

/* Selected State - Persistent after click */
.wdih-dot.selected {
    background-color: var(--red);
    transform: translate(-50%, -50%) scale(1.4);
    border-color: var(--white);
    border-width: 4px;
    box-shadow: 0 4px 20px rgba(230, 64, 64, 0.6);
    z-index: 12;
}

/* Pulse Effect on Dots */
.wdih-dot-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--red);
    transform: translate(-50%, -50%);
    animation: pulse 2s ease-out infinite;
    opacity: 0;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

/* Silhouette Caption */
.wdih-silhouette-caption {
    text-align: center;
}

.wdih-silhouette-caption p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--white);
    margin: 0;
}

.wdih-silhouette-caption .highlight-text {
    color: var(--teal);
    font-weight: 600;
}

/* ========================================
   RIGHT COLUMN - CARDS
   ======================================== */

.wdih-cards-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
    background-color: var(--teal);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 40px 40px 80px 40px;
}

/* Header */
.wdih-header {
    background-color: transparent;
    border-radius: 0;
    padding: 0 0 40px 0;
    color: var(--white);
}

.wdih-heading {
    font-size: 42px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: var(--white);
}

.wdih-description {
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
    color: var(--white);
    opacity: 0.95;
}

/* Cards Grid */
.wdih-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

/* Individual Card */
.wdih-card {
    background-color: transparent;
    border-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 24px 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

/* Remove right border on last column */
.wdih-card:nth-child(4n) {
    border-right: none;
}

/* Remove bottom border on last row */
.wdih-card:nth-last-child(-n+4) {
    border-bottom: none;
}

.wdih-card:hover,
.wdih-card.active {
    background-color: #72B8AB;
    transform: none;
    box-shadow: none;
}

/* Selected State - Persistent after click */
.wdih-card.selected {
    background-color: #72B8AB;
    transform: none;
    box-shadow: none;
}

.wdih-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

/* Card Icon Container */
.wdih-card-icon {
    position: relative;
    width: 100%;
    max-width: 80px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Normal and Active Icon States */
.wdih-icon-normal,
.wdih-icon-active {
    width: 100%;
    height: auto;
    display: block;
    max-height: 80px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* By default, show normal icon and hide active icon */
.wdih-icon-normal {
    opacity: 1;
}

.wdih-icon-active {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

/* On hover or active state, swap the images */
.wdih-card:hover .wdih-icon-normal,
.wdih-card.active .wdih-icon-normal {
    opacity: 0;
}

.wdih-card:hover .wdih-icon-active,
.wdih-card.active .wdih-icon-active {
    opacity: 1;
}

/* On selected state, show active image */
.wdih-card.selected .wdih-icon-normal {
    opacity: 0;
}

.wdih-card.selected .wdih-icon-active {
    opacity: 1;
}

/* Card Title */
.wdih-card-title {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin: 0;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

/* CTA Button */
.wdih-cta-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.wdih-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-pill);
    background-color: transparent;
    color: var(--white);
    border: 3px solid var(--white);
    transition: all var(--transition-base);
    cursor: pointer;
}

.wdih-cta-button:hover {
    background-color: var(--white);
    color: var(--teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.wdih-cta-button:active {
    transform: translateY(0);
}

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

/* Tablet Landscape (1024px) */
@media (max-width: 1024px) {
    .wdih-content-wrapper {
        gap: 40px;
    }
    
    .wdih-heading {
        font-size: 36px;
    }
    
    .wdih-cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .wdih-card {
        padding: 20px 12px;
        min-height: 140px;
    }
    
    .wdih-card-icon {
        max-width: 60px;
    }
    
    .wdih-icon-normal,
    .wdih-icon-active {
        max-height: 60px;
    }
    
    .wdih-card-title {
        font-size: 14px;
    }
}

/* Tablet Portrait (768px) */
@media (max-width: 768px) {
    .where-does-it-hurt-section {
        min-height: auto;
    }
    
    .wdih-container {
        padding: 60px 20px 0 20px;
    }
    
    .wdih-content-wrapper {
        flex-direction: column;
        gap: 40px;
    }
    
    .wdih-silhouette-column {
        flex: 1;
        width: 100%;
    }
    
    .wdih-silhouette-container {
        max-width: 400px;
    }
    
    .wdih-silhouette-caption {
        margin-top: 30px;
    }
    
    .wdih-silhouette-caption p {
        font-size: 16px;
    }
    
    .wdih-header {
        padding: 32px;
    }
    
    .wdih-heading {
        font-size: 32px;
        margin-bottom: 16px;
    }
    
    .wdih-description {
        font-size: 16px;
    }
    
    .wdih-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .wdih-card {
        min-height: 180px;
        padding: 24px 16px;
    }
    
    .wdih-card-icon {
        max-width: 70px;
    }
    
    .wdih-icon-normal,
    .wdih-icon-active {
        max-height: 70px;
    }
}

/* Mobile (480px) */
@media (max-width: 480px) {
    .wdih-container {
        padding: 40px 16px 0 16px;
    }
    
    .wdih-content-wrapper {
        gap: 32px;
    }
    
    .wdih-silhouette-container {
        max-width: 300px;
    }
    
    .wdih-dot {
        width: 20px;
        height: 20px;
    }
    
    .wdih-silhouette-caption {
        margin-top: 24px;
    }
    
    .wdih-silhouette-caption p {
        font-size: 14px;
    }
    
    .wdih-header {
        padding: 24px;
        border-radius: 12px;
    }
    
    .wdih-heading {
        font-size: 28px;
    }
    
    .wdih-description {
        font-size: 15px;
    }
    
    .wdih-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .wdih-card {
        min-height: 160px;
        padding: 20px 12px;
        border-radius: 10px;
    }
    
    .wdih-card-icon {
        max-width: 60px;
    }
    
    .wdih-icon-normal,
    .wdih-icon-active {
        max-height: 60px;
    }
    
    .wdih-card-title {
        font-size: 13px;
    }
    
    .wdih-cta-button {
        padding: 16px 40px;
        font-size: 16px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .wdih-dot,
    .wdih-card,
    .wdih-cta-button {
        transition: none;
    }
    
    .wdih-dot:hover,
    .wdih-dot.active {
        transform: translate(-50%, -50%);
    }
    
    .wdih-dot.selected {
        transform: translate(-50%, -50%);
    }
    
    .wdih-card:hover,
    .wdih-card.active {
        transform: none;
    }
    
    .wdih-card.selected {
        transform: none;
    }
    
    .wdih-cta-button:hover {
        transform: none;
    }
    
    .wdih-dot-pulse {
        animation: none;
        display: none;
    }
}

/* Focus Styles for Keyboard Navigation */
.wdih-dot:focus {
    outline: 3px solid var(--white);
    outline-offset: 4px;
}

.wdih-card:focus {
    outline: none;
}

.wdih-cta-button:focus {
    outline: 3px solid var(--white);
    outline-offset: 4px;
}
