/* ============================================
   CSS VARIABLES - Light & Dark Theme Support
   ============================================ */
:root {
  /* Light Mode Colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --border-color: #e2e8f0;
  --header-bg: #ffffff;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 24px rgba(15, 23, 42, 0.1);
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #ec4899;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient-main: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-light: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --border-color: #334155;
  --header-bg: #1e293b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.5);
  --accent-primary: #60a5fa;
  --accent-secondary: #a78bfa;
  --accent-tertiary: #f472b6;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   HEADER STYLES
   ============================================ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background-color: var(--header-bg);
  padding: 12px 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid var(--border-color);
}

.header .logo img {
  display: block;
  width: 100px;
  height: auto;
  border-radius: 12px;
  transition: transform 0.2s ease;
}

.header .logo img:hover {
  transform: scale(1.05);
}

.header-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header a {
  color: var(--text-primary);
  padding: 8px 16px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.header a:hover {
  background-color: var(--bg-tertiary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.header a.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: var(--shadow-md);
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.theme-toggle:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--accent-primary);
  transform: rotate(20deg);
}

/* ============================================
   MAIN SECTION
   ============================================ */
.tools-section {
  padding: 60px 24px;
  text-align: center;
  background: var(--gradient-light);
  transition: background 0.3s ease;
}

[data-theme="dark"] .tools-section {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.main_text {
  text-align: center;
  color: var(--text-primary);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.main_text + p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* ============================================
   TOOL GROUP LAYOUT
   ============================================ */
.tool-group-container {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.tool-group {
  flex: 1 1 640px;
  min-width: 280px;
}

.tool-group h2 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 700;
}

.tool-group > p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 28px;
  line-height: 1.7;
}

.sidebar {
  flex: 0 0 300px;
  background-color: var(--bg-secondary);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  height: fit-content;
}

.sidebar:hover {
  box-shadow: var(--shadow-lg);
}

.sidebar .sub_headings {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.sidebar a {
  display: block;
  padding: 12px 0;
  text-decoration: none;
  color: var(--accent-primary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  padding-left: 12px;
}

.sidebar a:hover {
  color: var(--accent-secondary);
  border-left-color: var(--accent-primary);
  transform: translateX(4px);
}

/* ============================================
   TOOLS CONTAINER & ITEMS
   ============================================ */
.tools-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  background-color: var(--bg-secondary);
  padding: 28px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.tools-container:hover {
  box-shadow: var(--shadow-lg);
}

.tool-item {
  background-color: var(--bg-secondary);
  padding: 20px;
  border-radius: 14px;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.tool-item img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tool-item:hover img {
  transform: scale(1.08);
}

.tool-item h3 {
  margin: 8px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tool-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
}

/* ============================================
   FOOTER STYLES
   ============================================ */
.foot-item {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 40px 24px;
  border-radius: 16px;
  margin: 40px auto;
  max-width: 1200px;
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.foot-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.footer-img {
  width: 40%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.footer-img img {
  width: 100%;
  max-width: 320px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
}

.footer-img:hover img {
  transform: scale(1.05);
}

.footer-text {
  flex: 1;
  min-width: 240px;
}

.footer-text h3 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-text p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

footer {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 48px 24px;
  border-top: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

footer h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

footer ul {
  list-style: none;
}

footer li {
  margin-bottom: 10px;
}

footer a {
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

footer a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
  transform: translateX(4px);
  display: inline-block;
}

.footer-top {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-bottom: 32px;
  gap: 24px;
}

.footer-column {
  flex: 1;
  min-width: 200px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom img {
  max-width: 100px;
  height: auto;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.footer-bottom img:hover {
  transform: scale(1.08);
}

.footer-bottom-links {
  text-align: right;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .header {
    padding: 12px 16px;
  }

  .header .logo img {
    width: 88px;
  }

  .tools-section {
    padding: 48px 16px;
  }

  .tool-group-container {
    gap: 24px;
  }

  .sidebar {
    flex-basis: 100%;
  }

  .foot-item {
    flex-direction: column;
    text-align: center;
  }

  .footer-img {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 12px;
  }

  .header-right {
    gap: 8px;
  }

  .header a {
    padding: 6px 12px;
    font-size: 14px;
  }

  .header .logo img {
    width: 72px;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .tools-section {
    padding: 32px 12px;
  }

  .main_text {
    font-size: 1.5rem;
    margin-bottom: 12px;
  }

  .main_text + p {
    font-size: 0.95rem;
  }

  .tool-group-container {
    flex-direction: column;
    gap: 16px;
  }

  .tool-group {
    flex-basis: 100%;
  }

  .tools-container {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 16px;
  }

  .tool-item {
    padding: 14px;
  }

  .tool-item h3 {
    font-size: 0.95rem;
  }

  .tool-item p {
    font-size: 0.8rem;
  }

  .sidebar {
    flex-basis: 100%;
  }

  .foot-item {
    padding: 24px 12px;
    gap: 16px;
    margin: 24px auto;
  }

  .footer-text h3 {
    font-size: 1.3rem;
  }

  .footer-text p {
    font-size: 0.9rem;
  }

  .footer-top {
    justify-content: center;
  }

  .footer-column {
    min-width: 160px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom-links {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 10px 8px;
    gap: 8px;
  }

  .header .logo img {
    width: 60px;
  }

  .header-right {
    display: none;
  }

  .theme-toggle {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .tools-section {
    padding: 24px 10px;
  }

  .main_text {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .main_text + p {
    font-size: 0.85rem;
    margin-bottom: 24px;
  }

  .tools-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .tool-item {
    padding: 10px;
  }

  .tool-item h3 {
    font-size: 0.85rem;
  }

  .tool-item p {
    font-size: 0.7rem;
  }

  .sidebar {
    padding: 16px;
  }

  .sidebar a {
    padding: 10px 0;
    padding-left: 8px;
    font-size: 0.85rem;
  }

  .foot-item {
    padding: 16px 10px;
    gap: 12px;
  }

  .footer-text h3 {
    font-size: 1.1rem;
  }

  .footer-text p {
    font-size: 0.85rem;
  }

  .footer-img img {
    max-width: 240px;
  }
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-item {
  animation: fadeIn 0.5s ease-out;
}

/* Smooth theme transition */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}


.tools-container a{
  text-decoration: none;
}





.head-h1 {
  align-items: center;
  background-color: transparent;
  color: #4f4545;
  font-size: 150%;
  margin-bottom: 60px;
  margin-top: 5px;
  border-top: 6px solid #faf3f3;
  border-bottom: 6px solid #faf3f3;
  border-radius: 10px;
  color: #3a230a;
  margin-left: 20%;
  margin-right: 20%;
}

/* ============================================
   FOOTER STYLES
   ============================================ */
footer {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 40px 20px;
  font-size: 14px;
  border-top: 1px solid var(--border-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  margin-top: 40px;
}

footer h3 {
  color: var(--text-primary);
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 16px;
}

footer ul {
  list-style: none;
  padding: 0;
}

footer li {
  margin-bottom: 8px;
}

footer a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

footer p {
  margin: 8px 0;
  color: var(--text-secondary);
}

.footer-top {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-bottom: 30px;
  text-align: left;
}

.footer-column {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-logo {
  flex: 1;
  text-align: left;
}

.footer-logo img {
  max-width: 100px;
  height: auto;
  border-radius: 20px;
  transition: transform 0.2s ease;
}

.footer-logo img:hover {
  transform: scale(1.05);
}

.footer-links {
  flex: 2;
  text-align: right;
  min-width: 250px;
}

@media (max-width: 768px) {
  footer {
    padding: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
  }

  .footer-logo,
  .footer-links {
    text-align: center;
    flex: 1;
  }
}






