/**
 * Contact Page Styles - Beacon Pain Clinic
 * 
 * Follows existing design system using CSS custom properties from base.html.
 * Sections: Hero, Contact Cards, Location, FAQ, Buttons, Responsive.
 */

/* ============================================
   HERO SECTION
   ============================================ */
.contact-hero {
    background: linear-gradient(135deg, rgba(91, 163, 208, 0.12), rgba(91, 163, 208, 0.02));
    padding: 56px 0 44px;
    text-align: left;
}

.contact-hero__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.contact-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(91, 163, 208, 0.18);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}

.contact-hero__title {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 18px;
}

.contact-hero__text {
    max-width: 620px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   CONTACT METHODS GRID
   ============================================ */
.contact-methods {
    padding: 64px 0;
    background: var(--bg-white);
}

.contact-methods__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Contact Card */
.contact-card {
    background: var(--bg-white);
    padding: 36px 28px;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
}

.contact-card:hover::before {
    transform: scaleX(1);
}

.contact-card__icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 26px;
    color: white;
}

.contact-card__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px;
}

.contact-card__description {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0 0 20px;
    line-height: 1.5;
}

.contact-card__action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
}

.contact-card__action:hover {
    color: var(--primary-dark);
}

/* Email obfuscation fix for contact card */
.contact-card__action.email-obfuscated-link,
.contact-card__action.email-obfuscated-link span,
.contact-card__action .email-obfuscated {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-card__action.email-obfuscated-link:hover,
.contact-card__action.email-obfuscated-link:hover span {
    color: var(--primary-dark);
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header__title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px;
}

.section-header__subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
}

/* ============================================
   CLINIC LOCATION SECTION
   ============================================ */
.clinic-location {
    padding: 64px 0;
    background: var(--bg-light);
}

.clinic-location__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Info Card */
.info-card {
    background: var(--bg-white);
    padding: 28px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.info-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.info-card__icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.info-card__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* Schedule */
.schedule {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.schedule__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 8px;
}

.schedule__day {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 15px;
}

.schedule__time {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
}

.schedule__time--closed {
    color: #b91c1c;
    font-weight: 600;
}

/* Clinic Details */
.clinic-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background: var(--bg-white);
    border-radius: 12px;
    transition: transform 0.2s ease;
    border: 1px solid var(--border-color);
}

.detail-item:hover {
    transform: translateX(3px);
}

.detail-item__icon {
    width: 38px;
    height: 38px;
    background: rgba(91, 163, 208, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 15px;
    flex-shrink: 0;
}

.detail-item__content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px 0;
}

.detail-item__content p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Location Actions */
.location-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Map */
.map-container {
    position: relative;
}

.map-wrapper {
    position: relative;
    width: 100%;
    height: 480px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.location-map {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(15%);
    transition: filter 0.3s ease;
}

.location-map:hover {
    filter: grayscale(0%);
}

.map-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 10px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.map-link-text {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
}

.map-link-text:hover {
    text-decoration: underline;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
    padding: 64px 0 80px;
    background: var(--bg-white);
}

.faq-section__container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* FAQ Item */
.faq-item {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
    border-color: var(--primary-light);
}

.faq-item.active {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.faq-item__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    cursor: pointer;
    transition: background 0.2s ease;
    background: var(--bg-white);
}

.faq-item:hover .faq-item__question {
    background: var(--bg-light);
}

.faq-item.active .faq-item__question {
    background: rgba(91, 163, 208, 0.04);
    border-bottom: 1px solid var(--border-color);
}

.faq-item__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.faq-item.active .faq-item__title {
    color: var(--primary-color);
}

.faq-item__toggle {
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item__toggle:hover {
    background: var(--primary-light);
    color: white;
}

.faq-item.active .faq-item__toggle {
    background: var(--primary-color);
    color: white;
    transform: rotate(45deg);
}

.faq-item__toggle i {
    font-size: 14px;
}

.faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-item__answer {
    max-height: 300px;
}

.faq-item__content {
    padding: 22px 28px 28px;
}

.faq-item__content p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}

.faq-item__content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.faq-item__content a:hover {
    text-decoration: underline;
}

/* ============================================
   BUTTON SYSTEM
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 163, 208, 0.3);
}

.btn--primary:active {
    transform: translateY(0);
}

.btn--outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn--outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Focus States - Accessibility */
.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

/* Tablet */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .location-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    
    .map-wrapper {
        height: 380px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .contact-hero {
        padding: 44px 0 36px;
    }

    .contact-methods {
        padding: 48px 0;
    }
    
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .contact-card {
        padding: 28px 20px;
    }

    .contact-card__icon {
        width: 52px;
        height: 52px;
        font-size: 22px;
        border-radius: 14px;
        margin-bottom: 16px;
    }
    
    .clinic-location {
        padding: 48px 0;
    }
    
    .location-actions {
        flex-direction: column;
    }
    
    .location-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .schedule__item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .faq-section {
        padding: 48px 0 64px;
    }
    
    .faq-item__question {
        padding: 18px 22px;
    }
    
    .faq-item__content {
        padding: 18px 22px 24px;
    }
    
    .faq-item__toggle {
        width: 34px;
        height: 34px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .contact-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin: 0 auto;
    }

    .contact-card {
        padding: 24px 20px;
    }

    .map-wrapper {
        height: 300px;
    }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .contact-card:hover {
        transform: none;
    }

    .contact-card:active {
        transform: scale(0.98);
    }

    .detail-item:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.97);
    }
}
