/**
 * Gutenberg Blocks Styles
 * Only applies to pages using the "Gutenberg Page" template
 * Scoped under .is-gutenberg-page to avoid conflicts with existing theme CSS
 *
 * @package OguzInjury
 */

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

.is-gutenberg-page .gutenberg-page-content {
    padding-top: 0;
}

.is-gutenberg-page .gutenberg-content {
    max-width: 100%;
    margin: 0 auto;
}

/* Content width for non-full-width blocks */
.is-gutenberg-page .gutenberg-content > *:not(.alignfull):not(.alignwide) {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Wide alignment */
.is-gutenberg-page .gutenberg-content > .alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Full width alignment */
.is-gutenberg-page .gutenberg-content > .alignfull {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

.is-gutenberg-page h1,
.is-gutenberg-page h2,
.is-gutenberg-page h3,
.is-gutenberg-page h4,
.is-gutenberg-page h5,
.is-gutenberg-page h6 {
    font-family: 'Outfit', sans-serif;
    color: #192d2e;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.is-gutenberg-page h1 { font-size: 2.5rem; font-weight: 700; }
.is-gutenberg-page h2 { font-size: 2rem; font-weight: 600; }
.is-gutenberg-page h3 { font-size: 1.5rem; font-weight: 600; }
.is-gutenberg-page h4 { font-size: 1.25rem; font-weight: 600; }
.is-gutenberg-page h5 { font-size: 1.125rem; font-weight: 500; }
.is-gutenberg-page h6 { font-size: 1rem; font-weight: 500; }

.is-gutenberg-page p {
    font-family: 'Outfit', sans-serif;
    color: #505050;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.is-gutenberg-page .wp-block-button__link {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.875rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

/* Default/Primary button style */
.is-gutenberg-page .wp-block-button:not(.is-style-outline) .wp-block-button__link {
    background-color: #b8a269 !important;
    color: #192d2e !important;
}

.is-gutenberg-page .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
    background-color: #a08f5a !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 162, 105, 0.3);
}

/* Outline button style */
.is-gutenberg-page .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    color: #192d2e !important;
    border: 2px solid #192d2e !important;
}

.is-gutenberg-page .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: #192d2e !important;
    color: #fbfafa !important;
}

/* Buttons container */
.is-gutenberg-page .wp-block-buttons {
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   COVER BLOCK (Hero sections)
   ========================================================================== */

.is-gutenberg-page .wp-block-cover {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.is-gutenberg-page .wp-block-cover.alignfull {
    margin-top: 0;
}

.is-gutenberg-page .wp-block-cover__inner-container {
    max-width: 1200px;
    padding: 2rem;
    text-align: center;
}

.is-gutenberg-page .wp-block-cover h1,
.is-gutenberg-page .wp-block-cover h2,
.is-gutenberg-page .wp-block-cover p {
    color: inherit;
}

/* ==========================================================================
   GROUP BLOCK
   ========================================================================== */

.is-gutenberg-page .wp-block-group {
    padding: 2rem 0;
}

.is-gutenberg-page .wp-block-group.has-background {
    padding: 3rem 2rem;
}

.is-gutenberg-page .wp-block-group__inner-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   COLUMNS
   ========================================================================== */

.is-gutenberg-page .wp-block-columns {
    gap: 2rem;
    margin-bottom: 2rem;
}

.is-gutenberg-page .wp-block-column {
    flex-basis: 0;
    flex-grow: 1;
}

/* ==========================================================================
   IMAGE BLOCKS
   ========================================================================== */

.is-gutenberg-page .wp-block-image {
    margin-bottom: 2rem;
}

.is-gutenberg-page .wp-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.is-gutenberg-page .wp-block-image.is-style-rounded img {
    border-radius: 9999px;
}

/* ==========================================================================
   LISTS
   ========================================================================== */

.is-gutenberg-page ul,
.is-gutenberg-page ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.is-gutenberg-page ul {
    list-style-type: disc;
}

.is-gutenberg-page ol {
    list-style-type: decimal;
}

.is-gutenberg-page li {
    font-family: 'Outfit', sans-serif;
    color: #505050;
    line-height: 1.75;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   SOCIAL LINKS
   ========================================================================== */

.is-gutenberg-page .wp-block-social-links {
    gap: 1rem;
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.is-gutenberg-page .wp-block-social-links li {
    margin: 0;
    padding: 0;
}

.is-gutenberg-page .wp-block-social-link {
    margin: 0;
}

.is-gutenberg-page .wp-block-social-link a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #192d2e;
    color: #fbfafa;
    transition: all 0.3s ease;
}

.is-gutenberg-page .wp-block-social-link a:hover {
    background-color: #b8a269;
    color: #192d2e;
    transform: translateY(-3px);
}

.is-gutenberg-page .wp-block-social-link a svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Pills style */
.is-gutenberg-page .wp-block-social-links.is-style-pill-shape .wp-block-social-link a {
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    width: auto;
}

/* Logos only style */
.is-gutenberg-page .wp-block-social-links.is-style-logos-only .wp-block-social-link a {
    background: transparent;
    color: #192d2e;
    width: auto;
    height: auto;
}

.is-gutenberg-page .wp-block-social-links.is-style-logos-only .wp-block-social-link a:hover {
    color: #b8a269;
    background: transparent;
}

/* ==========================================================================
   SEPARATOR
   ========================================================================== */

.is-gutenberg-page .wp-block-separator {
    border: none;
    border-top: 2px solid #f5f2eb;
    margin: 3rem auto;
    max-width: 100px;
}

.is-gutenberg-page .wp-block-separator.is-style-wide {
    max-width: 100%;
}

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

.is-gutenberg-page .wp-block-separator.is-style-dots::before {
    content: "...";
    font-size: 1.5rem;
    letter-spacing: 1rem;
    color: #b8a269;
}

/* ==========================================================================
   SPACER
   ========================================================================== */

.is-gutenberg-page .wp-block-spacer {
    display: block;
}

/* ==========================================================================
   QUOTE
   ========================================================================== */

.is-gutenberg-page .wp-block-quote {
    border-left: 4px solid #b8a269;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.is-gutenberg-page .wp-block-quote p {
    font-size: 1.125rem;
    color: #192d2e;
}

.is-gutenberg-page .wp-block-quote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #505050;
    font-style: normal;
}

/* ==========================================================================
   TABLE
   ========================================================================== */

.is-gutenberg-page .wp-block-table {
    margin-bottom: 2rem;
    width: 100%;
    overflow-x: auto;
}

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

.is-gutenberg-page .wp-block-table th,
.is-gutenberg-page .wp-block-table td {
    padding: 0.75rem 1rem;
    border: 1px solid #f5f2eb;
    text-align: left;
}

.is-gutenberg-page .wp-block-table th {
    background-color: #192d2e;
    color: #fbfafa;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.is-gutenberg-page .wp-block-table tr:nth-child(even) {
    background-color: #f5f2eb;
}

/* ==========================================================================
   MEDIA & TEXT
   ========================================================================== */

.is-gutenberg-page .wp-block-media-text {
    margin-bottom: 2rem;
}

.is-gutenberg-page .wp-block-media-text .wp-block-media-text__content {
    padding: 2rem;
}

/* ==========================================================================
   GALLERY
   ========================================================================== */

.is-gutenberg-page .wp-block-gallery {
    gap: 1rem;
    margin-bottom: 2rem;
}

.is-gutenberg-page .wp-block-gallery .wp-block-image img {
    border-radius: 10px;
}

/* ==========================================================================
   VIDEO & EMBED
   ========================================================================== */

.is-gutenberg-page .wp-block-video,
.is-gutenberg-page .wp-block-embed {
    margin-bottom: 2rem;
}

.is-gutenberg-page .wp-block-video video {
    max-width: 100%;
    border-radius: 10px;
}

.is-gutenberg-page .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.is-gutenberg-page .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .is-gutenberg-page h1 { font-size: 2rem; }
    .is-gutenberg-page h2 { font-size: 1.5rem; }
    .is-gutenberg-page h3 { font-size: 1.25rem; }

    .is-gutenberg-page .wp-block-columns {
        flex-direction: column;
    }

    .is-gutenberg-page .wp-block-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .is-gutenberg-page .wp-block-button__link {
        width: 100%;
        text-align: center;
    }

    .is-gutenberg-page .wp-block-cover {
        min-height: 300px;
    }

    .is-gutenberg-page .wp-block-social-link a {
        width: 40px;
        height: 40px;
    }

    .is-gutenberg-page .wp-block-social-link a svg {
        width: 20px;
        height: 20px;
    }
}

/* ==========================================================================
   CODE & PREFORMATTED
   ========================================================================== */

.is-gutenberg-page .wp-block-code {
    background-color: #192d2e;
    color: #fbfafa;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.is-gutenberg-page .wp-block-code code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: inherit;
    background: transparent;
}

.is-gutenberg-page .wp-block-preformatted {
    background-color: #f5f2eb;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
}

/* ==========================================================================
   PULLQUOTE
   ========================================================================== */

.is-gutenberg-page .wp-block-pullquote {
    border-top: 4px solid #b8a269;
    border-bottom: 4px solid #b8a269;
    padding: 2rem 0;
    margin: 3rem 0;
    text-align: center;
}

.is-gutenberg-page .wp-block-pullquote blockquote {
    margin: 0;
    border: none;
    padding: 0;
}

.is-gutenberg-page .wp-block-pullquote p {
    font-size: 1.5rem;
    font-style: italic;
    color: #192d2e;
    margin-bottom: 1rem;
}

.is-gutenberg-page .wp-block-pullquote cite {
    font-size: 1rem;
    color: #505050;
    font-style: normal;
}

/* ==========================================================================
   FILE BLOCK
   ========================================================================== */

.is-gutenberg-page .wp-block-file {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f5f2eb;
    border-radius: 10px;
}

.is-gutenberg-page .wp-block-file a:not(.wp-block-file__button) {
    color: #192d2e;
    text-decoration: none;
    font-weight: 500;
}

.is-gutenberg-page .wp-block-file a:not(.wp-block-file__button):hover {
    text-decoration: underline;
}

.is-gutenberg-page .wp-block-file__button {
    background-color: #b8a269;
    color: #192d2e;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.is-gutenberg-page .wp-block-file__button:hover {
    background-color: #a08f5a;
}

/* ==========================================================================
   AUDIO BLOCK
   ========================================================================== */

.is-gutenberg-page .wp-block-audio {
    margin-bottom: 1.5rem;
}

.is-gutenberg-page .wp-block-audio audio {
    width: 100%;
    border-radius: 10px;
}

.is-gutenberg-page .wp-block-audio figcaption {
    font-size: 0.875rem;
    color: #505050;
    text-align: center;
    margin-top: 0.5rem;
}

/* ==========================================================================
   DETAILS/ACCORDION BLOCK
   ========================================================================== */

.is-gutenberg-page .wp-block-details {
    margin-bottom: 1rem;
    border: 1px solid #f5f2eb;
    border-radius: 10px;
    overflow: hidden;
}

.is-gutenberg-page .wp-block-details summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #192d2e;
    background-color: #f5f2eb;
    transition: background-color 0.3s ease;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.is-gutenberg-page .wp-block-details summary::-webkit-details-marker {
    display: none;
}

.is-gutenberg-page .wp-block-details summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.is-gutenberg-page .wp-block-details[open] summary::after {
    content: '-';
}

.is-gutenberg-page .wp-block-details summary:hover {
    background-color: #f0ece1;
}

.is-gutenberg-page .wp-block-details > *:not(summary) {
    padding: 1rem 1.5rem;
}

/* ==========================================================================
   SEARCH BLOCK
   ========================================================================== */

.is-gutenberg-page .wp-block-search {
    margin-bottom: 1.5rem;
}

.is-gutenberg-page .wp-block-search__label {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #192d2e;
    margin-bottom: 0.5rem;
    display: block;
}

.is-gutenberg-page .wp-block-search__inside-wrapper {
    display: flex;
    gap: 0.5rem;
}

.is-gutenberg-page .wp-block-search__input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #f5f2eb;
    border-radius: 5px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.is-gutenberg-page .wp-block-search__input:focus {
    outline: none;
    border-color: #b8a269;
}

.is-gutenberg-page .wp-block-search__button {
    background-color: #b8a269;
    color: #192d2e;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.is-gutenberg-page .wp-block-search__button:hover {
    background-color: #a08f5a;
}

/* ==========================================================================
   COLOR CLASSES (from editor palette)
   ========================================================================== */

.is-gutenberg-page .has-primary-color { color: #192d2e !important; }
.is-gutenberg-page .has-primary-background-color { background-color: #192d2e !important; }
.is-gutenberg-page .has-secondary-color { color: #b8a269 !important; }
.is-gutenberg-page .has-secondary-background-color { background-color: #b8a269 !important; }
.is-gutenberg-page .has-white-color { color: #fbfafa !important; }
.is-gutenberg-page .has-white-background-color { background-color: #fbfafa !important; }
.is-gutenberg-page .has-cream-color { color: #f5f2eb !important; }
.is-gutenberg-page .has-cream-background-color { background-color: #f5f2eb !important; }
.is-gutenberg-page .has-gray-color { color: #505050 !important; }
.is-gutenberg-page .has-gray-background-color { background-color: #505050 !important; }

/* ==========================================================================
   FONT SIZE CLASSES (from editor font sizes)
   ========================================================================== */

.is-gutenberg-page .has-small-font-size { font-size: 14px !important; }
.is-gutenberg-page .has-normal-font-size { font-size: 16px !important; }
.is-gutenberg-page .has-medium-font-size { font-size: 18px !important; }
.is-gutenberg-page .has-large-font-size { font-size: 24px !important; }
.is-gutenberg-page .has-extra-large-font-size { font-size: 32px !important; }

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */

/* Flex layouts */
.is-gutenberg-page .is-layout-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.is-gutenberg-page .is-layout-flex.is-vertical {
    flex-direction: column;
}

.is-gutenberg-page .is-layout-flex.is-content-justification-center {
    justify-content: center;
}

.is-gutenberg-page .is-layout-flex.is-content-justification-right {
    justify-content: flex-end;
}

.is-gutenberg-page .is-layout-flex.is-content-justification-space-between {
    justify-content: space-between;
}

/* Grid layouts */
.is-gutenberg-page .is-layout-grid {
    display: grid;
    gap: 1rem;
}

/* Flow layouts */
.is-gutenberg-page .is-layout-flow > * + * {
    margin-top: 1.5rem;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .is-gutenberg-page .wp-block-button__link {
        border: 1px solid #192d2e !important;
        background: transparent !important;
        color: #192d2e !important;
    }

    .is-gutenberg-page .wp-block-social-links {
        display: none !important;
    }

    .is-gutenberg-page .wp-block-cover {
        min-height: auto !important;
        padding: 2rem !important;
    }
}
