/* ==========================================================================
   Northshore Digital Agency - Custom Component Styles
   ========================================================================== */

/* ==========================================================================
   1. Pricing Cards
   ========================================================================== */

.pricing-card-featured {
    transform: scale(1.05);
    z-index: 2;
    position: relative;
}

.pricing-columns {
    align-items: center;
}

.promo-badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 9999px;
    background: rgba(212, 160, 23, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pricing-features {
    list-style: none;
    padding-left: 0 !important;
}

.pricing-features li {
    padding: 0.4rem 0;
    padding-left: 1.6rem;
    position: relative;
}

.pricing-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--color-gold);
    font-weight: 700;
}

/* ==========================================================================
   2. Testimonial Carousel
   ========================================================================== */

.testimonial-carousel {
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

.testimonial-slide {
    width: 100%;
}

.testimonial-quote {
    position: relative;
    padding-top: 1.5rem;
}

.testimonial-quote::before {
    content: '\201C';
    position: absolute;
    top: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    font-family: 'Sora', serif;
    color: var(--color-gold);
    opacity: 0.3;
    line-height: 1;
    pointer-events: none;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--color-gray-400);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot:hover {
    border-color: var(--color-gold);
}

.carousel-dot.active {
    background: var(--color-gold);
    border-color: var(--color-gold);
    transform: scale(1.2);
}

/* ==========================================================================
   3. Industry Tiles
   ========================================================================== */

.industry-tile {
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.industry-tile:hover {
    border-bottom: 3px solid var(--color-gold);
    box-shadow: var(--shadow-glass-gold);
}

/* ==========================================================================
   4. Trust Badge
   ========================================================================== */

.trust-badge {
    display: inline-block !important;
    width: auto !important;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   5. Feature Checklist
   ========================================================================== */

.feature-checklist {
    list-style: none;
    padding-left: 0 !important;
}

.feature-checklist li {
    padding: 0.35rem 0;
    padding-left: 1.6rem;
    position: relative;
}

.feature-checklist li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--color-gold);
    font-weight: 700;
}

/* ==========================================================================
   6. Contact Form
   ========================================================================== */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-navy);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9375rem;
    color: var(--color-gray-800);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
}

.form-submit {
    padding: 0.875rem 2rem;
    background: var(--gradient-gold);
    color: var(--color-navy);
    border: none;
    border-radius: 9999px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glass-gold);
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glass-elevated);
}

.form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* RapidForms loading overlay */
.contact-form,
form[data-rapidforms="true"] {
    position: relative;
}

.rapidforms-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-md);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.rapidforms-loading.is-visible {
    opacity: 1;
    visibility: visible;
}

.rapidforms-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-gray-200);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: rapidforms-spin 0.8s linear infinite;
}

@keyframes rapidforms-spin {
    to { transform: rotate(360deg); }
}

.rapidforms-loading-text {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-navy);
}

/* Form validation errors */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #b91c1c;
    box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.15);
}

.form-error {
    display: block;
    font-size: 0.8125rem;
    color: #b91c1c;
    margin-top: 0.25rem;
}

/* Form feedback (success/error message) */
.form-feedback {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-feedback--success {
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
    border: 1px solid rgba(22, 163, 74, 0.3);
}

.form-feedback--error {
    background: rgba(185, 28, 28, 0.08);
    color: #b91c1c;
    border: 1px solid rgba(185, 28, 28, 0.25);
}

/* ==========================================================================
   7. Navigation Enhancements
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.glass-header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(27, 45, 91, 0.06);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04);
}

/* Active nav link underline */
.wp-block-navigation-item.current-menu-item>a {
    color: var(--color-gold) !important;
    position: relative;
}

/* Mobile drawer glass overlay */
.wp-block-navigation__responsive-container.is-menu-open {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* Header CTA glow */
.header-cta .wp-block-button__link {
    box-shadow: var(--shadow-glass-gold);
    transition: all 0.3s ease;
}

.header-cta .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(212, 160, 23, 0.35);
}

/* ==========================================================================
   8. Blog Cards
   ========================================================================== */

.glass-card .wp-block-post-featured-image img {
    transition: transform 0.4s ease;
}

.glass-card:hover .wp-block-post-featured-image img {
    transform: scale(1.03);
}

/* ==========================================================================
   9. FAQ Accordion
   ========================================================================== */

.faq-item {
    margin-bottom: 0.75rem;
}

.faq-item summary {
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-navy);
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-gold);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item[open] summary::after {
    content: '\2013';
}

.faq-item p {
    margin-top: 0.75rem;
}

/* ==========================================================================
   10. Scroll-to-Top Button
   ========================================================================== */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(27, 45, 91, 0.1);
    box-shadow: var(--shadow-glass);
    color: var(--color-gold);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--color-gold);
    color: var(--color-navy);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glass-gold);
}

/* ==========================================================================
   11. Footer Styles
   ========================================================================== */

.footer-links {
    list-style: none;
    padding-left: 0 !important;
}

.footer-links li {
    padding: 0.2rem 0;
}

.footer-links li a {
    color: var(--color-gray-400);
    transition: color 0.3s ease;
    text-decoration: none;
}

.footer-links li a:hover {
    color: var(--color-gold);
}

.site-footer a[href*="privacy-policy"],
.site-footer a[href*="terms-of-service"],
.site-footer a[href*="mailto:support"] {
    color: #fff;
}

.site-footer a[href*="privacy-policy"]:hover,
.site-footer a[href*="terms-of-service"]:hover,
.site-footer a[href*="mailto:support"]:hover {
    color: var(--color-gold);
}

/* ==========================================================================
   Long Island Interactive Map Widget
   ========================================================================== */

.li-map-widget {
    display: flex;
    align-items: stretch;
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    min-height: 340px;
}

.li-map-widget__map {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.li-map-widget__map svg {
    width: 100%;
    height: auto;
    display: block;
}

.li-map-guide {
    width: 100%;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-gray-400, #9CA3AF);
    margin: 0 0 0.25rem;
    padding: 0;
}

.li-map-region-group {
    cursor: pointer;
    outline: none;
}

.li-map-region-group:focus-visible .li-map-region {
    filter: brightness(1.25);
    stroke: var(--color-gold, #D4A017);
    stroke-width: 3;
}

.li-map-region {
    transition: filter 0.3s ease, transform 0.3s ease;
}

.li-map-region-group:hover .li-map-region {
    filter: brightness(1.12);
}

.li-map-region-group.is-active .li-map-region {
    filter: brightness(1.25) drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    stroke-width: 3;
}

.li-map-label {
    font-family: 'Sora', system-ui, sans-serif;
    font-weight: 700;
    fill: #fff;
    pointer-events: none;
    text-anchor: middle;
}

.li-map-sublabel {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    font-size: 12px;
    fill: rgba(255, 255, 255, 0.8);
    pointer-events: none;
    text-anchor: middle;
}

/* --- Side Panel --- */

.li-map-panel {
    width: 0;
    overflow: hidden;
    opacity: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(27, 45, 91, 0.1);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    padding: 0;
}

.li-map-widget.is-open .li-map-panel {
    width: 320px;
    opacity: 1;
    padding: 1.25rem;
    margin-left: 1.5rem;
}

.li-map-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    flex-shrink: 0;
}

.li-map-panel__title {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-navy, #1B2D5B);
    margin: 0;
    white-space: nowrap;
}

.li-map-panel__county-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-gold, #D4A017);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.li-map-panel__county-link:hover {
    color: var(--color-navy, #1B2D5B);
}

/* --- Search Bar --- */

.li-map-panel__search-wrap {
    position: relative;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.li-map-panel__search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray-400, #9CA3AF);
    pointer-events: none;
    width: 16px;
    height: 16px;
}

.li-map-panel__search {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid rgba(27, 45, 91, 0.15);
    border-radius: 9999px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.875rem;
    color: var(--color-navy, #1B2D5B);
    background: rgba(255, 255, 255, 0.7);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.li-map-panel__search::placeholder {
    color: var(--color-gray-400, #9CA3AF);
}

.li-map-panel__search:focus {
    border-color: var(--color-gold, #D4A017);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
}

/* --- Town List --- */

.li-map-panel__list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1 1 auto;
    max-height: 320px;
    overscroll-behavior: contain;
}

.li-map-panel__list::-webkit-scrollbar {
    width: 4px;
}

.li-map-panel__list::-webkit-scrollbar-track {
    background: transparent;
}

.li-map-panel__list::-webkit-scrollbar-thumb {
    background: rgba(27, 45, 91, 0.15);
    border-radius: 4px;
}

.li-map-panel__item {
    margin: 0;
    padding: 0;
}

.li-map-panel__item a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: var(--color-navy, #1B2D5B);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.li-map-panel__item a:hover,
.li-map-panel__item a:focus-visible {
    background: rgba(212, 160, 23, 0.12);
    color: var(--color-navy-dark, #0F1B3A);
}

.li-map-panel__empty {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-gray-400, #9CA3AF);
    padding: 1.5rem 0;
    margin: 0;
}

.li-map-panel__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-navy);
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.li-map-panel__close:hover {
    background: rgba(0, 0, 0, 0.08);
}

.li-map-panel__header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* --- Town grid (used on county sub-pages) --- */

.service-area-town-grid {
    list-style: none;
    padding-left: 0 !important;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.service-area-town-grid li {
    padding: 0;
}

.service-area-town-grid li a {
    display: block;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(27, 45, 91, 0.08);
    border-radius: var(--radius-md, 10px);
    color: var(--color-navy, #1B2D5B);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.service-area-town-grid li a:hover {
    background: rgba(212, 160, 23, 0.1);
    border-color: var(--color-gold, #D4A017);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* --- Responsive: stack on mobile --- */

@media (max-width: 767px) {
    .li-map-widget {
        flex-direction: column;
    }

    .li-map-widget.is-open .li-map-panel {
        width: 100%;
        margin-left: 0;
        margin-top: 1rem;
        max-height: 360px;
    }

    .li-map-panel__list {
        max-height: 220px;
    }
}

/* ==========================================================================
   13. CTA Banner Glass Overlay
   ========================================================================== */

.cta-banner-gold {
    position: relative;
}

.cta-banner-gold::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
}

.cta-banner-gold>* {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   14. Service Detail Zigzag
   ========================================================================== */

@media (min-width: 768px) {
    .is-reversed {
        flex-direction: row-reverse;
    }
}

.service-mockup {
    overflow: hidden;
}

.service-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--color-gray-100);
    min-height: 300px;
}

/* ==========================================================================
   15. Stat Items
   ========================================================================== */

.stat-item {
    text-align: center;
}

/* ==========================================================================
   16. Most Popular Badge
   ========================================================================== */

.most-popular-badge,
.full-service-badge {
    display: inline-block !important;
    width: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

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

/* Mobile */
@media (max-width: 639px) {
    .pricing-card-featured {
        transform: scale(1);
    }

    .pricing-columns {
        flex-direction: column !important;
    }

    .industries-grid {
        flex-wrap: wrap !important;
    }

    .industries-grid>.wp-block-column {
        flex-basis: calc(50% - 0.75rem) !important;
    }

    .glass-card,
    .glass-card-dark,
    .glass-card-featured {
        border-radius: var(--radius-md);
    }

    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Tablet */
@media (min-width: 640px) and (max-width: 1023px) {
    .industries-grid>.wp-block-column {
        flex-basis: calc(33.333% - 1rem) !important;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

/* ==========================================================================
   17. SVG Icon Containers
   ========================================================================== */

.service-icon,
.industry-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.industry-icon {
    margin-bottom: 0.75rem;
}

.star-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   18. Hero Trust Indicators
   ========================================================================== */

.hero-trust-indicators {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: var(--wp--preset--spacing--50, 2rem);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
}

/* ==========================================================================
   19. Glass Ghost Button (Hero secondary CTA)
   ========================================================================== */

.glass-ghost-btn .wp-block-button__link {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.glass-ghost-btn .wp-block-button__link:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   20. Hero CTA Glow
   ========================================================================== */

.hero-cta-primary .wp-block-button__link {
    box-shadow: 0 4px 24px rgba(212, 160, 23, 0.35);
    transition: all 0.3s ease;
}

.hero-cta-primary .wp-block-button__link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(212, 160, 23, 0.5);
}

@media print {

    .site-header,
    .site-footer,
    .site-footer-wave,
    .scroll-to-top,
    .cta-banner-gold,
    .cta-banner-navy,
    .carousel-dots {
        display: none !important;
    }

    .glass-card,
    .glass-card-dark,
    .glass-card-featured {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}