/*
 * Block Editor Styles for DoorBoost Theme
 * Specific styles for WordPress blocks
 */

:root {
    --primary-color: #683ab7;
    --primary-hover: #5b35aa;
}

* {
    font-family: "Roboto", "Roboto Placeholder", sans-serif;
}

/* Block Container Improvements */
.wp-block {
    max-width: 100%;
}

/* Full Width and Wide Alignment */
.alignwide {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Hero Section Styling */
.wp-block-cover.alignfull {
    margin-top: 0;
    margin-bottom: 0;
}

.wp-block-cover {
    min-height: 80vh;
    background-attachment: fixed;
}

.wp-block-cover .wp-block-cover__inner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.wp-block-cover h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.wp-block-cover h2 {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.wp-block-cover p {
    font-size: clamp(1.125rem, 3vw, 1.375rem);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.wp-block-group.has-background {
    padding: 6rem 2rem;
}

.wp-block-group .wp-block-group__inner-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Enhanced Headings */
.wp-block h1,
.wp-block h2,
.wp-block h3,
.wp-block h4,
.wp-block h5,
.wp-block h6 {
    color: #2c3e50;
    font-weight: 700;
    line-height: 0.5;
    margin-bottom: 1.5rem;
}

.wp-block h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

.wp-block h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
}

.wp-block h3 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.wp-block h4 {
    font-size: clamp(1.5rem, 2.5vw, 1.875rem);
}

/* Enhanced Paragraphs */
.wp-block-paragraph {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #333;
}

.wp-block-paragraph.has-drop-cap:first-letter {
    font-size: 4em;
    color: #6c3fcf;
    font-weight: bold;
    line-height: 1;
    margin: 0.1em 0.1em 0 0;
    float: left;
}

/* Enhanced Buttons */
/* Universal Button Base */
.wp-block-button,
.wp-block-button__link,
.button {
    font-size: 16px !important;
    font-weight: 500;
    padding: 12px 0px;
    border: none;
    border-radius: 16px; /* pill shape */
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-button-fill {
    font-size: 16px;
    font-weight: 500;
    padding: 15px 28px;
    border: none;
    border-radius: 16px; /* pill shape */
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
}

.header-button-fill:hover {
    background-color: var(--primary-hover);
    text-decoration: none;
    color: white;
    transition: all 0.2s ease;
}

.header-button-outline {
    font-size: 16px;
    font-weight: 500;
    background-color: white;
    padding: 15px 28px;
    border: none;
    border-radius: 16px; /* pill shape */
    color: black;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.header-button-outline:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    transition: all 0.2s ease;
    text-decoration: none;
}

/* Primary Button */
.wp-block-button.is-style-fill .wp-block-button__link,
.button-primary {
    background-color: var(--primary-color);
    color: white;
}

.wp-block-button.is-style-fill .wp-block-button__link:hover,
.button-primary:hover {
    background-color: var(--primary-hover);
    text-decoration: none;
    color: white;
}

/* Secondary / Outline Button */
.wp-block-button.is-style-outline .wp-block-button__link,
.button-secondary {
    background-color: transparent;
    border: 1px solid #ddd;
    color: black;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.button-secondary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    text-decoration: none;
}

/* Optional: Adjust spacing */
.wp-block-button {
    margin: 1rem 0.5rem 1rem 0;
}

/* Media & Text Blocks */
.wp-block-media-text {
    margin: 4rem 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    background: white;
}

/* Quote Blocks */
.wp-block-quote {
    border-left: 4px solid #6c3fcf;
    padding: 2rem;
    margin: 3rem 0;
    background: #f8f9fa;
    border-radius: 8px;
    position: relative;
}

.wp-block-quote::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary-color);
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: Georgia, serif;
}

.wp-block-quote p {
    font-size: 1.25rem;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.wp-block-quote cite {
    display: block;
    font-size: 0.9rem;
    color: #666;
    font-style: normal;
    font-weight: 600;
    margin-top: 1rem;
}

.wp-block-quote cite::before {
    content: "— ";
}

/* List Blocks */
.wp-block-list {
    padding-left: 0;
    margin: 2rem 0;
}

/* Separator Blocks */
.wp-block-separator {
    margin: 4rem auto;
    max-width: 100px;
    border: none;
    border-top: 3px solid var(--primary-color);
    opacity: 1;
}

.wp-block-separator.is-style-wide {
    max-width: 300px;
}

.wp-block-separator.is-style-dots {
    border: none;
    text-align: center;
    max-width: none;
}

.wp-block-separator.is-style-dots::before {
    content: "···";
    color: var(--primary-color);
    font-size: 2rem;
    letter-spacing: 1rem;
}

/* Code Blocks */
.wp-block-code {
    background: #2c3e50;
    color: #fff;
    padding: 2rem;
    border-radius: 8px;
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
    margin: 2rem 0;
}

.wp-block-table table,
.wp-block-table th,
.wp-block-table td {
    border: 1px solid #eee; /* light gray instead of black */
}

/* Table Blocks */
.wp-block-table {
    margin: 3rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table th {
    background: #6c3fcf;
    color: white;
    padding: 1rem;
    font-weight: 600;
}

.wp-block-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.wp-block-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* Background Color Classes */
.has-light-gray-background-color {
    background-color: #f8f9fa !important;
}

.has-dark-gray-background-color {
    background-color: #2c3e50 !important;
    color: white;
}

.has-dark-gray-background-color h1,
.has-dark-gray-background-color h2,
.has-dark-gray-background-color h3,
.has-dark-gray-background-color h4 {
    color: white;
}

.has-primary-background-color {
    background: linear-gradient(135deg, #6c3fcf, #8b5cf6) !important;
    color: white;
}

.has-primary-background-color h1,
.has-primary-background-color h2,
.has-primary-background-color h3,
.has-primary-background-color h4 {
    color: white;
}

/* Text Color Classes */
.has-primary-color {
    color: var(--primary-color) !important;
}

.has-dark-gray-color {
    color: #2c3e50 !important;
}

.has-white-color {
    color: white !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-block-group {
        padding: 3rem 0;
    }

    .wp-block-group.has-background {
        padding: 4rem 1rem;
    }

    .wp-block-group .wp-block-group__inner-container {
        padding: 0 1rem;
    }

    .wp-block-columns {
        margin-top: 0;
        gap: 2rem;
    }

    .wp-block-media-text__content {
        padding: 2rem;
    }

    .wp-block-cover {
        min-height: 60vh;
        background-attachment: scroll;
    }

    .wp-block-cover .wp-block-cover__inner-container {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .wp-block-group {
        padding: 2rem 0;
    }

    .wp-block-group.has-background {
        padding: 3rem 1rem;
    }

    .wp-block-media-text__content {
        padding: 1.5rem;
    }

    .wp-block-cover {
        min-height: 50vh;
    }

    .wp-block-button .wp-block-button__link {
        padding: 12px 20px;
        font-size: 0.9rem;
        min-width: 140px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

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

.slide-up {
    transform: translateY(30px);
    opacity: 0;
    animation: slideUp 0.8s ease-out forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
