/* 
* VetCalculator Main Stylesheet
* Version: 1.0
*/

/* -----------------------------
   Base Styles & CSS Variables
----------------------------- */
:root {
    --primary-color: #4a6da7;
    --primary-dark: #345089;
    --secondary-color: #50b3a2;
    --accent-color: #f39c12;
    --dark-text: #333333;
    --medium-text: #555555;
    --light-text: #777777;
    --lighter-text: #999999;
    --light-bg: #f8f9fa;
    --border-color: #e1e1e1;
    --danger-color: #e74c3c;
    --warning-color: #f1c40f;
    --success-color: #2ecc71;
    --font-main: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 4px;
    --container-width: 1200px;
    --header-height: 80px;
  }
  /* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  
  .modal.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
  
  .modal-content {
    background-color: #fff;
    margin: 10vh auto;
    padding: 2rem;
    border-radius: 4px;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
  }
  
  .modal.active .modal-content {
    transform: translateY(0);
  }
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .modal-title {
    font-size: 1.5rem;
    margin: 0;
    color: #4a6da7;
  }
  
  .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #555555;
    transition: color 0.3s ease;
    padding: 0;
    margin: 0;
    line-height: 1;
  }
  
  .modal-close:hover {
    color: #4a6da7;
  }
  
  .modal-body {
    margin-bottom: 1.5rem;
  }
  
  .modal-footer {
    border-top: 1px solid #e1e1e1;
    padding-top: 1rem;
    text-align: right;
  }
  
  .btn-close {
    background-color: #4a6da7;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .btn-close:hover {
    background-color: #345089;
  }
  
  .modal-section {
    margin-bottom: 1.25rem;
  }
  
  .modal-section-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #4a6da7;
  }
  
  .modal-section-content {
    color: #555555;
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  /* For mobile */
  @media (max-width: 768px) {
    .modal-content {
      margin: 15% auto;
      padding: 1.5rem;
      width: 90%;
    }
  }
  /* -----------------------------
     Reset & Base Elements
  ----------------------------- */
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  html {
    font-size: 16px;
    scroll-behavior: smooth;
  }
  
  body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--dark-text);
    background-color: #fff;
    overflow-x: hidden;
  }
  
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
  }
  
  a:hover, a:focus {
    color: var(--primary-dark);
    text-decoration: underline;
  }
  
  ul, ol {
    list-style-position: inside;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-text);
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
    margin-top: 2rem;
  }
  
  h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
  }
  
  p {
    margin-bottom: 1rem;
  }
  
  .container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
  }
  
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
  
  .skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 100;
  }
  
  .skip-link:focus {
    top: 0;
  }
  
  /* -----------------------------
     Header & Navigation
  ----------------------------- */
  .site-header {
    background-color: #fff;
    box-shadow: var(--box-shadow);
    position: relative;
    z-index: 100;
  }
  
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
  }
  
  .logo {
    display: flex;
    align-items: center;
  }
  
  .logo img {
    max-height: 50px;
    width: auto;
  }
  
  /* Primary Navigation */
  .primary-navigation {
    height: 100%;
  }
  
  .menu {
    display: flex;
    height: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .menu > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
  }
  
  .menu > li > a {
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    height: 100%;
    color: var(--dark-text);
    font-weight: 500;
    text-decoration: none;
  }
  
  .menu > li > a:hover, 
  .menu > li > a:focus {
    color: var(--primary-color);
  }
  
  /* Dropdown Menu */
  .dropdown {
    position: relative;
  }
  
  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 200px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
    list-style: none;
    padding: 0.5rem 0;
  }
  
  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--dark-text);
    text-decoration: none;
  }
  
  .dropdown-menu li a:hover,
  .dropdown-menu li a:focus {
    background-color: var(--light-bg);
    color: var(--primary-color);
  }
  
  /* Mobile Menu Toggle */
  .menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
  }
  
  .icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-text);
    margin: 5px 0;
    transition: var(--transition);
  }
  
  /* -----------------------------
     Breadcrumbs
  ----------------------------- */
  .breadcrumbs {
    margin: 1rem 0 2rem;
    font-size: 0.875rem;
  }
  
  .breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .breadcrumbs li {
    display: flex;
    align-items: center;
  }
  
  .breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin: 0 0.5rem;
    color: var(--lighter-text);
  }
  
  .breadcrumbs a {
    color: var(--light-text);
    text-decoration: none;
  }
  
  .breadcrumbs a:hover {
    color: var(--primary-color);
    text-decoration: underline;
  }
  
  .breadcrumbs li:last-child {
    color: var(--medium-text);
    font-weight: 500;
  }
  
  /* -----------------------------
     Hero/Media Text Section
  ----------------------------- */
  .header-media-container {
    margin-bottom: 40px;
    border-radius: var(--border-radius);
    overflow: hidden;
  }
  
  .media-text-wrapper {
    display: grid;
    grid-template-columns: 1fr 50%;
    align-items: center;
    background-color: var(--light-bg);
  }
  
  .media-figure {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    line-height: 0;
  }
  
  .media-image {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
  
  .media-content {
    grid-column: 1;
    grid-row: 1;
    padding: 3rem 8%;
  }
  
  .heading-title {
    margin-top: 0;
    color: var(--dark-text);
  }
  
  .mobile-note {
    display: none;
    font-size: 0.875rem;
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
  }
  
  /* -----------------------------
     Calculator Styles
  ----------------------------- */
  .calculator-container {
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
  }
  
  .warning {
    color: #7B1818;
    font-size: 1rem;
    background-color: #ffe6e6;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
  }
  
  .input-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
  }
  
  .weight-inputs, .concentration-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .input-group {
    display: flex;
    flex-direction: column;
  }
  
  label {
    margin-bottom: 5px;
    font-weight: 500;
  }
  
  input, select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    width: 180px;
    transition: var(--transition);
  }
  
  input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 109, 167, 0.25);
  }
  
  .help-text {
    font-size: 0.75rem;
    color: var(--light-text);
    margin-top: 0.25rem;
  }
  
  .search-section {
    margin-bottom: 30px;
  }
  
  #search {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
  }
  
  #search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 109, 167, 0.25);
  }
  
  .medication-section {
    margin-bottom: 30px;
  }
  
  .medication-section h2 {
    margin-top: 0;
    font-size: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-bg);
  }
  
  /* Table Styles */
  .table-container {
    overflow-x: auto;
    margin-top: 1rem;
    position: relative;
  }
  
  table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
  }
  
  th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
  }
  
  th {
    background-color: var(--light-bg);
    font-weight: 600;
  }
  
  tr:hover {
    background-color: rgba(214, 238, 238, 0.5);
  }
  
  .parentCell {
    position: relative;
  }
  
  .tooltip {
    display: none;
    position: absolute;
    z-index: 100;
    background-color: white;
    border: 1px solid var(--border-color);
    padding: 10px;
    color: var(--dark-text);
    top: 30px;
    left: 0;
    width: 250px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
  }
  
  .parentCell:hover .tooltip {
    display: block;
  }
  
  /* Collapse Icon */
  .collapse-icon {
    display: none;
    cursor: pointer;
    font-weight: bold;
    padding: 5px;
    text-align: right;
    color: var(--primary-color);
  }
  
  /* -----------------------------
     Additional Information Section
  ----------------------------- */
  .additional-info {
    margin: 3rem 0;
    padding: 2rem;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
  }
  
  .info-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
  }
  
  .info-column h3 {
    color: var(--primary-color);
    margin-top: 0;
  }
  
  /* -----------------------------
     FAQ Section
  ----------------------------- */
  .faq-section {
    margin: 3rem 0;
  }
  
  details {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
  }
  
  summary {
    padding: 1rem;
    background-color: var(--light-bg);
    cursor: pointer;
    font-weight: 600;
    position: relative;
  }
  
  summary::-webkit-details-marker {
    display: none;
  }
  
  summary::after {
    content: "+";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
  }
  
  details[open] summary::after {
    content: "-";
  }
  
  .faq-content {
    padding: 1rem;
  }
  
  /* -----------------------------
     Page Content (About, Contact, etc)
  ----------------------------- */
  .page-content {
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 3rem;
  }
  
  .page-content h1 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .page-body {
    max-width: 800px;
  }
  
  .page-body h2 {
    color: var(--primary-color);
    margin-top: 2rem;
  }
  
  .page-body p, .page-body ul, .page-body ol {
    margin-bottom: 1.5rem;
  }
  
  .page-body a {
    color: var(--primary-color);
    text-decoration: underline;
  }
  
  .page-body a:hover {
    color: var(--primary-dark);
  }
  
  .page-body ul, .page-body ol {
    padding-left: 1.5rem;
    list-style-position: outside;
  }
  
  .page-body li {
    margin-bottom: 0.5rem;
  }
  
  /* -----------------------------
     Sources Section
  ----------------------------- */
  .sources-section {
    margin: 3rem 0;
    padding: 2rem;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
  }
  
  .sources-list {
    list-style: none;
    padding-left: 0;
  }
  
  .sources-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
  }
  
  .sources-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
  }
  
  /* -----------------------------
     Collapsible Category Headers
  ----------------------------- */
  .medication-section h2 {
    cursor: pointer;
    position: relative;
    padding-right: 30px;
    user-select: none;
  }
  
  .medication-section h2:after {
    content: "−";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary-color);
  }
  
  .medication-section.collapsed h2:after {
    content: "+";
  }
  
  .medication-section.collapsed .table-container {
    display: none;
  }
  .site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 3rem 0 1rem;
  }
  
  .footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
  }
  
  .footer-widget h4 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
  }
  
  .footer-widget h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
  }
  
  .footer-links {
    list-style: none;
    padding: 0;
  }
  
  .footer-links li {
    margin-bottom: 0.75rem;
  }
  
  .footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
  }
  
  .footer-links a:hover {
    color: var(--accent-color);
    text-decoration: none;
  }
  
  .footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: #bdc3c7;
  }
  
  /* -----------------------------
     Media Queries
  ----------------------------- */
  @media (max-width: 1023px) {
    /* Mobile Navigation */
    .menu-toggle {
      display: block;
    }
    
    .primary-navigation {
      position: absolute;
      top: var(--header-height);
      left: 0;
      width: 100%;
      background-color: #fff;
      box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
      transform: translateY(-100%);
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
      height: auto;
      overflow: hidden;
    }
    
    .primary-navigation.active {
      transform: translateY(0);
      opacity: 1;
      visibility: visible;
    }
    
    .menu {
      flex-direction: column;
      align-items: flex-start;
      padding: 1rem 0;
    }
    
    .menu > li {
      width: 100%;
      height: auto;
    }
    
    .menu > li > a {
      padding: 1rem 1.25rem;
      height: auto;
      border-bottom: 1px solid var(--border-color);
    }
    
    .dropdown-menu {
      position: static;
      opacity: 1;
      visibility: visible;
      transform: none;
      box-shadow: none;
      background-color: var(--light-bg);
      margin-left: 1.25rem;
      display: none;
    }
    
    .dropdown.open .dropdown-menu {
      display: block;
    }
    
    .dropdown-toggle::after {
      content: "+";
      margin-left: 0.5rem;
    }
    
    .dropdown.open .dropdown-toggle::after {
      content: "-";
    }
    
    /* Media Text Layout */
    .media-text-wrapper {
      grid-template-columns: 100%;
    }
    
    .media-figure {
      grid-column: 1;
      grid-row: 1;
    }
    
    .media-content {
      grid-column: 1;
      grid-row: 2;
      padding: 2rem;
    }
    
    .mobile-note {
      display: block;
    }
    
    /* Columns to rows */
    .info-columns {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }
  }
  
  @media (max-width: 768px) {
    .input-section, .weight-inputs, .concentration-inputs {
      flex-direction: column;
    }
    
    input, select {
      width: 100%;
    }
    
    .collapse-icon {
      display: block;
    }
    
    .table-container {
      overflow-x: auto;
    }
    
    .collapsed .table-body {
      display: none;
    }
    
    /* Make the calculator fit better on small screens */
    .calculator-container, .page-content {
      padding: 1.5rem;
    }
    
    /* Improve tap targets on mobile */
    label, input, select, #search {
      font-size: 16px; /* Prevent iOS zoom on focus */
    }
    
    th, td {
      padding: 10px 12px;
      font-size: 14px;
    }
    
    /* Adjust font sizes for mobile */
    h1 {
      font-size: 2rem;
    }
    
    h2 {
      font-size: 1.75rem;
    }
    
    h3 {
      font-size: 1.25rem;
    }
    
    /* Better padding for the FAQ items */
    summary {
      padding: 0.75rem;
    }
    
    .faq-content {
      padding: 0.75rem;
    }
    
    /* Footer adjustments */
    .footer-widget {
      text-align: center;
    }
    
    .footer-widget h4::after {
      left: 50%;
      transform: translateX(-50%);
    }
  }