/* =============================================
   99tool.in - Global Stylesheet
   Theme: Red, Black, White | iLovePDF Style
   ============================================= */

/* --- CSS Variables --- */
:root {
  --primary: #e53935;
  --primary-dark: #b71c1c;
  --primary-light: #ff6f6f;
  --black: #111111;
  --dark: #1a1a1a;
  --dark-card: #222222;
  --grey: #444444;
  --grey-light: #888888;
  --border: #2e2e2e;
  --white: #ffffff;
  --off-white: #f5f5f5;
  --text: #e0e0e0;
  --text-muted: #999999;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --transition: 0.2s ease;
  --font: 'Inter', 'Segoe UI', sans-serif;
  --header-height: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background-color: var(--black);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-light); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--white);
}

h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
h3 { font-size: clamp(1rem, 2.5vw, 1.2rem); }
p  { color: var(--text); margin-bottom: 0.8rem; }

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-sm {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================================
   HEADER
   ============================================= */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--dark);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center; /* Center the inner container */
}

/* Ensure the injected header component fills the width */
#site-header > header {
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px;
  margin-left: auto; /* Position on right */
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Hamburger Animation */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Dropdown container */
.nav-item-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.dropdown-trigger::after {
  content: '▾';
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.nav-item-dropdown:hover .dropdown-trigger::after {
  transform: rotate(180deg);
}

/* Premium Desktop Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(34, 34, 34, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 200px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
  z-index: 1000;
}

/* --- Language Selector Dropdown --- */
.lang-selector-dropdown {
  margin-left: 8px;
}

.lang-trigger {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  white-space: nowrap !important;
  transition: background var(--transition), border-color var(--transition);
}

.lang-trigger:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
}

.lang-flag-img {
  width: 20px !important;
  height: 14px !important;
  min-width: 20px !important;
  min-height: 14px !important;
  max-width: 20px !important;
  max-height: 14px !important;
  object-fit: cover !important;
  display: inline-block !important;
  vertical-align: middle !important;
  border-radius: 2px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  flex-shrink: 0 !important;
}

.lang-dropdown-menu {
  max-height: 340px !important;
  overflow-y: auto !important;
  min-width: 170px !important;
  padding: 8px !important;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--dark-card);
}

.lang-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}
.lang-dropdown-menu::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 4px;
}

.lang-dropdown-menu a {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  white-space: nowrap !important;
  transition: all var(--transition);
}

.lang-dropdown-menu a:hover,
.lang-dropdown-menu a.active {
  background: rgba(229, 57, 53, 0.2) !important;
  color: var(--white) !important;
}

.lang-flag-option {
  width: 20px !important;
  height: 14px !important;
  min-width: 20px !important;
  min-height: 14px !important;
  max-width: 20px !important;
  max-height: 14px !important;
  object-fit: cover !important;
  display: inline-block !important;
  vertical-align: middle !important;
  border-radius: 2px !important;
  flex-shrink: 0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.nav-item-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.2s;
}

.dropdown-menu a:hover {
  background: rgba(229, 57, 53, 0.1);
  color: var(--primary);
  padding-left: 20px;
}

/* Mobile Nav Mobile Submenu */
@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 17, 17, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 30px 20px;
    gap: 15px;
    opacity: 0;
    overflow-y: auto;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  
  .nav-links.open { 
    display: flex;
    opacity: 1;
    z-index: 2000;
    pointer-events: auto;
  }

  .nav-item-dropdown {
    width: 100%;
    flex-direction: column;
  }

  .dropdown-trigger {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: 600;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    width: 100%;
    max-width: 100vw;
    background: rgba(255, 255, 255, 0.03); /* Subtle indent background */
    border: none;
    box-shadow: none;
    display: none;
    opacity: 1;
    visibility: visible;
    text-align: center;
    padding: 10px 0;
    margin-top: 5px;
    border-radius: 8px;
  }

  /* Neutralize legacy desktop hover baggage on mobile */
  .nav-item-dropdown:hover .dropdown-menu {
    transform: none !important;
    left: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: none; /* Keep hidden until .active is toggled */
  }

  .nav-item-dropdown.active .dropdown-menu {
    display: flex !important;
  }

  .dropdown-menu a {
    font-size: 1rem;
    padding: 10px 20px;
    white-space: normal; /* Allow wrapping */
    word-break: break-word;
    color: var(--text);
  }

  .nav-links a {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px;
    text-align: center;
    width: 100%;
  }
  
  .nav-toggle { display: flex; }
}

/* =============================================
   FOOTER
   ============================================= */
#site-footer {
  background: var(--dark);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 10px;
  max-width: 240px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* =============================================
   HOME PAGE - HERO
   ============================================= */
.hero {
  background: linear-gradient(145deg, var(--dark) 0%, #1a0000 60%, #1a0000 100%);
  padding: 80px 20px 60px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  margin-bottom: 16px;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 32px;
}

/* Search Bar */
.search-wrap {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: 14px 50px 14px 20px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--dark-card);
  color: var(--white);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-wrap input::placeholder { color: var(--text-muted); }
.search-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.2);
}

.search-wrap .search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* =============================================
   HOME PAGE - CATEGORIES & CARDS
   ============================================= */
.tools-section {
  padding: 56px 0;
}

.category-block {
  margin-bottom: 52px;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.category-title .cat-icon {
  width: 30px;
  height: 30px;
  background: rgba(229, 57, 53, 0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.category-title h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* Tool Card */
.tool-card {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tool-card-icon {
  width: 50px;
  height: 50px;
  background: rgba(229, 57, 53, 0.08); /* Lighter bg */
  border: 1px solid rgba(229, 57, 53, 0.15); /* Subtle border */
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem; /* Balanced size */
  font-weight: 800;
  color: var(--primary) !important; /* Explicit color override */
  flex-shrink: 0;
  transition: all var(--transition);
}

.tool-card:hover .tool-card-icon {
  background: var(--primary);
  color: var(--white) !important;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

.tool-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}

.tool-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
  line-height: 1.5;
}

.tool-card .use-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  padding: 6px 0;
  transition: gap var(--transition);
}

.tool-card:hover .use-btn { gap: 10px; }

/* No results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  display: none;
}

/* =============================================
   TOOL PAGE - HERO
   ============================================= */
.tool-hero {
  background: linear-gradient(145deg, var(--dark) 0%, #1a0000 100%);
  padding: 48px 20px 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.tool-hero .breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.tool-hero .breadcrumb a { color: var(--text-muted); }
.tool-hero .breadcrumb a:hover { color: var(--primary); }
.tool-hero .breadcrumb span { color: var(--text-muted); }

.tool-hero h1 { margin-bottom: 10px; }

.tool-hero p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* =============================================
   TOOL PAGE - TOOL UI AREA
   ============================================= */
.tool-main {
  padding: 40px 0;
  flex: 1;
}

.tool-box {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

/* =============================================
   SEO CONTENT SECTION
   ============================================= */
.seo-content {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.seo-content h2 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  margin-top: 28px;
  color: var(--white);
}

.seo-content h2:first-child { margin-top: 0; }

.seo-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* =============================================
   FAQ SECTION
   ============================================= */
.faq-section {
  padding: 40px 0 56px;
  border-top: 1px solid var(--border);
}

.faq-section h2 {
  font-size: 1.3rem;
  margin-bottom: 24px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: var(--dark-card);
  color: var(--white);
  border: none;
  padding: 16px 20px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background var(--transition);
}

.faq-question:hover { background: #2a2a2a; }

.faq-question .faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(229, 57, 53, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--primary);
  transition: transform var(--transition);
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: var(--dark);
  padding: 0 20px;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 16px 20px;
}

.faq-answer p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.7;
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.9rem;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
}

.btn-secondary {
  background: var(--dark-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; }

/* BADGE */
.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 4px;
}
.badge-primary {
  background-color: var(--primary);
  color: #fff;
}

/* VIEW MORE BUTTON */
.view-more-container {
  display: flex !important;
  justify-content: center !important;
  margin: 24px 0 0 !important;
  width: 100% !important;
}

.view-more-btn {
  /* Reset */
  appearance: none !important;
  -webkit-appearance: none !important;
  outline: none !important;
  
  /* Style */
  background: rgba(229, 57, 53, 0.1) !important;
  border: 1px solid #e53935 !important;
  color: #e53935 !important;
  padding: 12px 30px !important;
  border-radius: 50px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  font-family: 'Inter', sans-serif !important;
}

.view-more-btn:hover {
  background: #e53935 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4) !important;
  transform: translateY(-2px) !important;
}

.tools-grid.collapsed .tool-card:nth-child(n+5) {
  display: none;
}

/* =============================================
   OUTPUT / RESULT AREA
   ============================================= */
.result-area {
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  min-height: 80px;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
}

.copy-group {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 5px 12px;
  font-size: 0.75rem;
  background: var(--dark-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
}

.copy-btn:hover { border-color: var(--primary); color: var(--primary); }

/* =============================================
   BADGES & TAGS
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-red { background: rgba(229,57,53,0.15); color: var(--primary); }
.badge-grey { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* =============================================
   UTILITY CLASSES
   ============================================= */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-white  { color: var(--white); }

.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 32px !important; }
.mt-5 { margin-top: 48px !important; }

.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }
.mb-5 { margin-bottom: 48px !important; }

.py-1 { padding-top: 8px !important; padding-bottom: 8px !important; }
.py-2 { padding-top: 16px !important; padding-bottom: 16px !important; }
.py-3 { padding-top: 24px !important; padding-bottom: 24px !important; }
.py-4 { padding-top: 32px !important; padding-bottom: 32px !important; }
.py-5 { padding-top: 48px !important; padding-bottom: 48px !important; }

.fw-bold { font-weight: 700 !important; }
.w-100 { width: 100% !important; }

.flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.items-center { align-items: center !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.gap-1 { gap: 8px !important; }
.gap-2 { gap: 16px !important; }
.gap-3 { gap: 24px !important; }
.gap-4 { gap: 32px !important; }

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* Alert/Info Box */
.info-box {
  background: rgba(229, 57, 53, 0.08);
  border: 1px solid rgba(229, 57, 53, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.info-box .info-icon { color: var(--primary); flex-shrink: 0; margin-top: 2px; }

/* =============================================
   STATIC PAGES (about, contact, etc.)
   ============================================= */
.static-page {
  padding: 60px 0;
  flex: 1;
}

.static-page h1 { margin-bottom: 20px; }
.static-page h2 { margin-top: 32px; margin-bottom: 12px; }
.static-page p  { color: var(--text-muted); font-size: 0.9rem; line-height: 1.8; }
.static-page ul { list-style: disc; padding-left: 22px; }
.static-page ul li { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 6px; }

/* =============================================
   RESPONSIVE UTILITIES (PDF Tools Focus)
   ============================================= */
@media (max-width: 1024px) {
  .thumbnails-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 768px) {
  .tool-box { padding: 20px; }
  .hero { padding: 40px 20px; text-align: center; }
  .hero h1 { font-size: 1.8rem; }
  .tool-hero { padding: 32px 15px; }
  .tool-hero h1 { font-size: 1.6rem; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  
  .header-inner { justify-content: space-between; }
  .nav-links { margin: 0; }
  
  .file-info {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 16px;
  }
  
  .upload-area, .pdf-uploader {
    padding: 40px 15px;
  }
  .upload-icon { font-size: 2.5rem; }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .tool-box { padding: 15px; }
  .tool-hero h1 { font-size: 1.4rem; }
  .tool-hero p { font-size: 0.85rem; }
  .thumbnails-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; padding: 12px; text-align: center; }
  
  .logo-text { font-size: 1.2rem; }
}

/* COOKIE CONSENT BANNER */
.cookie-banner {
  position: fixed;
  bottom: -300px; /* Fully hidden */
  left: 20px;
  right: 20px;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  z-index: 10000;
  transition: bottom 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  max-width: 1000px;
  margin: 0 auto;
}

.cookie-banner.show {
  bottom: 20px; /* Floating look */
}

.cookie-banner p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.cookie-banner p a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.cookie-banner p a:hover {
  text-decoration: underline;
}

.cookie-btns {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-banner {
    left: 10px;
    right: 10px;
    flex-direction: column;
    text-align: center;
    padding: 24px;
    gap: 16px;
  }
  .cookie-btns {
    width: 100%;
  }
  .cookie-btns .btn {
    width: 100%;
  }
}



/* =============================================
   TOOL UI UTILITIES (Shared)
   ============================================= */
.tool-container {
  max-width: 1000px;
  margin: 0 auto;
}

.upload-area, .pdf-uploader {
  background: var(--dark-card);
  border: 3px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 20px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.upload-area:hover, .pdf-uploader:hover,
.upload-area.dragover, .pdf-uploader.dragover {
  border-color: var(--primary) !important;
  background: rgba(229, 57, 53, 0.05) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.upload-icon {
  font-size: 3.5rem;
  margin-bottom: 5px;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

.file-info {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  animation: fadeIn 0.4s ease;
}

.file-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#file-name {
  font-weight: 700;
  color: var(--white);
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(76, 175, 80, 0.1);
  color: #4CAF50;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(76, 175, 80, 0.2);
}

.badge-icon {
  font-size: 1rem;
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   ULTIMATE NAVBAR LANGUAGE SELECTOR STYLING
   ============================================= */
#site-header .lang-selector-dropdown {
  position: relative !important;
  margin-left: 10px !important;
}

#site-header .lang-trigger,
#site-header #lang-dropdown-btn {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid var(--border) !important;
  color: var(--white) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

#site-header .lang-trigger:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: var(--primary) !important;
}

#site-header .lang-flag-img,
#site-header img.lang-flag-img,
#site-header #current-lang-flag {
  width: 22px !important;
  height: 15px !important;
  min-width: 22px !important;
  min-height: 15px !important;
  max-width: 22px !important;
  max-height: 15px !important;
  object-fit: cover !important;
  display: inline-block !important;
  vertical-align: middle !important;
  border-radius: 2px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

#site-header #current-lang-name {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: var(--white) !important;
  line-height: 1 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

#site-header .lang-dropdown-menu,
#site-header #lang-dropdown-menu {
  max-height: 320px !important;
  overflow-y: auto !important;
  width: 190px !important;
  min-width: 190px !important;
  padding: 8px !important;
  border-radius: 12px !important;
  background: rgba(26, 26, 26, 0.98) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

#site-header .lang-dropdown-menu a,
#site-header #lang-dropdown-menu a {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#site-header .lang-dropdown-menu a:hover,
#site-header .lang-dropdown-menu a.active {
  background: rgba(229, 57, 53, 0.2) !important;
  color: var(--white) !important;
  padding-left: 12px !important;
}

#site-header .lang-flag-option,
#site-header img.lang-flag-option {
  width: 22px !important;
  height: 15px !important;
  min-width: 22px !important;
  min-height: 15px !important;
  max-width: 22px !important;
  max-height: 15px !important;
  object-fit: cover !important;
  display: inline-block !important;
  vertical-align: middle !important;
  border-radius: 2px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

