/* ============================================
   Consilium Advisory — Custom Styles
   ============================================ */

/* Selection styling */
::selection {
    background-color: #C9A227;
    color: white;
}

/* ---- Navbar Solid Scroll State ---- */
.nav-solid {
    background-color: rgba(250, 250, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px -2px rgba(11, 31, 58, 0.08);
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* ---- Scroll Reveal Animations ---- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}
.scroll-reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}
.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ---- Marquee Animation (TrustedBy) ---- */
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee-track {
    animation: marquee 60s linear infinite;
}

/* ---- GLOBAL MOBILE OVERFLOW FIX ---- */
html, body {
    overflow-x: clip !important;
    max-width: 100vw !important;
}

/* ---- Mobile Content Containment ---- */
@media (max-width: 767px) {
    /* Ensure all sections contain their content */
    main, section, div {
        max-width: 100vw;
    }

    /* Prevent long text from overflowing on mobile */
    h1, h2, h3, h4, h5, h6, p, span, a, li {
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
    }

    /* Ensure images never exceed their container */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Insights section card text containment */
    .grid > div {
        min-width: 0;
        overflow: hidden;
    }
}

/* ---- Mobile Menu Transitions ---- */
#mobile-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
#mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
#mobile-menu {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
    filter: blur(10px);
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
#mobile-menu.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0px);
    pointer-events: auto;
}

/* ---- No Scrollbar Utility ---- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---- Card Hover Lift ---- */
.card-hover { transition: transform 0.5s ease, box-shadow 0.5s ease; }
.card-hover:hover { transform: translateY(-10px); }

/* ---- Page Fade In ---- */
.page-fade-in { animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---- Insight Card Transition ---- */
.insight-card {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ---- Custom z-index ---- */
.z-30 { z-index: 30; }

/* ---- Prose-like article styling (Insight Detail) ---- */
.article-body p {
    margin-bottom: 2rem;
}
.article-body h3 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

/* ---- Footer Newsletter CF7 ---- */
.footer-newsletter-cf7 { width: 100%; }

/* CF7 wraps fields in <p> tags — flatten them */
.footer-newsletter-cf7 .wpcf7-form p {
    margin: 0;
    padding: 0;
    display: flex;
}

/* The form itself is a flex row */
.footer-newsletter-cf7 .wpcf7 {
    width: 100%;
}
.footer-newsletter-cf7 .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

/* Wrap the email + button in one row */
.footer-newsletter-cf7 .wpcf7-form p:first-child {
    display: flex;
    flex-direction: row;
    width: 100%;
}

/* Email input */
.footer-newsletter-cf7 .wpcf7-form-control-wrap {
    flex: 1;
    display: block;
    min-width: 0;
}
.footer-newsletter-cf7 input[type="email"] {
    display: block;
    width: 100%;
    height: 46px;
    background: rgba(255,255,255,0.05);
    border: none;
    padding: 0 14px;
    font-size: 14px;
    color: #fff;
    outline: none;
    box-sizing: border-box;
    border-radius: 0;
}
.footer-newsletter-cf7 input[type="email"]::placeholder {
    color: rgba(255,255,255,0.35);
}
.footer-newsletter-cf7 input[type="email"]:focus {
    box-shadow: inset 0 0 0 1px #C9A227;
}

/* Submit button — same <p> as email so they sit inline */
.footer-newsletter-cf7 input[type="submit"] {
    display: block;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    background-color: #C9A227;
    border: none;
    cursor: pointer;
    font-size: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: background-color .3s;
    border-radius: 0;
}
.footer-newsletter-cf7 input[type="submit"]:hover {
    background-color: #0B1F3A;
}

/* Hide spinner */
.footer-newsletter-cf7 .wpcf7-spinner { display: none !important; }

/* Response message */
.footer-newsletter-cf7 .wpcf7-response-output {
    font-size: 11px;
    margin: 8px 0 0 !important;
    padding: 6px 10px !important;
    border-radius: 6px;
    border-color: #C9A227 !important;
    color: rgba(255,255,255,0.6);
}
.footer-newsletter-cf7 .wpcf7-not-valid-tip {
    font-size: 11px;
    color: #ff6b6b;
    display: block;
    margin-top: 4px;
}

/* ---- Insight Post Body (WP WYSIWYG content) ---- */
.insight-post-body {
    color: #374151;
    font-size: 1.125rem;
    line-height: 1.85;
}
.insight-post-body p {
    margin-bottom: 1.75rem;
}
.insight-post-body h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 2.25rem;
    color: #0B1F3A;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}
.insight-post-body h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.75rem;
    color: #0B1F3A;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}
.insight-post-body h4 {
    font-family: "Manrope", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0B1F3A;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}
.insight-post-body a {
    color: #C9A227;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s;
}
.insight-post-body a:hover {
    color: #0B1F3A;
}
.insight-post-body strong, .insight-post-body b {
    font-weight: 700;
    color: #0B1F3A;
}
.insight-post-body em, .insight-post-body i {
    font-style: italic;
}
.insight-post-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem 0;
    space-y: 0.75rem;
}
.insight-post-body ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: rgba(31,41,55,0.85);
}
.insight-post-body ul li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #C9A227;
    flex-shrink: 0;
    margin-top: 0.6rem;
}
.insight-post-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.75rem;
    counter-reset: ol-counter;
    list-style: none;
}
.insight-post-body ol li {
    counter-increment: ol-counter;
    margin-bottom: 0.75rem;
    color: rgba(31,41,55,0.85);
    position: relative;
    padding-left: 1.75rem;
}
.insight-post-body ol li::before {
    content: counter(ol-counter) '.';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #C9A227;
}
.insight-post-body blockquote {
    background: #0B1F3A;
    color: #fff;
    border-left: none;
    border-radius: 1rem;
    padding: 2.5rem;
    margin: 2.5rem 0;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.5rem;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}
.insight-post-body blockquote::before {
    content: '\201C';
    position: absolute;
    top: -0.5rem;
    left: 1.25rem;
    font-size: 6rem;
    color: #C9A227;
    opacity: 0.25;
    line-height: 1;
    font-family: Georgia, serif;
}
.insight-post-body blockquote p {
    margin: 0;
    position: relative;
    z-index: 1;
}
.insight-post-body img {
    width: 100%;
    border-radius: 1rem;
    margin: 2rem 0;
    height: auto;
}
.insight-post-body figure {
    margin: 2rem 0;
}
.insight-post-body figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: rgba(31,41,55,0.5);
    margin-top: 0.5rem;
}
.insight-post-body hr {
    border: none;
    border-top: 1px solid rgba(11,31,58,0.1);
    margin: 3rem 0;
}
.insight-post-body pre,
.insight-post-body code {
    background: #F8F7F5;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    color: #0B1F3A;
}
.insight-post-body pre {
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.75rem;
}
/* Pagination links */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0B1F3A;
    background: #fff;
    border: 1px solid rgba(11,31,58,0.1);
    text-decoration: none;
    transition: all .2s;
}
.page-numbers.current,
.page-numbers:hover {
    background: #C9A227;
    color: #fff;
    border-color: #C9A227;
}
.page-numbers.dots {
    background: transparent;
    border-color: transparent;
    pointer-events: none;
}
ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    gap: 0.5rem;
    justify-content: center;
}
ul.page-numbers li {
    margin: 0;
}
ul.page-numbers li::before { display: none; }

/* ---- WYSIWYG content — restore Tailwind-reset styles ---- */
.wysiwyg-content h1,.wysiwyg-content h2,.wysiwyg-content h3,
.wysiwyg-content h4,.wysiwyg-content h5,.wysiwyg-content h6 {
    font-family: "Cormorant Garamond", serif;
    color: #0B1F3A;
    line-height: 1.25;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.wysiwyg-content h1 { font-size: 2.5rem; }
.wysiwyg-content h2 { font-size: 2rem; }
.wysiwyg-content h3 { font-size: 1.65rem; }
.wysiwyg-content h4 { font-size: 1.35rem; font-family: "Manrope", sans-serif; }
.wysiwyg-content h5 { font-size: 1.1rem;  font-family: "Manrope", sans-serif; }
.wysiwyg-content h6 { font-size: 1rem;    font-family: "Manrope", sans-serif; }

.wysiwyg-content p {
    margin-bottom: 1.5rem;
    line-height: 1.85;
    color: rgba(31,41,55,0.85);
}
.wysiwyg-content a {
    color: #C9A227;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.wysiwyg-content a:hover { color: #0B1F3A; }

.wysiwyg-content strong, .wysiwyg-content b {
    font-weight: 700;
    color: #0B1F3A;
}
.wysiwyg-content em, .wysiwyg-content i { font-style: italic; }

.wysiwyg-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}
.wysiwyg-content ol {
    list-style: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}
.wysiwyg-content li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
    color: rgba(31,41,55,0.85);
}

.wysiwyg-content blockquote {
    border-left: 4px solid #C9A227;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #fafaf8;
    font-style: italic;
    color: #0B1F3A;
    border-radius: 0 0.5rem 0.5rem 0;
}
.wysiwyg-content blockquote p { margin: 0; }

.wysiwyg-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    display: block;
}
.wysiwyg-content figure { margin: 1.5rem 0; }
.wysiwyg-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(31,41,55,0.5);
    margin-top: 0.5rem;
}

.wysiwyg-content hr {
    border: none;
    border-top: 1px solid rgba(11,31,58,0.1);
    margin: 2.5rem 0;
}
.wysiwyg-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.wysiwyg-content th {
    background: #0B1F3A;
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: left;
    font-family: "Manrope", sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.wysiwyg-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(11,31,58,0.08);
    color: rgba(31,41,55,0.85);
}
.wysiwyg-content tr:hover td { background: #fafaf8; }

.wysiwyg-content pre {
    background: #f3f4f6;
    padding: 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.wysiwyg-content code {
    background: #f3f4f6;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
}
.wysiwyg-content pre code {
    background: none;
    padding: 0;
}

/* WordPress alignment classes */
.wysiwyg-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wysiwyg-content .alignleft   { float: left;  margin-right: 1.5rem; margin-bottom: 1rem; }
.wysiwyg-content .alignright  { float: right; margin-left: 1.5rem;  margin-bottom: 1rem; }
.wysiwyg-content .wp-caption  { max-width: 100%; }
.wysiwyg-content .wp-caption-text {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(31,41,55,0.5);
    margin-top: 0.4rem;
}
