/* =========================================================
   GOLDRATES V3
   WORDPRESS / BETA COMPATIBILITY FIXES
   ========================================================= */


/* ---------------------------------------------------------
   PAGE SHELL
   --------------------------------------------------------- */

body.page-template-home-v3,
body.page-template-home-v3 main {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* ---------------------------------------------------------
   REMOVE OLD WORDPRESS WIDTH RESTRICTIONS
   --------------------------------------------------------- */

body.page-template-home-v3 main > section,
body.page-template-home-v3 main > div {
    width: 100% !important;
    max-width: none !important;
}


/* ---------------------------------------------------------
   BETA CONTAINER
   Keep all Beta sections consistently aligned.
   --------------------------------------------------------- */

body.page-template-home-v3 .ref-container,
body.page-template-home-v3 .container:not(.header .container) {
    width: calc(100% - 48px) !important;
    max-width: 1400px !important;

    margin-left: auto !important;
    margin-right: auto !important;
}


/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */

body.page-template-home-v3 .ref-hero {
    width: 100% !important;
    max-width: none !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
}


body.page-template-home-v3 .ref-hero .ref-container {
    width: calc(100% - 48px) !important;
    max-width: 1400px !important;

    margin-left: auto !important;
    margin-right: auto !important;
}


/* Hero columns */

body.page-template-home-v3 .ref-hero__grid {
    width: 100% !important;
    max-width: none !important;

    display: grid !important;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(480px, 0.9fr) !important;

    gap: clamp(50px, 6vw, 100px) !important;

    align-items: center !important;
}


/* Left hero content */

body.page-template-home-v3 .ref-hero__copy {
    width: 100% !important;
    max-width: 620px !important;

    margin: 0 !important;
}


/* Right live-price card */

body.page-template-home-v3 .ref-market-card {
    width: 100% !important;
    max-width: 560px !important;

    margin: 0 !important;

    justify-self: end !important;
}


/* ---------------------------------------------------------
   QUICK ANSWERS
   --------------------------------------------------------- */

body.page-template-home-v3 .quick-strip {
    width: 100% !important;
    max-width: none !important;
}


/* ---------------------------------------------------------
   ALL BETA SECTIONS
   --------------------------------------------------------- */

body.page-template-home-v3 .section,
body.page-template-home-v3 .v3-chart-section {
    width: 100% !important;
    max-width: none !important;
}


/* ---------------------------------------------------------
   NEWS CARDS
   Final WordPress override. This stylesheet loads after the
   other V3 styles, so legacy overlay rules cannot win.
   --------------------------------------------------------- */

body.page-template-home-v3 #news .news-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
    align-items: start !important;
}

body.page-template-home-v3 #news .news-card {
    position: relative !important;
    inset: auto !important;

    width: auto !important;
    min-width: 0 !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;

    overflow: visible !important;

    color: inherit !important;
    background: transparent !important;

    text-decoration: none !important;
    transform: none !important;
}


/* Image occupies its own fixed block. */

body.page-template-home-v3 #news .news-card .news-image,
body.page-template-home-v3 #news .news-card .news-image-featured {
    position: relative !important;
    inset: auto !important;

    width: 100% !important;
    height: 160px !important;
    min-height: 160px !important;
    max-height: 160px !important;

    margin: 0 0 10px 0 !important;
    padding: 0 !important;

    display: block !important;
    flex: 0 0 160px !important;

    overflow: hidden !important;

    border-radius: 8px !important;

    transform: none !important;
}


body.page-template-home-v3 #news .news-card .news-image img,
body.page-template-home-v3 #news .news-card .news-image-featured img {
    position: static !important;
    inset: auto !important;

    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    display: block !important;

    object-fit: cover !important;
    object-position: center center !important;

    transform: none !important;
}


/*
 * Reset old card-overlay rules.
 * Category, title and excerpt must all sit beneath the image.
 */

body.page-template-home-v3 #news .news-card > small,
body.page-template-home-v3 #news .news-card > strong,
body.page-template-home-v3 #news .news-card > span {
    position: static !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    inset: auto !important;

    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;

    float: none !important;
    clear: none !important;

    color: inherit !important;
    background: transparent !important;

    opacity: 1 !important;
    visibility: visible !important;

    text-shadow: none !important;

    transform: none !important;
    translate: none !important;

    z-index: auto !important;
}


body.page-template-home-v3 #news .news-card > small {
    display: block !important;

    margin-top: 0 !important;
    margin-bottom: 6px !important;

    color: #6b7788 !important;

    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}


body.page-template-home-v3 #news .news-card > strong {
    display: -webkit-box !important;

    margin-top: 0 !important;
    margin-bottom: 7px !important;

    min-height: 40px !important;

    overflow: hidden !important;

    color: #172131 !important;

    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;

    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
}


body.page-template-home-v3 #news .news-card > span {
    display: -webkit-box !important;

    margin-top: 0 !important;
    margin-bottom: 0 !important;

    overflow: hidden !important;

    color: #667085 !important;

    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;

    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media screen and (max-width: 900px) {

    body.page-template-home-v3 .ref-container,
    body.page-template-home-v3 .container:not(.header .container) {
        width: calc(100% - 30px) !important;
    }

    body.page-template-home-v3 .ref-hero__grid {
        grid-template-columns: 1fr !important;

        gap: 32px !important;
    }

    body.page-template-home-v3 .ref-market-card {
        max-width: none !important;

        justify-self: stretch !important;
    }

    body.page-template-home-v3 #news .news-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    body.page-template-home-v3 #news .news-card .news-image,
    body.page-template-home-v3 #news .news-card .news-image-featured {
        height: 220px !important;
        min-height: 220px !important;
        max-height: 220px !important;
        flex-basis: 220px !important;
    }
}


@media screen and (max-width: 560px) {

    body.page-template-home-v3 #news .news-card .news-image,
    body.page-template-home-v3 #news .news-card .news-image-featured {
        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
        flex-basis: 180px !important;
    }
}

/* ---------------------------------------------------------
   FAQ PANEL
   --------------------------------------------------------- */

body.page-template-home-v3 #guides.faq-panel {
    display: flex !important;
    flex-direction: column !important;
}

body.page-template-home-v3 #guides .faq {
    flex: 1 1 auto;
}

body.page-template-home-v3 #guides .faq-panel-footer {
    margin-top: auto;
    padding-top: 16px;
    text-align: right;
}

body.page-template-home-v3 #guides .faq-panel-footer a {
    color: #26384d;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

body.page-template-home-v3 #guides .faq-panel-footer a:hover {
    text-decoration: underline;
}

/* =========================================================
   LOWER NEWSLETTER CTA
   ========================================================= */

body.page-template-home-v3 #newsletter .newsletter-v3 {
    min-height: 118px !important;
    padding: 22px 28px !important;

    display: grid !important;
    grid-template-columns:
        minmax(320px, 0.9fr)
        minmax(460px, 1.15fr) !important;

    align-items: center !important;
    gap: 36px !important;

    color: #ffffff !important;

    background:
        linear-gradient(
            135deg,
            #0a2948,
            #061d35
        ) !important;

    border-radius: 12px !important;
}


/* ---------------------------------------------------------
   LEFT COPY
   --------------------------------------------------------- */

body.page-template-home-v3 #newsletter .newsletter-v3__copy {
    min-width: 0;

    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 16px !important;
}


body.page-template-home-v3 #newsletter .newsletter-v3__icon {
    width: 46px !important;
    height: 46px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    color: #f0ba2c !important;

    border: 1px solid #e1ad23 !important;
    border-radius: 50% !important;

    font-size: 20px !important;
    line-height: 1 !important;
}


body.page-template-home-v3 #newsletter .newsletter-v3__eyebrow {
    display: block !important;

    margin: 0 0 4px !important;

    color: #e8bd4b !important;

    font-size: 10px !important;
    font-weight: 800 !important;

    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}


body.page-template-home-v3 #newsletter .newsletter-v3 h2 {
    margin: 0 0 5px !important;

    color: #ffffff !important;

    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}


body.page-template-home-v3 #newsletter .newsletter-v3__copy p {
    max-width: 470px !important;

    margin: 0 !important;

    color: #b9c6d4 !important;

    font-size: 11px !important;
    line-height: 1.55 !important;
}


/* ---------------------------------------------------------
   FORM
   Match hero email field + gold button
   --------------------------------------------------------- */

body.page-template-home-v3 #newsletter .newsletter-v3__signup {
    min-width: 0;
}


body.page-template-home-v3 #newsletter .newsletter-v3__form {
    width: 100% !important;

    display: grid !important;
    grid-template-columns:
        minmax(0, 1fr)
        auto !important;

    gap: 0 !important;
}


body.page-template-home-v3 #newsletter .newsletter-v3__form input[type="email"] {
    min-width: 0 !important;
    height: 50px !important;

    margin: 0 !important;
    padding: 0 16px !important;

    color: #192638 !important;
    background: #ffffff !important;

    border: 0 !important;
    border-radius: 6px 0 0 6px !important;

    outline: none !important;
    box-shadow: none !important;

    font-family: inherit !important;
    font-size: 13px !important;
}


body.page-template-home-v3 #newsletter .newsletter-v3__form input[type="email"]::placeholder {
    color: #8490a0 !important;
}


body.page-template-home-v3 #newsletter .newsletter-v3__form button {
    min-width: 155px !important;
    height: 50px !important;

    margin: 0 !important;
    padding: 0 22px !important;

    color: #152137 !important;

    background:
        linear-gradient(
            180deg,
            #f7d36c,
            #d89e13
        ) !important;

    border: 0 !important;
    border-radius: 0 6px 6px 0 !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 6px 18px rgba(0, 0, 0, 0.12) !important;

    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 800 !important;

    white-space: nowrap !important;
    cursor: pointer !important;
}


body.page-template-home-v3 #newsletter .newsletter-v3__note {
    margin: 7px 0 0 !important;

    color: #8fa1b5 !important;

    font-size: 10px !important;
    line-height: 1.4 !important;
}


/* ---------------------------------------------------------
   BENEFIT STRIP
   --------------------------------------------------------- */

body.page-template-home-v3 #newsletter .newsletter-v3__benefits {
    min-height: 42px !important;
    padding: 0 12px !important;

    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;

    align-items: center !important;
    gap: 14px !important;
}


body.page-template-home-v3 #newsletter .newsletter-v3__benefits span {
    min-width: 0;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;

    color: #4f5d70 !important;

    font-size: 10px !important;
    font-weight: 600 !important;

    white-space: nowrap !important;
}


body.page-template-home-v3 #newsletter .newsletter-v3__benefits b {
    color: #b9870d !important;
    font-weight: 800 !important;
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media screen and (max-width: 900px) {

    body.page-template-home-v3 #newsletter .newsletter-v3 {
        grid-template-columns: 1fr !important;

        gap: 20px !important;

        padding: 24px !important;
    }


    body.page-template-home-v3 #newsletter .newsletter-v3__benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

        padding-top: 10px !important;
        padding-bottom: 10px !important;

        row-gap: 10px !important;
    }

}


@media screen and (max-width: 600px) {

    body.page-template-home-v3 #newsletter .newsletter-v3__copy {
        grid-template-columns: 1fr !important;
    }


    body.page-template-home-v3 #newsletter .newsletter-v3__icon {
        width: 42px !important;
        height: 42px !important;
    }


    body.page-template-home-v3 #newsletter .newsletter-v3__form {
        grid-template-columns: 1fr !important;

        gap: 8px !important;
    }


    body.page-template-home-v3 #newsletter .newsletter-v3__form input[type="email"],
    body.page-template-home-v3 #newsletter .newsletter-v3__form button {
        width: 100% !important;

        border-radius: 6px !important;
    }


    body.page-template-home-v3 #newsletter .newsletter-v3__benefits {
        grid-template-columns: 1fr !important;
    }


    body.page-template-home-v3 #newsletter .newsletter-v3__benefits span {
        justify-content: flex-start !important;
    }

}
/* =========================================================
   HERO PRICE COMPARISON - MOBILE
   ========================================================= */

@media screen and (max-width: 600px) {

    .ref-market-card .ref-market-labels--compare,
    .ref-market-card .ref-market-row--compare {
        display: grid !important;
        grid-template-columns:
            minmax(0, 44%)
            minmax(0, 28%)
            minmax(0, 28%) !important;
        gap: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .ref-market-card .ref-market-labels--compare {
        padding: 0 12px 9px !important;
    }

    .ref-market-card .ref-market-row--compare {
        padding: 0 12px !important;
    }

    .ref-market-card .ref-market-labels--compare > *,
    .ref-market-card .ref-market-row--compare > * {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .ref-market-card .ref-market-metal {
        text-align: left !important;
    }

    .ref-market-card .ref-market-yesterday,
    .ref-market-card .ref-market-today {
        overflow: hidden !important;
        text-align: right !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
        font-size: 11px !important;
    }

    .ref-market-card .ref-market-today-change {
        display: none !important;
    }

    .ref-market-card .ref-market-rows {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
}
/* =========================================================
   HERO CARD - USE MORE MOBILE WIDTH
   ========================================================= */

@media screen and (max-width: 600px) {

    .ref-hero .ref-container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .ref-market-card {
        width: 100% !important;
        max-width: none !important;
    }

}