/* ===============
   Brand Palette
   ===============
Primary:
- Midnight Blue: #003B6D
- Blue Sky:      #6699CC
Secondary:
- Dim Gray:      #676767
- Silver:        #BDBDBD
*/
:root{
  --brand-1:#003B6D;   /* Midnight Blue */
  --brand-2:#6699CC;   /* Blue Sky */
  --gray-1:#676767;    /* Dim Gray */
  --gray-2:#BDBDBD;    /* Silver */

  --ink:#1f2937;
  --bg:#f6f7f8;
  --surface:#ffffff;
  --line:#e5e7eb;
  --radius:16px;
  --shadow:0 8px 24px rgba(0,0,0,.08);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--ink);
  background:var(--bg);
  line-height:1.6;
}
.container{ width:min(1200px,92vw); margin-inline:auto; }
.placeholder{
  background: repeating-linear-gradient(135deg,#dfe3e8 0 12px,#eef1f5 12px 24px);
  border:2px dashed #cfd6de;
  border-radius:var(--radius);
}

/* Buttons */
.btn{
  display:inline-block;
  padding:.7rem 1.1rem;
  border-radius:12px;
  font-weight:600;
  text-decoration:none;
  transition:.2s ease-in-out;
  border:2px solid transparent;
  cursor:pointer;
}
.btn-primary{ background:var(--brand-1); color:#fff; }
.btn-primary:hover{ background:var(--brand-2); transform:translateY(-1px); box-shadow:var(--shadow); }
.btn-outline{
  color:#fff;
  background:transparent;
  border-color:rgba(255,255,255,.6);
}
.btn-outline:hover{ border-color:#fff; }
.btn-ghost{
  color:#fff;
  border:1px solid rgba(255,255,255,.4);
  background:transparent;
}
.btn-ghost:hover{ border-color:#fff; }

/* ==========================
   HEADER (logo | nav | search)
   ========================== */

/* Header bar */
.site-header{
  background: var(--brand-1); /* Midnight Blue */
  color:#fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Grid: logo | nav | search */
.header-inner{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 0;
}

/* Brand/logo (img in your HTML, but keep this if you ever use a div.logo) */
.brand .logo{ width:140px; height:48px; background-color:#fff; }

/* NAV: remove bullets, set horizontal layout, spacing */
.nav ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;            /* adjust spacing between items */
  align-items: center;
}

/* NAV link styles (including visited to prevent purple) */
.nav a,
.nav a:visited{
  color: #ffffff;
  text-decoration: none;
  display: inline-block;
  padding: .5rem .2rem;
  border-radius: 8px;
  font-weight: 500;
}

.nav a:hover{
  background: rgba(255,255,255,.08);
}

/* Active page highlight */
.nav a.active {
  background: var(--brand-2);      /* Blue Sky */
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Keep hover looking consistent even on active link */
.nav a.active:hover {
  background: var(--brand-2);
  color: #fff;
}

/* Keep nav centered between logo & search */
.nav{ justify-self: center; }

/* ==========================
   Header Search Box (fixed layout + blue glow)
   ========================== */
/* --- Fix search layout: keep input + button on one line --- */
.top-search {
  display: flex;
  flex-direction: row !important;   /* kill any old column rule */
  align-items: center;
  flex-wrap: nowrap;                 /* don't wrap to a new line */
  gap: 0.5rem;
}

/* constrain input so there's always room for the button */
.top-search input[type="search"] {
  flex: 1 1 auto;
  max-width: 240px;                  /* adjust if you want wider */
  min-width: 160px;
}

/* make sure no legacy margins push the button down */
.top-search button {
  margin: 0 !important;
}

/* If you still have an older media-query that stacks it, neutralize it */
@media (max-width: 1040px) {
  .top-search {
    flex-direction: row !important;  /* keep it side-by-side on mobile too */
    width: min(560px, 92%);
  }
}


.top-search {
  justify-self: end;           /* push to right in the grid */
  display: flex;
  align-items: center;
  flex-wrap: nowrap;           /* keep input + button on one line */
  gap: 0.5rem;

  background: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.10);
  transition: box-shadow .2s ease, transform .2s ease;
}

/* Brand-blue glow when hovered or focused */
.top-search:hover,
.top-search:focus-within {
  box-shadow:
    0 0 0 3px rgba(102,153,204,0.28),
    0 10px 20px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

.top-search input[type="search"] {
  flex: 1;
  min-width: 180px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gray-2);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--ink);
}
.top-search input[type="search"]:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 2px rgba(102,153,204,0.20);
}

.top-search button {
  background: var(--brand-1);
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;          /* prevents wrapping below the input */
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.top-search button:hover {
  background: var(--brand-2);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

/* ==========================
   Responsive header stack
   ========================== */
@media (max-width: 1040px){
  .header-inner{
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "nav"
      "search";
    justify-items: center;
    gap: 0.75rem;
  }
  .brand{ grid-area: logo; }
  .nav{ grid-area: nav; }
  .top-search{
    grid-area: search;
    justify-self: center;
    width: min(560px, 92%);
  }
}


/* Hero */
.hero{
  background: linear-gradient(180deg, #f8fafc, #e9f1fb 50%, #e5eef8);
  border-bottom:1px solid var(--line);
}
.hero-inner{ text-align:center; padding: clamp(2rem, 6vw, 5rem) 0; }
.hero-title{ font-size:clamp(1.8rem, 3.8vw, 3rem); margin:0 0 .5rem; color:var(--brand-1); }
.hero-subtitle{ color:var(--gray-1); margin:0 0 1.25rem; }

/* Features */
.features{ padding:3rem 0 2.5rem; }
.section-title{ margin:0 0 1.25rem; font-size:1.5rem; color:var(--brand-1); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: stretch; /* ensures equal card height alignment */
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* pushes footer text to bottom */
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Centered and cropped images */
.card-media {
  width: 100%;
  height: 180px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background-color: #f5f7fa;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* use contain if you prefer full visibility */
  display: block;
  border-radius: 10px;
}

.card-title {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.15rem;
  color: var(--brand-1);
  text-align: center;
}

.card-text {
  color: var(--gray-1);
  text-align: center;
  flex-grow: 1;
  font-size: 0.95rem;
  line-height: 1.5;
}


/* Content Area */
.content-area{ padding:2.5rem 0; }
.content-grid{ display:grid; grid-template-columns: 2fr 1fr; gap:1.25rem; }
.content-main,
.content-aside .aside-card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:1rem;
  box-shadow:var(--shadow);
}
.content-image{ height:180px; margin:1rem 0; }
.aside-card + .aside-card{ margin-top:1rem; }
.list{ padding-left:1.25rem; margin:.5rem 0; }
.list li{ margin:.35rem 0; }

/* Footer */
.site-footer{
  background: var(--ink);
  color:#e6edf6;
  margin-top:2rem;
  padding:2rem 0 0;
}
.footer-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap:1.25rem; }
.site-footer a{ color:#e6edf6; text-decoration:none; border-bottom:1px dotted rgba(255,255,255,.4);}
.site-footer a:hover{ border-bottom-color:#fff; }
.newsletter:hover;
.newsletter::focus-within {
  box-shadow:
    0 0 0 3px rgba(102,153,204,0.28),
    0 10px 20px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}
.newsletter{
  display:flex;
  gap:.5rem; 
  align-items:center; 
  flex-wrap:wrap;
}

.newsletter input{
  min-width:220px;
  padding:.6rem .8rem;
  border:1px solid var(--gray-2);
  border-radius:10px;
  background:#fff;
  color: var(--ink);
}
.newsletter input:focus{
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 2px rgba(102,153,204,0.20);
}

.newsletter button {
  background: var(--brand-1);
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;          /* prevents wrapping below the input */
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.newsletter button:hover {
  background: var(--brand-2);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}
.footer-bottom{ border-top:1px solid rgba(255,255,255,.2); text-align:center; padding:1rem 0; margin-top:1.25rem; }

/* Utilities */
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Responsive */
@media (max-width: 1040px){
  .header-inner{ grid-template-columns: auto 1fr; grid-template-areas:
    "logo nav"
    "search search";
  }
  .brand{ grid-area: logo; }
  .nav{ grid-area: nav; justify-self:end; }
  .top-search{ grid-area: search; justify-self:stretch; }
}
@media (max-width: 960px){
  .features-grid{ grid-template-columns: 1fr 1fr; }
  .content-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 700px){
  .features-grid{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; }
}

/* ==========================
   Pet Owner Form Styling
   ========================== */
form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--surface);
  padding: 1.25rem;
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

form h2 {
  text-align: center;
  color: var(--brand-1);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

form label {
  font-weight: 600;
  color: var(--gray-1);
  margin-top: 0.25rem;
}

form input,
form select {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gray-2);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--brand-1);
  background-color: #fff;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

form input:focus,
form select:focus {
  border-color: var(--brand-2);
  outline: none;
  box-shadow: 0 0 0 3px rgba(102,153,204,0.2);
}

form button {
  background: var(--brand-2);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  padding: 0.8rem;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease-in-out;
}

form button:hover {
  background: var(--brand-1);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* ==========================
   Full-Width Contact Form
   ========================== */
.contact-form-section {
  background: #fff;
  color: #fff;
  padding: clamp(2rem, 6vw, 5rem) 0;
  text-align: center;
}

.contact-form-section .section-title {
  color: #000;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.contact-intro {
  color: #000;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.contact-form {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  width: min(600px, 95%);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-align: left;
}

.contact-form label {
  font-weight: 600;
  color: var(--gray-1);
}

.contact-form input,
.contact-form select {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--gray-2);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--brand-1);
  background: #fff;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.contact-form input:focus,
.contact-form select:focus {
  border-color: var(--brand-2);
  outline: none;
  box-shadow: 0 0 0 3px rgba(102,153,204,0.2);
}

.contact-form button {
  background: var(--brand-2);
  color: #fff;
  border: none;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.contact-form button:hover {
  background: var(--brand-1);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ==========================
   Pet Owner Form
   ========================== */
.pet-form {
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-width: 600px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pet-form h2 {
  color: var(--brand-1);
  margin-bottom: .5rem;
  text-align: center;
}

.pet-form label {
  font-weight: 600;
  color: var(--brand-1);
}

.pet-form input,
.pet-form select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--gray-2);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.pet-form input:focus,
.pet-form select:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 2px rgba(102,153,204,0.2);
}

.pet-form fieldset {
  border: 1px solid var(--gray-2);
  border-radius: 10px;
  padding: 1rem;
}

.pet-form legend {
  font-weight: 600;
  color: var(--brand-1);
}

.pet-form legend small {
  color: var(--gray-1);
  font-weight: 400;
}

.age-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

.pet-form button {
  background: var(--brand-1);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  align-self: center;
  transition: background 0.3s ease, transform 0.2s ease;
}

.pet-form button:hover {
  background: var(--brand-2);
  transform: translateY(-1px);
}

/* Responsive tweak */
@media (max-width: 640px) {
  .age-fields {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* Wide content media (for big images inside articles) */
.wide-media{
  width: 100%;
  aspect-ratio: 16 / 9;            /* auto-scales; change to 21/9 or 4/3 if you prefer */
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 1rem 0 1.25rem;          /* breathing room around the image */
  background: #f5f7fa;             /* subtle fallback */
}

.wide-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;                /* fills the box like a banner (no distortion) */
  object-position: center;          /* tweak focal point if needed (e.g., 50% 35%) */
  display: block;
}

/* Optional caption styling */
.wide-media figcaption{
  padding: .5rem .75rem;
  font-size: .95rem;
  color: var(--gray-1);
  background: #fff;
  border-top: 1px solid var(--line);
}
.wide-media{ transition: transform .25s ease, box-shadow .25s ease; }
.wide-media:hover{ transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.15); }
