/* ==========================================
   BLOCKS.CSS - Frontend Styles for Custom Blocks
   Place in: assets/css/blocks.css
   ========================================== */

/* These styles are already defined in your main.css
   This file is for any additional block-specific styles */

.wp-block-hihat-service-card {
    margin-bottom: var(--beat-8);
}

.wp-block-hihat-metric-card {
    margin-bottom: var(--beat-8);
}

.wp-block-hihat-process-step {
    margin-bottom: var(--beat-8);
}

.wp-block-hihat-faq-item {
    margin-bottom: 0;
}

.wp-block-hihat-hero {
    margin: 0;
    padding: 0;
}

.wp-block-hihat-section-header {
    margin-bottom: var(--beat-16);
}

/* ==========================================
   BLOCKS-EDITOR.CSS - Editor Styles
   Place in: assets/css/blocks-editor.css
   ========================================== */

/* Import main theme colors for editor */
.hihat-service-card-editor,
.hihat-metric-editor,
.hihat-step-editor,
.hihat-faq-editor,
.hihat-hero-editor,
.hihat-section-header-editor {
    padding: var(--beat-4);
    border: 2px dashed #ddd;
    margin: var(--beat-4) 0;
}

.hihat-service-card-editor .service-card,
.hihat-metric-editor .metric,
.hihat-step-editor .step,
.hihat-faq-editor .faq__item,
.hihat-hero-editor .hero,
.hihat-section-header-editor .section-header {
    border: none;
    margin: 0;
}

/* Make editor inputs more visible */
.hihat-service-card-editor input[type="text"],
.hihat-step-editor input[type="text"],
.hihat-faq-editor input[type="text"],
.hihat-hero-editor input[type="text"],
.hihat-section-header-editor input[type="text"] {
    background-color: #f5f5f5;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 4px 0;
    width: 100%;
}

/* Service card features list in editor */
.hihat-service-card-editor .service-card__list li {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.hihat-service-card-editor .service-card__list li input {
    flex: 1;
}

/* Button styles in editor */
.hihat-service-card-editor .components-button,
.hihat-step-editor .components-button,
.hihat-faq-editor .components-button,
.hihat-hero-editor .components-button,
.hihat-section-header-editor .components-button {
    margin-top: 8px;
}

/* Hero editor specific */
.hihat-hero-editor .hero {
    min-height: auto !important;
    padding: var(--beat-8);
}

.hihat-hero-editor .hero__actions span {
    pointer-events: none;
}

/* FAQ editor - keep details open */
.hihat-faq-editor details {
    margin: 0;
}

.hihat-faq-editor summary {
    cursor: default;
    list-style: none;
}

.hihat-faq-editor summary::after {
    display: none;
}

/* Section header editor */
.hihat-section-header-editor .section-header {
    max-width: 100%;
}

/* Inspector controls styling */
.components-panel__body.is-opened {
    padding: 16px;
}

/* Color indicators in editor */
.text-accent { color: #D4FF00; }
.text-blue { color: #0057FF; }
.text-coral { color: #FF4F00; }
.text-violet { color: #8A2BE2; }

/* ==========================================
   ADDITIONAL STYLING FOR CASE STUDIES
   ========================================== */

/* Case Studies Grid */
.case-studies__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--beat-8);
}

/* Case Study Card */
.case-study-card {
    background-color: var(--color-base);
    border: 1px solid var(--color-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.case-study-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
}

.case-study-card__image {
    height: 240px;
    overflow: hidden;
    background-color: var(--color-darker);
}

.case-study-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.case-study-card:hover .case-study-card__image img {
    transform: scale(1.05);
}

.case-study-card__content {
    padding: var(--beat-8);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.case-study-card__industry {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: var(--beat-2);
    display: inline-block;
}

.case-study-card__title {
    font-size: var(--font-size-md);
    margin-bottom: var(--beat-4);
    line-height: 1.3;
}

.case-study-card__title a {
    color: var(--color-text);
    transition: color 0.2s ease;
}

.case-study-card__title a:hover {
    color: var(--color-accent);
}

.case-study-card__excerpt {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--beat-4);
    flex-grow: 1;
    line-height: 1.6;
}

.case-study-card__metric {
    margin: var(--beat-4) 0;
    padding: var(--beat-4);
    background-color: var(--color-darker);
    border-radius: var(--border-radius);
    text-align: center;
}

.case-study-card__metric .metric__value {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: var(--beat-2);
    line-height: 1;
}

.case-study-card__metric .metric__label {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Single Case Study */
.case-study-hero {
    padding: var(--beat-16) 0;
}

.case-study-featured-image {
    margin: var(--beat-8) 0;
}

.case-study-featured-image img {
    width: 100%;
    border-radius: var(--border-radius);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--beat-8);
    padding: var(--beat-8);
    background-color: var(--color-darker);
    border-radius: var(--border-radius);
}

.overview-item__label {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: var(--beat-2);
    font-weight: 600;
}

.overview-item__value {
    font-size: var(--font-size-md);
    color: var(--color-text);
    font-weight: 500;
}

.overview-item__value a {
    color: var(--color-accent);
    text-decoration: underline;
}

.case-study-section {
    padding: var(--beat-16) 0;
}

.case-study-content {
    max-width: 800px;
    font-size: var(--font-size-md);
    line-height: 1.7;
}

.case-study-content p {
    margin-bottom: var(--beat-4);
}

.case-study-content ul,
.case-study-content ol {
    margin-bottom: var(--beat-4);
    padding-left: var(--beat-8);
}

.case-study-content ul li,
.case-study-content ol li {
    margin-bottom: var(--beat-2);
    color: var(--color-text-muted);
}

.case-study-results {
    background-color: var(--color-darker);
}

.related-case-studies {
    padding: var(--beat-16) 0;
    background-color: var(--color-base);
}

/**
 * CASE STUDIES BLOCK STYLES
 * Add this CSS to your /assets/css/blocks.css file
 */

/* Case Studies Block */
.case-studies-block {
    padding: 4rem 0;
}

.case-studies-block__header {
    text-align: center;
    margin-bottom: 3rem;
}

.case-studies-block__header .section-title {
    margin-bottom: 1rem;
}

.case-studies-block__header .section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted, #9CA3AF);
    max-width: 600px;
    margin: 0 auto;
}

.case-studies__grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.case-studies__grid--1-col {
    grid-template-columns: 1fr;
}

.case-studies__grid--2-col {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.case-studies__grid--3-col {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.case-studies__grid--4-col {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

@media (min-width: 768px) {
    .case-studies__grid--2-col {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .case-studies__grid--3-col {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .case-studies__grid--4-col {
        grid-template-columns: repeat(4, 1fr);
    }
}

.case-study-card {
    display: flex;
    flex-direction: column;
    background: var(--color-secondary, #3D3E42);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-study-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(212, 255, 0, 0.1);
}

.case-study-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.case-study-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-study-card:hover .case-study-card__image img {
    transform: scale(1.05);
}

.case-study-card__content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.case-study-card__industry {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.case-study-card__title {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 600;
}

.case-study-card__title a {
    color: var(--color-text, #F0F2F5);
    text-decoration: none;
    transition: color 0.2s ease;
}

.case-study-card__title a:hover {
    color: var(--color-accent, #D4FF00);
}

.case-study-card__excerpt {
    margin-bottom: 1.5rem;
    color: var(--color-text-muted, #9CA3AF);
    line-height: 1.6;
    flex-grow: 1;
}

.case-study-card__metric {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(212, 255, 0, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(212, 255, 0, 0.1);
}

.case-study-card__metric .metric__value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent, #D4FF00);
    line-height: 1;
}

.case-study-card__metric .metric__label {
    font-size: 0.875rem;
    color: var(--color-text-muted, #9CA3AF);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.case-studies-block__footer {
    text-align: center;
    margin-top: 2rem;
}

.case-studies-block__empty {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-muted, #9CA3AF);
    font-size: 1.125rem;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .case-studies-block {
        padding: 3rem 0;
    }
    
    .case-studies__grid {
        gap: 1.5rem;
    }
    
    .case-studies__grid--2-col,
    .case-studies__grid--3-col,
    .case-studies__grid--4-col {
        grid-template-columns: 1fr;
    }
    
    .case-study-card__content {
        padding: 1.5rem;
    }
    
    .case-study-card__title {
        font-size: 1.25rem;
    }
    
    .case-study-card__metric .metric__value {
        font-size: 2rem;
    }
}

/* Editor-specific styles */
.editor-styles-wrapper .case-studies-block {
    background: var(--color-base, #1A1B1F);
    border-radius: 12px;
    padding: 2rem;
}

.editor-styles-wrapper .case-studies-block__header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(212, 255, 0, 0.1);
}





/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--beat-2);
    margin-top: var(--beat-16);
}

.pagination .page-numbers {
    padding: var(--beat-2) var(--beat-4);
    background-color: var(--color-darker);
    border: 1px solid var(--color-secondary);
    border-radius: var(--border-radius);
    color: var(--color-text);
    transition: all 0.2s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background-color: var(--color-accent);
    color: var(--color-base);
    border-color: var(--color-accent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .case-studies__grid {
        grid-template-columns: 1fr;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .case-study-card__image {
        height: 200px;
    }
}

/* ============================================
   LLM VISIBILITY CHECKER BLOCK STYLES
   Add this to the END of your /assets/css/blocks.css file
   ============================================ */

/* LLM Checker Section */
.llm-checker-section {
    padding: var(--beat-24) 0;
    text-align: center;
    background: var(--color-base);
}

.llm-checker {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--beat-12);
    border: 2px solid var(--color-accent);
    border-radius: 12px;
    background: rgba(26, 27, 31, 0.6);
}

/* Badge */
.llm-checker__badge {
    display: inline-block;
    background: rgba(212, 255, 0, 0.15);
    color: var(--color-accent);
    padding: var(--beat-2) var(--beat-4);
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--beat-6);
    border: 1px solid rgba(212, 255, 0, 0.3);
}

/* Title */
.llm-checker__title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--beat-4);
    color: var(--color-text);
}

/* Subtitle */
.llm-checker__subtitle {
    font-size: var(--font-size-md);
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto var(--beat-12);
    line-height: 1.6;
}

/* Form */
.llm-checker__form {
    display: flex;
    gap: var(--beat-4);
    max-width: 700px;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
}

.llm-checker__input {
    flex: 1;
    padding: var(--beat-4) var(--beat-6);
    background: var(--color-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--color-text);
    font-size: var(--font-size-base);
    font-family: var(--font-main);
    transition: all 0.2s ease;
}

.llm-checker__input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(61, 62, 66, 0.8);
}

.llm-checker__input::placeholder {
    color: var(--color-text-muted);
}

.llm-checker__button {
    white-space: nowrap;
    padding: var(--beat-4) var(--beat-8);
}

/* Loading State */
.llm-checker__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--beat-4);
    padding: var(--beat-16) 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(212, 255, 0, 0.2);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Results */
.llm-checker__results {
    display: flex;
    gap: var(--beat-12);
    align-items: center;
    justify-content: center;
    margin-top: var(--beat-12);
    padding: var(--beat-8);
    background: rgba(61, 62, 66, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Circular Score */
.llm-score {
    position: relative;
    flex-shrink: 0;
}

.llm-score__circle {
    transform: rotate(-90deg);
}

.llm-score__bg {
    fill: none;
    stroke: var(--color-secondary);
    stroke-width: 8;
}

.llm-score__progress {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke 0.3s ease;
}

.llm-score__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.llm-score__value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.llm-score__label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: var(--beat-2);
}

/* Results Content */
.llm-results__content {
    text-align: left;
    flex: 1;
    max-width: 500px;
}

.llm-results__verdict {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--beat-4);
}

.llm-results__message {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: var(--beat-6);
}

.llm-results__cta {
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .llm-checker__form {
        flex-direction: column;
        gap: var(--beat-3);
    }
    
    .llm-checker__input {
        width: 100%;
    }
    
    .llm-checker__button {
        width: 100%;
    }
    
    .llm-checker__results {
        flex-direction: column;
        text-align: center;
        gap: var(--beat-8);
    }
    
    .llm-results__content {
        text-align: center;
    }
    
    .llm-score__circle {
        width: 160px;
        height: 160px;
    }
    
    .llm-score__value {
        font-size: 2.5rem;
    }
}

/* Editor Styles */
.hihat-llm-checker-editor {
    padding: 20px;
    background: #f7f7f7;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

.hihat-llm-checker-editor .llm-checker {
    background: var(--color-base);
    padding: 40px;
    border-radius: 8px;
}

.hihat-llm-checker-editor .llm-checker__form-preview {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

/* ============================================
   LLM CHECKER - INLINE VALIDATION STYLES
   Add this to your /assets/css/blocks.css (replace the form section)
   ============================================ */

/* Form */
.llm-checker__form {
    display: flex;
    gap: var(--beat-4);
    max-width: 700px;
    margin: 0 auto;
    align-items: flex-start;
}

/* Input wrapper for error message positioning */
.llm-checker__input-wrapper {
    flex: 1;
}

.llm-checker__input {
    width: 100%;
    padding: var(--beat-4) var(--beat-6);
    background: var(--color-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--color-text);
    font-size: var(--font-size-base);
    font-family: var(--font-main);
    transition: all 0.2s ease;
}

.llm-checker__input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(61, 62, 66, 0.8);
}

.llm-checker__input::placeholder {
    color: var(--color-text-muted);
}

/* Error state */
.llm-checker__input.has-error {
    border-color: #FF4F00;
    background: rgba(255, 79, 0, 0.05);
}

/* Error message */
.llm-checker__error {
    color: #FF4F00;
    font-size: var(--font-size-sm);
    margin-top: var(--beat-2);
    text-align: left;
    padding: var(--beat-2) var(--beat-3);
    background: rgba(255, 79, 0, 0.1);
    border-left: 3px solid #FF4F00;
    border-radius: 4px;
    display: none;
}

/* Shake animation for validation errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.3s ease-in-out;
}

.llm-checker__button {
    white-space: nowrap;
    padding: var(--beat-4) var(--beat-8);
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .llm-checker__form {
        flex-direction: column;
        gap: var(--beat-3);
    }
    
    .llm-checker__input-wrapper {
        width: 100%;
    }
    
    .llm-checker__button {
        width: 100%;
    }
}

/* ============================================
   LATEST INSIGHTS BLOCK STYLES
   Add this to the END of your /assets/css/blocks.css file
   ============================================ */

/* Insights Block Section */
.insights-block {
    padding: var(--beat-24) 0;
}

/* Insights Grid - matches case studies layout */
.insights__grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 3), 1fr);
    gap: var(--beat-8);
    margin-bottom: var(--beat-12);
}

/* Insight Card - matches case study card */
.insight-card {
    background: var(--color-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(212, 255, 0, 0.1);
}

/* Image */
.insight-card__image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--color-base);
}

.insight-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.insight-card:hover .insight-card__image img {
    transform: scale(1.05);
}

/* Content */
.insight-card__content {
    padding: var(--beat-6);
    display: flex;
    flex-direction: column;
    gap: var(--beat-3);
    flex: 1;
}

/* Category */
.insight-card__category {
    display: inline-block;
    font-size: var(--font-size-xs);
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Date */
.insight-card__date {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* Title */
.insight-card__title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.insight-card__title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.insight-card__title a:hover {
    color: var(--color-accent);
}

/* Excerpt */
.insight-card__excerpt {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* Button */
.insight-card__content .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* Section CTA */
.section-cta {
    text-align: center;
    margin-top: var(--beat-8);
}

/* Responsive */
@media (max-width: 1024px) {
    .insights__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .insights__grid {
        grid-template-columns: 1fr;
        gap: var(--beat-6);
    }
    
    .insight-card__image {
        height: 180px;
    }
}

/* Pattern box fallback (for posts without featured images) */
.pattern-box {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-base) 0%, var(--color-secondary) 100%);
    position: relative;
}

.pattern-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, var(--p-color, var(--color-accent)) 25%, transparent 25%),
        linear-gradient(-45deg, var(--p-color, var(--color-accent)) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--p-color, var(--color-accent)) 75%),
        linear-gradient(-45deg, transparent 75%, var(--p-color, var(--color-accent)) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.1;
}