/* Neet Page Builder Frontend v5 - With Nested Elements */
/* Colour variables are set by the theme's customizer (--neet-* in :root).
   Only radius and font fallbacks are defined here. */
:root {
    --neet-font: 'Roboto', system-ui, sans-serif;
    --neet-radius-sm: 8px;
    --neet-radius-md: 12px;
    --neet-radius-lg: 16px;
    --neet-radius-xl: 28px;
    --neet-radius-full: 9999px;
    /* Colour fallbacks — overridden by theme customizer */
    --neet-primary: #6750A4;
    --neet-on-primary: #FFFFFF;
    --neet-primary-container: #EADDFF;
    --neet-on-primary-container: #21005D;
    --neet-secondary: #625B71;
    --neet-on-secondary: #FFFFFF;
    --neet-secondary-container: #E8DEF8;
    --neet-on-secondary-container: #1D192B;
    --neet-tertiary: #7D5260;
    --neet-on-tertiary: #FFFFFF;
    --neet-tertiary-container: #FFD8E4;
    --neet-on-tertiary-container: #31111D;
    --neet-surface: #FFFBFE;
    --neet-on-surface: #1C1B1F;
    --neet-on-surface-variant: #49454F;
    --neet-surface-container-lowest: #FFFFFF;
    --neet-surface-container-low: #F7F2FA;
    --neet-surface-container: #F3EDF7;
    --neet-surface-container-high: #ECE6F0;
    --neet-outline: #79747E;
    --neet-outline-variant: #CAC4D0;
    --neet-error: #B3261E;
    --neet-success: #1B7D46;
}

/* Background Colors */
.neet-bg--transparent { background-color: transparent !important; }
.neet-bg--surface { background-color: var(--neet-surface) !important; }
.neet-bg--surface-container-lowest { background-color: var(--neet-surface-container-lowest) !important; }
.neet-bg--surface-container-low { background-color: var(--neet-surface-container-low) !important; }
.neet-bg--surface-container { background-color: var(--neet-surface-container) !important; }
.neet-bg--surface-container-high { background-color: var(--neet-surface-container-high) !important; }
.neet-bg--primary { background-color: var(--neet-primary) !important; color: var(--neet-on-primary) !important; }
.neet-bg--primary-container { background-color: var(--neet-primary-container) !important; color: var(--neet-on-primary-container) !important; }
.neet-bg--secondary { background-color: var(--neet-secondary) !important; color: var(--neet-on-secondary) !important; }
.neet-bg--secondary-container { background-color: var(--neet-secondary-container) !important; color: var(--neet-on-secondary-container) !important; }
.neet-bg--tertiary { background-color: var(--neet-tertiary) !important; color: var(--neet-on-tertiary) !important; }
.neet-bg--tertiary-container { background-color: var(--neet-tertiary-container) !important; color: var(--neet-on-tertiary-container) !important; }

/* Icon Backgrounds */
.neet-icon-bg--primary { background-color: var(--neet-primary-container); }
.neet-icon-bg--primary .material-symbols-outlined { color: var(--neet-on-primary-container); }
.neet-icon-bg--secondary { background-color: var(--neet-secondary-container); }
.neet-icon-bg--secondary .material-symbols-outlined { color: var(--neet-on-secondary-container); }
.neet-icon-bg--tertiary { background-color: var(--neet-tertiary-container); }
.neet-icon-bg--tertiary .material-symbols-outlined { color: var(--neet-on-tertiary-container); }
.neet-icon-bg--on-surface { background-color: var(--neet-surface-container-high); }
.neet-icon-bg--on-surface .material-symbols-outlined { color: var(--neet-on-surface); }
.neet-icon-bg--on-surface-variant { background-color: var(--neet-surface-container); }
.neet-icon-bg--on-surface-variant .material-symbols-outlined { color: var(--neet-on-surface-variant); }

.neet-color--primary { color: var(--neet-primary) !important; }
.neet-color--secondary { color: var(--neet-secondary) !important; }
.neet-color--on-surface { color: var(--neet-on-surface) !important; }

/* Buttons */
.neet-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 24px; font-family: var(--neet-font); font-size: 14px; font-weight: 500; text-decoration: none; border: none; border-radius: var(--neet-radius-full); cursor: pointer; transition: all 0.2s; }
.neet-btn--large { height: 48px; padding: 0 32px; font-size: 15px; }
.neet-btn--filled.neet-btn--primary { background: var(--neet-primary); color: var(--neet-on-primary); }
.neet-btn--filled.neet-btn--secondary { background: var(--neet-secondary); color: var(--neet-on-secondary); }
.neet-btn--filled.neet-btn--tertiary { background: var(--neet-tertiary); color: var(--neet-on-tertiary); }
.neet-btn--outlined { background: transparent; border: 1px solid var(--neet-outline); }
.neet-btn--outlined.neet-btn--primary { color: var(--neet-primary); }
.neet-btn--outlined.neet-btn--secondary { color: var(--neet-secondary); }
.neet-btn:hover { text-decoration: none; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }

/* Hero */
/* Hero - M3 Style: Two separate rounded boxes */
.neet-hero { 
    display: grid; 
    gap: 0;
    margin-bottom: 32px;
    border-radius: var(--neet-radius-xl, 28px);
    overflow: hidden;
}
.neet-hero--image-right { grid-template-columns: 1fr 1fr; align-items: stretch; }
.neet-hero--image-left  { grid-template-columns: 1fr 1fr; align-items: stretch; }
.neet-hero--image-left .neet-hero__media,
.neet-hero--image-left .neet-hero__image { order: -1; }
.neet-hero--image-top   { grid-template-columns: 1fr; }
.neet-hero--image-top .neet-hero__media,
.neet-hero--image-top .neet-hero__image { max-width: 800px; margin: 0 auto; }
.neet-hero--no-image    { grid-template-columns: 1fr; }
.neet-hero--no-image .neet-hero__content { max-width: 800px; margin: 0 auto; text-align: center; }

.neet-hero__content {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.neet-hero__media,
.neet-hero__image {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 280px;
}

.neet-hero__media img,
.neet-hero__image img { 
    width: 100%; 
    height: auto;     /* natural sizing for non-edge heroes; media-edge overrides with !important */
    object-fit: cover;
    display: block;
}

/* Old plugin put bg class on content div — keep it working */
.neet-hero__content[class*="neet-bg--"] {
    border-radius: 0;
}

.neet-hero__media .neet-video-embed,
.neet-hero__image .neet-video-embed {
    width: 100%;
    align-self: stretch;
}

.neet-hero__media .neet-video-embed iframe {
    border-radius: 0;
}

@media (max-width: 900px) { 
    .neet-hero { grid-template-columns: 1fr !important; border-radius: var(--neet-radius-lg, 16px); }
    .neet-hero__media, .neet-hero__image { order: -1 !important; min-height: 220px; }
    .neet-hero__content { padding: 32px 24px; }
}

.neet-hero__title { 
    font-size: clamp(32px, 5vw, 57px); 
    font-weight: 400; 
    line-height: 1.1; 
    margin: 0 0 24px; 
    color: var(--neet-on-surface); 
    letter-spacing: -0.25px;
}
.neet-hero__subtitle { 
    font-size: 18px; 
    line-height: 1.6; 
    color: var(--neet-on-surface-variant); 
    margin: 0 0 32px; 
}
.neet-hero__subtitle p { margin: 0 0 16px; }
.neet-hero__buttons { display: flex; flex-wrap: wrap; gap: 16px; }
.neet-hero--no-image .neet-hero__buttons { justify-content: center; }

/* Video embed — responsive ratio box */
.neet-video-embed {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
}
.neet-video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
    border-radius: var(--neet-radius-lg, 16px);
}

/* Section Title */
.neet-section-title { font-size: 32px; font-weight: 400; text-align: center; margin: 0 0 48px; color: var(--neet-on-surface); }

/* Features */
.neet-features { display: grid; gap: 24px; margin-bottom: 32px; }
.neet-features--cols-2 { grid-template-columns: repeat(2, 1fr); }
.neet-features--cols-3 { grid-template-columns: repeat(3, 1fr); }
.neet-features--cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .neet-features--cols-3, .neet-features--cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .neet-features { grid-template-columns: 1fr !important; } }

.neet-feature-card { border-radius: var(--neet-radius-lg); padding: 32px 24px; text-decoration: none; color: inherit; display: block; transition: all 0.2s; }
.neet-feature-card--icon-top { text-align: center; }
.neet-feature-card--icon-left { display: flex; gap: 20px; text-align: left; }
.neet-feature-card--icon-right { display: flex; flex-direction: row-reverse; gap: 20px; text-align: left; }
a.neet-feature-card:hover { transform: translateY(-4px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.neet-feature-card__media { width: 56px; height: 56px; border-radius: var(--neet-radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.neet-feature-card--icon-top .neet-feature-card__media { margin: 0 auto 20px; }
.neet-feature-card__media .material-symbols-outlined { font-size: 28px; }
.neet-feature-card__media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--neet-radius-md); }
.neet-feature-card__body { flex: 1; }
.neet-feature-card__title { font-size: 18px; font-weight: 500; margin: 0 0 12px; color: var(--neet-on-surface); }
.neet-feature-card__desc { font-size: 15px; line-height: 1.5; margin: 0; color: var(--neet-on-surface-variant); }
.neet-feature-card__desc p { margin: 0; }

/* ========== FLEXIBLE ROW ========== */
.neet-flex-row { display: grid; margin-bottom: 32px; padding: 0; border-radius: var(--neet-radius-xl); gap: 24px; overflow: hidden; }
.neet-flex-row--cols-2 { grid-template-columns: repeat(2, 1fr); }
.neet-flex-row--cols-3 { grid-template-columns: repeat(3, 1fr); }
.neet-flex-row--cols-4 { grid-template-columns: repeat(4, 1fr); }
.neet-flex-row--gap-small { gap: 16px; }
.neet-flex-row--gap-medium { gap: 24px; }
.neet-flex-row--gap-large { gap: 32px; }
.neet-flex-row--valign-top { align-items: flex-start; }
.neet-flex-row--valign-center { align-items: center; }
.neet-flex-row--valign-bottom { align-items: flex-end; }
.neet-flex-row--valign-stretch { align-items: stretch; }
@media (max-width: 900px) { .neet-flex-row--cols-3, .neet-flex-row--cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .neet-flex-row { grid-template-columns: 1fr !important; } }

.neet-flex-row__column { display: flex; flex-direction: column; gap: 16px; }

/* A single element inside a column should stretch to fill the full column height
   so it matches the height of adjacent columns (e.g. text block next to an image). */
.neet-flex-row__column > .neet-text-block,
.neet-flex-row__column > .neet-image,
.neet-flex-row__column > .neet-nested-text,
.neet-flex-row__column > .neet-hero,
.neet-flex-row__column > .neet-cta,
.neet-flex-row__column > .neet-contact-form { flex: 1; }

/* Section-level elements carry their own margin-bottom for standalone use.
   Inside a flex-row column the column's gap handles spacing — zero those margins. */
.neet-flex-row__column > *,
.neet-flex-row__column .neet-features,
.neet-flex-row__column .neet-flex-row,
.neet-flex-row__column .neet-pricing,
.neet-flex-row__column .neet-comparison,
.neet-flex-row__column .neet-text-block,
.neet-flex-row__column .neet-section-header,
.neet-flex-row__column .neet-cta,
.neet-flex-row__column .neet-contact-form,
.neet-flex-row__column .neet-image,
.neet-flex-row__column .neet-hero,
.neet-flex-row__column .neet-post-embed,
.neet-flex-row__column .neet-slider-section {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

/* ========== NESTED ELEMENTS ========== */

/* Nested Text Block */
.neet-nested-text { padding: 24px; border-radius: var(--neet-radius-lg); }
.neet-nested-text--icon-left { display: flex; gap: 16px; }
.neet-nested-text--icon-right { display: flex; flex-direction: row-reverse; gap: 16px; }
.neet-nested-text--align-center { text-align: center; }
.neet-nested-text--align-right { text-align: right; }
.neet-nested-text__media { width: 48px; height: 48px; border-radius: var(--neet-radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.neet-nested-text--icon-top .neet-nested-text__media { margin-bottom: 16px; }
.neet-nested-text--align-center .neet-nested-text__media { margin-left: auto; margin-right: auto; }
.neet-nested-text__media .material-symbols-outlined { font-size: 24px; }
.neet-nested-text__media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--neet-radius-md); }
.neet-nested-text__body { flex: 1; }
.neet-nested-text__body h1, .neet-nested-text__body h2, .neet-nested-text__body h3, .neet-nested-text__body h4 { margin: 0 0 12px; font-weight: 500; color: var(--neet-on-surface); }
.neet-nested-text__content { font-size: 15px; line-height: 1.6; color: var(--neet-on-surface-variant); }
.neet-nested-text__content p { margin: 0 0 12px; }
.neet-nested-text__content p:last-child { margin-bottom: 0; }

/* Nested Pricing Card */
.neet-nested-price { padding: 24px; border-radius: var(--neet-radius-xl); text-align: center; position: relative; display: flex; flex-direction: column; height: 100%; }
.neet-nested-price--featured { border: 2px solid var(--neet-primary); box-shadow: 0 8px 24px rgba(103,80,164,0.15); }
.neet-nested-price__badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--neet-primary); color: var(--neet-on-primary); padding: 4px 16px; border-radius: var(--neet-radius-full); font-size: 12px; font-weight: 600; }
.neet-nested-price__name { font-size: 22px; font-weight: 500; margin: 0 0 8px; color: var(--neet-on-surface); }
.neet-nested-price__desc { font-size: 14px; color: var(--neet-on-surface-variant); margin: 0 0 16px; }
.neet-nested-price__price { font-size: 48px; font-weight: 500; color: var(--neet-primary); margin: 0 0 24px; line-height: 1; }
.neet-nested-price__price span { font-size: 16px; font-weight: 400; color: var(--neet-on-surface-variant); }
.neet-nested-price__features { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; flex: 1; }
.neet-nested-price__features li { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; font-size: 14px; color: var(--neet-on-surface-variant); border-bottom: 1px solid var(--neet-outline-variant); }
.neet-nested-price__features li:last-child { border-bottom: none; }
.neet-nested-price__features .material-symbols-outlined { color: var(--neet-primary); font-size: 20px; }

/* Nested CTA */
.neet-nested-cta { padding: 24px; border-radius: var(--neet-radius-xl); text-align: center; display: flex; flex-direction: column; height: 100%; }
.neet-nested-cta h1, .neet-nested-cta h2, .neet-nested-cta h3, .neet-nested-cta h4 { margin: 0 0 12px; font-weight: 500; }
.neet-nested-cta__content { flex: 1; font-size: 15px; line-height: 1.6; margin-bottom: 20px; opacity: 0.9; }
.neet-nested-cta__content p { margin: 0; }

/* Nested Image */
.neet-nested-image { margin: 0; display: block; text-decoration: none; }
.neet-nested-image img { width: 100%; height: auto; display: block; }
.neet-nested-image--rounded img { border-radius: var(--neet-radius-lg); }
.neet-nested-image--circle img { border-radius: 50%; }
.neet-nested-image figcaption { text-align: center; font-size: 13px; color: var(--neet-on-surface-variant); margin-top: 8px; }

/* Nested Feature Card */
.neet-nested-feature { padding: 24px; border-radius: var(--neet-radius-lg); text-decoration: none; color: inherit; display: block; transition: all 0.2s; }
.neet-nested-feature--icon-top { text-align: center; }
.neet-nested-feature--icon-left { display: flex; gap: 16px; }
.neet-nested-feature--icon-right { display: flex; flex-direction: row-reverse; gap: 16px; }
a.neet-nested-feature:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.neet-nested-feature__media { width: 48px; height: 48px; border-radius: var(--neet-radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.neet-nested-feature--icon-top .neet-nested-feature__media { margin: 0 auto 16px; }
.neet-nested-feature__media .material-symbols-outlined { font-size: 24px; }
.neet-nested-feature__media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--neet-radius-md); }
.neet-nested-feature__body { flex: 1; }
.neet-nested-feature__body h1, .neet-nested-feature__body h2, .neet-nested-feature__body h3, .neet-nested-feature__body h4 { margin: 0 0 8px; font-weight: 500; color: var(--neet-on-surface); }
.neet-nested-feature__content { font-size: 14px; line-height: 1.5; color: var(--neet-on-surface-variant); }
.neet-nested-feature__content p { margin: 0; }

/* ========== PRICING TABLE ========== */
.neet-pricing { display: grid; gap: 24px; margin-bottom: 32px; }
.neet-pricing--cols-2 { grid-template-columns: repeat(2, 1fr); }
.neet-pricing--cols-3 { grid-template-columns: repeat(3, 1fr); }
.neet-pricing--cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .neet-pricing--cols-3, .neet-pricing--cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .neet-pricing { grid-template-columns: 1fr !important; } }

.neet-pricing__card { border-radius: var(--neet-radius-xl); padding: 32px; text-align: center; position: relative; display: flex; flex-direction: column; }
.neet-pricing__card--featured { transform: scale(1.05); box-shadow: 0 8px 32px rgba(103,80,164,0.2); z-index: 1; border: 2px solid var(--neet-primary); }
.neet-pricing__badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--neet-primary); color: var(--neet-on-primary); padding: 4px 16px; border-radius: var(--neet-radius-full); font-size: 12px; font-weight: 600; }
.neet-pricing__name { font-size: 24px; font-weight: 500; margin: 0 0 8px; color: var(--neet-on-surface); }
.neet-pricing__desc { font-size: 14px; color: var(--neet-on-surface-variant); margin: 0 0 16px; }
.neet-pricing__price { font-size: 56px; font-weight: 500; color: var(--neet-primary); margin: 0 0 24px; line-height: 1; }
.neet-pricing__price span { font-size: 16px; font-weight: 400; color: var(--neet-on-surface-variant); }
.neet-pricing__features { list-style: none; padding: 0; margin: 0 0 32px; text-align: left; flex: 1; }
.neet-pricing__features li { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; font-size: 14px; color: var(--neet-on-surface-variant); border-bottom: 1px solid var(--neet-outline-variant); }
.neet-pricing__features li:last-child { border-bottom: none; }
.neet-pricing__features .material-symbols-outlined { color: var(--neet-primary); font-size: 20px; }

/* Comparison */
.neet-comparison { margin-bottom: 32px; overflow-x: auto; }
.neet-comparison__table { width: 100%; border-collapse: collapse; background: var(--neet-surface); border-radius: var(--neet-radius-lg); overflow: hidden; }
.neet-comparison__table th, .neet-comparison__table td { padding: 16px 20px; text-align: center; border-bottom: 1px solid var(--neet-outline-variant); }
.neet-comparison__table th { background: var(--neet-surface-container); font-weight: 600; font-size: 14px; }
.neet-comparison__table td:first-child { text-align: left; font-weight: 500; }
.neet-comparison__table tbody tr:last-child td { border-bottom: none; }
.neet-comparison--highlight { background: var(--neet-primary-container) !important; }
.neet-comparison--yes { color: var(--neet-success); font-size: 24px; }
.neet-comparison--no { color: var(--neet-error); font-size: 24px; }

/* Text Block, Section Header, Image, CTA, Contact Form */
.neet-text-block { margin-bottom: 32px; }
.neet-text-block--card { padding: 32px; border-radius: var(--neet-radius-lg); display: flex; flex-direction: column; }
.neet-text-block--outlined { padding: 32px; border-radius: var(--neet-radius-lg); border: 1px solid var(--neet-outline-variant); display: flex; flex-direction: column; }
.neet-text-block--icon-left { display: flex; gap: 20px; }
.neet-text-block--icon-right { display: flex; flex-direction: row-reverse; gap: 20px; }
.neet-text-block--align-center { text-align: center; }
.neet-text-block--align-right { text-align: right; }
.neet-text-block__media { width: 56px; height: 56px; border-radius: var(--neet-radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-bottom: 16px; }
.neet-text-block--icon-left .neet-text-block__media, .neet-text-block--icon-right .neet-text-block__media { margin-bottom: 0; }
.neet-text-block--align-center .neet-text-block__media { margin-left: auto; margin-right: auto; }
.neet-text-block__media .material-symbols-outlined { font-size: 28px; }
.neet-text-block__media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--neet-radius-md); }
.neet-text-block__body { flex: 1; }
.neet-text-block__title { font-size: 20px; font-weight: 500; margin: 0 0 12px; color: var(--neet-on-surface); }
.neet-text-block__content { font-size: 16px; line-height: 1.7; color: var(--neet-on-surface-variant); }
.neet-text-block__content p { margin: 0 0 16px; }
.neet-text-block__content p:last-child { margin-bottom: 0; }

.neet-section-header { margin-bottom: 48px; }
.neet-section-header--center { text-align: center; }
.neet-section-header--left { text-align: left; }
.neet-section-header--right { text-align: right; }
.neet-section-header h1, .neet-section-header h2, .neet-section-header h3, .neet-section-header h4 { font-weight: 400; margin: 0 0 16px; }
.neet-section-header__subtitle { font-size: 18px; line-height: 1.6; color: var(--neet-on-surface-variant); }
.neet-section-header__subtitle p { margin: 0; }

/* Section header with a background: inherit text colour from that background token */
.neet-section-header[class*="neet-bg--"]:not(.neet-bg--transparent) h1,
.neet-section-header[class*="neet-bg--"]:not(.neet-bg--transparent) h2,
.neet-section-header[class*="neet-bg--"]:not(.neet-bg--transparent) h3,
.neet-section-header[class*="neet-bg--"]:not(.neet-bg--transparent) h4 { margin: 0 0 16px; }

/* Section header with a gradient background: ensure subtitle is readable */
.neet-section-header[style*="background:linear-gradient"],
.neet-section-header[style*="background: linear-gradient"] {
    background-clip: unset;
}

/* Full-width: the box-model breakout is applied inline; just ensure overflow is visible */
.neet-section-header[style*="width:100vw"] {
    overflow: visible;
    /* Ensure the block itself doesn't scroll-clip the page */
    max-width: 100vw;
}

.neet-image { margin: 0 0 32px; }
.neet-image img { width: 100%; height: auto; display: block; }
.neet-image--rounded img { border-radius: var(--neet-radius-lg); }
.neet-image--circle img { border-radius: 50%; }
.neet-image--shadow-small img { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.neet-image--shadow-medium img { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.neet-image--shadow-large img { box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.neet-image--large { max-width: 800px; }
.neet-image--medium { max-width: 600px; }
.neet-image--small { max-width: 400px; }
.neet-image--align-center { margin-left: auto; margin-right: auto; }
.neet-image--align-right { margin-left: auto; }
.neet-image figcaption { text-align: center; font-size: 14px; color: var(--neet-on-surface-variant); margin-top: 12px; }

.neet-cta { padding: 48px; border-radius: var(--neet-radius-xl); margin-bottom: 32px; }
.neet-cta--center { text-align: center; }
.neet-cta--left { text-align: left; }
.neet-cta--split { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.neet-cta h1, .neet-cta h2, .neet-cta h3 { font-weight: 400; margin: 0 0 16px; }
.neet-cta__desc { font-size: 18px; line-height: 1.6; margin: 0 0 24px; opacity: 0.9; }
.neet-cta__desc p { margin: 0; }
.neet-cta--split .neet-cta__content { flex: 1; }
.neet-cta--split .neet-cta__desc { margin-bottom: 0; }

.neet-contact-form { padding: 48px; border-radius: var(--neet-radius-xl); margin-bottom: 32px; max-width: 700px; }
.neet-contact-form h1, .neet-contact-form h2, .neet-contact-form h3, .neet-contact-form h4 { font-weight: 400; margin: 0 0 12px; color: var(--neet-on-surface); }
.neet-contact-form__desc { font-size: 16px; color: var(--neet-on-surface-variant); margin-bottom: 32px; }
.neet-contact-form__desc p { margin: 0; }
.neet-form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 600px) { .neet-form-row { grid-template-columns: 1fr; } }
.neet-form-field { margin-bottom: 16px; }
.neet-form-field label { display: block; font-size: 14px; font-weight: 500; color: var(--neet-on-surface); margin-bottom: 8px; }
.neet-form-field input, .neet-form-field textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--neet-outline-variant); border-radius: var(--neet-radius-sm); font-family: var(--neet-font); font-size: 16px; background: var(--neet-surface); color: var(--neet-on-surface); box-sizing: border-box; }
.neet-form-field input:focus, .neet-form-field textarea:focus { outline: none; border-color: var(--neet-primary); }
.neet-contact-form__success { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px; }
.neet-contact-form__success .material-symbols-outlined { font-size: 64px; color: var(--neet-success); margin-bottom: 16px; }
.neet-contact-form__success p { font-size: 18px; color: var(--neet-on-surface); margin: 0; }

/* Spacer & Divider */
.neet-spacer--small { height: 24px; }
.neet-spacer--medium { height: 48px; }
.neet-spacer--large { height: 80px; }
.neet-spacer--xlarge { height: 120px; }
.neet-divider { border: none; height: 1px; margin: 32px 0; }
.neet-divider--line { border-top: 1px solid; }
.neet-divider--dashed { border-top: 1px dashed; }
.neet-divider--outline-variant { border-color: var(--neet-outline-variant); }
.neet-divider--outline { border-color: var(--neet-outline); }
.neet-divider--primary { border-color: var(--neet-primary); }

/* Page builder content wrapper */
.neet-pb-content { width: 100%; }
.neet-pb-section { margin-bottom: 0; }

/* Page builder pages: remove main-content padding so sections sit edge-to-edge */
body.neet-pb-page .main-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ── Per-element corner radius overrides ───────── */
.neet-hero[style*="--el-radius"]   { border-radius: var(--el-radius) !important; }
.neet-feature-card[style*="--el-radius"] { border-radius: var(--el-radius) !important; }
.neet-flex-row[style*="--el-radius"]     { border-radius: var(--el-radius) !important; }
.neet-nested-text[style*="--el-radius"]  { border-radius: var(--el-radius) !important; }

/* ── Hero media edge-to-edge ──────────────────── */
/*
   ROOT CAUSE OF PREVIOUS FAILURES:
   .neet-hero__media is display:flex. When its img child becomes
   position:absolute (out of flow), the flex container has no in-flow
   content, so the grid-stretch height becomes "auto" for percentage
   resolution purposes. inset:0 then has no height to fill against.

   FIX: switch to display:block for the media container in edge mode.
   A block-level grid item with align-self:stretch gets a DEFINITE height
   from the grid algorithm. position:absolute children can then resolve
   inset:0 correctly against that definite height.

   All rules use !important to beat any theme img/video resets
   (e.g. "img { height: auto; max-width: 100%; }").
*/
.neet-hero--media-edge .neet-hero__media,
.neet-hero--media-edge .neet-hero__image {
    display: block !important;      /* not flex — definite height for abs children */
    position: relative !important;  /* containing block for the abs-pos img */
    padding: 0 !important;
    align-self: stretch !important; /* fill the full grid row height */
    overflow: hidden !important;    /* clip image to rounded corners of .neet-hero */
    min-height: 280px;
}

.neet-hero--media-edge .neet-hero__media img,
.neet-hero--media-edge .neet-hero__image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;   /* beat theme: img { max-width: 100% } */
    max-height: none !important;  /* beat any theme max-height resets */
    object-fit: cover !important;
    border-radius: 0 !important;
    display: block !important;
}

/* video embed in edge mode */
.neet-hero--media-edge .neet-video-embed {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    right: 0 !important; bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0;
}
.neet-hero--media-edge .neet-video-embed iframe {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    right: 0 !important; bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0;
}

/* ================================================================
   FLEXIBLE ROW — NO GAP
   Design: the row container owns the rounded corners via overflow:hidden.
   Columns have overflow:hidden to clip their own internal content cleanly.
   Image-only columns use absolute-fill (hero media-edge technique) so the
   image stretches to the full column height with zero patching.
   Non-image columns get border-radius:0 so nothing "peeks" at inner edges.
================================================================ */

/* Row: zero gap, outer corners stay rounded, clips children */
.neet-flex-row--no-gap {
    gap: 0 !important;
    overflow: hidden;
}

/* Columns: stretch full row height, clip inner-edge content */
.neet-flex-row--no-gap > .neet-flex-row__column {
    gap: 0;
    overflow: hidden;
    align-self: stretch;
}

/* All direct-child elements: no own border-radius
   (the row's overflow:hidden owns the outer rounding already).
   Do NOT set flex:1 here — that would stretch multi-element columns
   and create huge gaps. Image-fill columns handle their own sizing
   via absolute positioning (see .neet-flex-row__column--img-fill). */
.neet-flex-row--no-gap > .neet-flex-row__column > * {
    border-radius: 0 !important;
}

/* ── Image-fill column: absolute positioning (hero media-edge approach) ──
   Applied by PHP when a no-gap column contains exactly one image_block.
   The image absolutely fills the column so it matches the adjacent text
   column height exactly, with no clipping artefacts. */
.neet-flex-row__column--img-fill {
    position: relative;
    /* Ensure a sensible floor when the other column is short */
    min-height: 300px;
}

/* Ensure items in img-fill columns don't try to grow — the image
   is absolutely positioned and handles its own sizing. */
.neet-flex-row__column--img-fill > * {
    flex: none !important;
    min-height: unset !important;
    border-radius: 0 !important;
}

/* Stretch the image wrapper chain to fill the column absolutely */
.neet-flex-row__column--img-fill .neet-nested-image-wrap,
.neet-flex-row__column--img-fill .neet-nested-image {
    position: absolute !important;
    inset: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    overflow: hidden;
}

/* Image itself fills its absolutely-positioned parent */
.neet-flex-row__column--img-fill img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    display: block !important;
}

/* ================================================================
   FLEXIBLE ROW — INNER CORNER FLATTENING (v3)

   Two separate strategies:
   A) NO-GAP rows  — row + columns both have overflow:hidden, so the
      row's border-radius clips the outer corners cleanly. We zero ALL
      border-radius on container descendants so nothing curves inward
      at the internal seam. Pill buttons are excepted.
   B) GAPPED rows  — only flatten the *touching* side of direct
      children and key nested elements (video iframes, images).
      Wrapped in a min-width query so stacked mobile columns are
      never affected.
================================================================ */

/* ── A: NO-GAP — zero every container's border-radius ──────── */
.neet-flex-row--no-gap > .neet-flex-row__column > *,
.neet-flex-row--no-gap > .neet-flex-row__column .neet-video-embed,
.neet-flex-row--no-gap > .neet-flex-row__column .neet-video-embed iframe,
.neet-flex-row--no-gap > .neet-flex-row__column .neet-nested-image,
.neet-flex-row--no-gap > .neet-flex-row__column .neet-nested-image-wrap,
.neet-flex-row--no-gap > .neet-flex-row__column .neet-nested-image img,
.neet-flex-row--no-gap > .neet-flex-row__column .neet-lb-trigger,
.neet-flex-row--no-gap > .neet-flex-row__column > * > img {
    border-radius: 0 !important;
}

/* ── B: GAPPED — flatten touching sides on desktop only ─────── */
@media (min-width: 601px) {
    /* First column: zero right-side corners on direct children + key descendants */
    .neet-flex-row:not(.neet-flex-row--square):not(.neet-flex-row--no-gap):not(.neet-flex-row--cols-1)
        > .neet-flex-row__column:first-child > *,
    .neet-flex-row:not(.neet-flex-row--square):not(.neet-flex-row--no-gap):not(.neet-flex-row--cols-1)
        > .neet-flex-row__column:first-child .neet-video-embed iframe,
    .neet-flex-row:not(.neet-flex-row--square):not(.neet-flex-row--no-gap):not(.neet-flex-row--cols-1)
        > .neet-flex-row__column:first-child .neet-nested-image img,
    .neet-flex-row:not(.neet-flex-row--square):not(.neet-flex-row--no-gap):not(.neet-flex-row--cols-1)
        > .neet-flex-row__column:first-child > *:not(.neet-slider-section) > img {
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }
    /* Last column: zero left-side corners */
    .neet-flex-row:not(.neet-flex-row--square):not(.neet-flex-row--no-gap):not(.neet-flex-row--cols-1)
        > .neet-flex-row__column:last-child > *,
    .neet-flex-row:not(.neet-flex-row--square):not(.neet-flex-row--no-gap):not(.neet-flex-row--cols-1)
        > .neet-flex-row__column:last-child .neet-video-embed iframe,
    .neet-flex-row:not(.neet-flex-row--square):not(.neet-flex-row--no-gap):not(.neet-flex-row--cols-1)
        > .neet-flex-row__column:last-child .neet-nested-image img,
    .neet-flex-row:not(.neet-flex-row--square):not(.neet-flex-row--no-gap):not(.neet-flex-row--cols-1)
        > .neet-flex-row__column:last-child > *:not(.neet-slider-section) > img {
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }
    /* Middle columns (3- and 4-col): zero all corners */
    .neet-flex-row:not(.neet-flex-row--square):not(.neet-flex-row--no-gap):not(.neet-flex-row--cols-1)
        > .neet-flex-row__column:not(:first-child):not(:last-child) > *,
    .neet-flex-row:not(.neet-flex-row--square):not(.neet-flex-row--no-gap):not(.neet-flex-row--cols-1)
        > .neet-flex-row__column:not(:first-child):not(:last-child) .neet-video-embed iframe,
    .neet-flex-row:not(.neet-flex-row--square):not(.neet-flex-row--no-gap):not(.neet-flex-row--cols-1)
        > .neet-flex-row__column:not(:first-child):not(:last-child) .neet-nested-image img {
        border-radius: 0 !important;
    }
}



/* ── Image Block: match-height ──────────────────────────────────
   When enabled, the image wrapper fills its flex column, so the
   image height equals the tallest column in the row automatically. */
.neet-nested-image-wrap.neet-img--match-height {
    flex: 1;               /* grow to fill remaining column height */
    min-height: 200px;     /* sensible floor */
    display: flex;
    flex-direction: column;
}
.neet-img--match-height .neet-nested-image,
.neet-img--match-height .neet-lb-trigger {
    flex: 1;
    overflow: hidden;
    display: flex !important;   /* override figure default */
    flex-direction: column;
}
.neet-img--match-height img {
    flex: 1;
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    object-fit: cover !important;
}

/* ── Lightbox trigger button ─────────────────────────────────── */
.neet-lb-trigger {
    display: block;
    background: none;
    border: none;
    padding: 0;
    cursor: zoom-in;
    position: relative;
    overflow: hidden;
    text-align: left;   /* reset button default */
    width: 100%;        /* fill wrap width */
    border-radius: 0;   /* prevent theme button styles making this pill-shaped */
}
/* Inside a slider: override the lb-trigger so image border-radius shows correctly */
.neet-slider-section .neet-lb-trigger,
.neet-slider-section .neet-slider__lb-btn {
    border-radius: 0 !important;
    overflow: visible !important;
    width: auto;
}
.neet-lb-trigger img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.35s ease;
}
/* Zoom icon overlay */
.neet-lb-zoom {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.neet-lb-zoom svg {
    width: 18px;
    height: 18px;
    color: #fff;
    stroke: #fff;
}
.neet-lb-trigger:hover .neet-lb-zoom {
    opacity: 1;
}
.neet-lb-trigger:hover img {
    transform: scale(1.03);
}

/* ── Lightbox overlay ────────────────────────────────────────── */
.neet-lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: background 0.25s ease;
    cursor: zoom-out;
}
.neet-lb-overlay.is-open {
    background: rgba(0,0,0,0.88);
}
.neet-lb-inner {
    position: relative;
    max-width: min(92vw, 1400px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.neet-lb-overlay.is-open .neet-lb-inner {
    opacity: 1;
    transform: scale(1);
}
.neet-lb-img {
    max-width: 100%;
    max-height: calc(92vh - 60px);
    object-fit: contain;
    display: block;
    border-radius: 4px;
    cursor: default;
}
.neet-lb-caption {
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
    max-width: 600px;
}
.neet-lb-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.neet-lb-close:hover {
    background: rgba(255,255,255,0.28);
}
/* prev/next arrows */
.neet-lb-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    z-index: 1000000;
}
.neet-lb-arrow:hover { background: rgba(255,255,255,0.25); }
.neet-lb-arrow--prev { left: 16px; }
.neet-lb-arrow--next { right: 16px; }

/* ── Video Block ──────────────────── */
.neet-video-block { overflow: hidden; }
.neet-video-block__caption {
    font-size: 13px;
    color: var(--neet-on-surface-variant, #49454F);
    text-align: center;
    margin: 8px 0 0;
    padding: 0 12px 12px;
}

/* ── Heading Block ──────────────────── */
.neet-heading-block { display: block; }
.neet-heading-block__text { margin: 0; }


/* ── Hero content padding sizes ──────────────── */
.neet-hero__content--pad-none   { padding: 0; }
.neet-hero__content--pad-small  { padding: 24px; }
.neet-hero__content--pad-medium { padding: 48px 40px; }
.neet-hero__content--pad-large  { padding: 64px 56px; }

/* ============================================
   NEET FORM ELEMENT STYLES
   ============================================ */

.neet-form-wrapper {
    border-radius: 12px;
}

.neet-form-padding--small {
    padding: 16px;
}

.neet-form-padding--medium {
    padding: 24px;
}

.neet-form-padding--large {
    padding: 40px;
}

.neet-form-title {
    margin: 0 0 12px;
}

.neet-form-description {
    margin-bottom: 24px;
    color: var(--md-on-surface-variant, #49454F);
}

.neet-form-placeholder {
    padding: 40px;
    background: var(--md-surface-container-low, #F7F2FA);
    border: 2px dashed var(--md-outline-variant, #CAC4D0);
    border-radius: 12px;
    text-align: center;
    color: var(--md-on-surface-variant, #49454F);
}

.neet-form-error {
    color: var(--md-error, #B3261E);
    padding: 16px;
    background: var(--md-error-container, #F9DEDC);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .neet-form-padding--large {
        padding: 24px;
    }
}

/* ============================================
   MATERIAL DESIGN 3 BUTTONS
   ============================================ */

/* Base Button */
.neet-m3-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    overflow: hidden;
    vertical-align: middle;
}

.neet-m3-btn__label {
    position: relative;
    z-index: 1;
    text-align: center; /* center multi-line text when button label wraps */
}

.neet-m3-btn__icon {
    font-size: 18px;
    position: relative;
    z-index: 1;
}

/* Button Sizes */
.neet-m3-btn--small {
    height: 32px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 16px;
}

.neet-m3-btn--small .neet-m3-btn__icon { font-size: 16px; }

.neet-m3-btn--medium {
    height: 40px;
    padding: 0 24px;
    font-size: 14px;
    border-radius: 20px;
}

.neet-m3-btn--large {
    height: 56px;
    padding: 0 32px;
    font-size: 16px;
    border-radius: 28px;
}

.neet-m3-btn--large .neet-m3-btn__icon { font-size: 22px; }

.neet-m3-btn--full {
    width: 100%;
}

/* ===== FILLED BUTTON (High Emphasis) ===== */
.neet-m3-btn--filled {
    color: var(--md-on-primary, #FFFFFF);
}

.neet-m3-btn--filled.neet-m3-btn--primary {
    background: var(--md-primary, #6750A4);
}
.neet-m3-btn--filled.neet-m3-btn--primary:hover {
    background: var(--md-primary-hover, #7965AF);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.neet-m3-btn--filled.neet-m3-btn--secondary {
    background: var(--md-secondary, #625B71);
    color: var(--md-on-secondary, #FFFFFF);
}
.neet-m3-btn--filled.neet-m3-btn--secondary:hover {
    background: #7A7289;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.neet-m3-btn--filled.neet-m3-btn--tertiary {
    background: var(--md-tertiary, #7D5260);
    color: var(--md-on-tertiary, #FFFFFF);
}
.neet-m3-btn--filled.neet-m3-btn--tertiary:hover {
    background: #956B79;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.neet-m3-btn--filled.neet-m3-btn--error {
    background: var(--md-error, #B3261E);
    color: var(--md-on-error, #FFFFFF);
}
.neet-m3-btn--filled.neet-m3-btn--error:hover {
    background: #C44137;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

/* ===== FILLED TONAL BUTTON (Medium-High Emphasis) ===== */
.neet-m3-btn--filled-tonal.neet-m3-btn--primary {
    background: var(--md-secondary-container, #E8DEF8);
    color: var(--md-on-secondary-container, #1D192B);
}
.neet-m3-btn--filled-tonal.neet-m3-btn--primary:hover {
    background: #D9CDEC;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.neet-m3-btn--filled-tonal.neet-m3-btn--secondary {
    background: var(--md-surface-container-high, #ECE6F0);
    color: var(--md-on-surface, #1D1B20);
}
.neet-m3-btn--filled-tonal.neet-m3-btn--secondary:hover {
    background: #DED8E4;
}

.neet-m3-btn--filled-tonal.neet-m3-btn--tertiary {
    background: var(--md-tertiary-container, #FFD8E4);
    color: var(--md-on-tertiary-container, #31111D);
}
.neet-m3-btn--filled-tonal.neet-m3-btn--tertiary:hover {
    background: #F3C9D8;
}

.neet-m3-btn--filled-tonal.neet-m3-btn--error {
    background: var(--md-error-container, #F9DEDC);
    color: var(--md-on-error-container, #410E0B);
}
.neet-m3-btn--filled-tonal.neet-m3-btn--error:hover {
    background: #F0CCCB;
}

/* ===== OUTLINED BUTTON (Medium Emphasis) ===== */
.neet-m3-btn--outlined {
    background: transparent;
    border: 1px solid var(--md-outline, #79747E);
}

.neet-m3-btn--outlined.neet-m3-btn--primary {
    color: var(--md-primary, #6750A4);
}
.neet-m3-btn--outlined.neet-m3-btn--primary:hover {
    background: rgba(103, 80, 164, 0.08);
}

.neet-m3-btn--outlined.neet-m3-btn--secondary {
    color: var(--md-secondary, #625B71);
}
.neet-m3-btn--outlined.neet-m3-btn--secondary:hover {
    background: rgba(98, 91, 113, 0.08);
}

.neet-m3-btn--outlined.neet-m3-btn--tertiary {
    color: var(--md-tertiary, #7D5260);
}
.neet-m3-btn--outlined.neet-m3-btn--tertiary:hover {
    background: rgba(125, 82, 96, 0.08);
}

.neet-m3-btn--outlined.neet-m3-btn--error {
    color: var(--md-error, #B3261E);
    border-color: var(--md-error, #B3261E);
}
.neet-m3-btn--outlined.neet-m3-btn--error:hover {
    background: rgba(179, 38, 30, 0.08);
}

/* ===== ELEVATED BUTTON (With Shadow) ===== */
.neet-m3-btn--elevated {
    background: var(--md-surface-container-low, #F7F2FA);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.neet-m3-btn--elevated.neet-m3-btn--primary {
    color: var(--md-primary, #6750A4);
}
.neet-m3-btn--elevated.neet-m3-btn--primary:hover {
    background: var(--md-surface-container, #F3EDF7);
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

.neet-m3-btn--elevated.neet-m3-btn--secondary {
    color: var(--md-secondary, #625B71);
}
.neet-m3-btn--elevated.neet-m3-btn--tertiary {
    color: var(--md-tertiary, #7D5260);
}
.neet-m3-btn--elevated.neet-m3-btn--error {
    color: var(--md-error, #B3261E);
}

/* ===== TEXT BUTTON (Low Emphasis) ===== */
.neet-m3-btn--text {
    background: transparent;
    padding-left: 12px;
    padding-right: 12px;
}

.neet-m3-btn--text.neet-m3-btn--primary {
    color: var(--md-primary, #6750A4);
}
.neet-m3-btn--text.neet-m3-btn--primary:hover {
    background: rgba(103, 80, 164, 0.08);
}

.neet-m3-btn--text.neet-m3-btn--secondary {
    color: var(--md-secondary, #625B71);
}
.neet-m3-btn--text.neet-m3-btn--secondary:hover {
    background: rgba(98, 91, 113, 0.08);
}

.neet-m3-btn--text.neet-m3-btn--tertiary {
    color: var(--md-tertiary, #7D5260);
}
.neet-m3-btn--text.neet-m3-btn--tertiary:hover {
    background: rgba(125, 82, 96, 0.08);
}

.neet-m3-btn--text.neet-m3-btn--error {
    color: var(--md-error, #B3261E);
}
.neet-m3-btn--text.neet-m3-btn--error:hover {
    background: rgba(179, 38, 30, 0.08);
}

/* Button Group */
.neet-m3-btn-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.neet-m3-btn-group--gap-small { gap: 8px; }
.neet-m3-btn-group--gap-medium { gap: 16px; }
.neet-m3-btn-group--gap-large { gap: 24px; }

/* Button Wrap — uses flexbox so justify-content drives alignment cleanly
   in both flex-column contexts (nested columns) and normal block flow.
   The text-align fallback from PHP is no longer needed but kept for safety. */
.neet-m3-btn-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;       /* stop button stretching vertically inside the wrapper */
    gap: 8px;
    margin: 8px 0;
    justify-content: flex-start;
    /* These two together prevent the wrapper itself from growing in a flex column.
       Without them, .neet-flex-row__column > * { flex: 1 } makes the btn-wrap fill
       the full column height, which then stretches the button to match. */
    flex: 0 0 auto !important;
    width: 100%;               /* keep full width so left/centre/right alignment works */
}

/* Alignment modifiers written by PHP via style attr are overridden here
   so we handle them with classes instead. These mirror the PHP $align values. */
.neet-m3-btn-wrap--center { justify-content: center; }
.neet-m3-btn-wrap--right  { justify-content: flex-end; }
.neet-m3-btn-wrap--stretch .neet-m3-btn { flex: 1; }

/* Ripple Effect (optional - via JS) */
.neet-m3-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: inherit;
}

.neet-m3-btn:active::after {
    opacity: 0.12;
}

/* Focus State */
.neet-m3-btn:focus-visible {
    outline: 2px solid var(--md-primary, #6750A4);
    outline-offset: 2px;
}

/* Disabled State */
.neet-m3-btn:disabled,
.neet-m3-btn--disabled {
    opacity: 0.38;
    pointer-events: none;
}

/* ==========================================================================
   Video Element
   ========================================================================== */

.neet-video {
    margin: 0 0 1.5rem;
}

.neet-video--full {
    max-width: 100%;
}

.neet-video--large {
    max-width: 800px;
}

.neet-video--medium {
    max-width: 600px;
}

.neet-video--small {
    max-width: 400px;
}

.neet-video--align-left {
    margin-left: 0;
    margin-right: auto;
}

.neet-video--align-center {
    margin-left: auto;
    margin-right: auto;
}

.neet-video--align-right {
    margin-left: auto;
    margin-right: 0;
}

.neet-video__wrapper {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    border-radius: var(--md-sys-shape-corner-large, 16px);
    background: var(--md-sys-color-surface-container, #f5f5f5);
}

.neet-video__wrapper iframe,
.neet-video__wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--md-sys-shape-corner-large, 16px);
}

.neet-video figcaption {
    text-align: center;
    padding: 0.75rem 0;
    color: var(--md-sys-color-on-surface-variant, #666);
    font-size: 0.875rem;
}

/* ── Image Slider ─────────────────────────── */
.neet-slider {
    overflow: hidden;
    width: 100%;
    padding: 8px 0;
}
.neet-slider__track {
    display: flex;
    width: max-content;
}
.neet-slider__slide {
    flex-shrink: 0;
}

/* Post Embed */
.neet-post-embed__title { margin-top: 0; margin-bottom: 16px; }
.neet-post-embed__image { border-radius: inherit; }
.neet-post-embed__content > *:last-child { margin-bottom: 0; }

/* ── Flex Row new features ─────────────────────────────────────────── */
.neet-flex-row--cols-1 { grid-template-columns: 1fr; }
.neet-flex-row--gap-none   { gap: 0; }
.neet-flex-row--gap-xlarge { gap: 60px; }
.neet-flex-row--reverse { direction: rtl; }
.neet-flex-row--reverse > * { direction: ltr; }
.neet-flex-row--equal-height > .neet-flex-row__column { align-self: stretch; }
@media (max-width: 600px) {
    .neet-flex-row--reverse { direction: ltr; }
}

/* ── Image alignment ──────────────────────────────────────────────── */
.neet-img-align--left   { display:flex; justify-content:flex-start; }
.neet-img-align--center { display:flex; justify-content:center; }
.neet-img-align--right  { display:flex; justify-content:flex-end; }
.neet-nested-image__caption { display:block; font-size:13px; text-align:center; margin-top:8px; color:var(--neet-on-surface-variant,#49454F); }

/* ── Image hover effects ──────────────────────────────────────────── */
.neet-nested-image { overflow:hidden; display:block; }
.neet-nested-image img { display:block; width:100%; transition:transform 0.35s ease, opacity 0.35s ease, filter 0.35s ease; }

/* Zoom In */
.neet-img-hover--zoom-in:hover img  { transform: scale(1.06); }
/* Zoom Out */
.neet-nested-image.neet-img-hover--zoom-out img { transform: scale(1.06); }
.neet-img-hover--zoom-out:hover img { transform: scale(1); }
/* Fade */
.neet-img-hover--fade:hover img { opacity: 0.75; }
/* Grayscale → Colour */
.neet-nested-image.neet-img-hover--grayscale img { filter: grayscale(100%); }
.neet-img-hover--grayscale:hover img { filter: grayscale(0%); }
/* Lift */
.neet-img-hover--lift { transition: box-shadow 0.3s ease, transform 0.3s ease; }
.neet-img-hover--lift:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.15); }

/* ── Tabs ─────────────────────────────────────────────────────────── */
.neet-tabs { width: 100%; }

/* Nav */
.neet-tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid var(--neet-outline-variant, #CAC4D0);
    margin-bottom: 0;
}
.neet-tabs--align-center .neet-tabs__nav { justify-content: center; }
.neet-tabs--align-right  .neet-tabs__nav { justify-content: flex-end; }

/* Default style — underline */
.neet-tabs--default .neet-tabs__btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--neet-on-surface-variant, #49454F);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.neet-tabs--default .neet-tabs__btn:hover {
    color: var(--neet-primary, #6750A4);
}
.neet-tabs--default .neet-tabs__btn--active {
    color: var(--neet-primary, #6750A4);
    border-bottom-color: var(--neet-primary, #6750A4);
}

/* Pills style */
.neet-tabs--pills .neet-tabs__nav {
    border-bottom: none;
    gap: 8px;
    padding: 4px 0 12px;
}
.neet-tabs--pills .neet-tabs__btn {
    background: var(--neet-surface-container, #F3EDF7);
    border: none;
    border-radius: var(--neet-radius-full, 9999px);
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--neet-on-surface-variant, #49454F);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.neet-tabs--pills .neet-tabs__btn--active {
    background: var(--neet-primary, #6750A4);
    color: var(--neet-on-primary, #fff);
}

/* Boxed style */
.neet-tabs--boxed .neet-tabs__nav {
    border-bottom: none;
    gap: 4px;
}
.neet-tabs--boxed .neet-tabs__btn {
    background: transparent;
    border: 2px solid var(--neet-outline-variant, #CAC4D0);
    border-bottom: none;
    border-radius: var(--neet-radius-sm, 8px) var(--neet-radius-sm, 8px) 0 0;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--neet-on-surface-variant, #49454F);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.neet-tabs--boxed .neet-tabs__btn--active {
    background: var(--neet-surface, #FFFBFE);
    color: var(--neet-primary, #6750A4);
    border-color: var(--neet-primary, #6750A4);
}

/* Panels */
.neet-tabs__panel {
    padding: 24px;
    border-radius: 0 0 var(--neet-radius-md, 12px) var(--neet-radius-md, 12px);
}
.neet-tabs--pills   .neet-tabs__panel { border-radius: var(--neet-radius-md, 12px); }
.neet-tabs--boxed   .neet-tabs__panel { border: 2px solid var(--neet-outline-variant, #CAC4D0); }
.neet-tabs__panel[hidden] { display: none; }
.neet-tabs__panel > *:last-child { margin-bottom: 0; }

/* Responsive tabs */
@media (max-width: 600px) {
    .neet-tabs__nav { gap: 4px; }
    .neet-tabs__btn { padding: 8px 12px; font-size: 13px; }
}
