/*
Theme Name: WriterClinic Theme
Description: A clean, modern, conversion-focused WordPress theme for WriterClinic
Version: 1.1
Author: WriterClinic
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Reset & Variables
# Global Styles
# Typography
# Buttons
# Layout & Container
# Header & Navigation
# Hero Section
# What We Create Section
# How It Works Section
# Pricing Section
# Testimonials Section
# FAQ Section
# Application Form Section
# Footer
# Utility Classes
# Responsive Design
# Site Popup
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Reset & Variables
--------------------------------------------------------------*/
:root {
    --color-accent: #2563eb;
    --color-accent-dark: #1d4ed8;
    --color-dark: #111827;
    --color-secondary: #4b5563;
    --color-gray-light: #f3f4f6;
    --color-gray-border: #e5e7eb;
    --color-light: #ffffff;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    --font-serif: 'Georgia', 'Times New Roman', serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: var(--font-sans);
    line-height: 1.7;
    color: var(--color-dark);
    background-color: var(--color-light);
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

#page {
    position: relative;
    overflow-x: hidden;
}


/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.75rem); /* Responsive font size */
}

h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 2rem;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    color: var(--color-secondary);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--color-accent-dark);
}

/*--------------------------------------------------------------
# Buttons
--------------------------------------------------------------*/
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-light);
}

.btn-primary:hover {
    background-color: var(--color-accent-dark);
    color: var(--color-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-secondary:hover {
    background-color: var(--color-accent);
    color: var(--color-light);
}


/*--------------------------------------------------------------
# Layout & Container
--------------------------------------------------------------*/
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0; /* Reduced vertical padding */
    position: relative;
    border-bottom: 1px solid var(--color-gray-border);
}

.section:last-child {
    border-bottom: none;
}

.section-alt {
    background-color: var(--color-gray-light);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-intro {
    text-align: center;
    max-width: 600px;
    margin: -2rem auto 3rem;
    font-size: 1.125rem;
    color: var(--color-secondary);
}

/* Old classes to be replaced */
.features-grid, .steps-grid, .testimonials-grid {
    display: grid;
    gap: 2rem;
}


/*--------------------------------------------------------------
# Header & Navigation
--------------------------------------------------------------*/
.site-header {
    position: static;
    padding: 2rem 0;
    background-color: #ffffff;
    border-bottom: 1px solid var(--color-gray-border);
}

.site-header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.site-logo a {
    display: block;
}

.site-logo img {
    max-height: none;
    width: auto;
    filter: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
}

.main-nav a {
    color: var(--color-secondary);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.main-nav .menu-item-button a {
    padding: 0.875rem 1.75rem;
}

.main-nav li.current-menu-item > a {
    color: var(--color-accent);
    font-weight: 600;
}


/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.site-footer {
    background-color: var(--color-gray-light);
    color: var(--color-secondary);
    padding: 3rem 0;
    text-align: center;
}

.footer-content {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-gray-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo img {
    max-height: 40px;
    width: auto;
    filter: grayscale(1) brightness(0.5);
}

.footer-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: var(--color-secondary);
    font-weight: 500;
}

.footer-nav a:hover {
    color: var(--color-accent);
}

.footer-bottom p {
    font-size: 0.875rem;
    margin: 0;
}

@media (min-width: 768px) {
    .site-footer {
        text-align: left;
    }
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}


/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
.hero {
    padding-top: 4rem; /* Space for sticky header */
    padding-bottom: 4rem;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 3rem;
    text-align: center;
}

@media (min-width: 992px) {
    .hero-content {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }
}

.hero-text h1 {
    margin-bottom: 1.5rem;
}

.hero-text p {
    max-width: 500px;
    margin-bottom: 2rem;
    font-size: 1.25rem;
}

.pill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    justify-content: center;
}

@media (min-width: 992px) {
    .pill-badges {
        justify-content: flex-start;
    }
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background-color: var(--color-gray-light);
    color: var(--color-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 992px) {
    .hero-buttons {
        justify-content: flex-start;
    }
}

.hero-visual {
    perspective: 1500px;
}

.pitch-deck-mockup {
    transform-style: preserve-3d;
    transform: rotateY(-30deg) rotateX(15deg);
    position: relative;
    width: 80%;
    margin: 0 auto;
    height: 300px;
}

.mockup-page {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--color-light);
    border: 1px solid var(--color-gray-border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-gray-border);
}

.mockup-page.page-1 {
    transform: translateZ(0);
}
.mockup-page.page-2 {
    transform: translateZ(-20px) translateX(20px) scale(0.95);
}
.mockup-page.page-3 {
    transform: translateZ(-40px) translateX(40px) scale(0.9);
}

/* Intro animation */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.hero-text h1.fade-in { animation-delay: 0.2s; }
.hero-text p.fade-in { animation-delay: 0.4s; }
.pill-badges.fade-in { animation-delay: 0.6s; }
.hero-buttons.fade-in { animation-delay: 0.8s; }
.hero-visual.fade-in { animation-delay: 1s; }


@keyframes fadeIn {
    to {
        opacity: 1;
    }
}


/*--------------------------------------------------------------
# What We Create Section
--------------------------------------------------------------*/
.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .process-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.process-card {
    background-color: var(--color-light);
    border: 1px solid var(--color-gray-border);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
}

.process-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    border-top-color: var(--color-accent);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.process-card h3 {
    margin-bottom: 1rem;
}

.process-card p {
    font-size: 1rem;
    margin-bottom: 0;
}


/*--------------------------------------------------------------
# How It Works Section
--------------------------------------------------------------*/
.timeline {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

@media (min-width: 768px) {
    .timeline::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--color-gray-border);
        transform: translateY(-50%);
    }
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .timeline {
        display: flex;
        justify-content: space-between;
    }
    .timeline-item {
        width: 23%;
        flex-direction: column;
        align-items: center;
        text-align: center;
        position: relative;
        margin-bottom: 0;
    }
}

.timeline-step {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background-color: var(--color-accent);
    color: var(--color-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 3px solid var(--color-light);
    box-shadow: 0 0 0 3px var(--color-accent);
}


@media (min-width: 768px) {
    .timeline-step {
        margin-bottom: 1.5rem;
        background-color: var(--color-light);
        color: var(--color-accent);
        border: 2px solid var(--color-accent);
        box-shadow: none;
        transition: all 0.3s ease;
    }
    .timeline-item:hover .timeline-step {
        background-color: var(--color-accent);
        color: var(--color-light);
        transform: scale(1.1);
    }
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 1rem;
    margin-bottom: 0;
}


/*--------------------------------------------------------------
# Pricing Section
--------------------------------------------------------------*/
.pricing-panel {
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--color-light);
    border: 1px solid var(--color-gray-border);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.price-display {
    margin-bottom: 2rem;
}

.price-amount {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-dark);
}

.price-period {
    font-size: 1.125rem;
    color: var(--color-secondary);
    font-weight: 500;
}

.inclusions-list {
    list-style: none;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    color: var(--color-secondary);
}

.pricing-panel p {
    margin-bottom: 2rem;
    font-size: 1rem;
}


/*--------------------------------------------------------------
# Testimonials Section
--------------------------------------------------------------*/
.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        align-items: start;
    }
}

.testimonial-card {
    background-color: var(--color-gray-light);
    border-radius: 12px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: "“";
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 8rem;
    font-weight: 700;
    color: rgba(0,0,0,0.04);
    line-height: 1;
    z-index: 1;
}

.testimonial-text {
    font-size: 1.25rem;
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.testimonial-author {
    font-weight: 600;
    color: var(--color-dark);
    position: relative;
    z-index: 2;
}





/*--------------------------------------------------------------
# Application Form Section
--------------------------------------------------------------*/
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--color-light);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

#form-success-message {
    text-align: center;
}

#form-success-message h3 {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-gray-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-full {
    width: 100%;
}

.alternate-contact {
    text-align: center;
    margin-top: 2rem;
}

body.popup-active {
    overflow: hidden;
}

#site-popup.site-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    z-index: 9999 !important;
    display: none; /* hidden by default; JS toggles inline display */
    justify-content: center !important;
    align-items: center !important;
    padding: 1rem;
}

.site-popup-content {
    background-color: var(--color-light);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.popup-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--color-secondary);
    cursor: pointer;
    padding: 0.5rem;
}

.popup-logo {
    margin-bottom: 1.5rem;
}

.popup-logo img {
    max-width: 200px;
    margin: 0 auto;
}

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.popup-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-gray-border);
    border-radius: 8px;
    font-size: 1rem;
}

#popup-form-feedback {
    margin-top: 1rem;
    font-weight: 500;
}

#popup-form-feedback.success {
    color: #16a34a; /* Green */
}

#popup-form-feedback.error {
    color: #dc2626; /* Red */
}