/*
 * Castgrove: brand defaults, and the pieces the theme draws itself.
 * Page layouts are styled in Elementor; this keeps them on-brand by default.
 */

:root {
    --cg-dark: #061E13;
    --cg-deep: #0B2A1D;
    --cg-green: #2FEF82;
    --cg-lime: #B6F141;
    --cg-text: #122019;
    --cg-muted: #55655D;
    --cg-paper: #F3F6F4;
    --cg-line: #E3EBE6;
    --cg-font: "Poppins", "Segoe UI", Helvetica, Arial, sans-serif;
}

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

body {
    margin: 0;
    font-family: var(--cg-font);
    color: var(--cg-text);
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.015em; }

.screen-reader-text {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.screen-reader-text:focus {
    clip: auto; width: auto; height: auto; padding: 10px 14px; z-index: 100000;
    background: #fff; color: var(--cg-dark); top: 8px; left: 8px;
}

/* ---- The theme's own pages, where no Elementor template is set ---------- */

.cg-shell { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.cg-header { background: var(--cg-dark); color: #fff; }
.cg-header .cg-shell { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.cg-header a { text-decoration: none; }
.cg-header .custom-logo { max-height: 44px; width: auto; }
.cg-brand-name { font-weight: 700; font-size: 22px; }
.cg-menu { display: flex; flex-wrap: wrap; gap: 6px 24px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.cg-menu a { color: rgba(255, 255, 255, 0.85); }
.cg-menu a:hover { color: #fff; }

.cg-main { padding: 56px 0 72px; min-height: 50vh; }
.cg-main .cg-shell > article + article { margin-top: 48px; }

.cg-footer { background: #04140D; color: rgba(255, 255, 255, 0.65); padding: 40px 0; font-size: 14px; }
.cg-footer .cg-shell { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.cg-footer .cg-menu a { color: rgba(255, 255, 255, 0.8); }

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

.cg-button, .cg-plan__button {
    display: inline-block;
    padding: 13px 22px;
    border-radius: 12px;
    background: var(--cg-lime);
    color: var(--cg-dark);
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cg-button:hover, .cg-plan__button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(6, 30, 19, 0.18); }
.cg-button:focus-visible, .cg-plan__button:focus-visible, .cg-pricing__switch button:focus-visible { outline: 3px solid var(--cg-green); outline-offset: 3px; }

/* ---- Features list (the Features tag, and the pricing table) ----------- */

.cg-features { list-style: none; margin: 0; padding: 0; }
.cg-features li { position: relative; padding: 4px 0 4px 28px; }
.cg-features li::before {
    content: ""; position: absolute; left: 2px; top: 11px; width: 14px; height: 8px;
    border-left: 2.5px solid var(--cg-accent, var(--cg-green));
    border-bottom: 2.5px solid var(--cg-accent, var(--cg-green));
    transform: rotate(-45deg);
}

/* ---- Pricing table ------------------------------------------------------ */

.cg-pricing__switch {
    display: inline-flex; gap: 4px; padding: 4px; margin: 0 auto 28px;
    border: 1px solid var(--cg-line); border-radius: 999px; background: #fff;
    position: relative; left: 50%; transform: translateX(-50%);
}

.cg-pricing__switch button {
    border: 0; background: none; padding: 9px 18px; border-radius: 999px;
    font: inherit; font-weight: 600; color: var(--cg-muted); cursor: pointer;
}

.cg-pricing__switch button.is-on { background: var(--cg-dark); color: #fff; }
.cg-pricing__save { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--cg-lime); color: var(--cg-dark); font-size: 12px; }

.cg-pricing__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
@media (max-width: 1024px) { .cg-pricing__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cg-pricing__grid { grid-template-columns: minmax(0, 1fr); } }

.cg-plan {
    position: relative; display: flex; flex-direction: column;
    padding: 28px 24px 24px; background: #fff; color: var(--cg-text);
    border: 1px solid var(--cg-line); border-top: 5px solid var(--cg-accent); border-radius: 18px;
}

.cg-plan--featured { box-shadow: 0 18px 44px rgba(6, 30, 19, 0.14); }
.cg-plan__badge {
    position: absolute; top: -13px; right: 18px; padding: 4px 12px; border-radius: 999px;
    background: var(--cg-dark); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
}

.cg-plan__icon { width: 52px; height: 52px; border-radius: 12px; margin-bottom: 12px; }
.cg-plan__name { margin: 0; font-size: 22px; }
.cg-plan__name a { text-decoration: none; }
.cg-plan__for { margin: 2px 0 14px; color: var(--cg-muted); font-size: 14px; }
.cg-plan__price { margin: 4px 0 2px; }
.cg-plan__amount { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; }
.cg-plan__period { color: var(--cg-muted); font-size: 15px; }
.cg-plan__fee { margin: 0; color: var(--cg-muted); font-size: 13px; }
.cg-plan__tagline { margin: 12px 0 14px; color: var(--cg-muted); font-size: 15px; }
.cg-plan .cg-features { margin-bottom: 22px; font-size: 14.5px; }
.cg-plan__button { margin-top: auto; }

@media (prefers-reduced-motion: reduce) {
    .cg-button, .cg-plan__button { transition: none; }
}
