/* MOAR Abogados — home pública (réplica visual de moar.pe) */
:root {
    --gold: #b78b31;
    --gold-2: #b58a2f;
    --navy: #161d33;
    --navy-2: #161b30;
    --navy-3: #2b3458;
    --navy-4: #171d33;
    --text: #777777;
    --heading: #161d33;
    --white: #ffffff;
    --muted: #9aa0ae;
    --header-h: 118px;
    --font: "Poppins", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font-family: inherit;
}

.site-wrap {
    overflow-x: hidden;
}

/* ---------- Top bar ---------- */
.topbar {
    background-image: linear-gradient(180deg, var(--navy-2) 0%, var(--navy-3) 100%);
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
}

.topbar-inner,
.header-inner,
.container {
    width: min(1280px, calc(100% - 48px));
    margin-inline: auto;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
}

.lang {
    display: flex;
    gap: 18px;
    letter-spacing: 0.04em;
}

.lang a {
    color: rgba(255, 255, 255, 0.72);
    transition: color 0.2s;
}

.lang a.is-active,
.lang a:hover {
    color: var(--gold);
}

.topbar-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold-2);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 2px;
    transition: background 0.2s;
}

.topbar-phone:hover {
    background: var(--navy);
}

.topbar-phone svg {
    width: 14px;
    height: 14px;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--white);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.header-main {
    background: var(--white);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 76px;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand img {
    height: 58px;
    width: auto;
    display: block;
}

.nav-desktop {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
    text-transform: capitalize;
    font-weight: 500;
    font-size: 14px;
}

.nav-desktop a {
    color: var(--gold);
    position: relative;
    padding: 8px 0;
}

.nav-desktop a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s;
}

.nav-desktop a:hover::after,
.nav-desktop a.is-active::after {
    transform: scaleX(1);
}

.nav-panel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    color: var(--white) !important;
    padding: 8px 16px !important;
    border-radius: 2px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    transition: background 0.2s;
}

.nav-desktop .nav-panel::after {
    display: none;
}

.nav-panel:hover {
    background: var(--gold);
}

.nav-panel-mobile {
    display: none;
    height: 40px;
    padding: 0 14px !important;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
}

.search-toggle,
.menu-toggle {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--white);
    background: var(--gold);
}

.search-toggle {
    background: transparent;
    color: var(--gold);
}

.search-toggle:hover {
    color: var(--navy);
}

.menu-toggle:hover {
    background: var(--navy);
}

.search-toggle svg,
.menu-toggle svg {
    width: 18px;
    height: 18px;
}

.search-panel {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% - 8px);
    background: var(--white);
    box-shadow: 0 12px 40px rgba(22, 29, 51, 0.16);
    padding: 12px;
    width: min(360px, calc(100vw - 32px));
    z-index: 5;
}

.search-panel.is-open {
    display: block;
}

.search-panel form {
    display: flex;
    gap: 8px;
}

.search-panel input {
    flex: 1;
    border: 1px solid #e6e6e6;
    padding: 10px 12px;
    outline: none;
}

.search-panel button {
    background: var(--gold);
    color: var(--white);
    border: 0;
    padding: 0 14px;
    cursor: pointer;
}

.header-main {
    position: relative;
}

/* ---------- Sidebar ---------- */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(22, 29, 51, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    z-index: 60;
}

.sidebar-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 70;
    width: min(360px, 88vw);
    height: 100%;
    background: var(--navy);
    color: var(--white);
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    padding: 28px 28px 24px;
}

.sidebar.is-open {
    transform: translateX(0);
}

.sidebar-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: 0;
    color: var(--white);
    cursor: pointer;
    width: 36px;
    height: 36px;
}

.sidebar-brand {
    display: block;
    margin: 8px 0 28px;
}

.sidebar-brand img {
    height: 52px;
    width: auto;
    display: block;
}

.sidebar-tech {
    margin-top: 24px;
}

.sidebar-tech img {
    height: 40px;
    width: auto;
    display: block;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav a {
    color: rgba(255, 255, 255, 0.86);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 500;
    text-transform: capitalize;
}

.sidebar-nav a.is-active,
.sidebar-nav a:hover {
    color: var(--gold);
}

.sidebar-panel {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gold);
    color: var(--navy) !important;
    padding: 10px 16px !important;
    border: 0;
    border-bottom: none !important;
    font-weight: 600;
    text-transform: none;
}

.sidebar-panel:hover {
    background: var(--white);
    color: var(--navy) !important;
}

.sidebar-social {
    margin-top: auto;
    display: flex;
    gap: 12px;
    padding-top: 28px;
}

.sidebar-social a {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(183, 139, 49, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.sidebar-social a:hover {
    background: var(--gold);
    color: var(--white);
}

.sidebar-social svg {
    width: 16px;
    height: 16px;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    height: calc(100vh - 42px);
    min-height: 520px;
    overflow: hidden;
    background: var(--navy);
    color: var(--white);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-slide video,
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(22, 27, 48, 0.28) 0%, rgba(22, 29, 51, 0.55) 100%);
}

.hero-copy {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8vw;
}

.hero-kicker {
    font-size: clamp(18px, 2.4vw, 28px);
    font-weight: 500;
    letter-spacing: 0.04em;
    margin: 0 0 10px;
    color: var(--gold);
}

.hero-title {
    font-size: clamp(32px, 5.2vw, 64px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
    max-width: 14ch;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 0;
}

.hero-dots button.is-active {
    background: var(--gold);
}

/* ---------- Sections ---------- */
.section {
    padding: 72px 0;
}

.section-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--heading);
    text-align: center;
    margin: 0 0 40px;
    letter-spacing: 0.02em;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 36px;
}

.news-card {
    border-bottom: 1px solid #eee;
    padding-bottom: 24px;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 12px;
    color: var(--gold);
    font-weight: 500;
    margin-bottom: 8px;
}

.news-date {
    color: var(--muted);
    font-weight: 400;
}

.news-card h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.55;
    color: var(--heading);
}

.news-card h3 a:hover {
    color: var(--gold);
}

.news-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.news-more svg {
    width: 12px;
    height: 12px;
}

.news-more:hover {
    color: var(--navy);
}

/* ---------- Logo rails ---------- */
.rail-wrap {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.rail {
    display: flex;
    gap: 48px;
    width: max-content;
    animation: rail 32s linear infinite;
    align-items: center;
}

.rail img {
    height: 72px;
    width: auto;
    object-fit: contain;
    filter: grayscale(0.15);
}

.clients .rail img {
    height: 56px;
}

@keyframes rail {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.acks {
    background: #f7f6f3;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.82);
    position: relative;
}

.footer-brand {
    margin-bottom: 28px;
}

.footer-brand img {
    height: 52px;
    width: auto;
    display: block;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 40px;
    padding: 56px 0 40px;
}

.footer-block h4 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
}

.footer-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.footer-item svg {
    width: 16px;
    height: 16px;
    color: var(--gold);
    margin-top: 4px;
    flex-shrink: 0;
}

.footer-item p {
    margin: 4px 0 0;
}

.footer-map {
    color: var(--gold);
    font-weight: 600;
    font-size: 13px;
}

.footer-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-menu a:hover {
    color: var(--gold);
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(183, 139, 49, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.footer-social a:hover {
    background: var(--gold);
    color: var(--white);
}

.footer-social svg {
    width: 15px;
    height: 15px;
}

.footer-copy {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 0 22px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

/* ---------- WhatsApp / cookies ---------- */
.wa-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #25d366;
    color: var(--white);
    border-radius: 25px;
    padding: 10px 16px 10px 10px;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
    font-weight: 600;
}

.wa-float svg {
    width: 28px;
    height: 28px;
}

.cookie-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 80;
    background: var(--navy);
    color: var(--white);
    padding: 18px 22px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.cookie-bar.is-visible {
    display: flex;
}

.cookie-bar p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.cookie-bar button {
    background: #0c4da2;
    color: var(--white);
    border: 0;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

body.sidebar-open {
    overflow: hidden;
}

@media (max-width: 980px) {
    .nav-desktop {
        display: none;
    }

    .nav-panel-mobile {
        display: inline-flex;
    }

    .header-actions {
        margin-left: auto;
    }

    .news-grid,
    .footer-main {
        grid-template-columns: 1fr;
    }

    .hero {
        height: 70vh;
        min-height: 420px;
    }

    .cookie-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .topbar-inner,
    .header-inner,
    .container {
        width: calc(100% - 28px);
    }

    .hero-copy {
        padding: 0 28px;
    }

    .brand img {
        height: 44px;
    }

    .section {
        padding: 48px 0;
    }

    .wa-float span {
        display: none;
    }

    .wa-float {
        padding: 12px;
        border-radius: 50%;
    }
}
