/**
 * Orion Services Enhanced Widget Styles - Mega Menu Layout
 * 
 * @package Orion_Construction
 * @since 1.0.0
 */

/* Orion Services Mega Menu
   The widget markup carries no Tailwind utility classes. Colours, font
   family/weight/transform/letter-spacing and margins come from the widget's
   Elementor controls; the layout and the breakpoint-driven size/spacing
   schedule live here, because the reference steps them over five breakpoints
   (640/769/992/1199/1380/1752) and Elementor only exposes three. Every
   responsive control on the widget is left empty by default so this schedule
   applies, and setting one in the editor overrides it. */
.orion-services-mega-menu {
    width: 100%;
}

/* ── Grid ─────────────────────────────────────────────────────── */
.orion-services-mega-grid {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0;
    padding: 12px 0 28px;
    list-style: none;
    text-transform: none;
}
/* Stacked rows are separated by a hairline below the sm breakpoint only.
   The colour is set at every width (matching the reference, where the
   divide utility colours all four edges) and only the width is toggled. */
.orion-services-mega-grid > li:not(:last-child) {
    border-style: solid;
    border-color: var(--color-gray-300, #f2f2f2);
    border-width: 0 0 1px;
}
@media (min-width: 640px) {
    .orion-services-mega-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 20px;
        row-gap: 28px;
        padding-top: 20px;
    }
    .orion-services-mega-grid > li:not(:last-child) { border-bottom-width: 0; }
}
@media (min-width: 992px)  { .orion-services-mega-grid { row-gap: 40px; padding-bottom: 40px; } }
@media (min-width: 1380px) { .orion-services-mega-grid { padding-bottom: 55px; } }
@media (min-width: 1752px) { .orion-services-mega-grid { column-gap: 57px; row-gap: 57px; } }

/* Desktop column count (the sm/base steps above are shared). */
@media (min-width: 1199px) {
    .orion-services-mega-grid--3col { grid-template-columns: repeat(3, 1fr); }
    .orion-services-mega-grid--4col { grid-template-columns: repeat(4, 1fr); }
    .orion-services-mega-grid--5col { grid-template-columns: repeat(5, 1fr); }
    .orion-services-mega-grid--6col { grid-template-columns: repeat(6, 1fr); }
}

/* ── Card ─────────────────────────────────────────────────────── */
.orion-services-mega-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    max-width: 455px;
    width: 100%;
    padding: 16px 0;
}
@media (min-width: 640px)  { .orion-services-mega-item { padding: 0; } }
@media (min-width: 992px)  { .orion-services-mega-item { gap: 10px; } }
@media (min-width: 1752px) { .orion-services-mega-item { gap: 12px; } }

.orion-services-mega-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.orion-services-mega-thumb { width: 100%; }
.orion-services-mega-thumb-img { display: block; width: 100%; height: auto; object-fit: cover; }

.orion-services-mega-title { text-align: start; }
.orion-services-mega-title a { color: inherit; text-decoration: none; }

/* Arrow is a mobile affordance; the desktop rows drop it. */
.orion-services-mega-arrow {
    display: block;
    flex-shrink: 0;
    color: #000;
}
@media (min-width: 992px) { .orion-services-mega-arrow { display: none; } }

.orion-services-mega-description { text-align: start; }

/* Services Accordion Layout */
.orion-services__accordion {
    margin-bottom: 40px;
}

.orion-services__item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.orion-services__item:hover {
    border-color: var(--orion-primary);
}

.orion-services__item.is-open {
    border-color: var(--orion-primary);
}

.orion-services__toggle {
    width: 100%;
    padding: 20px 25px;
    background: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: left;
}

.orion-services__toggle:hover {
    background-color: var(--orion-secondary);
}

.orion-services__toggle .orion-services__icon {
    margin: 0 15px 0 0;
    width: 40px;
    height: 40px;
    background-color: var(--orion-primary);
    color: #ffffff;
}

.orion-services__toggle .orion-services__name {
    flex: 1;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.orion-services__plus {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--orion-primary);
    transition: transform 0.3s ease;
}

.orion-services__item.is-open .orion-services__plus {
    transform: rotate(45deg);
}

.orion-services__panel {
    padding: 0 25px 25px;
    background: #ffffff;
    display: none;
}

.orion-services__item.is-open .orion-services__panel {
    display: block;
}

.orion-services__thumb {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.orion-services__thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.orion-services__desc {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.orion-services__read.wc-solid-btn {
    background-color: var(--orion-primary);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.orion-services__read.wc-solid-btn:hover {
    background-color: #0f4a42;
}

/* Services Rows Layout */
.orion-services__rows {
    margin-bottom: 40px;
}

.orion-services__row {
    display: flex;
    align-items: center;
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.orion-services__row:hover {
    border-color: var(--orion-primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.orion-services__num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--orion-primary);
    margin-right: 25px;
    min-width: 50px;
    text-align: center;
}

.orion-services__thumb {
    width: 80px;
    height: 80px;
    margin-right: 25px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.orion-services__thumb img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

.orion-services__thumb.placeholder {
    background-color: var(--orion-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.orion-services__content {
    flex: 1;
    margin-right: 25px;
}

.orion-services__row .orion-services__name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.orion-services__row .orion-services__excerpt {
    color: #666;
    line-height: 1.5;
    margin: 0;
    font-size: 0.95rem;
}

.orion-services__cta {
    width: 50px;
    height: 50px;
    border: 2px solid var(--orion-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orion-primary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.orion-services__cta:hover {
    background-color: var(--orion-primary);
    color: #ffffff;
}
/* ── Footer row ───────────────────────────────────────────────── */
.orion-services-mega-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    padding-block: 18px;
}
@media (min-width: 640px) {
    .orion-services-mega-footer {
        align-items: center;
        flex-wrap: nowrap;
        gap: 18px;
        padding-block: 20px;
    }
}
@media (min-width: 1380px) { .orion-services-mega-footer { padding-block: 24px; } }
@media (min-width: 1752px) { .orion-services-mega-footer { padding-block: 30px; } }

.orion-services-mega-copyright {
    text-align: start;
    cursor: default;
}
@media (min-width: 640px) { .orion-services-mega-copyright { text-align: center; } }

/* ── Type scale ───────────────────────────────────────────────── */

/* h4: text-xl md:text-2xl 2xl:text-3xl / leading-7 xl:leading-8
   1xl:leading-9 2xl:leading-[42px] */
.orion-services-mega-title,
.orion-services-mega-title a {
    font-size: 20px;
    line-height: 28px;
}
/* md:text-2xl resolves to 22px, not Tailwind's stock 24px — the reference
   redefines --text-2xl. The 24px step only arrives at xl via text-[24px]. */
@media (min-width: 769px) {
    .orion-services-mega-title,
    .orion-services-mega-title a { font-size: 22px; }
}
@media (min-width: 1199px) {
    .orion-services-mega-title,
    .orion-services-mega-title a { font-size: 24px; line-height: 32px; }
}
@media (min-width: 1380px) {
    .orion-services-mega-title,
    .orion-services-mega-title a { line-height: 36px; }
}
@media (min-width: 1752px) {
    .orion-services-mega-title,
    .orion-services-mega-title a { font-size: 30px; line-height: 42px; }
}

/* p scale: text-sm lg:text-[15px] 2xl:text-lg / leading-[23px]
   lg:leading-[25px] xl:leading-[26px] 1xl:leading-7 2xl:leading-8 */
.orion-services-mega-description,
.orion-services-mega-copyright {
    font-size: 14px;
    line-height: 23px;
}
@media (min-width: 992px) {
    .orion-services-mega-description,
    .orion-services-mega-copyright { font-size: 15px; line-height: 25px; }
}
@media (min-width: 1199px) {
    .orion-services-mega-description,
    .orion-services-mega-copyright { line-height: 26px; }
}
@media (min-width: 1380px) {
    .orion-services-mega-description,
    .orion-services-mega-copyright { line-height: 28px; }
}
@media (min-width: 1752px) {
    .orion-services-mega-description,
    .orion-services-mega-copyright { font-size: 18px; line-height: 32px; }
}

/* "View Services" link. Colour, family, weight, transform and letter spacing
   are Elementor-controlled; the box and size schedule are here. */
.orion-services-mega-view-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    white-space: nowrap;
    text-decoration: none;
    font-size: 14px;
    line-height: 24px;
    padding-block: 8px;
    padding-inline: 0;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    transition: color .3s ease-in-out, border-color .3s ease-in-out;
}
@media (min-width: 1199px) { .orion-services-mega-view-link { font-size: 15px; } }
@media (min-width: 1752px) { .orion-services-mega-view-link { font-size: 18px; } }
