/* ============================================================
   preview-extras.css
   Off-canvas accordion + responsive footer — supplements
   main-style-v4.css without modifying it.
   ============================================================ */

/* ---- Footer grid: full-viewport-width bottom divider ---- */
.footer-grid {
    border-bottom: none;
    position: relative;
}
.footer-grid::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
}
[data-theme="dark"] .footer-grid::after { background: rgba(255, 255, 255, 0.08); }

/* ---- Above 1024px: brand + 3 cols in one row ---- */
@media (min-width:1025px) {
    .footer-grid { grid-template-columns: 1.6fr repeat(3, 1fr); }
    .footer-brand { grid-column: auto; display: block; }
    .footer-theme { margin-top: 20px; }
}

/* ---- 441px–1024px: logo+desc left, theme toggle right ---- */
@media (max-width:1024px) {
    .footer-brand {
        display: grid;
        grid-template-columns: 1fr auto;
        column-gap: 24px;
        align-items: start;
        grid-column: 1 / -1;
    }
    .footer-brand .logo { grid-column: 1; grid-row: 1; }
    .footer-brand p { grid-column: 1; grid-row: 2; margin-top: 8px; }
    .footer-theme { grid-column: 2; grid-row: 1 / 3; margin-top: 0; align-self: center; }
}

/* ---- Below 800px: hide footer link columns ---- */
@media (max-width:800px) {
    .footer-col,
    .footer-legal { display: none; }
    .footer-bottom { justify-content: center; }
    .footer-bottom .cpwr { align-self: center; text-align: center; }
}

/* ---- Below 580px: keep copyright centered ---- */
@media (max-width:580px) {
    .footer-legal { flex-direction: column; align-items: flex-start; align-self: flex-start; gap: 8px; }
}

/* ---- Below 440px: theme toggle drops below description ---- */
@media (max-width:440px) {
    .footer-brand { grid-template-columns: 1fr; }
    .footer-brand .logo { grid-column: 1; grid-row: 1; }
    .footer-brand p { grid-column: 1; grid-row: 2; }
    .footer-theme { grid-column: 1; grid-row: 3; margin-top: 16px; align-self: start; }
}

/* ---- Off-canvas accordion: hidden on desktop ---- */
@media (min-width:1211px) {
    .nav-footer-menu { display: none; }
}

/* ---- Responsive nav: IDrive + Get in Touch float to top of off-canvas ---- */
@media (max-width:1210px) {
    .nav-links a.nav-idrive { order: -1; }
    .nav-links a.nav-cta { order: -1; margin-top: 0;}
     .nav-links a.nav-cta:hover{
        transform: translateX(0);
     }
}

/* ---- Off-canvas accordion: active inside hamburger ---- */
@media (max-width:1210px) {
    .nav-footer-menu { display: block; }
    .nav-accordion { border-bottom: 1px dashed rgba(255,255,255,0.171); }
    .nav-accordion-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 28px; font-weight: 500; font-family: var(--font); color: rgba(255,255,255,0.98); background: transparent; border: none; cursor: pointer; text-align: left; transition: color 0.15s, background 0.15s; }
    .nav-accordion-toggle:hover { background: rgba(255,255,255,0.06); color: #fff; }
    .nav-accordion-icon { width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.25s ease; }
    .nav-accordion.open .nav-accordion-icon { transform: rotate(180deg); }
    .nav-accordion-panel { max-height: 0; overflow: hidden; transition: max-height 0.32s cubic-bezier(0.16,1,0.3,1); }
    .nav-accordion.open .nav-accordion-panel { max-height: 240px; }
    .nav-accordion-panel a { display: block; padding: 12px 28px 12px 44px; color: rgba(255,255,255,0.75); text-decoration: none; transition: color 0.15s, background 0.15s; }
    .nav-accordion-panel a:hover { background: rgba(255,255,255,0.06); color: #fff; }
    .nav-footer-link { display: block; padding: 14px 28px; font-size: 1rem; font-weight: 500; color: rgba(255,255,255,0.98); border-bottom: 1px dashed rgba(255,255,255,0.171); transition: color 0.15s, background 0.15s; }
    .nav-footer-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
    .nav-footer-link:last-child { border-bottom: none; }
}

/* ---- Nav open + light theme: accordion text turns dark ---- */
@media (max-width:800px) {
    .nav-open .nav-accordion { border-bottom: 1px dashed rgb(0 0 0 / 17%); }
    .nav-open .nav-accordion-toggle { color: #000000; }
    .nav-open .nav-accordion-toggle:hover { background: rgba(0,0,0,0.06); color: #000000; }
    .nav-open .nav-accordion-panel a { color: rgba(0,0,0,0.65); }
    .nav-open .nav-accordion-panel a:hover { background: rgba(0,0,0,0.06); color: #000000; }
    .nav-open .nav-footer-link { color: #000000; border-bottom: 1px dashed rgb(0 0 0 / 17%); }
    .nav-open .nav-footer-link:hover { background: rgba(0,0,0,0.06); color: #000000; }
}

/* ---- Nav open + dark theme: accordion text stays white ---- */
@media (max-width:800px) {
    [data-theme="dark"] .nav-open .nav-accordion { border-bottom-color: rgb(255 255 255 / 17%); }
    [data-theme="dark"] .nav-open .nav-accordion-toggle { color: #ffffff; }
    [data-theme="dark"] .nav-open .nav-accordion-toggle:hover { background: rgba(255,255,255,0.06); color: #ffffff; }
    [data-theme="dark"] .nav-open .nav-accordion-panel a { color: rgba(255,255,255,0.65); }
    [data-theme="dark"] .nav-open .nav-accordion-panel a:hover { background: rgba(255,255,255,0.06); color: #ffffff; }
    [data-theme="dark"] .nav-open .nav-footer-link { color: #ffffff; border-bottom: 1px dashed rgb(255 255 255 / 17%); }
    [data-theme="dark"] .nav-open .nav-footer-link:hover { background: rgba(255,255,255,0.06); color: #ffffff; }
}
