/* ──────────────────────────────────────────────
   Happyresto — Custom CSS
   DigitalEra-inspired design system
   Sharp, high-contrast, professional
   ────────────────────────────────────────────── */

/* ── Blog Magazine Masonry Grid ─────────────── */

/*
 * Layout: CSS Grid auto-fill avec colonnes de ~300px.
 * Les cartes "wide" (hr-mag-card--wide) prennent 2 colonnes sur desktop.
 * Les ratios d'image varient par carte (16:9, 1:1, 4:5, 4:3) pour l'effet magazine.
 */
.hr-mag-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .hr-mag-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .hr-mag-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* Wide card spans 2 columns */
.hr-mag-card--wide {
    grid-column: span 2;
}

/* On mobile, wide cards only span 2 of 2 cols (full width) */
@media (max-width: 767px) {
    .hr-mag-card--wide {
        grid-column: span 2;
    }
}

/* Base card */
.hr-mag-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: box-shadow .3s ease, border-color .3s ease, transform .3s ease;
}

.hr-mag-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,.12);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.hr-mag-card a {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Pagination */
.page-numbers {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.page-numbers li .page-numbers,
.page-numbers li a {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}

.page-numbers li a:hover {
    background: #0066FF;
    border-color: #0066FF;
    color: #fff;
}

.page-numbers li .current {
    background: #0066FF;
    border-color: #0066FF;
    color: #fff;
}

/* line-clamp utilities (fallback for older browsers) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Typography — Outfit for headings ──────── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
}

/* ── Animations ─────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-up {
    animation: fadeInUp .6s ease both;
}

.animate-fade-in {
    animation: fadeIn .5s ease both;
}

.anim-delay-1 {
    animation-delay: .1s;
}

.anim-delay-2 {
    animation-delay: .2s;
}

.anim-delay-3 {
    animation-delay: .3s;
}

.anim-delay-4 {
    animation-delay: .4s;
}

.anim-delay-5 {
    animation-delay: .5s;
}

/* ── Scroll-driven reveal ───────────────────── */
[data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Header — Dark teal bar DigitalEra style ── */
#site-header {
    background: #121A38;
    transition: all .3s ease;
}

#site-header.scrolled {
    background: #121A38 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* ── Nav link styles — white on dark bg ────── */
.nav-link {
    position: relative;
    padding-bottom: 6px;
    color: rgba(255, 255, 255, 0.7);
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #0066FF;
    transition: width .3s cubic-bezier(.4, 0, .2, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #fff !important;
}

/* Header transparent overrides (for pages with dark hero) */
.header-transparent .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
}

.header-transparent .nav-link:hover,
.header-transparent .nav-link.active {
    color: #fff !important;
}

.header-transparent #menu-toggle {
    color: #fff;
}

.header-transparent #header-cta {
    background: #0066FF;
    color: #fff;
}

.header-transparent #header-cta:hover {
    background: #0052CC;
}

/* Scrolled state keeps dark bg */
#site-header.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
}

#site-header.scrolled .nav-link:hover,
#site-header.scrolled .nav-link.active {
    color: #fff !important;
}

#site-header.scrolled #header-cta {
    background: #0066FF;
    color: #fff;
}

#site-header.scrolled #header-cta:hover {
    background: #0052CC;
}

#site-header.scrolled #menu-toggle {
    color: rgba(255, 255, 255, 0.8);
}

/* ── Mobile menu transition ─────────────────── */
#mobile-menu {
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}

/* ── Pricing wizard ─────────────────────────── */
.wizard-check.checked {
    border-color: #0f172a;
    background: #f8fafc;
}

.wizard-check.checked .w-5 {
    background: #0f172a;
    border-color: #0f172a;
}

.wizard-check.checked .w-5 i {
    opacity: 1;
}

/* ── WordPress Content Defaults ─────────────── */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.entry-content img {
    border-radius: .5rem;
    margin: 2rem 0;
}

.entry-content blockquote {
    border-left: 4px solid #0066FF;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #EBF5FF;
    border-radius: 0;
    font-style: italic;
}

.entry-content a {
    color: #0066FF;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin-right: 2rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: .875rem;
    color: #64748b;
    text-align: center;
    margin-top: .5rem;
}

/* ── Utility overrides ──────────────────────── */
.shadow-primary-glow {
    box-shadow: 0 10px 25px -5px rgba(0, 102, 255, .25);
}

/* ── Logo sizing ────────────────────────────── */
.custom-logo-link {
    display: inline-flex;
    align-items: center;
    max-height: 60px;
    overflow: hidden;
}

.custom-logo-link img,
.custom-logo {
    height: 60px !important;
    width: auto !important;
    max-width: 210px !important;
    max-height: 60px !important;
    object-fit: contain;
}

/* ── Floating notification cards (hero) ────── */
@keyframes floatSubtle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.animate-float-subtle {
    animation: floatSubtle 4s ease-in-out infinite;
}

.animate-float-subtle-delayed {
    animation: floatSubtle 4s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* ── Timeline step glow ────────────────────── */
.step-active .step-dot {
    box-shadow: 0 0 0 6px rgba(0, 102, 255, 0.2);
    transition: box-shadow 0.5s ease;
}

/* ── Hover lift for cards ─────────────────── */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ── DigitalEra-style numbered accent ─────── */
.de-number {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0066FF;
    opacity: 0.5;
    font-style: italic;
}

/* ── Sharp button style ──────────────────── */
.btn-sharp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-sharp-primary {
    background: #0066FF;
    color: #fff;
}

.btn-sharp-primary:hover {
    background: #0052CC;
}

.btn-sharp-dark {
    background: #121A38;
    color: #fff;
}

.btn-sharp-dark:hover {
    background: #143A44;
}

/* ── Brush stroke (kept minimal) ────────────── */
.brush-text {
    position: relative;
    display: inline-block;
    color: #0066FF;
}

.brush-text svg {
    position: absolute;
    bottom: -4px;
    left: -4%;
    width: 108%;
    height: 14px;
    overflow: visible;
    pointer-events: none;
}

.brush-text svg path {
    stroke: #0066FF;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    opacity: 0.35;
    stroke-dasharray: 350;
    stroke-dashoffset: 350;
    transition: none;
}

.brush-text.brush-visible svg path {
    animation: brushDraw 1s cubic-bezier(.22, .61, .36, 1) forwards;
}

@keyframes brushDraw {
    0% {
        stroke-dashoffset: 350;
        opacity: 0;
    }

    10% {
        opacity: 0.35;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0.35;
    }
}

/* ── Hero underline (kept for brand moment) ─── */
.hero-underline-word {
    position: relative;
    display: inline-block;
}

.hero-underline-word::after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    bottom: 0.05em;
    width: 100%;
    height: 6px;
    background: currentColor;
    border-radius: 0;
    opacity: 0.5;
    transform: scaleX(0);
    transform-origin: left;
    animation: heroUnderlineDraw 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

@keyframes heroUnderlineDraw {
    to {
        transform: scaleX(1);
    }
}