/* 
 * Service Page Styles
 * Styles for the Service page template
 */

.service-detail {
    padding: 2rem 0;
}

.service-detail__grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.service-detail__content h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--c-fg);
}

.service-detail__content h3 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin: 2rem 0 1rem;
    color: var(--c-fg);
}

/* Service header with subtitle and price */
.service-detail__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.service-detail__subtitle {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    color: var(--c-accent);
    margin: 0;
    flex: 1;
}

.service-detail__price-prefix {
    display: inline-block;
    font-size: clamp(0.9rem, 1.6vw, 1rem);
    font-weight: 400;
    color: var(--c-fg-light);
    vertical-align: middle;
    margin-right: -1rem;
}

.service-detail__price {
    display: inline-block;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 700;
    padding: 0.5rem 1rem;
    background-color: var(--c-accent);
    border-radius: 4px;
    margin-left: 1rem;
}

.service-detail__price-note {
    font-size: clamp(0.9rem, 1.8vw, 1rem)!important;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    color: var(--c-fg-light);
}

.service-detail__intro {
    font-size: clamp(1.15rem, 3vw, 1.3rem)!important;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--c-fg);
    font-weight: 500;
}

.service-detail__note {
    font-size: clamp(0.9rem, 1.8vw, 1rem)!important;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
}

.service-detail__list {
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.service-detail__list li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.service-detail__cta {
    margin-top: 2rem;
}

.service-detail__cta .btn {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
}

.service-detail__cta .btn-primary:hover {
    background-color: #1a1a1a;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Sidebar styles */
.service-detail__sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.service-detail__card {
    background-color: var(--c-surface);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px var(--button-shadow);
}

/* Common styles for cards with icon backgrounds */
.service-detail__card--benefits,
.service-detail__card--process {
    position: relative;
    overflow: hidden;
}

/* Common icon overlay styles */
.service-detail__card--benefits::after,
.service-detail__card--process::after {
    content: '';
    position: absolute;
    bottom: -65%;
    left: -25%;
    width: 150%;
    height: 150%;
    background-repeat: no-repeat;
    background-position: center top;
    background-size: contain;
    z-index: 1;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
}

/* Common content z-index */
.service-detail__card--benefits h3,
.service-detail__card--benefits li,
.service-detail__card--process h3,
.service-detail__card--process li,
.service-detail__card--process ol {
    position: relative;
    z-index: 2;
}

/* Green benefits card with circle icon */
.service-detail__card--benefits:not(.gsw-service--benefits) {
    background-color: var(--c-accent);
}

.service-detail__card--benefits::after {
    background-image: url('../images/circle-icon.svg');
    opacity: 0.3;
}

.service-detail__card--benefits h3,
.service-detail__card--benefits li {
    color: #000;
}

/* Process card with black background and star icon */
.service-detail__card--process:not(.gsw-service--process) {
    background-color: #141414;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.service-detail__card--process::after {
    background-image: url('../images/star-icon.svg');
    opacity: 0.2;
}

/* Custom styles for Green Starter Website cards */
.service-detail__card.gsw-service--process {
    background-color: transparent !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-detail__card.gsw-service--benefits {
    background-color: transparent !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-detail__card.gsw-service--process:hover,
.service-detail__card.gsw-service--benefits:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Fix text colors for transparent backgrounds */
.service-detail__card.gsw-service--process h3,
.service-detail__card.gsw-service--process .price-amount,
.service-detail__card.gsw-service--process .price-period,
.service-detail__card.gsw-service--process .setup-fee,
.service-detail__card.gsw-service--process .feature-list li {
    color: var(--c-fg);
}

.service-detail__card.gsw-service--benefits h3,
.service-detail__card.gsw-service--benefits .price-amount,
.service-detail__card.gsw-service--benefits .price-period,
.service-detail__card.gsw-service--benefits .setup-fee,
.service-detail__card.gsw-service--benefits .feature-list li {
    color: var(--c-fg);
}

.service-detail__card.gsw-service--process::after {
    background-image: url('../images/star-icon-grey.svg');
    opacity: 1;
}

.service-detail__card.gsw-service--benefits::after {
    background-image: url('../images/star-icon-grey.svg');
    opacity: 1;
}

.service-detail__card--process h3,
.service-detail__card--process li,
.service-detail__card--process ol {
    color: #fff;
}

/* Base card heading styles */
.service-detail__card h3 {
    font-size: 1.3rem;
    margin: 1rem 0;
}

.service-detail__benefits,
.service-detail__process {
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.service-detail__benefits li,
.service-detail__process li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* Related services section */
.related-services {
    padding: 0 0 5rem;
    width: 100%;
}

.related-services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

/* Specific styles for Other Services cards */
.related-services .service-card__header-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Override the default margin for icons in related services */
.related-services .service-card__icon {
    margin-bottom: 0;
    flex-shrink: 0;
}

/* Override margin for headers in related services */
.related-services .service-card__header {
    margin-bottom: 0;
}

/* Specific size for icons in Other Services section */
.related-services .service-card__icon img {
    width: 60px;
    height: 60px;
    display: block;
}

.section-header {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Mobile pricing boxes base styling */
.mobile-pricing-boxes {
    display: none; /* Hidden by default */
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

/* Ribbon styling using pseudo-elements */
/* Make sure cards have position relative for absolute positioning of ribbons */
.service-detail__card {
    position: relative;
    overflow: hidden;
}

/* Banner styling for pricing boxes */
.gsw-service--benefits,
.gsw-service--process {
    padding-top: 45px; /* Make room for the banner */
    border-top-left-radius: 10px !important;
    border-top-right-radius: 10px !important;
    overflow: hidden !important; /* Fix star icon overflow */
}

/* Add margin below the ribbon */
.gsw-service--benefits .pricing-header,
.gsw-service--process .pricing-header {
    margin-top: 25px; /* Space between ribbon and content */
}

/* Monthly Plan Box Banner - Ongoing Support */
.gsw-service--benefits::before {
    content: 'ALL-INCLUSIVE';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: #000000; 
    color: #fff;
    padding: 15px 0 15px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    z-index: 10;
    text-transform: uppercase;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 55% 100%, 45% 100%, 0 70%);
    height: 25px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    background-image: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.1) 100%);
    /* Fix for border radius mismatch */
    border: none;
    margin-top: -1px;
}

/* One-Off Plan Box Banner - Full Ownership */
.gsw-service--process::before {
    content: 'NO MONTHLY FEES';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: #000000; 
    color: #fff;
    padding: 15px 0 15px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    z-index: 10;
    text-transform: uppercase;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 55% 100%, 45% 100%, 0 70%);
    height: 25px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    background-image: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.1) 100%);
    /* Fix for border radius mismatch */
    border: none;
    margin-top: -1px;
}

/* Plan Comparison Styling */
.plan-comparison {
    margin: 2rem 0;
}

.plan-comparison__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Hide mobile-only elements on desktop */
@media (min-width: 769px) {
    .plan-comparison__feature-group {
        display: contents;
    }
    
    .plan-comparison__values-container {
        display: contents;
    }
    
    .plan-comparison__value-header {
        display: none;
    }
}

.plan-comparison__header {
    background-color: #000000;
    color: #ffffff;
    padding: 1rem;
    font-weight: 700;
    text-align: center;
    font-size: 1.1rem;
}

/* Specific colors for plan headers */
.plan-comparison__grid .plan-comparison__header:nth-of-type(2) {
    background-color: #7DED0B; 
    color: #000000;
}

.plan-comparison__grid .plan-comparison__header:nth-of-type(3) {
    background-color: #7DED0B; 
    color: #000000;
}

.plan-comparison__feature {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.plan-comparison__value {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.plan-comparison__grid > div:nth-child(3n+2) {
    background-color: rgba(255, 255, 255, 0.95);
}

.plan-comparison__grid > div:nth-child(3n+3) {
    background-color: rgba(255, 255, 255, 0.95);
}

/* FAQ Accordion Styling */
.faq-accordion {
    margin: 2rem 0;
}

.faq-accordion__item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.95);
    border-left: 3px solid #7DED06; /* Lime green accent */
}

.faq-accordion__question {
    padding: 1.25rem;
    font-family: 'FormaDJR', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-weight: 600;
    font-size: clamp(1.15rem, 3vw, 1.25rem);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    width: 100%;
    text-align: left;
    background-color: transparent;
    transition: all 0.3s ease;
    color: #000;
}

.faq-accordion__question:hover {
    background-color: rgba(125, 237, 6, 0.2); /* Lime green background at 20% opacity on hover */
}

.faq-accordion__question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.faq-accordion__item.active .faq-accordion__question {
    background-color: rgba(125, 237, 6, 0.2); /* Light lime green background at 20% opacity for active question */
}

.faq-accordion__item.active .faq-accordion__question::after {
    content: '−';
    color: #7DED06; /* Lime green accent */
}

.faq-accordion__answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1.25rem 0!important;
    font-size: clamp(1.1rem, 3vw, 1.22rem);
    line-height: 1.5;
    opacity: 0;
    transform: translateY(-10px);
}

.faq-accordion__item.active .faq-accordion__answer {
    max-height: 1000px;
    padding: 1rem 1.25rem 0.25rem!important;
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Standard responsive layout for all service pages */
    .service-detail__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Responsive plan comparison */
    .plan-comparison__grid {
        display: flex;
        flex-direction: column;
    }
    
    /* Create grouped rows for each feature */
    .plan-comparison__grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Group each feature with its values */
    .plan-comparison__feature-group {
        display: grid;
        grid-template-columns: 1fr;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: none;
    }
    
    /* Style the feature header */
    .plan-comparison__feature {
        background-color: #000000;
        color: #ffffff;
        text-align: center;
        padding: 0.75rem;
        font-size: 1rem;
        font-weight: 700;
        grid-column: 1 / -1;
    }
    
    /* Create a flex container for plan values */
    .plan-comparison__values-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    
    /* Style plan headers in mobile view */
    .plan-comparison__value-header {
        font-weight: 700;
        padding: 0.75rem;
        text-align: center;
    }
    
    .plan-comparison__value-header--monthly {
        background-color: #7DED0B;
        color: #000000;
    }
    
    .plan-comparison__value-header--oneoff {
        background-color: #7DED0B;
        color: #000000;
    }
    
    /* Style the values */
    .plan-comparison__value {
        padding: 0.75rem;
        text-align: center;
    }
    
    /* Add top spacing between feature groups */
    .plan-comparison__feature-group + .plan-comparison__feature-group {
        margin-top: 1rem;
    }
    
    /* Hide the original headers on mobile */
    .plan-comparison__header {
        display: none;
    }
    
    .related-services__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Show mobile pricing boxes on mobile */
    .mobile-pricing-boxes {
        display: grid;
    }
    
    /* Hide the original sidebar on mobile for Green Starter Websites */
    .green-starter-websites .service-detail__sidebar {
        display: none;
    }
}

/* Desktop styles */
@media (min-width: 769px) {
    /* Hide mobile pricing boxes on desktop */
    .mobile-pricing-boxes {
        display: none;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    /* Improve header layout on mobile */
    .service-detail__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    /* Fix price prefix and price alignment */
    .service-detail__price-prefix {
        display: block;
        margin-bottom: 0.25rem;
        margin-right: 0;
    }
    
    .service-detail__price {
        margin-left: 0;
    }
}
