/**
 * Service Page Styles
 * Beautiful design for About, Contact, Cooperation, Policy pages
 *
 * @package EHF
 * @since 1.6.2
 */

/* ==========================================================================
   Page Hero Section
   ========================================================================== */

.service-page-hero {
    position: relative;
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
    background: linear-gradient(135deg, #FAF7F4 0%, #F5F1EC 40%, #EDE6DC 100%);
    text-align: center;
    overflow: hidden;
}

.service-page-hero::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(209, 183, 159, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.service-page-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.service-page-hero .container {
    position: relative;
    z-index: 1;
}

.service-page-hero__label {
    display: inline-block;
    font-family: var(--ehf-font-family);
    font-size: var(--ehf-font-size-xs);
    font-weight: var(--ehf-font-weight-semibold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ehf-primary-color);
    margin-bottom: var(--ehf-spacing-md);
}

.service-page-hero__title {
    font-family: var(--ehf-font-family-headings);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: var(--ehf-font-weight-bold);
    color: var(--ehf-gray-900);
    line-height: 1.15;
    margin-bottom: var(--ehf-spacing-lg);
}

.service-page-hero__divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--ehf-primary-color), var(--ehf-primary-hover));
    margin: 0 auto;
}

/* ==========================================================================
   Service Page Content Area
   ========================================================================== */

.service-page-content {
    padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
}

.service-page-content .container {
    max-width: 900px;
}

/* Entry content typography */
.service-page-content .entry-content {
    font-size: var(--ehf-font-size-base);
    line-height: 1.8;
    color: var(--ehf-text-color);
}

.service-page-content .entry-content > p:first-child {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.8;
    color: var(--ehf-gray-700);
}

/* Headings inside content */
.service-page-content .entry-content h1 {
    font-family: var(--ehf-font-family-headings);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: var(--ehf-font-weight-bold);
    color: var(--ehf-gray-900);
    margin-top: var(--ehf-spacing-3xl);
    margin-bottom: var(--ehf-spacing-lg);
    line-height: 1.2;
}

.service-page-content .entry-content h2,
.service-page-content .entry-content .wp-block-heading:where(h2) {
    font-family: var(--ehf-font-family-headings);
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: var(--ehf-font-weight-bold);
    color: var(--ehf-gray-900);
    margin-top: var(--ehf-spacing-3xl);
    margin-bottom: var(--ehf-spacing-md);
    padding-bottom: var(--ehf-spacing-sm);
    border-bottom: 2px solid var(--ehf-primary-light);
    line-height: 1.3;
}

.service-page-content .entry-content h3,
.service-page-content .entry-content .wp-block-heading:where(h3) {
    font-family: var(--ehf-font-family-headings);
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    font-weight: var(--ehf-font-weight-semibold);
    color: var(--ehf-gray-800);
    margin-top: var(--ehf-spacing-2xl);
    margin-bottom: var(--ehf-spacing-sm);
    line-height: 1.35;
}

.service-page-content .entry-content h4 {
    font-family: var(--ehf-font-family);
    font-size: var(--ehf-font-size-base);
    font-weight: var(--ehf-font-weight-semibold);
    color: var(--ehf-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--ehf-spacing-xl);
    margin-bottom: var(--ehf-spacing-sm);
}

/* Paragraphs */
.service-page-content .entry-content p {
    margin-bottom: var(--ehf-spacing-md);
    color: var(--ehf-text-color);
}

/* Links */
.service-page-content .entry-content a {
    color: var(--ehf-primary-dark);
    text-decoration: underline;
    text-decoration-color: rgba(209, 183, 159, 0.4);
    text-underline-offset: 3px;
    transition: all var(--ehf-transition-fast);
}

.service-page-content .entry-content a:hover {
    color: var(--ehf-primary-hover);
    text-decoration-color: var(--ehf-primary-color);
}

/* ==========================================================================
   Lists
   ========================================================================== */

.service-page-content .entry-content ul,
.service-page-content .entry-content ol {
    margin: var(--ehf-spacing-md) 0;
    padding-left: 0;
}

.service-page-content .entry-content ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: var(--ehf-spacing-sm);
    line-height: 1.7;
}

.service-page-content .entry-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    background-color: var(--ehf-primary-color);
    transform: rotate(45deg);
}

.service-page-content .entry-content ol {
    counter-reset: list-counter;
}

.service-page-content .entry-content ol li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: var(--ehf-spacing-sm);
    counter-increment: list-counter;
    line-height: 1.7;
}

.service-page-content .entry-content ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--ehf-font-family-headings);
    font-weight: var(--ehf-font-weight-bold);
    font-size: var(--ehf-font-size-sm);
    color: var(--ehf-primary-color);
    width: 1.4rem;
    text-align: center;
}

/* Nested lists */
.service-page-content .entry-content li ul,
.service-page-content .entry-content li ol {
    margin-top: var(--ehf-spacing-xs);
    margin-bottom: var(--ehf-spacing-xs);
}

.service-page-content .entry-content li li::before {
    background-color: var(--ehf-gray-400);
    width: 5px;
    height: 5px;
}

/* ==========================================================================
   Team Member Cards (wp-block-media-text)
   ========================================================================== */

.service-page-content .wp-block-media-text {
    margin: var(--ehf-spacing-xl) 0;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    background: var(--ehf-white) !important;
    border: 1px solid var(--ehf-border-light);
    box-shadow: var(--ehf-shadow-sm);
    transition: all var(--ehf-transition-normal);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: center;
}

.service-page-content .wp-block-media-text:hover {
    box-shadow: var(--ehf-shadow-lg);
    border-color: var(--ehf-primary-light);
    transform: translateY(-2px);
}

.service-page-content .wp-block-media-text.has-media-on-the-right {
    grid-template-columns: 1fr 1fr;
}

.service-page-content .wp-block-media-text__media {
    overflow: hidden;
}

.service-page-content .wp-block-media-text__media img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 1;
    transition: transform var(--ehf-transition-slow);
}

.service-page-content .wp-block-media-text:hover .wp-block-media-text__media img {
    transform: scale(1.03);
}

.service-page-content .wp-block-media-text__content {
    padding: 0;
}

.service-page-content .wp-block-media-text__content h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    margin-top: 0;
    padding-bottom: 0;
    border-bottom: none;
    color: var(--ehf-gray-900);
}

.service-page-content .wp-block-media-text__content p {
    font-size: var(--ehf-font-size-sm);
    line-height: 1.75;
    color: var(--ehf-gray-600);
}

/* Mobile: stack media-text */
@media (max-width: 767px) {
    .service-page-content .wp-block-media-text,
    .service-page-content .wp-block-media-text.has-media-on-the-right {
        grid-template-columns: 1fr;
    }

    .service-page-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media {
        order: -1;
    }

    .service-page-content .wp-block-media-text__media img {
        max-width: 280px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Section Dividers (before h2 headings for team roles)
   ========================================================================== */

.service-page-content .entry-content > .wp-block-heading:where(h3) {
    display: inline-block;
    font-family: var(--ehf-font-family);
    font-size: var(--ehf-font-size-xs);
    font-weight: var(--ehf-font-weight-semibold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ehf-primary-color);
    margin-top: var(--ehf-spacing-3xl);
    margin-bottom: var(--ehf-spacing-xs);
    padding-bottom: 0;
    border-bottom: none;
}

/* First h2 in content - role heading like Founder and Chief Editor */
.service-page-content .entry-content > .wp-block-heading:where(h2):not(.wp-block-media-text__content *) {
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    text-align: center;
    margin-top: var(--ehf-spacing-4xl);
    padding-bottom: var(--ehf-spacing-sm);
    border-bottom: none;
    position: relative;
}

.service-page-content .entry-content > .wp-block-heading:where(h2):not(.wp-block-media-text__content *)::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--ehf-primary-color);
    margin: var(--ehf-spacing-sm) auto 0;
}

/* ==========================================================================
   Contact Form Styles
   ========================================================================== */

.service-page-content .wpcf7 {
    margin-top: var(--ehf-spacing-2xl);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background: var(--ehf-gray-50);
    border: 1px solid var(--ehf-border-light);
}

.service-page-content .wpcf7 label {
    display: block;
    font-size: var(--ehf-font-size-sm);
    font-weight: var(--ehf-font-weight-medium);
    color: var(--ehf-gray-700);
    margin-bottom: var(--ehf-spacing-xs);
}

.service-page-content .wpcf7 input[type=text],
.service-page-content .wpcf7 input[type=email],
.service-page-content .wpcf7 input[type=tel],
.service-page-content .wpcf7 textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--ehf-border-color);
    background: var(--ehf-white);
    font-family: var(--ehf-font-family);
    font-size: var(--ehf-font-size-base);
    color: var(--ehf-text-color);
    transition: border-color var(--ehf-transition-fast), box-shadow var(--ehf-transition-fast);
}

.service-page-content .wpcf7 input:focus,
.service-page-content .wpcf7 textarea:focus {
    outline: none;
    border-color: var(--ehf-primary-color);
    box-shadow: 0 0 0 3px rgba(209, 183, 159, 0.15);
}

.service-page-content .wpcf7 input[type=submit] {
    display: inline-block;
    padding: 0.875rem 2.5rem;
    background: var(--ehf-primary-color);
    color: var(--ehf-white);
    font-family: var(--ehf-font-family);
    font-size: var(--ehf-font-size-sm);
    font-weight: var(--ehf-font-weight-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 2px solid var(--ehf-primary-color);
    cursor: pointer;
    transition: all var(--ehf-transition-fast);
}

.service-page-content .wpcf7 input[type=submit]:hover {
    background: var(--ehf-primary-hover);
    border-color: var(--ehf-primary-hover);
}

/* ==========================================================================
   Blockquotes & Highlights
   ========================================================================== */

.service-page-content .entry-content blockquote {
    margin: var(--ehf-spacing-xl) 0;
    padding: var(--ehf-spacing-lg) var(--ehf-spacing-xl);
    border-left: 3px solid var(--ehf-primary-color);
    background: var(--ehf-primary-light);
    font-style: italic;
    color: var(--ehf-gray-700);
}

.service-page-content .entry-content blockquote p {
    margin-bottom: 0;
}

/* Strong text */
.service-page-content .entry-content strong {
    font-weight: var(--ehf-font-weight-semibold);
    color: var(--ehf-gray-800);
}

/* ==========================================================================
   Post Thumbnail on Pages
   ========================================================================== */

.service-page-content .post-thumbnail {
    margin-bottom: var(--ehf-spacing-2xl);
    overflow: hidden;
}

.service-page-content .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Edit Link
   ========================================================================== */

.service-page-content .entry-footer {
    margin-top: var(--ehf-spacing-3xl);
    padding-top: var(--ehf-spacing-lg);
    border-top: 1px solid var(--ehf-border-light);
}

.service-page-content .edit-link a {
    font-size: var(--ehf-font-size-xs);
    color: var(--ehf-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   Legal Pages - Policy Specific
   ========================================================================== */

.page-cookie-policy .service-page-content .container,
.page-privacy-policy .service-page-content .container {
    max-width: 800px;
}

.page-cookie-policy .service-page-content .entry-content h1,
.page-privacy-policy .service-page-content .entry-content h1 {
    display: none; /* Hide duplicate H1, shown in hero */
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 767px) {
    .service-page-hero {
        padding: clamp(2rem, 6vw, 3rem) 0 clamp(1.5rem, 4vw, 2.5rem);
    }

    .service-page-content .wp-block-media-text {
        padding: var(--ehf-spacing-lg);
    }

    .service-page-content .entry-content > .wp-block-heading:where(h2):not(.wp-block-media-text__content *) {
        text-align: left;
    }

    .service-page-content .entry-content > .wp-block-heading:where(h2):not(.wp-block-media-text__content *)::after {
        margin: var(--ehf-spacing-sm) 0 0;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .service-page-content .container {
        max-width: 720px;
    }
}

@media (min-width: 1024px) {
    .service-page-content .wp-block-media-text.alignwide {
        margin-left: calc(-50px);
        margin-right: calc(-50px);
        max-width: calc(100% + 100px);
    }
}
