/* =========================================================
   Canyon Oaks Mortgage - Modernized content.css
   Keeps legacy classes alive while improving overall design
   ========================================================= */

:root {
    --mort-text: #334155;
    --mort-heading: #333;
    --mort-muted: #64748b;
    --mort-link: #007BFF;
    --mort-link-hover: #1d4ed8;
    --mort-border: #dbe3ea;
    --mort-surface: #ffffff;
    --mort-surface-soft: #f8fafc;
    --mort-hero-a: #f4f4f4;
    --mort-hero-b: #dfdfdf;
    --mort-table-head: #42210b;
    --mort-table-head-text: #ffffff;
    --mort-sidebar: #eef2f6;
    --mort-shadow-sm: 
      0 1px 2px rgba(0,0,0,0.04),
      0 2px 6px rgba(0,0,0,0.04);
    
    --mort-shadow-md: 
      0 4px 12px rgba(0,0,0,0.06),
      0 8px 24px rgba(0,0,0,0.06);
    --mort-radius: 1rem;
}

/* =========================
   Base typography
   ========================= */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: #f5f7fb;
    color: var(--mort-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

p,
table,
li,
td,
th,
input,
select,
textarea {
    font-family: Arial, Helvetica, sans-serif;
}

p,
li,
table {
    color: var(--mort-text);
    font-size: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--mort-heading);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.25;
    margin-top: 0;
}

h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

ol li {
    margin-top: 10px;
    margin-bottom: 2px;
}

li {
    padding-bottom: 5px;
}

/* =========================
   Links
   ========================= */

a {
    color: var(--mort-link);
    text-decoration: none;
}

a:hover {
    color: var(--mort-link-hover);
    text-decoration: underline;
}

/* Legacy link classes */
a:link.menu,
.menulink {
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
    font-size: 11px;
    line-height: 15px;
    text-decoration: none;
    vertical-align: middle;
}

a:hover.menulink {
    color: #ffffff;
    text-decoration: underline;
}

.menulinktext,
.menulinksep {
    font-family: Arial, Helvetica, sans-serif;
    color: gray;
    font-size: 11px;
    line-height: 15px;
    vertical-align: middle;
}

a:link.data,
.datalink {
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
    font-size: 8pt;
    line-height: 15px;
    text-decoration: none;
    vertical-align: middle;
}

a:hover.datalink {
    color: #ffffff;
    text-decoration: underline;
}

/* =========================
   Images
   ========================= */

img {
    max-width: 100%;
    height: auto;
    border: none;
}

/* =========================
   Legacy content classes
   ========================= */

.banner {
    background-color: white;
}

.data,
.data2,
.datafade,
.tag,
.tag2,
.note,
.colhead,
.colhead1,
.colfoot,
.colfoot1 {
    font-family: Arial, Helvetica, sans-serif;
}

.data,
.tag,
.tag2 {
    font-size: 0.875rem;
    background-color: #fff;
    color: var(--mort-text);
}

.data2 {
    font-size: 0.875rem;
    background-color: #eeeeee;
    color: var(--mort-text);
}

.datafade {
    font-size: 0.875rem;
    background-color: #fff;
    color: #1d4ed8;
}

.colhead,
.colhead1,
.colfoot,
.colfoot1 {
    font-size: 0.875rem;
    background-color: #eeeeee;
    color: #666666;
}

.colhead,
.colfoot {
    font-weight: bold;
}

.colhead1,
.colfoot1 {
    font-weight: normal;
}

.colfoot,
.colfoot1 {
    border-top: 1px orange solid;
}

.note {
    font-size: 0.875rem;
    background-color: #fff;
    color: blue;
}

.menubutton {
    font-size: 0.875rem;
    border-top: 1px yellow solid;
    border-left: 1px yellow solid;
    text-align: left;
    color: black;
    width: 250px;
}

.copyright {
    font-size: 0.75rem;
    text-align: center;
    color: gray;
}

div.errordiv {
    font-weight: normal;
    color: red;
    background: #ffebe8;
    border: 1px solid #dd3c10;
    line-height: 15px;
    padding: 7px 0;
    margin: 10px 0 0 0;
    text-align: center;
    font-size: 0.875rem;
    display: none;
    overflow: hidden;
}

/* =========================
   Forms
   ========================= */

input,
textarea,
select {
    font-size: 0.95rem;
    color: #212529;
    border: 1px solid #9aa6b2;
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    background: #fff;
    box-sizing: border-box;
}

input {
    margin-right: 2px;
}

input[type="radio"] {
    margin-right: 0.5rem;
    margin-left: 0;
}

select {
    border: 1px solid #9aa6b2;
    background: #fff;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* =========================
   Tables
   ========================= */

table {
    max-width: 100%;
    border-collapse: collapse;
}

th {
    border-right: 1px solid white;
    background-color: var(--mort-table-head);
    color: var(--mort-table-head-text);
}

/* =========================
   Legacy side columns
   ========================= */

td.middle {
    padding: 4px;
    background-color: #ffffff;
}

td.leftside,
td.rightside {
    background-color: var(--mort-sidebar);
    padding: 4px;
}

/* =========================
   Programs section
   ========================= */

div.programs tr.oddrow {
    background-color: #eee;
}

div.programs tr.evenrow {
    background-color: #fff;
}

div.programs ul {
    font-size: 0.95rem;
}

div.programs li {
    padding-bottom: 5px;
}

/* =========================
   New shared layout helpers
   ========================= */

.mort-page-wrap {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.mort-hero {
    background: linear-gradient(135deg, var(--mort-hero-a) 0%, var(--mort-hero-b) 100%);
    color: #1f2d3d;
    border: 1px solid #d7e3f0;
    border-radius: var(--mort-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: none;
}

.mort-hero h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--mort-heading);
    text-align: left;
}

.mort-hero p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #3a5068;
    max-width: 800px;
}

.mort-widget-card {
    border: 0;
    border-radius: var(--mort-radius);
    box-shadow: var(--mort-shadow-md);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.mort-widget-card .card-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    padding: 0.9rem 1.1rem;
    color: #243447;
}

.mort-widget-card .card-body {
    background: #fff;
    padding: 1rem;
}

.mort-main-content {
    background: #fff;
    border-radius: var(--mort-radius);
    box-shadow: var(--mort-shadow-md);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.mort-content-wrap {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: var(--mort-radius);
    padding: 1.5rem;
    box-shadow: var(--mort-shadow-sm);
}

.mort-sticky {
    position: sticky;
    top: 1rem;
}

.mort-navbar {
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
}

.mort-banner img,
.mort-logo img {
    max-width: 100%;
    height: auto;
}

.mort-footer {
    font-size: 0.95rem;
    color: #495057;
}

.disclaimer {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 1rem;
}

/* =========================
   DB homepage mobile fixes
   ========================= */

.mort-main-content table {
    width: 100% !important;
}

.mort-main-content img[align="right"] {
    float: none !important;
    display: block;
    margin: 0 auto 1rem auto;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 991.98px) {
    .mort-sticky {
        position: static;
    }

    .mort-main-content {
        margin-bottom: 1rem;
    }

    .mort-widget-card {
        margin-top: 0.75rem;
    }

    .mort-hero {
        padding: 1.5rem;
    }

    .mort-hero h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 15px;
    }

    h1 {
        font-size: 1.7rem;
        text-align: left;
    }

    .mort-main-content table,
    .mort-main-content tbody,
    .mort-main-content tr {
        display: block;
        width: 100%;
    }

    .mort-main-content table tr td {
        display: block;
        width: 100% !important;
    }

    .mort-main-content table tr td + td {
        margin-top: 1.25rem;
        padding-top: 1rem;
        border-top: 1px solid #dee2e6;
    }
}

/* ===== Loan Calc Layout ===== */

.mort-loan-calc-grid {
    display: grid;
    gap: 0.75rem;
}

/* Desktop: label left, input right */
.mort-loan-calc-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 0.5rem;
}

.mort-loan-calc-label {
    font-weight: 600;
    color: var(--mort-heading);
    font-size: 0.9rem;
}

.mort-loan-calc-field input,
.mort-loan-calc-field select {
    width: 100%;
}

/* Highlight payment row */
.mort-loan-calc-row.highlight {
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 0.4rem;
}

.mort-loan-calc-row.highlight input {
    font-weight: bold;
    font-size: 1.05rem;
}

/* Button */
.mort-loan-calc-actions {
    margin-top: 0.5rem;
}

/* Footer */
.mort-loan-calc-footer {
    font-size: 0.85rem;
    color: var(--mort-muted);
    border-top: 1px solid var(--mort-border);
    padding-top: 0.5rem;
}

/* ===== Mortgage News Widget ===== */

.mort-news-widget {
    width: 100%;
}

.mort-news-feed {
    background: var(--mort-surface);
}

.mort-news-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--mort-border);
    font-size: 0.9rem;
    color: var(--mort-muted);
}

.mort-news-footer a {
    color: var(--mort-link);
}

.mort-news-footer a:hover {
    color: var(--mort-link-hover);
}

.mort-news-sep {
    margin: 0 0.4rem;
    color: var(--mort-muted);
}


/* ===== Quick Quote Widget ===== */

.mort-quickquote {
    width: 100%;
    font-size: 14px;
}

.mort-quickquote-grid {
        display: grid;
        gap: 10px;
}

.mort-quickquote-row {
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 10px;
        align-items: center;
}

.mort-quickquote-label {
        font-weight: 600;
        color: #16324f;
        text-align: left;
        margin: 0;
}

.mort-quickquote-field input,
.mort-quickquote-field select {
        width: 100%;
        box-sizing: border-box;
}

.mort-quickquote-row.required .mort-quickquote-label {
        color: #0f2740;
}

.mort-quickquote-actions {
        background: #f8fafc;
        border: 1px solid #dbe3ea;
        border-radius: 8px;
        padding: 10px;
        margin-top: 4px;
}

.mort-quickquote-actions input,
.mort-quickquote-actions button {
        width: 100%;
        box-sizing: border-box;
}

.mort-quickquote-note {
        font-size: 12px;
        color: #64748b;
        border-top: 1px solid #dbe3ea;
        padding-top: 8px;
}


/* ===== Mortgage Rates Widget ===== */

.mort-rates-widget {
    width: 100%;
}

.mort-rates-feed {
    background: var(--mort-surface);
}

.mort-rates-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--mort-border);
    font-size: 0.9rem;
    color: var(--mort-muted);
}

.mort-rates-footer a {
    color: var(--mort-link);
}

.mort-rates-footer a:hover {
    color: var(--mort-link-hover);
}


/* =========================
   Mobile spacing refinement
========================= */
@media (max-width: 767.98px) {

    /* Outer container */
    .container.my-4 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Kill the white wrapper padding */
    .mort-content-wrap {
        padding: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* INNER container is the biggest offender */
    .mort-content-wrap .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        border: none  !important;
        box-shadow: none !important;
    }


    /* Optional: remove extra wrapper padding if still too wide */
    .mort-page-wrap {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    /* Reduce Bootstrap row gutters */
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    /* Tighten card spacing */
    .mort-widget-card {
        margin-bottom: 0.75rem;
    }

    /* Reduce card padding slightly */
    .mort-widget-card .card-body {
        padding: 0.75rem;
    }

    /* Hero section tighter */
    .mort-hero {
        padding: 1rem 0.75rem;
        margin-bottom: 0.75rem;
    }

    /* Main content spacing */
    .mort-main-content {
        margin-bottom: 0.75rem;
        border: 1px solid var(--mort-border);
        padding-left: .75rem;
    }
}



.mnd-rates table {
    width: 100%;
}


/* NAVBAR */
.mort-navbar {
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid #dee2e6;
    backdrop-filter: blur(8px);
}

.mort-navbar .nav-link {
    color: #334155;
    font-weight: 500;
    padding: 0.7rem 0.95rem;
    border-radius: 0.65rem;
    transition: all 0.2s ease;
}

.mort-navbar .nav-link:hover {
    background: #f1f5f9;
    color: var(--mort-accent);
}

.mort-navbar .nav-link.active {
    background: #eef4fb;
    color: var(--mort-accent);
    font-weight: 700;
}

/* DROPDOWN */
.mort-navbar .dropdown-menu {
    border-radius: 1rem;
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
    padding: 0.75rem;
    min-width: 320px;
}

/* RESOURCE ITEMS */
.mort-resource-item {
    padding: 0.8rem;
    border-radius: 0.75rem;
    display: block;
    text-decoration: none;
    transition: all 0.2s ease;
}



.mort-resource-item.active {
    background: #eef4fb;
    color: var(--mort-accent);
}


.mort-resource-item:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.mort-resource-title {
    font-weight: 700;
    color: #16324f;
}

.mort-resource-desc {
    font-size: 0.85rem;
    color: #64748b;
}

/* CONTENT */
.mort-content-wrap {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #dee2e6;
}

/* FOOTER */
.mort-footer {
    color: #6c757d;
    font-size: 0.9rem;
}
