/* ============================================================
   PetHub.pet — Main Stylesheet
   Structure: css/styles.css
   ============================================================ */

/* RESET & ROOT VARIABLES
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary:      #6f8f3b;
  --primary-dark: #274020;
  --secondary:    #10151d;
  --light:        #f5f7f4;
  --white:        #ffffff;
  --gray:         #8b95a1;
  --card:         #161d26;
  --gradient:     linear-gradient(135deg, #10151d 0%, #1f2a34 50%, #395227 100%);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--light);
  color: #111;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 90%;
  max-width: 1300px;
  margin: auto;
}


/* ============================================================
   NAVBAR
   ============================================================ */
nav {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 999;
  background: rgba(10, 15, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 10px rgba(111, 143, 59, 0.35))
    drop-shadow(0 0 25px rgba(111, 143, 59, 0.18));
  transition: 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo h1 {
  color: white;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.logo h1 span {
  color: var(--primary);
}

.logo p {
  color: #9fb78a;
  font-size: 0.72rem;
  letter-spacing: 3px;
  margin-top: 6px;
  text-transform: uppercase;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  gap: 30px;
  color: white;
  font-weight: 500;
}

.nav-links a {
  transition: 0.3s;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-login-btn {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 11px 18px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: 0.25s;
}

.nav-login-btn:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn {
  background: var(--primary);
  color: white;
  padding: 12px 22px;
  border-radius: 50px;
  font-weight: 600;
  transition: 0.3s;
}

.nav-btn:hover {
  background: #86a74f;
  transform: translateY(-2px);
}

/* ── Hamburger button (hidden on desktop) ── */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.28s ease;
  transform-origin: center;
}

/* Animated X when drawer is open */
.menu-toggle.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Nav backdrop (mobile only) ── */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 997;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-backdrop.show { opacity: 1; }

/* ── Mobile-only auth links inside drawer ── */
.nav-mobile-auth {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 20px 28px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 10px;
}

.nav-drawer-login,
.nav-drawer-register {
  display: block;
  text-align: center;
  padding: 12px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: 0.25s;
}

.nav-drawer-login {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.8);
}
.nav-drawer-login:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
}

.nav-drawer-register {
  background: var(--primary);
  color: white;
}
.nav-drawer-register:hover { background: #89ab50; }


/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  background: var(--gradient);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

.hero::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  background: rgba(111, 143, 59, 0.18);
  border-radius: 50%;
  top: -200px;
  right: -200px;
  filter: blur(40px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.hero-text h4 {
  color: var(--primary);
  font-size: 1rem;
  letter-spacing: 3px;
  margin-bottom: 15px;
}

.hero-text h1 {
  color: white;
  font-size: 4.5rem;
  line-height: 1.05;
  margin-bottom: 25px;
  font-weight: 800;
}

.hero-text h1 span {
  color: var(--primary);
}

.hero-text p {
  color: #d3d7dd;
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 35px;
  max-width: 650px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.primary-btn {
  background: var(--primary);
  color: white;
  padding: 16px 28px;
  border-radius: 50px;
  font-weight: 600;
  transition: 0.3s;
}

.primary-btn:hover {
  background: #89ab50;
  transform: translateY(-2px);
}

.secondary-btn {
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 16px 28px;
  border-radius: 50px;
  font-weight: 600;
  transition: 0.3s;
}

.secondary-btn:hover {
  background: white;
  color: black;
}

/* ── Install (PWA) button ── */
.install-btn {
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 16px 28px;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.install-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: 40px;
  width: 100%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-card img {
  width: 260px;
  margin-bottom: 25px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 18px rgba(111, 143, 59, 0.35))
    drop-shadow(0 0 40px rgba(111, 143, 59, 0.2));
}

.hero-card h3 {
  color: white;
  font-size: 2rem;
  margin-bottom: 15px;
}

.hero-card p {
  color: #c8d0d9;
  line-height: 1.7;
}


/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section {
  padding: 110px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 70px;
}

.section-title h2 {
  font-size: 3rem;
  color: var(--secondary);
  margin-bottom: 15px;
}

.section-title p {
  color: var(--gray);
  max-width: 700px;
  margin: auto;
  line-height: 1.8;
}


/* ============================================================
   FEATURES
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.feature-card {
  background: white;
  border-radius: 24px;
  padding: 35px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.05);
  transition: 0.3s;
  border: 1px solid #edf0f2;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  background: rgba(111, 143, 59, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 25px;
}

.feature-card h3 {
  margin-bottom: 15px;
  color: var(--secondary);
}

.feature-card p {
  color: var(--gray);
  line-height: 1.8;
}


/* ============================================================
   APP SECTION
   ============================================================ */
.app-section {
  background: var(--secondary);
  color: white;
  position: relative;
  overflow: hidden;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.app-image img {
  width: 100%;
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.app-content h2 {
  font-size: 3rem;
  margin-bottom: 25px;
}

.app-content h2 span {
  color: var(--primary);
}

.app-content p {
  color: #d0d6dd;
  line-height: 1.9;
  margin-bottom: 30px;
}

.app-list {
  display: grid;
  gap: 18px;
}

.app-list div {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
}

.tick {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(111, 143, 59, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}


/* ============================================================
   CTA
   ============================================================ */
.cta {
  background: linear-gradient(135deg, #6f8f3b, #243d1d);
  color: white;
  text-align: center;
  border-radius: 40px;
  padding: 80px 40px;
  margin-top: 50px;
}

.cta h2 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.cta p {
  max-width: 700px;
  margin: auto;
  line-height: 1.8;
  margin-bottom: 35px;
}


/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: #0d1218;
  color: white;
  padding: 70px 0 30px;
  margin-top: 100px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}

.footer-col h3 {
  margin-bottom: 20px;
  color: white;
}

.footer-col p,
.footer-col a {
  color: #aeb8c2;
  line-height: 2;
  display: block;
}

.footer-col a:hover {
  color: var(--primary);
  transition: 0.3s;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.footer-logo img {
  width: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(111, 143, 59, 0.25));
}

.copyright {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 25px;
  color: #9aa6b2;
}


/* ============================================================
   RESPONSIVE
   Single consolidated block — no conflicts.
   ============================================================ */

/* ── Tablet / small desktop (≤1000px) ── */
@media (max-width: 1000px) {

  /* Switch hero and app to single column */
  .hero-grid,
  .app-grid {
    grid-template-columns: 1fr;
  }

  .hero-text {
    text-align: center;
  }

  .hero-text p {
    margin: auto auto 35px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-text h1 {
    font-size: 3.5rem;
  }

  /* Show hamburger, hide desktop nav links and desktop login btn */
  .menu-toggle    { display: flex; }
  .nav-login-btn  { display: none; }

  /* Slide-in drawer */
  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    right: -100%;
    width: 78%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    gap: 0;
    background: #10151d;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding: 90px 0 30px;
    transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
  }

  .nav-links.open { right: 0; }

  /* Regular nav links inside drawer */
  .nav-links a:not(.nav-drawer-login):not(.nav-drawer-register) {
    padding: 15px 28px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
  }

  .nav-links a:not(.nav-drawer-login):not(.nav-drawer-register):hover {
    color: var(--primary);
    background: rgba(111, 143, 59, 0.06);
  }

  /* Show mobile auth section and backdrop */
  .nav-mobile-auth    { display: flex; }
  .nav-backdrop.show  { display: block; }
}

/* ── Mobile (≤700px) ── */
@media (max-width: 700px) {
  .logo img { width: 52px; height: 52px; }
  .logo h1  { font-size: 1.5rem; }
  .logo p   { font-size: 0.6rem; letter-spacing: 2px; }
  .nav-btn  { padding: 10px 14px; font-size: 0.82rem; }

  .hero { padding-top: 90px; }
  .hero-text h4 { font-size: 0.82rem; letter-spacing: 2px; }
  .hero-text h1 { font-size: 2.6rem; }
  .hero-text p  { font-size: 1rem; }

  /* Stack hero buttons full-width */
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .hero-buttons .primary-btn,
  .hero-buttons .secondary-btn,
  .hero-buttons .install-btn {
    width: 100%;
    text-align: center;
  }

  .hero-card { padding: 30px; }

  .section { padding: 70px 0; }

  .section-title h2,
  .app-content h2,
  .cta h2 {
    font-size: 2.2rem;
  }

  .feature-card   { padding: 26px; }
  .features-grid  { gap: 18px; }
  .app-grid       { gap: 40px; }

  .cta { padding: 50px 24px; border-radius: 24px; }
  .cta p { font-size: 0.92rem; }

  .footer-grid    { gap: 28px; }
  .footer-logo img { width: 52px; }
}

/* ── Small mobile (≤420px) ── */
@media (max-width: 420px) {
  .hero-text h1 { font-size: 2.1rem; }
  .container    { width: 94%; }
}
/* ============================================================
   PWA INSTALL MODAL
   Append to the bottom of css/styles.css
============================================================ */

/* Backdrop overlay */
.pwa-install-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: flex-end;
  justify-content: center;
}
.pwa-install-overlay.active {
  display: flex;
  animation: pwaFadeIn 0.22s ease forwards;
}
@keyframes pwaFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Bottom sheet */
.pwa-install-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #161d26;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px 22px 0 0;
  padding: 32px 24px 36px;
  padding-bottom: calc(36px + env(safe-area-inset-bottom));
  text-align: center;
  animation: pwaSlideUp 0.38s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}
@keyframes pwaSlideUp {
  from { transform: translateY(100%); opacity: 0.5; }
  to   { transform: translateY(0);    opacity: 1;   }
}

/* Drag handle pip */
.pwa-install-sheet::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  margin: 0 auto 24px;
}

/* Close × */
.pwa-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #8899aa;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}
.pwa-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* App icon */
.pwa-sheet-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  margin: 0 auto 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.08);
}
.pwa-sheet-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Headings */
.pwa-sheet-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.3;
}
.pwa-sheet-sub {
  font-size: 0.82rem;
  color: #7a8fa0;
  margin: 0 0 22px;
  line-height: 1.55;
}

/* Perks list */
.pwa-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.pwa-perks li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.88rem;
  color: #c8d4e0;
}
.pwa-perk-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

/* Primary install button */
.pwa-install-cta {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #6f8f3b, #4a6127);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(111, 143, 59, 0.35);
  transition: opacity 0.2s, transform 0.15s;
  margin-bottom: 10px;
}
.pwa-install-cta:hover  { opacity: 0.88; }
.pwa-install-cta:active { transform: scale(0.97); }

/* Dismiss link-button */
.pwa-dismiss-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: none;
  border: none;
  color: #6a7f90;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 0.2s;
}
.pwa-dismiss-btn:hover { color: #c8d4e0; }

/* iOS numbered steps */
.pwa-ios-steps {
  list-style: none;
  counter-reset: ios-step;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.pwa-ios-steps li {
  counter-increment: ios-step;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  font-size: 0.87rem;
  color: #c8d4e0;
  line-height: 1.55;
}
.pwa-ios-steps li::before {
  content: counter(ios-step);
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: rgba(111, 143, 59, 0.2);
  border: 1px solid rgba(111, 143, 59, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #9fb75a;
  margin-top: 1px;
}
.pwa-ios-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 1px 7px;
  font-size: 0.88rem;
  vertical-align: middle;
  margin: 0 2px;
}