/* === CMF Ferrer - Modern Responsive Theme (2026) === */
:root{
  --bg:#0b1220;
  --surface:#ffffff;
  --muted:#6b7280;
  --text:#0f172a;
  --brand:#1d4ed8;
  --brand2:#2563eb;
  --line:rgba(15,23,42,.12);
  --shadow:0 12px 30px rgba(0,0,0,.10);
  --r:16px;
}

/* Base */
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,Helvetica,sans-serif;
  color:var(--text);
  background: linear-gradient(180deg,#f7f8fb 0%, #f2f5fb 40%, #ffffff 100%);
  line-height:1.5;
}

a{ color:var(--brand2); }
a:hover{ text-decoration:none; }

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

/* Layout wrapper */
.wrapper{
  width:min(1040px, 92vw);
  margin: 18px auto 28px auto;
  background: transparent;
}

/* Top bar */
.upperhead{
  background: linear-gradient(135deg, #0b1220, #0f1b33);
  color: rgba(255,255,255,.88);
  border-radius: var(--r);
  padding: 10px 14px;
  box-shadow: var(--shadow);
  border:1px solid rgba(255,255,255,.08);
  margin-bottom: 12px;
}
.upperhead .tel{
  font-weight: 700;
  font-size: 13px;
  letter-spacing:.2px;
}

/* Banner */
.banner{
  background: #fff;
  border-radius: var(--r);
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
  border:1px solid var(--line);
  overflow:hidden;
  margin-bottom: 12px;
}
.banner img{ display:block; width:100%; height:auto; }

/* Content columns */
.content{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
  align-items:start;
}

/* Left column / nav */
.leftcolumn{
  width:auto;
}
#navvy{
  background: #fff;
  border-radius: var(--r);
  border:1px solid var(--line);
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
  overflow:hidden;
}
#navvylist{
  list-style:none;
  margin:0;
  padding:8px;
}
#navvylist li{ margin:0; padding:0; }
#navvylist a{
  display:block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration:none;
  color: var(--text);
  font-weight: 750;
  font-size: 14px;
}
#navvylist a:hover{
  background: rgba(37,99,235,.10);
  color: var(--brand2);
}

/* Left column promo box */
.box{
  margin-top: 12px;
  background:#fff;
  border-radius: var(--r);
  border:1px solid var(--line);
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
  padding:10px;
  overflow:hidden;
}
.box img{ display:block; width:100%; height:auto; border-radius: 12px; border:0 !important; }

/* Right column content */
.rightcolumn{
  background:#fff;
  border-radius: var(--r);
  border:1px solid var(--line);
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
  padding: 16px;
  overflow:hidden;
}

h2{
  margin: 0 0 10px 0;
  font-size: 26px;
  line-height:1.2;
  letter-spacing:-.2px;
}
h3{
  margin: 10px 0 8px 0;
  font-size: 16px;
  line-height:1.35;
  color: #111827;
}
.article{
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14.5px;
}
.article strong{ color: var(--text); }

/* Tables used as image grids */
table{ border-collapse: collapse; width:100% !important; }
td{ padding: 6px; vertical-align: top; }
td img{
  width:100%;
  height:auto;
  border-radius: 14px;
  border:1px solid var(--line);
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

/* Clearfix legacy */
.clear{ clear: both; height: 0; overflow:hidden; }

/* Footer */
.footer{
  margin-top: 14px;
  background: linear-gradient(135deg, #0b1220, #0f1b33);
  color: rgba(255,255,255,.88);
  border-radius: var(--r);
  padding: 12px 14px;
  border:1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  font-size: 13px;
}
.footer a{ color: rgba(255,255,255,.92); font-weight: 800; }

/* Responsive */
@media (max-width: 900px){
  .content{ grid-template-columns: 1fr; }
  .leftcolumn{ order: 2; }
  .rightcolumn{ order: 1; }
}


/* Mobile image stacking for legacy tables */
@media (max-width: 640px){
  table, tbody, tr, td{ display:block; width:100% !important; }
  td{ padding: 8px 0; }
  td img{ width:100% !important; height:auto !important; }
}


/* Uniform image tiles (keeps all photos same visual size) */
td img{
  width:100% !important;
  height: 180px !important;        /* desktop tile height */
  object-fit: cover;               /* crop to keep uniform tiles */
  object-position: center;
  border-radius: 14px;
  border:1px solid var(--line);
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
  background: #f3f4f6;
}
@media (max-width: 900px){
  td img{ height: 200px !important; }
}
@media (max-width: 640px){
  td img{ height: auto !important; object-fit: contain; } /* on mobile show full image */
}



/* Legacy float override (old HTML used floats) */
.leftcolumn, .rightcolumn{
  float: none !important;
  width: auto !important;
}

@media (max-width: 1024px){
  .content{ grid-template-columns: 1fr; }
}


/* Mobile-only topnav (desktop keeps original sidebar/menu) */
.topnav{ display:none; }

/* hamburger icon */
.topnav .burger{
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  display:block;
  border-radius: 999px;
}
.topnav .burger:before,
.topnav .burger:after{
  content:"";
  position:absolute;
  left:0;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}
.topnav .burger:before{ top:-6px; }
.topnav .burger:after{ top:6px; }

/* Mobile layout */
@media (max-width: 900px){
  /* show bar at the very top */
  .topnav{
    display:flex;
    align-items:center;
    gap:10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    padding: 10px 12px;
    background:#fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(0,0,0,.10);
    z-index: 999;
  }
  .topnav .brand{
    font-weight: 950;
    letter-spacing:.2px;
    color: var(--text);
    text-decoration:none;
    padding: 8px 10px;
    border-radius: 12px;
  }
  .topnav .brand:hover{ background: rgba(37,99,235,.08); color: var(--brand2); }

  .nav-toggle{ display:none; }

  .nav-toggle-label{
    margin-left:auto;
    width: 42px;
    height: 42px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(15,23,42,.02);
    cursor:pointer;
    user-select:none;
  }
  .nav-toggle-label:hover{ background: rgba(37,99,235,.08); }

  .nav-links{
    display:none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 62px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    padding: 10px;
    z-index: 1000;
  }
  .nav-links a{
    display:block;
    text-decoration:none;
    color: var(--text);
    font-weight: 850;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 12px;
  }
  .nav-links a:hover{ background: rgba(37,99,235,.10); color: var(--brand2); }

  #nav-toggle:checked ~ .nav-links{ display:block; }

  /* Make room for the fixed bar */
  body{ padding-top: 70px; }

  /* On mobile, hide sidebar nav and use full width content */
  .content{ grid-template-columns: 1fr; }
  .leftcolumn{ display:none; }
  #navvy{ display:none; }
}

/* Extra small */
@media (max-width: 360px){
  body{ padding-top: 78px; }
}

/* listfix for legacy orphan <li> blocks */
ul.listfix{ margin: 10px 0; padding-left: 18px; }
ul.listfix li{ margin: 6px 0; }
