/* =====================================================
   ROOT VARIABLES (THEME COLORS)
   Change these to update your whole site design easily
===================================================== */
:root {
  --primary: #156ed3;    /* Slightly muted green for professional look */
  --secondary: #332727;  /* Dark navy for header/nav */
  --bg: #f8fafc;         /* Light neutral background */
  --card: #ffffff;       /* Card background */
  --text: #0f172a;       /* Main text color */
  --subtext: #334155;    /* Secondary text color for sidebar/labels */
  --highlight: #1a73e8;  /* Accent color for links, hover effects */
}

/* =====================================================
   RESET (REMOVE DEFAULT BROWSER STYLES)
===================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Prevent layout breaking */
  font-family: Arial, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
}

/* =====================================================
   HEADER (LOGO + NAVBAR)
===================================================== */
header {
  background: var(--secondary);
  color: white;
  padding: 15px 20px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  flex-wrap: wrap; /* ✅ IMPORTANT: prevents overflow on mobile */
}

/* =====================================================
   NAVIGATION MENU
===================================================== */
nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap; /* ✅ allows nav items to wrap on small screens */
  gap: 10px;
}

nav a {
  color: white;
  text-decoration: none;
  font-size: 14px;
}

nav a:hover {
  text-decoration: underline;
}

/* Remove link styling for logo */
.no-link-style {
  color: inherit;
  text-decoration: none;
}

/* =====================================================
   DROPDOWN MENU
===================================================== */
.dropdown {
  position: relative;
  color: white;
}

.dropdown span {
  cursor: pointer;
  padding: 6px 8px;
  display: inline-block;
  font-size: 14px;
}

/* Hidden dropdown content */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;

  background: white;
  list-style: none;
  min-width: 220px;

  border-radius: 6px;
  padding: 5px 0;

  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
  z-index: 20000;
}

/* Dropdown links */
.dropdown-menu li a {
  display: block;
  padding: 10px 15px;
  color: black;
  text-decoration: none;
}

.dropdown-menu li:hover {
  background: #f1f5f9;
}

/* Show dropdown on hover (desktop) */
.dropdown:hover > .dropdown-menu {
  display: block;
}

/* =====================================================
   TOP SECTION STRIP (CATEGORY TABS)
===================================================== */
.section-strip {
  background: var(--primary);
  padding: 10px 20px;

  display: flex;
  flex-wrap: nowrap;        /* ❗ prevent wrapping */
  overflow-x: auto;         /* ✅ enable horizontal scroll */
  white-space: nowrap;      /* ✅ keep items in one line */
  gap: 10px;

  -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
}

/* Tabs */
.strip-tab {
  color: white;
  cursor: pointer;
  font-weight: bold;
  padding: 8px 14px; /* bigger click area */
  border-radius: 8px;
  flex: 0 0 auto;
  transition: background 0.3s, transform 0.2s;
}

.strip-tab.active {
  background: var(--secondary);
}

.strip-tab:hover {
  background: rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

/* =====================================================
   MAIN LAYOUT (SIDEBAR + CONTENT)
===================================================== */
.layout {
  display: flex;     /* Desktop: side-by-side */
  gap: 20px;
}

/* =====================================================
   SIDEBAR
===================================================== */
.sidebar {
  width: 250px;
  background: #f1f5f9;
  padding: 15px;
  border-right: 1px solid #ddd;
  flex-shrink: 0;

}

.sidebar h3 {
  margin-bottom: 10px;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin: 8px 0;
}

.sidebar a {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
}

.sidebar a:hover {
  color: var(--primary);
}

/* =====================================================
   MAIN CONTENT AREA
===================================================== */
.container {
  max-width: 1000px;
  margin: 0;   /* Center content */
  padding: 20px;
  width: 100%;
}

/* IMPORTANT FIX:
   prevents container from breaking layout */
.layout .container {
  flex: 1;
}

/* =====================================================
   GRID SYSTEM (CARDS LAYOUT)
   Automatically adjusts columns based on screen size
===================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0px;
}

/* =====================================================
   CARD DESIGN
===================================================== */
.card, .tool-box, .why-card, .password-box {
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover, .tool-box:hover, .why-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

/* =====================================================
   BUTTONS & INPUTS
===================================================== */
button {
  background: var(--primary);
  color: white;
  padding: 10px;
  border: none;
  margin-top: 10px;
  cursor: pointer;
  border-radius: 6px;

 /* width: 100%; /* ✅ Mobile-friendly full width */

   width: auto;          /* ✅ FIX */
  min-width: 120px;     /* Smaller than before */


}

button:hover, .tool-links .btn:hover, .why-card .cta-btn:hover {
  opacity: 0.95; 
  transform: translateY(-1px); /* subtle lift effect */
  transition: background 0.3s, transform 0.2s, opacity 0.3s;
}

input, .input-window-template-length {
  padding: 12px 14px;  /* slightly larger for readability */
  margin-top: 10px;
  width: 100%;
  border: 1px solid #cbd5e1; /* subtle professional gray */
  border-radius: 8px;
  transition: border 0.3s, box-shadow 0.3s;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 5px rgba(3,152,106,0.4);
  outline: none;
}

/* =====================================================
   FOOTER
===================================================== */
footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  color: #64748b;
}

/* =====================================================
   MOBILE RESPONSIVE DESIGN
   Applies when screen width ≤ 768px
===================================================== */
@media (max-width: 768px) {

  /* STACK sidebar above content */
  .layout {
    flex-direction: column;
  }

  /* Sidebar becomes full width */
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ddd;
  }

  /* Header stacks vertically */
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Nav takes full width */
  nav {
    width: 100%;
  }

  /* Dropdown becomes normal block (no floating) */
  .dropdown-menu {
    position: static;
    box-shadow: none;
  }

  /* Improve text readability */
  h1 {
    font-size: 22px;
  }

  p {
    font-size: 15px;
  }
}


/* OPTIONS (checkbox row) */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* STRENGTH TEXT */
.strength {
  margin-top: 10px;
  font-weight: bold;
}

/* DARK MODE */
.dark-mode {
  background: #0f172a;
  color: #e2e8f0;
}

.dark-mode .tool-box {
  background: #1e293b;
}

.dark-mode input {
  background: #0f172a;
  color: white;
  border: 1px solid #334155;
}

.dark-mode #result {
  background: #0f172a;
}


@media (max-width: 768px) {
  .section-strip {
    justify-content: center; /* center tabs nicely */
  }
}

.section-strip::-webkit-scrollbar {
  display: none;
}
.section-strip {
  scrollbar-width: none; /* Firefox */
}

.input-length {
  width: 100px;
}

/* Container for one row: date + time */
.window-template-row {
    display: flex;
    gap: 20px; /* space between date and time */
    margin-bottom: 20px;
    flex-wrap: wrap; /* responsive for mobile */
}

/* Individual group (label + input) */
.window-template-group {
    display: flex;
    flex-direction: column;
    flex: 1; /* evenly distribute space */
    min-width: 180px; /* prevent inputs from being too small */
}

/* Inputs styling */
.input-window-template-length {
    padding: 8px 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 5px; /* space below label */
}

/* Optional: label styling */
.window-template-group label {
    font-weight: 500;
    margin-bottom: 3px;
}


.text-spacing {
  line-height: 1.8;
}

.toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  justify-content: space-between; /* pushes switch to the right neatly */
  max-width: 200px; /* optional: keeps things from stretching too far */
}

/* SWITCH BASE */
.switch {
  position: relative;
  display: inline-block;
  width: 45px;
  height: 24px;
}

/* Hide default checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Slider background */
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  border-radius: 34px;
  transition: 0.3s;
}

/* Circle */
.slider:before {
  position: absolute;
  content: \"\";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

/* Active state */
input:checked + .slider {
  background-color: #1a73e8;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.password-box {
  background: #111;
  color: #dbece8;
  padding: 15px;
  font-size: 18px;
  letter-spacing: 2px;
  border-radius: 8px;
  margin-top: 10px;
  word-break: break-all;
  text-align: center;
  border: 1px solid #333;
}


.strength-bar {
  width: 100%;
  height: 8px;
  background: #ddd;
  border-radius: 5px;
  margin-top: 8px;
  overflow: hidden;
}

#strengthFill {
  height: 100%;
  width: 0%;
  transition: 0.3s;
}


.why-topics {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.why-card {
  background: #f7f9fc;
  border-radius: 12px;
  padding: 30px 40px;
  max-width: 700px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  text-align: left;
  font-family: 'Inter', sans-serif;
}

.why-card h2 {
  font-size: 28px;
  color: #0a1f44;
  margin-bottom: 15px;
}

.why-card p {
  font-size: 16px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 20px;
}

.why-card ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 20px;
}

.why-card ul li {
  margin-bottom: 10px;
  font-size: 15px;
  color: #0a1f44;
  position: relative;
  padding-left: 25px;
}

.why-card ul li::before {
  content: "✔";
  color: #28a745;
  position: absolute;
  left: 0;
}

.why-card .cta-btn {
  display: inline-block;
  padding: 10px 20px;       /* same as button */
  background: var(--primary); /* same green as buttons */
  color: white;
  border: none;
  border-radius: 6px;       /* same as buttons */
  font-weight: 600;
  text-decoration: none;    /* remove underline */
  cursor: pointer;
  transition: opacity 0.3s;
}

.why-card .cta-btn:hover {
  opacity: 0.9;             /* same hover as buttons */
}

.related-tools h2 {
  font-size: 24px;
  color: var(--text);
  margin-bottom: 15px;
}

.tool-links {
  display: flex;
  flex-wrap: wrap;   /* wrap on small screens */
  gap: 10px;         /* space between buttons */
}

.tool-links .btn {
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: opacity 0.3s;
}

.tool-links .btn:hover {
  opacity: 0.9;
}


/* Left-align the results with background and text color */
.result-left-align {
    text-align: left;
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    background-color: #1f2937; /* professional dark panel */
    color: #f9fafb;           /* light text */
    font-size: 16px;
    line-height: 1.6;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.result-left-align p {
    margin: 5px 0;  /* spacing between each line */
    font-size: 16px;
    line-height: 1.5;
}

.result-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.result-scroll pre {
    white-space: pre;   /* prevent wrapping */
    margin: 0;
}


/* =====================================================
   ERP FILTER BAR (Country + Gender)
===================================================== */
.filter-bar {
  display: flex;
  gap: 15px;
  background: #eef2f7;
  padding: 15px 20px;
  border-radius: 10px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid #e2e8f0;
}

.filter-bar select {
  background: #fff;
  border: 1px solid #cbd5e1;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  min-width: 180px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-bar select:hover {
  border-color: var(--primary);
}

/* =====================================================
   ALPHABET RIBBON (A–Z)
===================================================== */
.alpha-bar {
  margin: 15px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alpha-bar a {
  padding: 6px 10px;
  background: #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
}

.alpha-bar a:hover {
  background: var(--primary);
  color: #fff;
}

.alpha-bar a.active {
  background: var(--secondary);
  color: #fff;
}

/* =====================================================
   NAME TABLE (5 COLUMN GRID STYLE)
===================================================== */
.name-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
}

.name-table td {
  border: 1px solid #e5e7eb;
  padding: 12px;
  text-align: left;
  font-size: 14px;
  transition: background 0.2s;
}

.name-table td:hover {
  background: #f1f5f9;
}

/* =====================================================
   PAGINATION
===================================================== */
.pagination {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pagination a {
  padding: 6px 12px;
  background: #e2e8f0;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  color: var(--text);
  transition: all 0.2s ease;
}

.pagination a:hover {
  background: var(--primary);
  color: #fff;
}

.pagination a.active {
  background: var(--secondary);
  color: #fff;
}

/* =====================================================
   EMPTY STATE
===================================================== */
.no-data {
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 15px;
}

/* =====================================================
   MOBILE TABLE FIX
===================================================== */
@media (max-width: 768px) {

  .name-table td {
    font-size: 13px;
    padding: 8px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar select {
    width: 100%;
  }

  .alpha-bar {
    justify-content: center;
  }
}