/* ===============================
   PHYSIQUEFORMULAS STYLE SHEET v5.3 FINAL
   =============================== */

:root {
  --navy: #0c1b33;
  --emerald: #2ecc71;
  --white: #ffffff;
  --grey-light: #f7f7f7;
  --text-dark: #111;
  --radius: 12px;
  --transition: all 0.25s ease-in-out;
}

/* === RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* === CONTAINERS === */
.container {
  width: 90%;
  max-width: 1080px;
  margin: 0 auto;
}

/* === HEADER === */
.header {
  background: var(--navy);
  color: var(--white);
  padding: 1rem 0;
  border-bottom: 2px solid rgba(255,255,255,.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  position: relative;
  z-index: 10;
  min-height: 60px;
}

.header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  height: 36px;
  margin-right: 8px;
  border-radius: var(--radius);
}

.brand-row {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--white);
  text-decoration: none;
}

.menu {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  display: none;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.3rem;
}

/* === NAVIGATION === */
.nav {
  display: flex;
  gap: 1.5rem;
  transition: var(--transition);
}

.nav a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
  font-weight: 500;
}

.nav a:hover {
  color: var(--emerald);
  border-bottom-color: var(--emerald);
}

.nav a.active {
  color: var(--emerald);
  border-bottom-color: var(--emerald);
}

/* === HERO === */
.hero {
  background: linear-gradient(135deg, var(--navy) 30%, #10264e);
  color: var(--white);
  text-align: center;
  padding: 5rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
}

.hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.hero.small {
  padding: 3rem 1rem 2.5rem; /* tighter top & bottom padding */
  text-align: center;
}

.hero.small h1 {
  font-size: 2rem;
  margin-top: 0.5rem;
}

.hero.small p {
  max-width: 650px;
  margin: 0.5rem auto 0;
  color: var(--gray-light);
  line-height: 1.6;
}

/* === BLOG HERO IMAGE (FinFormulas Style) === */
.blog-hero {
  display: block;
  max-width: 480px;        /* FinFormulas-style size */
  width: 100%;
  height: auto;
  margin: 0 auto 1.25rem;  /* centers + spacing below */
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  object-fit: contain;
}

.blog-hero:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 18px rgba(0,0,0,0.1);
}

.hero.small {
  padding: 3rem 1rem; /* default is often 4–5rem — this tightens it */
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  border: none;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  color: var(--white);
  background: var(--emerald);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn:hover {
  background: #29b765;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn.alt {
  background: var(--white);
  color: var(--navy);
}

.btn.alt:hover {
  background: #eaeaea;
}

.btn.navy {
  background: var(--navy);
  border: 1px solid var(--emerald);
}

.btn.navy:hover {
  background: #16274f;
}

/* === SECTIONS === */
.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: var(--navy);
}

.about-section {
  padding-bottom: .5rem;  /* reduces extra space below */
}

/* === GRID & CARDS === */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid #eaeaea;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.card .thumb {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.card h4 {
  margin: 0.5rem 0;
  color: var(--navy);
}

.card p {
  font-size: 0.95rem;
  color: #333;
}

.card .btn.small {
  margin-top: 0.8rem;
  font-size: 0.85rem;
}

/* === Footer Styling (Final Refined Version) === */
.footer {
  background: #0c1b33;
  color: #fff;
  text-align: center;
  padding: 32px 18px;
  border-top: 2px solid rgba(46, 204, 113, 0.3);
}

/* Universal link style */
.footer a {
  color: #2ecc71; /* emerald brand color */
  text-decoration: none;
  transition: opacity 0.2s ease, text-decoration 0.2s ease;
}
.footer a:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* Top legal navigation row */
.footer .footer-links {
  margin-bottom: 18px; /* space below the top link row */
}
.footer .footer-links.small a {
  font-size: 0.88rem;
  font-weight: 500;
  color: #2ecc71;
  text-decoration: none;
  margin: 0 6px;
}
.footer .footer-links.small a:hover {
  text-decoration: underline;
  opacity: 0.9;
}

/* Main disclaimer text */
.footer .disclaimer {
  font-size: 0.9rem;
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 22px; /* increased spacing below disclaimer */
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.footer .disclaimer a {
  color: #2ecc71;
  text-decoration: none;
  font-weight: 500;
}
.footer .disclaimer a:hover {
  text-decoration: underline;
}

/* Copyright line */
.footer small {
  display: block;
  margin-bottom: 12px;
  color: #aaa;
}

/* Language dropdown spacing */
.lang-block {
  margin-top: 12px;
}

/* Mobile adjustments */
@media (max-width: 600px){
  .footer {
    padding: 28px 12px;
  }
  .footer .footer-links.small a {
    display: inline-block;
    margin: 4px 6px;
  }
  .footer .disclaimer {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 20px;
  }
}

/* === Navy Calculate Button with Emerald Text === */
.btn.navy {
  background: #0c1b33;           /* deep navy background */
  color: #2ecc71 !important;     /* emerald text */
  border: 1px solid #2ecc71;     /* emerald outline */
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn.navy:hover {
  background: #2ecc71;           /* emerald background on hover */
  color: #0c1b33 !important;     /* navy text */
  border: 1px solid #0c1b33;
}

.btn.navy:focus,
.btn.navy:active {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46,204,113,0.35);
}

/* === Calculator Styling (Polished UI) === */
.calculator-section {
  background: #fff;
  color: #0c1b33;
  border-radius: 14px;
  padding: 32px 24px;
  max-width: 700px;
  margin: 40px auto;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  border: 1px solid rgba(12,27,51,0.08);
}

.calculator-section h2 {
  color: #0c1b33;
  margin-bottom: 12px;
  font-size: 1.5rem;
  text-align: center;
}

.calculator-section p {
  text-align: center;
  color: #444;
  font-size: 0.96rem;
  margin-bottom: 28px;
}

/* Form layout */
.calculator-form {
  display: grid;
  gap: 18px;
}

/* Labels */
.calculator-form label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #0c1b33;
}

/* Inputs, dropdowns, selects */
.calculator-form input[type="number"],
.calculator-form input[type="text"],
.calculator-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(12,27,51,0.25);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background-color: #f9f9fb;
  color: #0c1b33;
}

.calculator-form input:focus,
.calculator-form select:focus {
  outline: none;
  border-color: #2ecc71;
  box-shadow: 0 0 0 3px rgba(46,204,113,0.2);
  background-color: #fff;
}

/* Buttons */
.calculator-form button {
  background-color: #2ecc71;
  color: #0c1b33;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  padding: 12px 18px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.calculator-form button:hover {
  background-color: #29b765;
}

.calculator-form button:active {
  transform: scale(0.98);
}

/* Results box */
.calculator-result {
  margin-top: 28px;
  background: #f2f5f7;
  border-radius: 12px;
  padding: 20px 18px;
  font-size: 1rem;
  color: #0c1b33;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: center;
}

/* Mobile refinement */
@media (max-width: 600px) {
  .calculator-section {
    padding: 24px 18px;
    margin: 24px auto;
  }
  .calculator-form {
    gap: 14px;
  }
}

/* === Translate dropdown (compact, centered) === */
.lang-block {
  margin-top: 10px;
  display: inline-block;
}

.lang-block #google_translate_element select {
  max-width: 180px;
  width: 100%;
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--emerald);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.9rem;
}

/* === BUTTON HOVER GLOW (DESKTOP POLISH) === */
@media (min-width: 769px) {
  .btn:hover {
    box-shadow: 0 6px 12px rgba(46, 204, 113, 0.4);
  }
  .card:hover {
    box-shadow: 0 8px 20px rgba(12, 27, 51, 0.1);
  }
}

/* === BLOG CARD IMAGE SIZE (FinFormulas match) === */
.blog .card .thumb,
.section .card .thumb {
  max-width: 260px;      /* smaller like FinFormulas */
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}

/* === BLOG HERO IMAGE (FinFormulas size) === */
.blog-hero {
  display: block;
  max-width: 380px;      /* exact FinFormulas width */
  width: 100%;
  height: auto;
  margin: 0 auto 2rem;
  border-radius: 8px;
}

/* === BLOG IMAGE SIZING – PIXEL-PERFECT MATCH TO FINFORMULAS === */

/* Blog index cards (blog.html) */
.blog .card .thumb,
.section .card .thumb {
  width: 240px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
  border-radius: 8px;
}

/* Individual blog pages (blog1–blog3) */
.blog-hero {
  display: block;
  width: 360px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 2rem;
  border-radius: 10px;
}

/* === FINFORMULAS-MATCH BLOG IMAGE SIZING (FINAL TUNING) === */

/* Blog index cards (blog.html) */
.blog .card .thumb,
.section .card .thumb {
  width: 200px;           /* same visual width as FinFormulas cards */
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 0.8rem;
  border-radius: 6px;
}

/* Individual blog pages (blog1–blog3) */
.blog-hero {
  display: block;
  width: 320px;           /* same hero width as FinFormulas blog posts */
  max-width: 100%;
  height: auto;
  margin: 0 auto 1.8rem;
  border-radius: 8px;
}

@media (max-width: 480px) {
  .blog .card .thumb,
  .section .card .thumb {
    width: 80%;
  }

  .blog-hero {
    width: 90%;
  }
}

/* === FORCE BLOG IMAGE SIZES TO MATCH FINFORMULAS === */

/* Blog card images (on blog.html) */
section .card img.thumb,
.section .card img.thumb,
.card.compact img.thumb {
  display: block !important;
  max-width: 100% !important;
  height: 120px !important;   /* ✅ FinFormulas thumbnail height */
  object-fit: contain !important;
  margin: 0 auto 10px !important;
  border-radius: 6px !important;
}

/* Blog hero image (inside blog1–3.html) */
.blog-hero {
  display: block !important;
  width: 100% !important;
  max-width: 220px !important;  /* ✅ Compact FinFormulas hero width */
  height: auto !important;
  margin: 0 auto 24px auto !important;
  border-radius: 10px !important;
  object-fit: cover !important;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08) !important;
}

/* Responsive adjustment for smaller screens */
@media (max-width: 600px) {
  .blog-hero {
    max-width: 160px !important;
    margin: 0 auto 16px auto !important;
  }
}

/* === ✅ FINAL MOBILE NAVIGATION FIX (PhysiqueFormulas 2025, Corrected Overlay) === */
@media (max-width: 768px) {

  /* Hide desktop nav layout */
  .nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 24px 0 32px;
    display: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 999;
  }

  /* Show when menu is active */
  .nav.active {
    display: flex;
  }

  /* Hamburger (☰) style */
  .menu {
    font-size: 28px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: block;
    position: absolute;
    right: 20px;
    top: 18px;
    z-index: 1001;
  }

  /* When menu is active, turn emerald */
  .menu.active {
    color: var(--emerald);
  }

  /* Nav links styling */
  .nav a {
    display: block;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.15rem;
    padding: 8px 0;
    width: auto;
    transition: color 0.3s ease, border-color 0.3s ease;
  }

  /* Hover + active underline */
  .nav a:hover,
  .nav a.active {
    color: var(--emerald);
    border-bottom: 2px solid var(--emerald);
  }

  /* Smooth open/close animation */
  .nav,
  .nav.active {
    transition: all 0.25s ease-in-out;
  }
}
