/* ===============================
   style.css
   =============================== */


/* ========== Custom Properties ========== */

:root {
  /* Colors */
  --blue-green-color-wheel_60: hsla(165, 77%, 17%, 0.6);
  --blue-green-color-wheel_10: hsla(165, 77%, 17%, 0.1);
  --blue-green-color-wheel: hsl(165, 77%, 17%);
  --black-chocolate: hsl(32, 24%, 14%);
  --spanish-gray: hsl(210, 3%, 62%);
  --orange-web: hsl(38, 100%, 50%);
  --davys-gray: hsl(213, 5%, 34%);
  --light-gray: hsl(0, 0%, 80%);
  --msu-green: hsl(165, 77%, 15%);
  --cultured: hsl(30, 22%, 96%);
  --white_15: hsl(0, 0%, 100%, 0.15);
  --white: hsl(0, 0%, 100%);
  --onyx: hsl(210, 10%, 23%);

  /* Typography */
  --ff-montserrat: 'Montserrat', sans-serif;
  --ff-playfair: 'Playfair Display', serif;

  --fs-1: 3.6rem;
  --fs-2: 2.4rem;
  --fs-3: 2.2rem;
  --fs-4: 2rem;
  --fs-5: 1.5rem;
  --fs-6: 1.4rem;
  --fs-7: 1.3rem;

  --fw-700: 700;
  --fw-600: 600;
  --fw-500: 500;

  /* Layout */
  --section-padding: 60px;

  /* Effects */
  --shadow-1: 0 2px 30px hsla(0, 0%, 0%, 0.1);
  --shadow-2: 2px 4px 8px hsla(215, 20%, 16%, 0.15);

  /* Radius */
  --radius-2: 2px;
  --radius-10: 10px;
  --radius-50: 50px;

  /* Transitions */
  --transition-1: 0.25s ease;
  --transition-2: 0.5s ease;
  --transition-3: 1s ease;
  --cubic-in: cubic-bezier(0.51, 0.03, 0.64, 0.28);
  --cubic-out: cubic-bezier(0.33, 0.85, 0.4, 0.96);
}


/* ========== Reset ========== */

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

li { list-style: none; }

a { text-decoration: none; color: inherit; }

a, img, span, input, button, ion-icon { display: block; }

img { height: auto; }

input, button { background: none; border: none; font: inherit; }

input { width: 100%; }

button { cursor: pointer; }

ion-icon { pointer-events: none; }

address { font-style: normal; }

html { font-family: var(--ff-montserrat); font-size: 10px; scroll-behavior: smooth; }

body { background-color: var(--white); color: var(--davys-gray); font-size: 1.6rem; line-height: 1.75; }

:focus-visible { outline-offset: 4px; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background-color: hsl(0, 0%, 98%); }
::-webkit-scrollbar-thumb { background-color: hsl(0, 0%, 80%); }
::-webkit-scrollbar-thumb:hover { background-color: hsl(0, 0%, 70%); }


/* ========== Reused ========== */

.container { padding-inline: 15px; }

.btn {
  color: var(--white);
  font-size: var(--fs-6);
  font-weight: var(--fw-600);
  max-width: max-content;
  padding: 8px 20px;
  border-radius: var(--radius-50);
  transition: var(--transition-1);
}

.btn-primary,
.btn-secondary:is(:hover, :focus) { background-color: var(--blue-green-color-wheel); }

.btn-secondary,
.btn-primary:is(:hover, :focus) { background-color: var(--orange-web); }

.section { padding-block: var(--section-padding); }

.h1, .h2, .h3 {
  color: var(--black-chocolate);
  font-family: var(--ff-playfair);
  line-height: 1.1;
}
.h1 { font-size: var(--fs-1); }
.h2 { font-size: var(--fs-2); }
.h3 { font-size: var(--fs-4); }

.grid-list { display: grid; gap: 50px; }

.img-holder { aspect-ratio: var(--width) / var(--height); background-color: var(--light-gray); }
.img-cover { width: 100%; height: 100%; object-fit: cover; }

.section-subtitle {
  color: var(--color, var(--blue-green-color-wheel));
  font-size: var(--fs-5);
  font-weight: var(--fw-700);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  margin-block-end: 15px;
}
.section-title { text-align: center; }
.section-text { font-size: var(--fs-5); }

.title-wrapper {
  position: relative;
  padding-block: 40px;
  margin-block-end: 50px;
  z-index: 1;
}
.title-wrapper::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; height: 160px;
  background-image: url('../images/title-shape-white.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: -1;
}

.card-link {
  color: var(--spanish-gray);
  font-size: var(--fs-5);
  font-weight: var(--fw-600);
  transition: var(--transition-2);
}
.card-link .span { display: inline-block; color: var(--hover-color, var(--black-chocolate)); transition: var(--transition-2); }

.card-meta-list { display: flex; align-items: center; gap: 25px; }
.card-meta-item { position: relative; color: var(--orange-web); font-size: var(--fs-6); }
.card-meta-item:not(:last-child)::after {
  position: absolute; content: "";
  top: 50%; right: -15px;
  width: 4px; height: 4px;
  background-color: var(--blue-green-color-wheel);
  border-radius: 50%;
}

[data-section] > * { opacity: 0; transform: translateY(50px); transition: var(--transition-3); }
[data-section].active > * { opacity: 1; transform: translateY(0); }


/* ========== Header ========== */

.header {
  position: fixed; top: 0; left: 0; width: 100%;
  background-color: var(--white);
  padding-block: 15px;
  z-index: 4;
  transition: var(--transition-1);
}
.header.active { box-shadow: var(--shadow-2); }

.header > .container { display: flex; justify-content: space-between; align-items: center; gap: 15px; }

.logo { color: var(--black-chocolate); font-size: 30px; line-height: 1; font-weight: var(--fw-700); }
.logo .span { display: inline-block; color: var(--orange-web); }

.header .btn { margin-inline-start: auto; }

.nav-toggle-btn { font-size: 40px; color: var(--black-chocolate); }

.navbar {
  position: fixed; top: 0; left: -300px;
  max-width: 300px; width: 100%; height: 100%;
  background-color: var(--white);
  visibility: hidden;
  transition: 0.25s var(--cubic-in);
  z-index: 2;
}
.navbar.active { transform: translateX(100%); visibility: visible; transition: 0.5s var(--cubic-out); }

.navbar .nav-toggle-btn {
  font-size: 35px;
  position: absolute; top: 25px; right: 20px;
}
.navbar .nav-toggle-btn ion-icon { --ionicon-stroke-width: 25px; }

.navbar-list {
  margin-block-start: 110px;
  border-block-end: 1px solid var(--blue-green-color-wheel_10);
}
.navbar-item { border-block-start: 1px solid var(--blue-green-color-wheel_10); }

.navbar-link {
  color: var(--black-chocolate);
  padding: 13px 20px;
  font-size: var(--fs-5);
  font-weight: var(--fw-600);
}

.overlay {
  position: fixed; top: 0; left: 0; bottom: 0; right: 0;
  background-color: hsla(0, 0%, 0%, 0.5);
  opacity: 0; pointer-events: none;
  transition: var(--transition-1);
  z-index: 1;
}
.overlay.active { opacity: 1; pointer-events: all; }


/* ========== Hero ========== */

.hero {
  padding-block: 130px 80px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 25%;
}

.hero-subtitle {
  color: var(--blue-green-color-wheel);
  font-size: var(--fs-5);
  font-weight: var(--fw-700);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title { margin-block: 16px 30px; } /* (deduped) */

.hero-title .hero-quote {
  display: inline-block;
  font-size: clamp(1.6rem, 3.5vw, 4.0rem);
  font-weight: 700;
  line-height: 1.05;
  opacity: 1;
  transition: opacity 0.6s ease-in-out;
  will-change: opacity;
}

/* Small mobile */
@media (max-width: 420px) {
  .hero-title .hero-quote { font-size: 1.8rem; }
}

.hero-text { color: var(--black-chocolate); font-weight: var(--fw-600); }
.hero .btn { margin-block: 20px; }

/* Social */
.social-wrapper { display: flex; align-items: center; gap: 15px; padding-left: 50px; }
.social-list { display: flex; align-items: center; gap: 15px; }
.social-title { color: var(--black-chocolate); font-size: var(--fs-6); font-weight: var(--fw-600); }
.social-link {
  font-size: 14px; padding: 10px;
  border: 1px solid var(--blue-green-color-wheel_10);
  border-radius: 50%;
  transition: var(--transition-1);
}
.social-link:is(:hover, :focus) { background-color: var(--blue-green-color-wheel); border-color: var(--blue-green-color-wheel); color: var(--white); }


/* ========== About ========== */

.about { background-color: var(--cultured); overflow: hidden; }

.about-banner { position: relative; margin-block-end: 50px; }

/* Decorative rotating shape + overlay */
.about-banner::before,
.about-banner::after { content: ""; position: absolute; }

.about-banner::before {
  top: -20px; left: -20px; width: 100px; height: 100px;
  background-repeat: no-repeat; background-position: center; background-size: contain;
  animation: rotate360 8s linear infinite;
}
@keyframes rotate360 { 0% { transform: rotate(0); } 100% { transform: rotate(1turn); } }

.about-banner::after {
  top: 0; right: 0; bottom: 0; left: 0;
  background-image: linear-gradient(to bottom, transparent 50%, var(--blue-green-color-wheel_60));
}

.about-banner .btn {
  position: absolute; min-width: max-content;
  bottom: 35px; left: 50%; transform: translateX(-50%);
  z-index: 1;
}

.about-content {
  position: relative; background-color: var(--white);
  padding: 40px; z-index: 1;
}
.about-content::after {
  content: ""; position: absolute; top: -10px; right: -20px;
  width: 110px; height: 110px;
  background-repeat: no-repeat; background-position: center; background-size: contain;
  z-index: -1;
}

.about :is(.section-subtitle, .section-title) { text-align: left; }
.about .section-title { margin-block-end: 20px; }

.about-h3 { color: var(--blue-green-color-wheel); font-size: var(--fs-2); font-weight: var(--fw-600); margin-block: 30px 10px; }


/* ========== Health Tip ========== */

.tip { background-color: var(--cultured); }

.tip-card {
  background-color: var(--white);
  min-height: 420px;
  padding: 20px;
  display: grid;
  align-content: center;
  transition: var(--transition-2);
}

.tip-card:is(:hover, :focus-within) {
  --hover-color: var(--white);
  background-color: var(--blue-green-color-wheel);
  color: var(--white);
}

.tip-card .wrapper { display: flex; align-items: center; justify-content: flex-start; gap: 20px; }

.tip-card .publish-date {
  background-color: var(--hover-color, var(--blue-green-color-wheel));
  color: var(--white);
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
  line-height: 1;
  text-align: center;
  width: 65px; height: 65px;
  display: grid; place-content: center;
  border-radius: var(--radius-2);
  transition: var(--transition-2);
}
.tip-card:is(:hover, :focus-within) .publish-date { color: var(--blue-green-color-wheel); }

.tip-card .publish-date .span {
  color: var(--orange-web);
  font-size: var(--fs-3);
  font-weight: var(--fw-700);
  line-height: 1;
  margin-block-end: 5px;
}

.tip-card .card-link { font-weight: var(--fw-700); margin-block-end: 10px; }
.tip-card:is(:hover, :focus-within) .card-link { color: var(--orange-web); }

.tip-card .card-meta-item:not(:last-child)::after {
  background-color: var(--hover-color, var(--black-chocolate));
  transition: var(--transition-2);
}

.tip-card .card-title { color: var(--hover-color); margin-block: 30px 15px; transition: var(--transition-2); }

.tip-card .card-text { font-size: 2.0rem; line-height: 1.8; }


/* ========== App ========== */

.app-card {
  position: relative;
  background-color: var(--orange-web);
  padding: 30px;
  border-radius: var(--radius-2);
  text-align: center;
  overflow: hidden;
  z-index: 1;
}

.app .section-subtitle {
  font-size: var(--fs-6);
  color: var(--black-chocolate); /* improved contrast on orange */
}

.app .section-title {
  color: var(--black-chocolate); /* improved contrast on orange */
  margin-block-end: 40px;
}

.app .wrapper { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 30px; }

.app .app-link {
  background-color: var(--white);
  min-height: 50px;
  padding-inline: 20px;
  border-radius: var(--radius-10);
  display: grid; place-content: center;
  outline: 4px solid var(--white_15);
}
.app .app-link .img { width: 100px; }

.app-card::before,
.app-card::after {
  content: "";
  position: absolute;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: -1;
}
.app-card::before {
  width: 80px; height: 130px;
  background-image: url('../images/app-shape-1.png');
  top: -50px; right: 20px;
}
.app-card::after {
  width: 100px; height: 150px;
  background-image: url('../images/app-shape-2.png');
  bottom: -50px; left: 20px;
}


/* ========== Footer ========== */

.footer-top { background-color: var(--blue-green-color-wheel); color: var(--white); }

.footer-top .container { display: grid; gap: 50px; }

.footer-list-title {
  color: var(--orange-web);
  font-family: var(--ff-playfair);
  font-size: var(--fs-4);
  font-weight: var(--fw-600);
  margin-block-end: 28px;
}

.footer-form { margin-block-start: 50px; }

.footer-top .email-field {
  background-color: var(--white);
  color: var(--black-chocolate);
  padding: 11px 30px;
  border-radius: var(--radius-10);
  margin-block-end: 20px;
}
.footer-top .email-field::placeholder { color: inherit; }

.footer-top .btn-secondary {
  border-radius: var(--radius-10);
  background-color: var(--orange-web); /* give it strong base color */
  color: var(--black-chocolate);       /* darker text for contrast */
}

.footer-top .btn-secondary:is(:hover, :focus) {
  background-color: var(--white);
  color: var(--onyx);
}


.footer-link, .address { font-size: var(--fs-6); margin-block-start: 12px; transition: var(--transition-1); }
.address-title { margin-block: 12px; }

.footer-link:is(:hover, :focus),
.footer-bottom-link:is(:hover, :focus) { color: var(--orange-web); }

.footer-bottom {
  background-color: var(--msu-green);
  color: var(--white);
  font-size: var(--fs-5);
  text-align: center;
  padding-block: 25px;
}

.copyright { margin-block-end: 25px; }
.copyright :is(.copyright-link, ion-icon) { display: inline-block; color: var(--orange-web); }
.copyright ion-icon { font-size: 18px; margin-block-end: -4px; }
.copyright-link:is(:hover, :focus) { text-decoration: underline; }

.footer-bottom-list { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 10px; }
.footer-bottom-item { position: relative; display: flex; align-items: center; }
.footer-bottom-item:not(:last-child)::after { content: "-"; margin-inline: 10px; }
.footer-bottom-link { transition: var(--transition-1); }

.visually-hidden {
  position: absolute;
  left: -9999px;
}


/* ========== Back To Top ========== */

.back-top-btn {
  position: fixed; bottom: 10px; right: 20px;
  background-color: var(--orange-web); color: var(--white);
  font-size: 20px; padding: 10px;
  border-radius: 50%;
  box-shadow: var(--shadow-1);
  visibility: hidden; opacity: 0;
  transition: var(--transition-1);
  z-index: 4;
}
.back-top-btn:is(:hover, :focus) { background-color: var(--onyx); }
.back-top-btn.active { visibility: visible; opacity: 1; transform: translateY(-10px); }


/* ========== Media Queries ========== */

/* ≥ 575px */
@media (min-width: 575px) {
  :root { --fs-1: 5.6rem; --fs-2: 3.6rem; }

  .container { max-width: 600px; width: 100%; margin-inline: auto; }
  .btn { padding: 10px 30px; }

  .hero { padding-block: 170px 100px; }
  .hero-text { font-size: var(--fs-4); }
  .hero .btn { margin-block: 25px 80px; }
  .hero .social-title { --fs-6: 1.6rem; }
  .hero .social-link { padding: 15px; }

  .about-banner::before { top: -60px; left: -60px; width: 155px; height: 155px; }
  .about-content::after { top: -30px; right: -50px; width: 195px; height: 195px; }
  .about .section-title { --fs-2: 4.4rem; }
  .about-h3 { --fs-2: 3rem; }

  /* Blog */
  .blog-card .h3 { --fs-4: 2.4rem; }

  /* App */
  .app-card { padding: 50px; }
  .app-card::before { width: 150px; height: 250px; }
  .app-card::after { width: 190px; height: 290px; bottom: -70px; }

  /* Footer */
  .footer-top .container { grid-template-columns: repeat(3, 1fr); column-gap: 30px; }
  .footer-list:first-child { grid-column: 1 / 4; }
}

/* ≥ 768px */
@media (min-width: 768px) {
  :root {
    --fs-1: 6.4rem;
    --fs-2: 5.7rem;
    --section-padding: 80px;
  }

  .container { max-width: 720px; }

  /* Header */
  .logo { font-size: 35px; }

  /* Hero */
  .hero-title { max-width: 15ch; }

  /* About */
  .about-content { padding: 100px 80px; }
  .about .section-title { --fs-2: 5.7rem; }

  /* Tip cards sizing at this breakpoint */
  .tip-card { padding: 45px; }

  /* App */
  .app-card { padding: 100px 50px; }
}

/* ≥ 992px */
@media (min-width: 992px) {
  :root { --section-padding: 100px; }

  .container { max-width: 960px; }

  .btn { font-size: unset; padding: 13px 40px; }
  :is(.tip) .grid-list { grid-template-columns: repeat(3, 1fr); }

  /* Header: desktop nav */
  .nav-toggle-btn, .overlay { display: none; }
  .header { padding-block: 20px; }
  .navbar, .navbar.active, .navbar-list, .navbar-item { all: unset; }
  .navbar { margin-inline-start: auto; }
  .header .btn { margin-inline-start: 0; }
  .navbar-list { display: flex; }
  .navbar-link { font-size: unset; padding-inline: 15px; transition: var(--transition-1); }
  .navbar-link:is(:hover, :focus) { color: var(--orange-web); }

  /* About */
  .about .container {
    display: grid; grid-template-columns: 0.7fr 1fr; align-items: center; gap: 50px;
  }
  .about-banner { margin-block-end: 0; }
  .about-content { padding: 40px; }
  .about .section-title { --fs-2: 4.4rem; }
  .about-h3 { --fs-2: 2.4rem; }

  /* Blog */
  .tip-card { padding: 30px; }

  /* App */
  .app .section-title { margin-block-end: 55px; }
  .app .app-link { width: 180px; height: 65px; }
  .app .app-link .img { width: max-content; }

  /* Footer */
  .footer-top .container { grid-template-columns: 1fr 0.6fr 0.6fr 0.65fr; }
  .footer-list:first-child { grid-column: auto; }
  .footer-list-title { --fs-4: 2.4rem; }
  .footer-link { display: flex; align-items: center; gap: 8px; }

  .footer-top .btn-secondary { padding-inline: 30px; }

  .footer-bottom .container { display: flex; justify-content: space-between; align-items: center; }
  .copyright { margin-block-end: 0; }
}

/* ≥ 1200px */
@media (min-width: 1200px) {
  :root { --fs-1: 8rem; --section-padding: 140px; }

  .container { max-width: 1200px; }

  /* Header */
  .header .container { gap: 35px; }
  .navbar-link { padding-inline: 25px; }

  /* Hero */
  .hero { padding-block: 200px 100px; background-position: 35%; }

  /* About */
  .about-content { padding: 100px 80px; }
  .about .section-title { --fs-2: 5.7rem; }
  .about-h3 { --fs-2: 3rem; }

  /* Blog */
  .tip-card { padding: 45px; }
  .tip-card .publish-date { width: 80px; height: 80px; }

  /* Footer */
  .footer-top .container { column-gap: 100px; }
}


/* ========== Small Extras ========== */

.hero-quote { display: inline-block; opacity: 1; transition: opacity 1s ease-in-out; font-size: 3rem; font-weight: 700; }

.footer-icon { color: #FFD700; font-size: 2rem; vertical-align: middle; margin-right: 0; }


/* ========== Recipe Cards Page ========== */

.filter-bar {
  display: flex; justify-content: center; gap: 15px; margin-bottom: 30px;
}
.filter-bar select,
.filter-bar input {
  padding: 10px; border-radius: 8px;
  border: 1px solid var(--light-gray);
  font-size: var(--fs-6);
}

.recipe-card {
  background: var(--white);
  border-radius: var(--radius-10);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: var(--transition-2);
  cursor: pointer;
}
.recipe-card:hover { transform: translateY(-5px); }
.recipe-card img { width: 100%; height: 200px; object-fit: cover; }
.recipe-card .card-content { padding: 15px; }
.recipe-card h3 { margin-bottom: 10px; font-size: var(--fs-4); color: var(--black-chocolate); }
.recipe-card p { font-size: var(--fs-6); color: var(--davys-gray); }


/* ========== Modal ========== */

.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  justify-content: center; align-items: center;
  z-index: 9999;
}
.modal-content {
  background: var(--white); padding: 20px; border-radius: var(--radius-10);
  width: 90%; max-width: 700px;
  overflow-y: auto; max-height: 90vh;
}
.close-btn {
  float: right; font-size: 2rem; font-weight: bold;
  color: #2e7d32; cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
}
.close-btn:hover { color: #66bb6a; transform: scale(1.2); }
.modal-img { width: 100%; border-radius: var(--radius-10); margin-bottom: 15px; }
.modal table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.modal table th, .modal table td { padding: 8px; border: 1px solid var(--light-gray); text-align: left; }

.search-btn {
  background: var(--blue-green-color-wheel);
  border: none; padding: 10px 14px;
  border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.search-btn ion-icon { font-size: 20px; color: var(--white); }
.search-btn:hover { background: var(--orange-web); }


/* ========== Calorie Calculator ========== */

.cal-grid { display: grid; gap: 40px; }
@media (min-width: 992px) { .cal-grid { grid-template-columns: 1fr 1fr; } }

.cal-card { background: var(--white); border-radius: var(--radius-10); box-shadow: var(--shadow-1); padding: 24px; }

.cal-row { display: grid; gap: 20px; margin-bottom: 20px; }
@media (min-width: 575px) { .cal-row { grid-template-columns: 1fr 1fr; } }

.cal-field { display: flex; flex-direction: column; gap: 8px; }
.cal-label { font-weight: var(--fw-600); color: var(--black-chocolate); }

.cal-input, .cal-select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-10);
  font-size: var(--fs-6);
  color: var(--davys-gray);
  background: var(--white);
}

.cal-radio { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--fs-6); }
.cal-radio input { margin-right: 6px; }

/* Conic-gradient dials */
.cal-dials {
  display: grid; gap: 24px; justify-items: center;  /* merged duplicate */
}
@media (min-width: 575px) { .cal-dials { grid-template-columns: repeat(3, 1fr); } }

.cal-dial {
  --fill: 0%;
  --track: var(--light-gray);
  --accent: var(--blue-green-color-wheel);
  width: 170px; height: 170px; border-radius: 50%;
  margin-inline: auto;
  background: conic-gradient(var(--accent) var(--fill), var(--track) 0);
  display: grid; place-items: center; position: relative;
  box-shadow: var(--shadow-1);
}
.cal-dial.target { --accent: var(--orange-web); }

.cal-dial::after {
  content: ""; position: absolute; inset: 12px;
  background: var(--white); border-radius: 50%;
}

.cal-dial-inner { position: relative; text-align: center; z-index: 1; }
.cal-dial-value { display: block; font-weight: var(--fw-700); color: var(--black-chocolate); font-size: 2.2rem; line-height: 1.1; }
.cal-subtitle { margin: 24px 0 12px; }

/* Center stack / stable numbers */
.dial-center {
  position: absolute; inset: 0;
  display: grid; grid-auto-rows: auto;
  align-content: center; justify-items: center;
  text-align: center; pointer-events: none;
}
.dial-value {
  font-size: 1.8rem; line-height: 1; font-weight: var(--fw-700);
  color: var(--black-chocolate); white-space: nowrap; width: 100%;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "lnum" 1;
}
.dial-value::after { content: " kcal"; font-size: 0.65em; margin-left: 4px; color: var(--davys-gray); }
.dial-center small { margin-top: 4px; color: var(--davys-gray); }

/* SVG dials */
.dial { position: relative; width: 170px; height: 170px; }
.dial-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial-bg { fill: none; stroke: var(--light-gray); stroke-width: 12; }
.dial-fg {
  fill: none; stroke: var(--blue-green-color-wheel);
  stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: 0 999;
  transition: stroke-dashoffset 1.2s ease, stroke-dasharray 0s;
}
.dial-fg.accent-green { stroke: var(--blue-green-color-wheel); }
.dial-fg.accent-blue  { stroke: hsl(207, 90%, 54%); }
.dial-fg.accent-orange{ stroke: var(--orange-web); }

/* Macros table */
.cal-table { width: 100%; border-collapse: collapse; font-size: var(--fs-6); margin-bottom: 14px; }
.cal-table th, .cal-table td { border: 1px solid var(--light-gray); padding: 10px; text-align: left; }
.cal-table th { background: var(--cultured); color: var(--black-chocolate); }

/* Food suggestions */
.cal-suggest { margin-top: 8px; padding-left: 20px; }
.cal-suggest li { list-style: disc; margin: 6px 0; }


/* ========== Workout Page ========== */

.section.workout {
  background: url('../images/workout-bg.png') no-repeat center top / cover;
  padding-block: var(--section-padding);
  padding-top: calc(var(--section-padding) + 10px);
  min-height: 100vh;
}
.section.workout .title-wrapper { text-align: center; margin-bottom: 50px; }

.workout-grid { display: grid; gap: 40px; justify-content: center; }
@media (min-width: 992px) { .workout-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

.workout-card {
  background: var(--white);
  border-radius: var(--radius-10);
  box-shadow: var(--shadow-1);
  padding: 24px;
  max-width: 480px;
  margin: 0 auto;
}

.workout-field { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.workout-list { margin: 16px 0; padding-left: 20px; list-style: disc; }

/* Timer box */
.timer-box { margin-top: 24px; text-align: center; }
.timer-box.hidden { display: none; }
.timer-display { font-size: 2rem; font-weight: bold; margin: 12px 0; color: var(--orange-web); }
.timer-title { font-weight: 600; }

/* Timer circle */
.timer-circle { position: relative; width: 140px; height: 140px; margin: 20px auto; }
.timer-svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.timer-bg { fill: none; stroke: var(--light-gray); stroke-width: 10; }
.timer-fg {
  fill: none; stroke: var(--orange-web); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 0 999; transition: stroke-dashoffset 1s linear;
}
.timer-center {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: bold; color: var(--black-chocolate);
}

/* Card heading */
.workout-heading {
  font-family: 'Montserrat', sans-serif; font-weight: 600;
  font-size: 2.25rem; color: var(--black-chocolate); margin-bottom: 16px;
}

/* Timer controls */
.timer-controls { display: flex; justify-content: center; gap: 14px; margin-top: 12px; }
.timer-controls .btn {
  min-width: 90px; padding: 10px 16px; border-radius: var(--radius-50);
  font-weight: 600; font-size: 1.5rem;
  transition: transform 0.2s ease, background 0.2s ease;
}
.timer-controls .btn:hover { transform: translateY(-2px); }

.btn-warning { background-color: #f1c40f; color: var(--white); }
.btn-warning:hover { background-color: #d68910; }
.btn-danger { background-color: #e74c3c; color: var(--white); }
.btn-danger:hover { background-color: #e81d07; }


/* ========== Mindfulness Page ========== */

.section.mindfulness {
  position: relative;
  padding: 100px 0 80px;
  background: transparent;
  overflow: hidden;
}

/* Background video */
.bg-video {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; opacity: 0.55; pointer-events: none;
}

/* Animated gradient */
body.mindfulness-page {
  background: linear-gradient(-45deg, #1b5e20, #2e7d32, #43a047, #66bb6a, #26a69a);
  background-size: 500% 500%;
  animation: gradientShift 24s ease infinite;
  position: relative; overflow-x: hidden;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
  100%{ background-position: 0% 50%; }
}

/* Mode toggle */
.mode-toggle { display: flex; justify-content: center; gap: 12px; margin-bottom: 18px; }
.mode-btn {
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.16);
  color: #fff; cursor: pointer; transition: transform .2s ease, background .2s ease;
  font-weight: 600; letter-spacing: .2px;
}
.mode-btn:hover { transform: translateY(-1px); }
.mode-btn.active { background: rgba(255,255,255,0.35); box-shadow: 0 8px 20px rgba(0,0,0,.15); }

/* Glass card */
.mind-card {
  width: min(640px, 92vw);
  margin: 0 auto;
  padding: 32px 28px;
  border-radius: var(--radius-10, 12px);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-1, 0 10px 30px rgba(0,0,0,.18));
  text-align: center;
}

/* Breathing circle */
.breathing-circle {
  width: 220px; height: 220px;
  margin: 10px auto 64px;
  border-radius: 50%;
  position: relative;
  display: grid; place-items: center;
  cursor: pointer;
}
.breathing-circle::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  background: conic-gradient(
    rgba(255,255,255,.65) 0%,
    rgba(255,255,255,.15) 25%,
    rgba(255,255,255,.35) 50%,
    rgba(255,255,255,.15) 75%,
    rgba(255,255,255,.65) 100%
  );
  animation: ringRotate 6s linear infinite; opacity: .7; filter: blur(1px);
}
@keyframes ringRotate { to { transform: rotate(360deg); } }

.circle-core {
  width: 100%; height: 100%; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  background: radial-gradient(circle at 50% 40%,
    rgba(255,255,255,0.22) 0%,
    rgba(255,255,255,0.08) 60%,
    rgba(255,255,255,0.04) 100%);
  display: grid; place-items: center;
  transition: transform 2s ease, box-shadow 2s ease;
  box-shadow: 0 0 24px rgba(255,255,255,0.18);
}

/* Breathing animation (18s cycle) */
.circle-core.breathe { animation: breathe 18s ease-in-out infinite; }
@keyframes breathe {
  0%       { transform: scale(1);    box-shadow: 0 0 20px rgba(255,255,255,0.25); }
  33.333%  { transform: scale(1.35); box-shadow: 0 0 45px rgba(255,255,255,0.60); }
  50%      { transform: scale(1);    box-shadow: 0 0 22px rgba(255,255,255,0.30); }
  83.333%  { transform: scale(0.80); box-shadow: 0 0 12px rgba(255,255,255,0.18); }
  100%     { transform: scale(1);    box-shadow: 0 0 20px rgba(255,255,255,0.25); }
}

#instruction { color: #fff; font-weight: 600; font-size: clamp(1rem, 2.2vw, 1.25rem); letter-spacing: .2px; }

/* Controls */
.controls { display: flex; gap: 20px; justify-content: center; margin: 20px 0; }
.controls .btn { border-radius: 999px; padding: 12px 22px; }

/* Sound buttons */
.sound-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 18px 0; }
.sound-btn {
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  cursor: pointer; font-weight: 600;
  transition: transform .2s ease, background .2s ease;
}
.sound-btn:hover { transform: translateY(-1px); }
.sound-btn.active { background: rgba(255,255,255,0.32); }

/* Sound toggle */
.sound-toggle { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 20px 0; color: #fff; font-weight: 600; }
.switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; cursor: pointer;
  background-color: rgba(255,255,255,0.35);
  transition: .3s; border-radius: 26px;
}
.slider:before {
  position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px;
  background-color: white; transition: .3s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--orange-web, #ff9800); }
input:checked + .slider:before { transform: translateX(22px); }
.slider.round { border-radius: 26px; }
.toggle-label { font-size: 1.3rem; }

/* Timer & sessions */
.timer-row {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  align-items: center; justify-items: center; margin-top: 10px;
}
.timer { display: inline-flex; gap: 8px; align-items: center; color: #fff; font-weight: 700; font-size: 2.25rem; }
.timer ion-icon { font-size: 2.25rem; }
.sessions { color: rgba(255,255,255,0.95); font-weight: 600; }
.pomodoro-note { color: rgba(255,255,255,0.9); margin-top: 6px; font-size: .95rem; }

/* Hints */
.session-note {
  margin-top: 12px; text-align: center;
  font-size: 1.6rem; font-weight: 600; color: #fff;
}
@media (min-width: 768px) { .session-note { font-size: 2rem; } }

/* Mindfulness responsive tweaks */
@media (min-width: 576px) { .breathing-circle { width: 240px; height: 240px; } }
@media (min-width: 992px) { .mind-card { padding: 36px 32px; } }


/* ========== Contact Page ========== */

.section.contact { background-color: var(--cultured); }

.contact-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 992px) { .contact-grid { grid-template-columns: 1.1fr 0.9fr; } }

.contact-form {
  background: var(--white); padding: 24px;
  border-radius: var(--radius-10); box-shadow: var(--shadow-1);
}

.form-row { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }

.form-label { font-weight: var(--fw-600); color: var(--black-chocolate); }

.form-input {
  padding: 12px 14px; border: 1px solid var(--light-gray);
  border-radius: var(--radius-10); font-size: var(--fs-6);
  color: var(--davys-gray); background: var(--white);
  transition: border-color var(--transition-1), box-shadow var(--transition-1);
}
.form-input:focus { border-color: var(--orange-web); box-shadow: 0 0 0 3px hsl(38 100% 50% / .15); outline: none; }
.form-input.input-error { border-color: #e74c3c; box-shadow: 0 0 0 3px rgba(231, 76, 60, .12); }

.error-text { color: #e74c3c; font-size: 1.3rem; min-height: 18px; }

.form-feedback { margin-top: 12px; font-weight: var(--fw-600); color: var(--blue-green-color-wheel); }

/* Required asterisk: darker for contrast */
.form-label .required {
  color: hsl(38, 100%, 32%); /* darker orange (~#a86400), ≥4.5:1 on white */
  font-weight: 700;
}


/* Map card */
.map-card { background: var(--white); padding: 18px; border-radius: var(--radius-10); box-shadow: var(--shadow-1); }
.map-address { margin-bottom: 10px; color: var(--davys-gray); }
.map {
  width: 100%; height: 380px; border: 0;
  border-radius: var(--radius-10); box-shadow: var(--shadow-1);
  margin-bottom: 12px;
}
.map-contacts a {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-6); color: var(--davys-gray);
  transition: var(--transition-1);
}
.map-contacts a:hover { color: var(--orange-web); }

/* FAQ */
.title-wrapper.faq-title-wrapper { margin-top: 50px; margin-bottom: 20px; }

.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-10);
  overflow: hidden; margin-bottom: 12px;
  background: var(--white); box-shadow: var(--shadow-1);
}
.faq-question {
  width: 100%; padding: 14px 16px;
  font-weight: var(--fw-600); font-size: var(--fs-5);
  background: var(--cultured); color: var(--black-chocolate);
  text-align: left; display: flex; justify-content: space-between; align-items: center;
  transition: background var(--transition-1);
}
.faq-item .faq-icon { transition: transform var(--transition-1); }
.faq-item.active .faq-icon { transform: rotate(180deg); }

.faq-answer {
  max-height: 0; overflow: hidden; background: var(--white);
  padding: 0 16px;
  transition: max-height 0.4s ease, padding 0.3s ease;
  color: var(--davys-gray);
}
.faq-item.active .faq-answer { max-height: 200px; padding: 14px 16px; }


/* Health tip compact card */
#health-tip-card {
  min-height: auto; max-width: 400px; margin-inline: auto;
  padding: 18px 20px; text-align: center;
  border-radius: var(--radius-10); box-shadow: var(--shadow-1);
}
#health-tip-card .card-text { font-size: 1.5rem; line-height: 1.5; }
#health-tip-card .card-title { font-size: 2rem; }
#health-tip-card .wrapper { display: flex; justify-content: center; margin-bottom: 15px; }

.faq-title { font-size: 2.5rem; font-weight: var(--fw-600); margin-bottom: 10px; }

