﻿/* site-responsive.css
   Offcanvas / topbar fixes + Footer layout.
   Ajustes para mostrar los padres en columna en móvil (col-12).
   Incluye ajustes para el toggler inline del sidebar (móvil).
*/

/* -------------------------------------------------------------
   Variables
   ------------------------------------------------------------- */
:root {
    --brand-color: #6a4e7a;
    --muted: #6b7280;
    --bg: #ffffff;
    --border: #eef2f7;
    --offcanvas-width: 360px;
    --offcanvas-sidebar-width: 320px;
    /* altura aproximada del topbar (ajusta si tu topbar cambia) */
    --topbar-height: 56px;
}

/* Basic helpers */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable both-edges;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
}

/* Offcanvas adjustments (kept) */
.offcanvas {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    height: 100vh !important;
    width: min(var(--offcanvas-width),86vw) !important;
    max-width: 86vw !important;
    box-sizing: border-box !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    border-right: 1px solid rgba(0,0,0,0.04);
    z-index: 2000 !important;
    background: var(--bg);
}

    .offcanvas.offcanvas-start, #topbarOffcanvas, #topbarOffcanvasMobile {
        width: min(var(--offcanvas-width),86vw) !important;
    }

/* Footer base */
.site-footer {
    background: #fff;
    color: #0f172a;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 12px;
}

.footer-top {
    margin-bottom: 1.5rem;
}

.footer-logo {
    height: 42px;
    object-fit: contain;
    display: inline-block;
}

/* headings as links */
.footer-heading {
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: .4rem;
}

.footer-heading-link {
    color: inherit;
    text-decoration: none;
}

    .footer-heading-link:hover,
    .footer-heading-link:focus {
        color: var(--brand-color);
        text-decoration: underline;
    }

/* lists */
.footer-list {
    margin: 0;
    padding: 0;
}

    .footer-list li {
        margin-bottom: .45rem;
    }

.footer-link {
    color: #0f172a;
    text-decoration: underline;
    font-size: .92rem;
}

    .footer-link:hover,
    .footer-link:focus {
        color: var(--brand-color);
        text-decoration: none;
    }

/* Desktop social icons (small boxes) */
.footer-social-desktop .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #fff;
    color: var(--muted);
    border: 1px solid rgba(0,0,0,0.06);
    font-size: 1rem;
}

    .footer-social-desktop .social-link > i {
        color: inherit;
        font-size: 1rem;
    }

    .footer-social-desktop .social-link:hover {
        background: rgba(0,0,0,0.03);
        color: var(--brand-color);
    }

/* Square action buttons */
.square-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.1rem;
}

    .square-btn.btn-success {
        background-color: #25D366;
        color: #fff;
        border: 1px solid rgba(0,0,0,0.04);
    }

    .square-btn.btn-light {
        background: #fff;
        color: #0f172a;
        border: 1px solid rgba(0,0,0,0.06);
    }

    .square-btn.btn-outline-success {
        background: transparent;
        color: var(--brand-color);
        border: 2px solid var(--brand-color);
    }

/* Mobile social icons (touch) */
.mobile-icons-row .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    font-size: 1.25rem;
    color: var(--muted);
    border: 1px solid rgba(0,0,0,0.06);
    background: #fff;
}

    .mobile-icons-row .social-link > i {
        font-size: 1.25rem;
        color: inherit;
    }

/* spacing adjustments on mobile: ensure parents stack nicely */
@media (max-width: 767.98px) {
    .footer-main {
        display: block;
    }

        .footer-main .col-12, .footer-main .col-6 {
            width: 100%;
        }

        .footer-main > .col-12 {
            margin-bottom: 0.75rem;
        }

    .mobile-icons-row {
        display: flex;
        gap: .5rem;
        align-items: center;
        margin-bottom: .5rem;
    }

    .footer-action-buttons {
        display: flex;
        justify-content: flex-start;
    }

    .footer-desktop-actions {
        display: none !important;
    }
}

/* Desktop / tablet layout: show lists and the desktop icons block */
@media (min-width: 768px) {
    .footer-main {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
    }

        .footer-main > div {
            flex: 0 0 auto;
        }

        .footer-main > .col-md-3 {
            width: 25%;
        }

            .footer-main > .col-md-3:last-child {
                margin-left: auto;
                display: flex;
                flex-direction: column;
                align-items: flex-end;
            }

    .footer-desktop-actions {
        display: flex;
    }

    .mobile-icons-row {
        display: none !important;
    }
}

/* extra spacing for large screens */
@media (min-width: 992px) {
    .footer-top {
        margin-bottom: 2rem;
    }
}

/* Copyright */
.site-footer small.text-muted {
    font-size: .82rem;
    line-height: 1.35;
    color: #6b7280;
}

/* -------------------------------------------------------------
   Sidebar inline toggler (móvil) - integrado en el mismo archivo
   ------------------------------------------------------------- */

/* Ensure the sidebar container is positioned so the absolute button is relative to it */
.sidebar-menu {
    position: relative;
}

/* Inline toggler inside the sidebar, visible only on mobile.
   Matches other togglers: 44x44, rounded, small shadow, spaced from topbar.
*/
.sidebar-toggle-inline {
    position: absolute;
    top: calc(var(--topbar-height, 56px) + 8px);
    right: 12px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--brand-color); /* morado */
    border: 2px solid rgba(0,0,0,0.06);
    color: #ffffff;
    box-shadow: 0 6px 12px rgba(16,24,40,0.06);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    z-index: 1400; /* above many items but below full-screen overlays */
}

    /* Icon inside */
    .sidebar-toggle-inline .bi {
        font-size: 1.15rem;
        vertical-align: middle;
        color: #fff;
    }

    /* Hover / focus affordance */
    .sidebar-toggle-inline:hover,
    .sidebar-toggle-inline:focus {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(16,24,40,0.08);
        outline: none;
    }

/* Hide the inline toggler on medium+ screens (sidebar visible by default) */
@media (min-width: 768px) {
    .sidebar-toggle-inline {
        display: none !important;
    }
}

/* Slightly different offsets for various small breakpoints to avoid overlap */
@media (max-width: 420px) {
    .sidebar-toggle-inline {
        top: calc(var(--topbar-height, 56px) + 14px);
        right: 10px;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .sidebar-toggle-inline {
        top: calc(var(--topbar-height, 56px) + 12px);
        right: 12px;
    }
}


/* Floating hamburger visual rules (fallback) */
.fhb-toggle {
    display: none;
    position: fixed;
    bottom: 18px;
    right: 18px;
    z-index: 2147483647;
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    background-color: var(--brand-color);
    border: 2px solid rgba(0,0,0,0.08);
    box-shadow: 0 8px 24px rgba(16,24,40,0.12);
    color: #fff;
}

/* Icon bars */
.fhb-icon {
    display: inline-block;
    width: 22px;
    height: 14px;
    position: relative;
}

    .fhb-icon::before, .fhb-icon::after, .fhb-icon span {
        content: '';
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        height: 2.6px;
        background: #fff;
        border-radius: 2px;
    }

    .fhb-icon::before {
        top: 0
    }

    .fhb-icon span {
        top: 6px
    }

    .fhb-icon::after {
        bottom: 0
    }

/* Mobile only */
@media (max-width: 767.98px) {
    .fhb-toggle {
        display: inline-flex !important;
    }
}