/* ========================================================
   SITE LAYOUT – Header & Footer
   Design System: Modern / Minimal / Premium
   Uses CSS variables from addpost.css (:root)
   ======================================================== */

/* ========== HEADER / NAVBAR ========== */
.puc-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    transition: box-shadow .3s ease;
}

.puc-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem 0;
    gap: 1rem;
}

/* Logo */
.puc-navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.puc-navbar-brand img {
    height: 38px;
    width: auto;
    transition: opacity .2s ease;
}

.puc-navbar-brand:hover img {
    opacity: .85;
}

/* Mobile Toggle */
.puc-navbar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all .2s ease;
    color: #334155;
    padding: 0;
}

.puc-navbar-toggle:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.puc-navbar-toggle svg {
    width: 20px;
    height: 20px;
}

/* Nav Links Container */
.puc-nav-collapse {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex: 1;
    justify-content: flex-end;
}

.puc-nav-menu {
    display: flex;
    align-items: center;
    gap: .15rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Nav Items */
.puc-nav-menu li {
    position: relative;
}

.puc-nav-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .75rem;
    font-size: .938rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    transition: all .2s ease;
    white-space: nowrap;
}

.puc-nav-link:hover {
    color: #2563eb;
    background: #eff6ff;
}

.puc-nav-link svg {
    width: 18px;
    height: 18px;
    opacity: .6;
}

/* Dropdown */
.puc-dropdown {
    position: relative;
}

.puc-dropdown-toggle::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    margin-left: 2px;
    transition: transform .25s ease;
}

.puc-dropdown:hover .puc-dropdown-toggle::after {
    transform: rotate(180deg);
}

.puc-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 340px;
    max-height: 420px;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
    padding: .5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .25s ease;
    z-index: 1060;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    list-style: none;
    margin: 0;
}

.puc-dropdown:hover .puc-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(2px);
}

.puc-dropdown-menu li a {
    display: block;
    padding: .45rem .7rem;
    font-size: .875rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    transition: all .15s ease;
}

.puc-dropdown-menu li a:hover {
    background: #eff6ff;
    color: #2563eb;
}

/* Scrollbar for dropdown */
.puc-dropdown-menu::-webkit-scrollbar {
    width: 5px;
}
.puc-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}
.puc-dropdown-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 50px;
}

/* Right-side Auth/User Nav */
.puc-nav-auth {
    display: flex;
    align-items: center;
    gap: .35rem;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-left: .5rem;
}

.puc-nav-auth .puc-nav-link {
    font-size: .9rem;
}

.puc-btn-login {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1.15rem;
    font-size: .938rem;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 50px;
    text-decoration: none;
    transition: all .2s ease;
    white-space: nowrap;
}

.puc-btn-login:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.puc-btn-register {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1.15rem;
    font-size: .938rem;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border: 1.5px solid #2563eb;
    border-radius: 50px;
    text-decoration: none;
    transition: all .2s ease;
    white-space: nowrap;
}

.puc-btn-register:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .3);
}

.puc-btn-post {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1.15rem;
    font-size: .938rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    border: none;
    border-radius: 50px;
    text-decoration: none;
    transition: all .2s ease;
    white-space: nowrap;
}

.puc-btn-post:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, .35);
    transform: translateY(-1px);
    color: #fff;
}

.puc-btn-post svg {
    width: 15px;
    height: 15px;
}

.puc-btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    color: #ef4444;
    text-decoration: none;
    transition: all .2s ease;
}

.puc-btn-logout:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

.puc-btn-logout svg {
    width: 16px;
    height: 16px;
}

/* ========== FOOTER ========== */
.puc-footer {
    background: #0f172a;
    color: #94a3b8;
    padding-top: 3rem;
}

.puc-footer-top {
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 2rem;
}

.puc-footer-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}

.puc-footer-brand img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

.puc-footer-brand span {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.puc-footer-desc {
    font-size: .9rem;
    line-height: 1.7;
    color: #64748b;
    max-width: 340px;
    margin-bottom: 1.25rem;
}

.puc-footer-socials {
    display: flex;
    gap: .5rem;
}

.puc-footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: #94a3b8;
    text-decoration: none;
    transition: all .2s ease;
}

.puc-footer-socials a:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    transform: translateY(-2px);
}

.puc-footer-socials a svg {
    width: 18px;
    height: 18px;
}

/* Footer Column Title */
.puc-footer-title {
    font-size: .938rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .75px;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid #2563eb;
    display: inline-block;
}

/* Footer Link Lists */
.puc-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.puc-footer-links li {
    margin-bottom: .35rem;
}

.puc-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .875rem;
    color: #64748b;
    text-decoration: none;
    padding: .2rem 0;
    transition: all .15s ease;
}

.puc-footer-links a:hover {
    color: #fff;
    padding-left: .35rem;
}

.puc-footer-links a::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #334155;
    flex-shrink: 0;
    transition: background .15s ease;
}

.puc-footer-links a:hover::before {
    background: #2563eb;
}

/* Footer Contact */
.puc-footer-contact {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.puc-footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .875rem;
    color: #64748b;
    margin-bottom: .5rem;
    line-height: 1.5;
}

.puc-footer-contact li svg {
    width: 16px;
    height: 16px;
    color: #2563eb;
    flex-shrink: 0;
    margin-top: 2px;
}

.puc-footer-contact a {
    color: #94a3b8;
    text-decoration: none;
    transition: color .15s ease;
}

.puc-footer-contact a:hover {
    color: #fff;
}

/* Footer Bottom Bar */
.puc-footer-bottom {
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255,255,255,.06);
    text-align: center;
}

.puc-footer-bottom p {
    font-size: .85rem;
    color: #475569;
    margin: 0;
}

.puc-footer-bottom a {
    color: #2563eb;
    text-decoration: none;
}

.puc-footer-bottom a:hover {
    color: #60a5fa;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 991.98px) {
    .puc-navbar-toggle {
        display: flex;
    }

    .puc-nav-collapse {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 10px 30px rgba(0,0,0,.1);
        border-radius: 0 0 16px 16px;
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
        z-index: 1055;
    }

    .puc-nav-collapse.show {
        display: flex;
    }

    .puc-nav-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .puc-nav-link {
        padding: .65rem .85rem;
        border-radius: 10px;
    }

    .puc-nav-link:hover {
        background: #f8fafc;
    }

    .puc-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8fafc;
        border-radius: 10px;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height .3s ease, padding .3s ease;
    }

    .puc-dropdown.open .puc-dropdown-menu {
        max-height: 500px;
        padding: .5rem;
        overflow-y: auto;
    }

    .puc-nav-auth {
        flex-direction: row;
        justify-content: center;
        margin-left: 0;
        margin-top: .75rem;
        padding-top: .75rem;
        border-top: 1px solid #f1f5f9;
        gap: .5rem;
        flex-wrap: wrap;
    }

    .puc-header {
        position: relative;
    }

    .puc-navbar {
        position: relative;
    }
}

@media (max-width: 575.98px) {
    .puc-navbar-brand img {
        height: 32px;
    }

    .puc-footer {
        padding-top: 2rem;
    }

    .puc-footer-title {
        margin-top: .5rem;
    }
}

/* ========== SHARED BREADCRUMB ========== */
.puc-breadcrumb {
    background: var(--puc-gray-50);
    border-radius: var(--puc-radius);
    padding: .65rem 1.15rem;
    margin-bottom: 1.5rem;
}

.puc-breadcrumb ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem;
}

.puc-breadcrumb li {
    display: inline-flex;
    align-items: center;
    font-size: .813rem;
    color: var(--puc-gray-400);
}

.puc-breadcrumb li + li::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: .35rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.puc-breadcrumb a {
    color: var(--puc-gray-500);
    text-decoration: none;
    font-weight: 500;
    transition: var(--puc-transition);
}

.puc-breadcrumb a:hover {
    color: var(--puc-primary);
}

.puc-breadcrumb .bc-active {
    color: var(--puc-gray-700);
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .puc-breadcrumb {
        padding: .5rem .85rem;
    }

    .puc-breadcrumb li {
        font-size: .75rem;
    }
}
