/*
 * Rede5 — institutional public site theme.
 *
 * Layers on top of core.css and only styles the public pages (home, services,
 * portfolio, dashboards, contact). The admin panel keeps the default tokens.
 */

.r5-page {
    --r5-blue-900: #1e3a8a;
    --r5-blue-700: #1d4ed8;
    --r5-blue-600: #2563eb;
    --r5-slate-50: #f8fafc;
    --r5-slate-200: #e2e8f0;
    --r5-slate-600: #475569;
    --r5-slate-900: #0f172a;
    font-family: Inter, var(--ch-font-sans);
    color: var(--r5-slate-900);
}

/* Header ------------------------------------------------------------------ */

.r5-header {
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    border-bottom: 0;
}

.r5-header .r5-logo {
    height: 40px;
    width: auto;
}

.r5-nav a {
    color: var(--r5-slate-600);
    font-weight: 500;
    text-decoration: none;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    transition: var(--ch-transition);
}

.r5-nav a:hover,
.r5-nav a.active {
    color: var(--r5-blue-600);
    background: rgba(37, 99, 235, 0.08);
}

/* Buttons ----------------------------------------------------------------- */

.r5-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    border: 1px solid transparent;
    text-decoration: none;
    transition: var(--ch-transition);
}

.r5-btn-primary {
    background: var(--r5-blue-600);
    color: #fff;
}

.r5-btn-primary:hover {
    background: var(--r5-blue-700);
    color: #fff;
}

.r5-btn-light {
    background: #fff;
    color: var(--r5-blue-700);
}

.r5-btn-light:hover {
    background: #eef2ff;
    color: var(--r5-blue-900);
}

.r5-btn-outline-light {
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.r5-btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.r5-btn-ghost {
    border-color: var(--r5-slate-200);
    color: var(--r5-slate-900);
    background: #fff;
}

.r5-btn-ghost:hover {
    border-color: var(--r5-blue-600);
    color: var(--r5-blue-600);
}

/* Sections ---------------------------------------------------------------- */

.r5-section {
    padding: 4rem 0;
}

@media (min-width: 768px) {
    .r5-section {
        padding: 6rem 0;
    }
}

.r5-section-alt {
    background: var(--r5-slate-50);
}

.r5-section-head {
    max-width: 46rem;
    margin: 0 auto 3rem;
    text-align: center;
}

.r5-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--r5-blue-600);
    margin-bottom: 0.75rem;
}

.r5-title {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--r5-slate-900);
}

.r5-lead {
    color: var(--r5-slate-600);
    font-size: 1.05rem;
}

/* Hero -------------------------------------------------------------------- */

.r5-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--r5-blue-900) 0%, var(--r5-blue-700) 100%);
    color: #fff;
    padding: 8rem 0 6rem;
}

@media (min-width: 768px) {
    .r5-hero {
        padding: 10rem 0 8rem;
    }
}

.r5-hero::after {
    content: "";
    position: absolute;
    inset: auto -12% -55% auto;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 62%);
    pointer-events: none;
}

.r5-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.r5-hero .r5-hero-sub {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.82);
}

/* Cards ------------------------------------------------------------------- */

.r5-card {
    height: 100%;
    background: #fff;
    border: 1px solid var(--r5-slate-200);
    border-radius: var(--ch-radius);
    padding: 1.6rem;
    box-shadow: var(--ch-shadow-sm);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.r5-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ch-shadow);
    border-color: rgba(37, 99, 235, 0.35);
}

.r5-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--r5-blue-600);
    margin-bottom: 1rem;
}

.r5-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.r5-card p {
    color: var(--r5-slate-600);
    font-size: 0.94rem;
    margin-bottom: 0;
}

/* Portfolio --------------------------------------------------------------- */

.r5-portfolio-card {
    background: #fff;
    border: 1px solid var(--r5-slate-200);
    border-radius: var(--ch-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--ch-shadow-sm);
}

.r5-portfolio-thumb {
    height: 168px;
    background: linear-gradient(135deg, var(--r5-blue-900), var(--r5-blue-700));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 2rem;
    opacity: 0.95;
}

.r5-portfolio-body {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.r5-portfolio-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.r5-portfolio-body p {
    color: var(--r5-slate-600);
    font-size: 0.92rem;
    flex: 1;
}

.r5-portfolio-link {
    font-weight: 600;
    color: var(--r5-blue-600);
    text-decoration: none;
    font-size: 0.92rem;
}

.r5-portfolio-link:hover {
    text-decoration: underline;
}

/* Dashboards -------------------------------------------------------------- */

.r5-dash-card {
    height: 100%;
    background: #fff;
    border: 1px solid var(--r5-slate-200);
    border-radius: var(--ch-radius);
    padding: 1.6rem;
    box-shadow: var(--ch-shadow-sm);
}

.r5-dash-preview {
    height: 120px;
    border-radius: 10px;
    background: var(--r5-slate-50);
    border: 1px solid var(--r5-slate-200);
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
    padding: 0.9rem;
    margin-bottom: 1.1rem;
}

.r5-dash-bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    background: var(--r5-blue-600);
    opacity: 0.85;
}

.r5-check {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    color: var(--r5-slate-600);
    font-size: 0.92rem;
    margin-bottom: 0.4rem;
}

.r5-check i {
    color: #16a34a;
    margin-top: 0.15rem;
}

/* Clients ----------------------------------------------------------------- */

.r5-clients {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2.5rem 3.5rem;
}

.r5-clients img {
    max-height: 56px;
    width: auto;
    filter: grayscale(1);
    opacity: 0.6;
    transition: var(--ch-transition);
}

.r5-clients img:hover {
    filter: none;
    opacity: 1;
}

.r5-clients span {
    font-weight: 700;
    color: var(--r5-slate-600);
    opacity: 0.7;
}

/* Contact ----------------------------------------------------------------- */

.r5-contact-card {
    background: #fff;
    border: 1px solid var(--r5-slate-200);
    border-radius: var(--ch-radius);
    padding: 2rem;
    box-shadow: var(--ch-shadow-sm);
    height: 100%;
}

.r5-contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.r5-contact-item i {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(37, 99, 235, 0.1);
    color: var(--r5-blue-600);
    font-size: 1.1rem;
    flex: 0 0 auto;
}

.r5-contact-item h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--r5-slate-600);
    margin-bottom: 0.15rem;
}

.r5-contact-item a,
.r5-contact-item span {
    font-weight: 600;
    color: var(--r5-slate-900);
    text-decoration: none;
}

.r5-social {
    display: flex;
    gap: 0.75rem;
}

.r5-social a {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    border: 1px solid var(--r5-slate-200);
    color: var(--r5-slate-600);
    transition: var(--ch-transition);
}

.r5-social a:hover {
    background: var(--r5-blue-600);
    border-color: var(--r5-blue-600);
    color: #fff;
}

/* Footer ------------------------------------------------------------------ */

.r5-footer {
    background: var(--r5-blue-900);
    color: rgba(255, 255, 255, 0.75);
    padding: 3.5rem 0 2rem;
    font-size: 0.9rem;
}

.r5-footer h6 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.r5-footer a {
    color: rgba(255, 255, 255, 0.74);
    text-decoration: none;
}

.r5-footer a:hover {
    color: #fff;
}

.r5-footer .r5-logo {
    height: 44px;
    width: auto;
    background: #fff;
    border-radius: 10px;
    padding: 6px 10px;
}

.r5-footer hr {
    border-color: rgba(255, 255, 255, 0.18);
}

.r5-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
}

.r5-social-light a {
    border-color: rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.85);
}

.r5-social-light a:hover {
    background: #fff;
    border-color: #fff;
    color: var(--r5-blue-900);
}
