
/* ==========================================
   SuitSizeCalculator.com
   Calculators Directory
   File: calculators.css
========================================== */


/* ==========================================
   1. GLOBAL RESET
========================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;

  color: #263445;
  background-color: #ffffff;
}

a {
  color: #1769aa;
}

button {
  font: inherit;
}

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

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid #287bc8;
  outline-offset: 3px;
}


/* ==========================================
   2. HEADER
========================================== */

header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e4e8ed;
  position: relative;
  z-index: 100;
}

.header-container {
  max-width: 1220px;
  width: 100%;

  min-height: 78px;

  margin: 0 auto;
  padding: 12px 24px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}


/* ==========================================
   3. SITE LOGO
========================================== */

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.logo img {
  display: block;
  width: auto;
  height: 40px;
  max-width: 100%;
  object-fit: contain;
}

.logo-desktop {
  display: block;
}

.logo-mobile {
  display: none !important;
}


/* ==========================================
   4. DESKTOP NAVIGATION
========================================== */

header nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;

  margin: 0;
  padding: 0;

  list-style: none;
}

#nav-menu li {
  margin: 0;
  padding: 0;
  list-style: none;
}

#nav-menu a {
  display: block;

  padding: 9px 0;

  color: #253c55;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;

  white-space: nowrap;

  transition: color 0.2s ease;
}

#nav-menu a:hover {
  color: #1673bd;
}

#nav-menu a[aria-current="page"] {
  color: #1769aa;
}


/* ==========================================
   5. HAMBURGER BUTTON
========================================== */

#hamburger {
  display: none;

  width: 42px;
  height: 42px;

  padding: 9px 7px;

  border: 1px solid #e1e6ed;
  border-radius: 7px;

  background: #ffffff;

  cursor: pointer;

  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

#hamburger:hover {
  background: #f5f9fd;
  border-color: #bdd5e9;
}

#hamburger span {
  display: block;

  width: 23px;
  height: 2px;

  background: #263e56;
  border-radius: 2px;

  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

#hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#hamburger.active span:nth-child(2) {
  opacity: 0;
}

#hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================
   6. MAIN DIRECTORY LAYOUT
========================================== */

.calculators-page main.directory-main {
  display: block;

  width: 100%;
  flex: 1 0 auto;

  margin: 0;
  padding: 34px 24px 65px;
}

.calculators-page .directory-container {
  width: 100%;
  max-width: 1050px;

  margin: 0 auto;
  padding: 0;
}

.calculators-page .directory-content {
  width: 100%;
  min-width: 0;
}


/* ==========================================
   7. DIRECTORY HERO
========================================== */

.directory-hero {
  text-align: center;

  margin: 0 auto 30px;
  padding: 0;
}

.directory-hero h1 {
  margin: 0 0 13px;

  color: #202936;

  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.directory-hero p {
  max-width: 720px;

  margin: 0 auto;

  color: #526071;

  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
}


/* ==========================================
   8. FEATURED CALCULATOR
========================================== */

.directory-featured {
  display: flex;
  align-items: center;
  gap: 18px;

  width: 100%;

  padding: 22px;

  background: #f0f7ff;

  border: 1px solid #bbd8f5;
  border-radius: 13px;

  color: inherit;
  text-decoration: none;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.directory-featured:hover {
  background: #e7f2ff;

  border-color: #76b4ec;

  box-shadow: 0 3px 14px rgba(30, 75, 115, 0.08);

  text-decoration: none;
}

.directory-featured:focus-visible {
  outline: 3px solid #287bc8;
  outline-offset: 3px;
}


/* Featured icon */

.directory-featured-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 56px;
  height: 56px;

  flex: 0 0 56px;

  background: #dceeff;
  border-radius: 12px;

  color: #1769ba;
}

.directory-featured-icon svg {
  width: 30px;
  height: 30px;
}


/* Featured content */

.directory-featured-content {
  display: block;

  flex: 1;
  min-width: 0;
}

.directory-featured-label {
  display: block;

  margin-bottom: 4px;

  color: #2269ad;

  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;

  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.directory-featured-title {
  display: block;

  margin-bottom: 5px;

  color: #164e82;

  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.directory-featured-desc {
  display: block;

  color: #52687d;

  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

.directory-featured-arrow {
  display: block;

  flex-shrink: 0;

  color: #1769ba;

  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}


/* ==========================================
   9. DIRECTORY CATEGORY SECTIONS
========================================== */

.directory-section {
  width: 100%;

  margin-top: 38px;
  padding: 0;
}

.directory-section h2 {
  margin: 0 0 8px;
  padding: 0;

  color: #202936;

  font-size: 23px;
  font-weight: 700;
  line-height: 1.35;
}

.directory-section-intro {
  margin: 0 0 19px;

  color: #667284;

  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
}


/* ==========================================
   10. CALCULATOR GRID
========================================== */

.directory-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  column-gap: 15px;
  row-gap: 15px;

  width: 100%;
  margin: 0;
  padding: 0;
}


/* ==========================================
   11. CALCULATOR CARDS
========================================== */

.directory-card {
  display: flex;
  align-items: flex-start;

  gap: 15px;

  width: 100%;
  min-width: 0;
  min-height: 112px;

  padding: 19px 18px;

  background: #ffffff;

  border: 1px solid #e0e6ed;
  border-radius: 12px;

  color: inherit;
  text-decoration: none;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.directory-card:hover {
  background: #f9fcff;

  border-color: #91bee9;

  box-shadow: 0 3px 12px rgba(30, 75, 115, 0.07);

  transform: translateY(-1px);

  text-decoration: none;
}

.directory-card:focus-visible {
  outline: 3px solid #287bc8;
  outline-offset: 3px;
}


/* ==========================================
   12. CALCULATOR CARD ICONS
========================================== */

.directory-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 46px;
  height: 46px;

  flex: 0 0 46px;

  background: #edf5fc;

  border-radius: 10px;

  color: #2878b9;

  transition: background 0.2s ease;
}

.directory-card:hover .directory-card-icon {
  background: #e1f0fd;
}

.directory-card-icon svg {
  display: block;

  width: 25px;
  height: 25px;
}


/* SVG icon styling */

.directory-card-icon svg,
.directory-featured-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* Hidden SVG icon definitions */

.svg-icon-library {
  position: absolute;

  width: 0;
  height: 0;

  overflow: hidden;

  pointer-events: none;
}


/* ==========================================
   13. CALCULATOR CARD TEXT
========================================== */

.directory-card-body {
  display: block;

  flex: 1;
  min-width: 0;
}

.directory-card-title {
  display: block;

  margin: 0 0 5px;

  color: #234e78;

  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;

  overflow-wrap: break-word;

  transition: color 0.2s ease;
}

.directory-card-description {
  display: block;

  margin: 0;

  color: #697789;

  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}

.directory-card:hover .directory-card-title {
  color: #126db6;
}


/* ==========================================
   14. FOOTER
========================================== */

footer {
  width: 100%;
  margin-top: auto;

  padding: 40px 24px 20px;

  background: #f6f8fa;

  border-top: 1px solid #e2e7ed;

  color: #425266;
}

.footer-links {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 40px;

  width: 100%;
  max-width: 1100px;

  margin: 0 auto 30px;
}

.footer-links .column {
  min-width: 0;
}

.footer-links h3 {
  margin: 0 0 15px;

  color: #263445;

  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.footer-links ul {
  margin: 0;
  padding: 0;

  list-style: none;
}

.footer-links li {
  margin: 0 0 10px;
  padding: 0;
}

.footer-links a {
  color: #42617e;

  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;

  text-decoration: none;

  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #1769aa;
  text-decoration: underline;
}

footer .copyright {
  max-width: 1100px;

  margin: 0 auto;
  padding-top: 20px;

  border-top: 1px solid #e0e5eb;

  color: #768293;

  text-align: center;

  font-size: 13px;
  line-height: 1.6;
}


/* ==========================================
   15. MEDIUM DESKTOP SCREENS
========================================== */

@media (max-width: 1050px) {

  .header-container {
    padding-left: 20px;
    padding-right: 20px;
  }

  #nav-menu {
    gap: 22px;
  }

  .calculators-page main.directory-main {
    padding: 30px 22px 55px;
  }

  .directory-card {
    padding: 17px 15px;
    gap: 13px;
  }

}


/* ==========================================
   16. TABLET / MOBILE NAVIGATION
========================================== */

@media (max-width: 790px) {

  .header-container {
    min-height: 70px;

    padding: 11px 18px;

    gap: 15px;
  }

  /*
     Keep the large logo on medium screens.
     Switch to the small logo only on phones.
  */

  .logo-desktop {
    display: block;
  }

  .logo-mobile {
    display: none !important;
  }

  #hamburger {
    display: flex;
    flex-shrink: 0;
  }

  header nav {
    position: relative;
  }

  #nav-menu {
    display: none;

    position: absolute;

    top: calc(100% + 13px);
    right: 0;

    width: 225px;
    max-width: calc(100vw - 36px);

    margin: 0;
    padding: 9px 0;

    flex-direction: column;
    align-items: stretch;

    gap: 0;

    background: #ffffff;

    border: 1px solid #e0e6ed;
    border-radius: 10px;

    box-shadow: 0 8px 24px rgba(25, 45, 65, 0.12);

    z-index: 200;
  }

  #nav-menu.active {
    display: flex;
  }

  #nav-menu li {
    width: 100%;
  }

  #nav-menu a {
    display: block;

    width: 100%;

    padding: 12px 17px;

    color: #263e56;

    font-size: 15px;
    font-weight: 500;

    white-space: normal;
  }

  #nav-menu a:hover {
    background: #f1f7fd;
    color: #1769aa;
  }

  #nav-menu a[aria-current="page"] {
    color: #1769aa;
    background: #f3f8fd;
    font-weight: 600;
  }

  .directory-card {
    padding: 16px 13px;
    gap: 12px;
  }

  .directory-card-icon {
    width: 42px;
    height: 42px;

    flex-basis: 42px;
  }

  .directory-card-icon svg {
    width: 23px;
    height: 23px;
  }

  .directory-card-title {
    font-size: 14px;
  }

  .directory-card-description {
    font-size: 12.5px;
  }

  .footer-links {
    gap: 25px;
  }

}


/* ==========================================
   17. SMALL TABLETS
========================================== */

@media (max-width: 680px) {

  .calculators-page main.directory-main {
    padding: 27px 18px 48px;
  }

  .directory-grid {
    gap: 12px;
  }

  .directory-featured {
    padding: 18px;
  }

  .directory-featured-title {
    font-size: 18px;
  }

  .directory-card {
    gap: 11px;
    padding: 14px 12px;
  }

  .directory-card-icon {
    width: 39px;
    height: 39px;

    flex-basis: 39px;
  }

  .directory-card-icon svg {
    width: 22px;
    height: 22px;
  }

  .directory-card-title {
    font-size: 14px;
  }

  .directory-card-description {
    font-size: 12px;
  }

}


/* ==========================================
   18. MOBILE
========================================== */

@media (max-width: 610px) {

  /* Header */

  .header-container {
    min-height: 64px;

    padding: 10px 15px;
  }

  .logo-desktop {
    display: none !important;
  }

  .logo-mobile {
    display: block !important;
  }

  .logo img {
    width: auto;
    height: 38px;
    max-width: 100%;
  }

  #hamburger {
    width: 40px;
    height: 40px;
  }


  /* Main */

  .calculators-page main.directory-main {
    padding: 25px 16px 45px;
  }


  /* Hero */

  .directory-hero {
    margin-bottom: 25px;
  }

  .directory-hero h1 {
    font-size: 27px;
    line-height: 1.25;
    letter-spacing: -0.3px;
  }

  .directory-hero p {
    font-size: 15px;
    line-height: 1.65;
  }


  /* Featured calculator */

  .directory-featured {
    padding: 17px;

    gap: 13px;
  }

  .directory-featured-icon {
    width: 46px;
    height: 46px;

    flex-basis: 46px;
  }

  .directory-featured-icon svg {
    width: 26px;
    height: 26px;
  }

  .directory-featured-title {
    font-size: 17px;
  }

  .directory-featured-desc {
    font-size: 13px;
  }

  .directory-featured-label {
    font-size: 10px;
  }

  .directory-featured-arrow {
    font-size: 24px;
  }


  /* Categories */

  .directory-section {
    margin-top: 33px;
  }

  .directory-section h2 {
    font-size: 21px;
    line-height: 1.35;
  }

  .directory-section-intro {
    font-size: 14px;

    margin-bottom: 15px;
  }


  /* Single-column calculator grid */

  .directory-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }


  /* Calculator cards */

  .directory-card {
    min-height: 0;

    padding: 16px 14px;
    gap: 14px;
  }

  .directory-card-icon {
    width: 44px;
    height: 44px;

    flex-basis: 44px;
  }

  .directory-card-icon svg {
    width: 24px;
    height: 24px;
  }

  .directory-card-title {
    font-size: 15px;
    line-height: 1.45;
  }

  .directory-card-description {
    font-size: 13px;
    line-height: 1.55;
  }


  /* Footer */

  footer {
    padding: 34px 20px 20px;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 28px;

    margin-bottom: 25px;
  }

  .footer-links h3 {
    font-size: 16px;
    margin-bottom: 11px;
  }

  .footer-links li {
    margin-bottom: 8px;
  }

  .footer-links a {
    font-size: 14px;
  }

  footer .copyright {
    font-size: 12px;
  }

}


/* ==========================================
   19. VERY SMALL PHONES
========================================== */

@media (max-width: 380px) {

  .header-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .logo img {
    height: 34px;
  }

  .calculators-page main.directory-main {
    padding: 22px 13px 40px;
  }

  .directory-hero h1 {
    font-size: 25px;
  }

  .directory-featured {
    gap: 10px;
    padding: 14px;
  }

  .directory-featured-icon {
    width: 42px;
    height: 42px;

    flex-basis: 42px;
  }

  .directory-featured-title {
    font-size: 16px;
  }

  .directory-featured-arrow {
    font-size: 22px;
  }

  .directory-card {
    padding: 14px 12px;
    gap: 12px;
  }

  .directory-card-title {
    font-size: 14px;
  }

  .directory-card-description {
    font-size: 12.5px;
  }

}


/* ==========================================
   20. REDUCED MOTION ACCESSIBILITY
========================================== */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .directory-card,
  .directory-featured,
  .directory-card-icon,
  #hamburger,
  #hamburger span,
  #nav-menu a {
    transition: none;
  }

  .directory-card:hover {
    transform: none;
  }

}
