/*
  Ensany v2 — generic static page (website/page.blade.php), used for any
  Pages-model content (About, Terms, Privacy Policy, etc). Scoped under
  #v2Page.

  FUNCTIONAL SAFETY — route('search'), the search field name="word",
  $pages->title/img_link/description (via clean_html()), and the
  iframely/embedly oembed script block are all unchanged.
*/

#v2Page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #F7F4EC;
}

#v2Page * {
    box-sizing: border-box;
}

/* ---------- Header band ---------- */
#v2Page .v2p-head {
    background: linear-gradient(155deg, #12332A, #1B4636);
    padding: 46px 0 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#v2Page .v2p-head::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .08) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black, transparent);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black, transparent);
    pointer-events: none;
}

#v2Page .v2p-head h1 {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: clamp(22px, 3.2vw, 32px);
    font-weight: 800;
    margin: 0;
    padding: 0 16px;
}

/* ---------- Layout ---------- */
#v2Page .v2p-wrap {
    max-width: 1180px;
    margin: -40px auto 0;
    padding: 0 16px 60px;
    position: relative;
    z-index: 2;
}

#v2Page .v2p-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: start;
}

@media (min-width: 992px) {
    #v2Page .v2p-grid {
        grid-template-columns: 2.2fr 1fr;
    }
}

/* ---------- Content card ---------- */
#v2Page .v2p-content-card {
    background: #fff;
    border: 1px solid #EFE9D8;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 18px 40px -28px rgba(18, 51, 42, .2);
}

#v2Page .v2p-content-card h3 {
    color: #12332A;
    font-size: clamp(19px, 2.6vw, 25px);
    font-weight: 800;
    margin: 0 0 18px;
}

#v2Page .v2p-content-img {
    width: 100%;
    aspect-ratio: 16/7;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 22px;
    background: #F7F4EC;
}

#v2Page .v2p-content-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Rich HTML body (clean_html($pages->description)) — no assumptions
   about exactly what tags it contains, so this covers the common set. */
#v2Page .v2p-body {
    color: #3A443E;
    font-size: 14px;
    line-height: 1.9;
}

#v2Page .v2p-body p {
    margin: 0 0 16px;
}

#v2Page .v2p-body h1,
#v2Page .v2p-body h2,
#v2Page .v2p-body h3,
#v2Page .v2p-body h4 {
    color: #12332A;
    font-weight: 800;
    margin: 26px 0 12px;
}

#v2Page .v2p-body h1:first-child,
#v2Page .v2p-body h2:first-child,
#v2Page .v2p-body h3:first-child,
#v2Page .v2p-body h4:first-child {
    margin-top: 0;
}

#v2Page .v2p-body ul,
#v2Page .v2p-body ol {
    margin: 0 0 16px;
    padding-inline-start: 22px;
}

#v2Page .v2p-body li {
    margin-bottom: 6px;
}

#v2Page .v2p-body a {
    color: #578021;
    font-weight: 700;
    text-decoration: underline;
}

#v2Page .v2p-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 10px 0;
}

#v2Page .v2p-body blockquote {
    margin: 0 0 16px;
    padding: 12px 18px;
    border-inline-start: 3px solid #7FB239;
    background: #F7F4EC;
    border-radius: 0 10px 10px 0;
    color: #5B6660;
}

#v2Page .v2p-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px;
}

#v2Page .v2p-body table th,
#v2Page .v2p-body table td {
    border: 1px solid #E7E1D0;
    padding: 8px 10px;
    text-align: start;
}

/* oembed/iframely video embeds — same iframely-responsive class the
   embed.js script targets, just restyled to fit the card. */
#v2Page .iframely-responsive {
    border-radius: 14px;
    overflow: hidden;
    margin: 16px 0;
    background: #EFE9D8;
}

#v2Page oembed {
    display: block;
}

/* ---------- Sidebar search widget ---------- */
#v2Page .v2p-search-card {
    background: #fff;
    border: 1px solid #EFE9D8;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 18px 40px -28px rgba(18, 51, 42, .2);
}

#v2Page .v2p-search-card h4 {
    color: #12332A;
    font-size: 13.5px;
    font-weight: 800;
    margin: 0 0 14px;
}

#v2Page .sidebar-search-form {
    display: flex;
    gap: 8px;
}

#v2Page .sidebar-search-form .form-control {
    flex: 1 1 auto;
    height: auto !important;
    border: 1.5px solid #E7E1D0 !important;
    border-radius: 10px !important;
    padding: 11px 12px !important;
    font-size: 13.5px !important;
    color: #12332A !important;
    background: #F7F4EC !important;
    box-shadow: none !important;
    transition: border-color .2s ease, box-shadow .2s ease;
}

#v2Page .sidebar-search-form .form-control:focus {
    outline: none;
    border-color: #7FB239 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(127, 178, 57, .15) !important;
}

#v2Page .sidebar-search-form button {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #7FB239, #578021);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s ease;
}

#v2Page .sidebar-search-form button:hover {
    transform: translateY(-1px);
}

#v2Page .sidebar-search-form button i {
    font-size: 15px;
}