/* ============================================
   TemplatHub — Styles
   Theme: Royal Blue / Navy / Orange
   ============================================ */

:root {
  --royal: #2055C7;
  --navy: #0A1A3A;
  --orange: #F4731A;
  --orange-light: #FF8C3A;
  --white: #FFFFFF;
  --off-white: #F5F7FC;
  --light-blue: #EBF0FB;
  --mid-grey: #8898BB;
  --border: #D4DCF0;
  --text: #1A2540;
  --text-light: #5A6A8A;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(10,26,58,0.10);
  --shadow-hover: 0 12px 40px rgba(32,85,199,0.18);
  --transition: all 0.28s cubic-bezier(0.4,0,0.2,1);

  --font-display: 'Bodoni Moda', serif;
  --font-body: 'Jost', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ---- UTILITIES ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--orange); }
.hidden { display: none !important; }

/* ---- NAVBAR ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 26, 58, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--royal), var(--orange));
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: white;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: white;
  letter-spacing: -0.3px;
}


.logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-img-footer {
  height: 36px;
  /* Footer logos often look better with a brightness boost on dark bg */
  filter: brightness(1.1);
}


.logo-accent { color: var(--orange); }

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
  letter-spacing: 0.2px;
}

.nav-links a:hover { color: white; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: white;
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--navy);
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.mobile-menu a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 10px 0;
  font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mobile-menu.open { display: flex; }

/* ---- HERO ---- */
.hero {
  background: var(--navy);
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 80px 24px 60px;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  gap: 60px;
  justify-content: center;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(32,85,199,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32,85,199,0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(32,85,199,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 600px;
  position: relative;
  z-index: 2;
  animation: fadeUp 0.8s ease both;
}

.hero-badge {
  display: inline-block;
  background: rgba(244,115,26,0.15);
  border: 1px solid rgba(244,115,26,0.35);
  color: var(--orange-light);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 100px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 66px);
  font-weight: 800;
  color: white;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.hero-title-accent {
  background: linear-gradient(90deg, var(--orange), #FFB347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: rgba(255,255,255,0.65);
  font-size: 17px;
  max-width: 500px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  letter-spacing: 0.2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), #e85d0a);
  color: white;
  box-shadow: 0 4px 20px rgba(244,115,26,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(244,115,26,0.5);
}

.btn-ghost {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.3);
}

.btn-ghost:hover {
  border-color: white;
  background: rgba(255,255,255,0.07);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
}

.stat { display: flex; flex-direction: column; gap: 2px; }

.stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-divider {
  width: 1px; height: 40px;
  background: rgba(255,255,255,0.15);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  width: 340px;
  height: 380px;
  flex-shrink: 0;
  z-index: 2;
  display: none;
}

.hero-blob {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(32,85,199,0.3) 0%, rgba(244,115,26,0.15) 100%);
  border-radius: 50%;
  filter: blur(30px);
}

.floating-card {
  position: absolute;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  min-width: 190px;
  animation: float 4s ease-in-out infinite;
}

.fc-icon { font-size: 24px; }
.fc-text { font-size: 13px; line-height: 1.4; }
.fc-text strong { font-size: 14px; }
.fc-text small { color: rgba(255,255,255,0.5); font-size: 11px; }

.fc1 { top: 10px; left: 0; animation-delay: 0s; }
.fc2 { top: 50%; left: 30px; transform: translateY(-50%); animation-delay: 1.3s; }
.fc3 { bottom: 10px; left: 0; animation-delay: 2.6s; }

/* ---- SEARCH ---- */
.search-section {
  background: var(--off-white);
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.search-wrap {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
}

#searchInput {
  width: 100%;
  padding: 16px 48px 16px 50px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: white;
  transition: var(--transition);
  outline: none;
}

#searchInput:focus {
  border-color: var(--royal);
  box-shadow: 0 0 0 4px rgba(32,85,199,0.12);
}

.search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 14px;
  color: var(--mid-grey);
  cursor: pointer;
  padding: 4px 8px;
  display: none;
}

.search-label {
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-light);
  min-height: 20px;
}

/* ---- CATEGORIES ---- */
.categories-section {
  padding: 80px 0;
  background: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-light);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.tab-btn {
  padding: 10px 22px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.2px;
}

.tab-btn:hover {
  border-color: var(--royal);
  color: var(--royal);
}

.tab-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

/* Template Grid */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* Template Card */
.template-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.5s ease both;
}

.template-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}

.template-card[data-cat="project-management"]::before { background: var(--royal); }
.template-card[data-cat="program-management"]::before { background: var(--navy); }
.template-card[data-cat="meal"]::before { background: var(--orange); }

.template-card:hover {
  border-color: var(--mid-grey);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.card-icon.pm { background: rgba(32,85,199,0.1); }
.card-icon.pgm { background: rgba(10,26,58,0.08); }
.card-icon.meal { background: rgba(244,115,26,0.1); }

.card-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 4px 10px;
  border-radius: 100px;
}

.badge-pm { background: rgba(32,85,199,0.1); color: var(--royal); }
.badge-pgm { background: rgba(10,26,58,0.08); color: var(--navy); }
.badge-meal { background: rgba(244,115,26,0.12); color: #c25200; }

.card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.card-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.card-format {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--mid-grey);
  font-weight: 500;
}

.card-format span { font-size: 14px; }

.btn-download {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--royal), #1a44a8);
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-download:hover {
  background: linear-gradient(135deg, #1847b8, #143696);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(32,85,199,0.35);
}

/* No results */
.no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
  grid-column: 1 / -1;
}

.no-results-icon { font-size: 48px; margin-bottom: 16px; }
.no-results h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 8px; color: var(--text); }

/* ---- ABOUT ---- */
.about-section {
  padding: 100px 0;
  background: var(--navy);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.section-tag {
  display: inline-block;
  background: rgba(244,115,26,0.15);
  border: 1px solid rgba(244,115,26,0.3);
  color: var(--orange-light);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 100px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.about-text h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  color: white;
  letter-spacing: -0.8px;
  margin-bottom: 20px;
  line-height: 1.15;
}

.about-text p {
  color: rgba(255,255,255,0.6);
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.75;
}

.about-features { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.75);
  font-size: 15px;
}

.feature-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-card {
  padding: 24px;
  border-radius: 14px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.about-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.about-card p { font-size: 14px; line-height: 1.6; }

.ac-blue { background: rgba(32,85,199,0.2); border: 1px solid rgba(32,85,199,0.3); color: rgba(255,255,255,0.85); }
.ac-navy { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); }
.ac-orange { background: rgba(244,115,26,0.15); border: 1px solid rgba(244,115,26,0.3); color: rgba(255,255,255,0.85); }

.ac-icon { font-size: 26px; flex-shrink: 0; }

/* ---- CONTACT ---- */
.contact-section {
  padding: 80px 24px;
  background: var(--off-white);
  text-align: center;
}

.contact-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 14px;
  color: var(--navy);
}

.contact-inner p { color: var(--text-light); font-size: 16px; margin-bottom: 32px; }

/* ---- FOOTER ---- */
.footer {
  background: var(--navy);
  padding: 32px 24px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy { color: rgba(255,255,255,0.4); font-size: 13px; }

.footer-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
}

.footer-links a:hover { color: white; }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.fc2 { animation: float2 4s ease-in-out 1.3s infinite; }
@keyframes float2 {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(calc(-50% - 10px)); }
}

/* ---- RESPONSIVE ---- */
@media (min-width: 900px) {
  .hero-visual { display: block; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 60px 24px 48px; flex-direction: column; min-height: auto; }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }

  .hero-stats { gap: 20px; }
  .stat-num { font-size: 22px; }

  .footer-inner { flex-direction: column; text-align: center; }

  .template-grid { grid-template-columns: 1fr; }
}
