/*
Theme Name: Lit Lab Theme
Description: Custom WordPress theme based on Lit-Lab Squarespace design.
Version: 1.0
Author: Lit Lab
*/

/* =====================================================
   FIX UI PERFORMANCE: Remove All Squarespace Delays
   Override Squarespace's global animation delays that
   cause 4-second delays on menus, accordions, and hovers
   ===================================================== */

/* CRITICAL: Override Squarespace's global animation delay variable */
:root {
    --tweak-global-animations-animation-delay: 0s !important;
    --tweak-global-animations-animation-duration: 0.3s !important;
}

/* Fix Accordion Delays - Remove all transition/animation delays */
.sqs-block-accordion .accordion-item__dropdown,
.sqs-block-accordion .accordion-item__description,
.sqs-block-accordion .accordion-item__click-target,
.sqs-block-accordion .accordion-item__title,
.sqs-block-accordion .accordion-item,
.sqs-block-accordion .accordion-item *,
.sqs-block-accordion {
    transition-duration: 0.3s !important;
    transition-delay: 0s !important;
    animation-delay: 0s !important;
    animation-duration: 0.3s !important;
}

/* Fix Header Navigation Menu Delays - Instant dropdown display */
.header-nav-folder-content,
.header-nav-folder-item,
.header-nav-item,
.header-nav-item *,
.header-nav-folder-title,
.header-nav-wrapper,
.header-nav {
    transition-duration: 0.2s !important;
    transition-delay: 0s !important;
    animation-delay: 0s !important;
    animation-duration: 0.2s !important;
}

/* Fix Portfolio and Image Hover Delays */
.portfolio-hover-display,
.portfolio-hover-item,
.sqs-block-image .image-overlay,
.has-hover-effect,
a.sqs-block-image-link {
    transition-duration: 0.3s !important;
    transition-delay: 0s !important;
    animation-delay: 0s !important;
}

/* Fix Global Animation Delays on All Elements */
[data-animation-role],
[data-animation],
.animation-element,
.sqs-block[data-animation] {
    animation-delay: 0s !important;
    transition-delay: 0s !important;
}

/* Ensure content is immediately visible (no fade-in delays) */
.header-nav-folder-content {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Make sure accordion content shows immediately when opened */
.accordion-item--open .accordion-item__dropdown,
.accordion-item--open .accordion-item__description {
    opacity: 1 !important;
    visibility: visible !important;
    max-height: none !important;
}

/* Fix spacing issue for centered list items with wrapped text in footer */
#block-yui_3_17_2_1_1765994464064_25467 {
    text-align: center !important;
}
#block-yui_3_17_2_1_1765994464064_25467 ul[data-rte-list="default"] {
    display: inline-block !important;
    text-align: left !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    list-style: none !important;
}
#block-yui_3_17_2_1_1765994464064_25467 ul[data-rte-list="default"] li {
    text-align: left !important;
    position: relative !important;
    text-indent: 0 !important;
    padding-left: 0 !important;
}
#block-yui_3_17_2_1_1765994464064_25467 ul[data-rte-list="default"] li::before {
    content: "•" !important;
    position: absolute !important;
    left: -18px !important;
    display: inline-block !important;
    margin: 0 !important;
}
#block-yui_3_17_2_1_1765994464064_25467 ul[data-rte-list="default"] li p,
#block-yui_3_17_2_1_1765994464064_25467 ul[data-rte-list="default"] li a {
    text-align: left !important;
    display: block !important;
    white-space: normal !important;
    margin: 0 !important;
}

/* =====================================================
   GLOBAL FIX: Hero banner height & background images
   Squarespace uses data-load="false" and JS to inject
   background images. When JS chunks fail, the section
   collapses to 0px. These overrides ensure the section
   is visible and the background-image-fx img is shown.
   ===================================================== */

/* Ensure hero sections with custom height of 0 still have visible height */
.page-section.section-height--custom {
    min-height: 300px !important;
}

/* Force background-image-fx images to actually display */
.section-background-content img.background-image-fx {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Make section-background itself take full area */
.page-section.has-background .section-background,
.page-section.has-background .section-border {
    position: absolute !important;
    inset: 0 !important;
    overflow: hidden !important;
}

/* Fix the section-background-content container to fill its parent */
.section-background-content {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
}

/* Ensure page content sits above background */
.section-height--custom .content-wrapper {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
    position: relative !important;
    z-index: 2 !important;
}

/* =====================================================
   CONTACT FORM 7: Pixel Perfect Match to Original
   ===================================================== */

.lit-lab-cf7-custom {
    max-width: 100%;
    margin: 0;
    text-align: left;
}

/* Form field containers */
.lit-lab-cf7-custom .form-field {
    margin-bottom: 16px;
}

/* Labels */
.lit-lab-cf7-custom .form-field > label {
    display: block;
    text-align: left;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 5px;
    color: #333;
    font-family: var(--body-font-family);
    letter-spacing: 0.01em;
}

/* Remove default CF7 span block display */
.lit-lab-cf7-custom .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

/* Text inputs and email - pill shape, page bg color */
.lit-lab-cf7-custom input[type="text"],
.lit-lab-cf7-custom input[type="email"] {
    width: 100%;
    padding: 12px 18px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #c8c3bc;
    border-radius: 50px;
    background-color: #f0ece6; /* matches page background */
    font-family: var(--body-font-family);
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
}

/* Textarea */
.lit-lab-cf7-custom textarea {
    width: 100%;
    padding: 12px 18px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #c8c3bc;
    border-radius: 10px;
    background-color: #f0ece6;
    font-family: var(--body-font-family);
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    color: #333;
    min-height: 120px;
    resize: vertical;
}

/* Focus states */
.lit-lab-cf7-custom input[type="text"]:focus,
.lit-lab-cf7-custom input[type="email"]:focus,
.lit-lab-cf7-custom textarea:focus {
    outline: none;
    border-color: #888;
}

/* Placeholder - very light so fields look "empty" */
.lit-lab-cf7-custom input::placeholder,
.lit-lab-cf7-custom textarea::placeholder {
    color: transparent;
    opacity: 0;
}

/* Textarea placeholder visible like screenshot */
.lit-lab-cf7-custom textarea::placeholder {
    color: #aaa;
    opacity: 1;
}

/* Radio buttons - horizontal row */
.lit-lab-cf7-custom .wpcf7-radio {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 4px;
}

.lit-lab-cf7-custom .wpcf7-radio .wpcf7-list-item {
    display: flex !important;
    align-items: center;
    margin: 0 !important;
}

.lit-lab-cf7-custom .wpcf7-radio .wpcf7-list-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    font-weight: 400;
    margin-bottom: 0 !important;
    gap: 5px;
}

/* Custom radio */
.lit-lab-cf7-custom .wpcf7-radio .wpcf7-list-item input[type="radio"] {
    width: 15px;
    height: 15px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid #666;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.lit-lab-cf7-custom .wpcf7-radio .wpcf7-list-item input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #333;
}

/* Checkbox */
.lit-lab-cf7-custom .wpcf7-checkbox {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 4px;
}

.lit-lab-cf7-custom .wpcf7-checkbox .wpcf7-list-item {
    display: flex !important;
    align-items: center;
    margin: 0 !important;
}

.lit-lab-cf7-custom .wpcf7-checkbox .wpcf7-list-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    font-weight: 400;
    margin-bottom: 0 !important;
    gap: 5px;
}

.lit-lab-cf7-custom .wpcf7-checkbox .wpcf7-list-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid #666;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.lit-lab-cf7-custom .wpcf7-checkbox .wpcf7-list-item input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #333;
}

/* Submit button - outline pill style like screenshot */
.lit-lab-cf7-custom .wpcf7-submit {
    display: block;
    margin: 24px 0 0 0;
    padding: 12px 44px;
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
    background-color: transparent;
    border: 2px solid #1a1a1a;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--body-font-family);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lit-lab-cf7-custom .wpcf7-submit:hover {
    background-color: #1a1a1a;
    color: #fff;
    transform: translateY(-1px);
}

.lit-lab-cf7-custom .wpcf7-submit:active {
    transform: translateY(0);
}

/* Validation errors */
.lit-lab-cf7-custom .wpcf7-not-valid-tip {
    color: #d32f2f;
    font-size: 11px;
    margin-top: 3px;
    display: block;
}

.lit-lab-cf7-custom .wpcf7-not-valid {
    border-color: #d32f2f !important;
}

/* Response messages */
.lit-lab-cf7-custom .wpcf7-response-output {
    margin: 16px 0;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
}

.lit-lab-cf7-custom .wpcf7-mail-sent-ok {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.lit-lab-cf7-custom .wpcf7-mail-sent-ng,
.lit-lab-cf7-custom .wpcf7-validation-errors {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Spinner */
.lit-lab-cf7-custom .wpcf7-spinner {
    margin-left: 10px;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 768px) {
    .lit-lab-cf7-custom input[type="text"],
    .lit-lab-cf7-custom input[type="email"],
    .lit-lab-cf7-custom textarea {
        font-size: 16px;
    }
    .lit-lab-cf7-custom .wpcf7-radio {
        gap: 4px 10px;
    }
}

/* =====================================================
   Service Card Heading Typography Consistency
   Ensures all service card titles have uniform size,
   line height, and maximum 2-line display
   ===================================================== */

/* Target all service card headings */
#block-99506f100525e48afba8 h2,
#block-f2992738a7034ea595e3 h2,
#block-9c1954a7a8ec6d567c65 h2,
#block-112c664fc51f8b9163e2 h2,
#block-f9175aaf63638d6e5e84 h2,
#block-2ac1b8ac86a9ad020d14 h2 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
    max-height: 4.55rem !important; /* 1.75rem * 1.3 * 2 lines = 4.55rem */
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    margin-bottom: 1rem !important;
}

/* Remove the scaled text container effect from Exec-Function Coach */
#block-f9175aaf63638d6e5e84 .sqsrte-scaled-text-container {
    display: block !important;
    transform: none !important;
}

#block-f9175aaf63638d6e5e84 .sqsrte-scaled-text {
    display: block !important;
    transform: none !important;
    font-size: inherit !important;
}

/* Ensure links within headings inherit the heading styles */
#block-99506f100525e48afba8 h2 a,
#block-f2992738a7034ea595e3 h2 a,
#block-9c1954a7a8ec6d567c65 h2 a,
#block-112c664fc51f8b9163e2 h2 a,
#block-f9175aaf63638d6e5e84 h2 a,
#block-2ac1b8ac86a9ad020d14 h2 a {
    font-size: inherit !important;
    line-height: inherit !important;
    display: inline !important;
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 768px) {
    #block-99506f100525e48afba8 h2,
    #block-f2992738a7034ea595e3 h2,
    #block-9c1954a7a8ec6d567c65 h2,
    #block-112c664fc51f8b9163e2 h2,
    #block-f9175aaf63638d6e5e84 h2,
    #block-2ac1b8ac86a9ad020d14 h2 {
        font-size: 1.5rem !important;
        max-height: 3.9rem !important; /* 1.5rem * 1.3 * 2 lines = 3.9rem */
    }
}

@media screen and (max-width: 480px) {
    #block-99506f100525e48afba8 h2,
    #block-f2992738a7034ea595e3 h2,
    #block-9c1954a7a8ec6d567c65 h2,
    #block-112c664fc51f8b9163e2 h2,
    #block-f9175aaf63638d6e5e84 h2,
    #block-2ac1b8ac86a9ad020d14 h2 {
        font-size: 1.25rem !important;
        max-height: 3.25rem !important; /* 1.25rem * 1.3 * 2 lines = 3.25rem */
    }
}

/* =====================================================
   Hero Section Tagline Styling
   "We Grow Bookworms" tagline under main heading
   ===================================================== */

/* Style the tagline that appears under "Welcome to Lit-Lab" */
#block-16c5b4e548e654b4a2ba .sqs-html-content p {
    color: inherit;
    opacity: 0.85;
    letter-spacing: 0.05em;
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
    font-style: italic;
}

/* Ensure tagline stays on one line on all screen sizes */
#block-16c5b4e548e654b4a2ba .sqs-html-content p {
    white-space: nowrap !important;
    overflow: visible !important;
}

/* Responsive font sizing for tagline */
@media screen and (max-width: 768px) {
    #block-16c5b4e548e654b4a2ba .sqs-html-content p {
        font-size: 1.4rem !important;
    }
}

@media screen and (max-width: 480px) {
    #block-16c5b4e548e654b4a2ba .sqs-html-content p {
        font-size: 1.2rem !important;
    }
}

/* =====================================================
   CRITICAL: Hide the old "WE GROW BOOKWORMS" block
   ===================================================== */

/* Force hide the original standalone "WE GROW BOOKWORMS" block */
#block-yui_3_17_2_1_1760547771123_25122,
.fe-block-yui_3_17_2_1_1760547771123_25122 {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}
