@font-face {
  font-family: "CustomFont";
  src: url("/fonts/custom-font.woff2") format("woff2");
  font-display: swap;
}

/* Global Styles */
:root {
  --primary-color: #1a237e; /* Navy Blue */
  --primary-light: #534bae; /* Lighter Navy Blue */
  --primary-dark: #000051; /* Darker Navy Blue */
  --secondary-color: #4a90e2; /* Blue */
  --secondary-light: #7eb6ff; /* Light Blue */
  --secondary-dark: #0063cc; /* Dark Blue */
  --accent-color: #64b5f6; /* Accent Blue */
  --background-color: #c8e4fe; /* Very Light Blue - Updated */
  --text-color: #1a237e; /* Navy Blue */
  --card-bg: #ffffff;
  --border-color: #c5cae9; /* Light Blue Border */
  --section-bg: #f5f8ff; /* Light Blue Section Background */
  --footer-bg: #1a237e; /* Navy Blue Footer */
  --footer-gradient: linear-gradient(
    135deg,
    #1a237e 0%,
    #534bae 100%
  ); /* Footer Gradient */
}

html {
  background-color: var(--background-color);
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
}

body {
  background-color: var(--background-color) !important;
  color: var(--text-color);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}
.fs-7 {
  font-size: 0.75rem !important; /* Smaller than Bootstrap fs-6 */
}
.btn-back {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
}
.btn-back:hover {
  background-color: #0056b3;
  color: white;
}
.btn-back i {
  margin-right: 5px;
}

/* Tool Card Styles */
.tool-card {
  background: linear-gradient(
    145deg,
    var(--card-bg) 0%,
    var(--section-bg) 100%
  );
  border-radius: 15px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px rgba(26, 35, 126, 0.1);
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(26, 35, 126, 0.2);
}

.tool-card .card-body {
  padding: 1.5rem;
}

.tool-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Category Section Styles */
.category-card {
  background: linear-gradient(
    145deg,
    var(--card-bg) 0%,
    var(--section-bg) 100%
  );
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  height: 100%;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px rgba(26, 35, 126, 0.1);
}

.category-card:hover {
  transform: translateY(-5px);
  background: linear-gradient(
    145deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: white;
  box-shadow: 0 8px 15px rgba(26, 35, 126, 0.2);
  cursor: pointer !important;
}

.category-card:hover .tool-icon {
  color: white;
  cursor: pointer !important;
}

/* Search Bar Styles */
.search-section {
  background: linear-gradient(
    145deg,
    var(--card-bg) 0%,
    var(--section-bg) 100%
  );
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(26, 35, 126, 0.1);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

/* Statics Section Styles */
.statics-section {
  display: flex;
  justify-content: space-around;
  /* background-color: var(--card-bg); */
  /* border-radius: 15px; */
  /* padding: 1rem 0; */
  /* box-shadow: 0 4px 6px rgba(26, 35, 126, 0.1); */
  /* margin-bottom: 0.5rem; */
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  flex-wrap: wrap;
}

.statics-section .stat-item {
  flex: 1 1 30%;
  margin: 0.5rem 0;
}

.statics-section .stat-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.25rem;
}

.statics-section .stat-number {
  font-weight: 700;
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.25rem;
}

.statics-section .stat-label {
  font-size: 1rem;
}

@media (max-width: 576px) {
  .statics-section {
    font-size: 0.45rem;
  }
  .statics-section .stat-icon {
    font-size: 1.1rem;
  }
  .statics-section .stat-number {
    font-size: 0.8rem;
  }
  .statics-section .stat-label {
    font-size: 0.6rem;
  }
}

#search-tools {
  border-radius: 50px 0 0 50px;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border-color);
}

.search-section .btn {
  border-radius: 0 50px 50px 0;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.search-section .btn:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Button Styles */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

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

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

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

/* Card Styles */
.card {
  background: linear-gradient(
    145deg,
    var(--card-bg) 0%,
    var(--section-bg) 100%
  );
  border-radius: 15px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px rgba(26, 35, 126, 0.1);
}

.card-header {
  background: linear-gradient(
    145deg,
    var(--primary-color) 0%,
    var(--primary-light) 100%
  );
  color: white;
  border-bottom: none;
  border-radius: 15px 15px 0 0 !important;
}

/* Badge Styles */
.badge {
  padding: 0.5em 1em;
  font-weight: 500;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color) !important;
}

/* Footer Styles */
footer {
  background: var(--footer-gradient);
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
  box-shadow: 0 -4px 10px rgba(26, 35, 126, 0.1);
}

footer a {
  color: var(--secondary-light);
  transition: color 0.2s ease;
}

footer a:hover {
  color: white;
  text-decoration: none;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.social-links a {
  color: white;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: var(--secondary-light);
  transform: translateY(-2px);
}

/* Tool Page Specific Styles */
.tool-container {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.tool-header {
  text-align: center;
  margin-bottom: 2rem;
}

.tool-description {
  color: var(--secondary-color);
  margin-bottom: 2rem;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Form Controls */
.form-control {
  border: 1px solid var(--border-color);
  border-radius: 5px;
}

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
  .tool-card {
    margin-bottom: 1rem;
  }

  .search-section {
    padding: 1rem;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .search-section {
    padding: 1.5rem;
  }

  .tool-card {
    padding: 1.2rem;
  }

  .category-card {
    padding: 1.2rem;
  }
}

@media (max-width: 768px) {
  .tool-card,
  .category-card {
    padding: 1rem;
    height: auto; /* Ensures proper height adjustment */
  }

  .tool-card .card-body,
  .category-card {
    padding: 1rem;
  }

  .tool-icon {
    font-size: 1.5rem; /* Adjust icon size */
  }

  .search-section {
    padding: 1rem;
  }

  .search-section input {
    font-size: 14px;
  }

  .card {
    border-radius: 10px;
    padding: 1rem;
  }

  .card-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .navbar-light .navbar-nav .nav-link {
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .row-cols-2 {
    --bs-gutter-x: 0.5rem; /* Reduce gap between columns */
  }

  .tool-card,
  .category-card {
    padding: 0.8rem;
  }

  .tool-icon {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  .card-title {
    font-size: 12px;
  }

  .search-section {
    padding: 0.8rem;
  }

  #search-tools {
    padding: 0.5rem 1rem;
    font-size: 16px;
  }

  .search-section .btn {
    padding: 0.5rem 1rem;
  }

  .btn-primary,
  .btn-outline-primary {
    font-size: 14px;
    padding: 0.5rem 1rem;
  }

  footer {
    padding: 1.5rem 0;
  }

  footer a {
    font-size: 14px;
  }

  .social-links a {
    font-size: 16px;
  }
}

@media (max-width: 320px) {
  .row-cols-2 {
    flex-direction: column; /* Stacks elements on smaller screens */
  }

  .tool-card,
  .category-card {
    padding: 0.6rem;
    font-size: 12px;
  }

  .tool-icon {
    font-size: 1.2rem;
  }

  .search-section {
    padding: 0.6rem;
  }

  .btn-primary,
  .btn-outline-primary {
    font-size: 12px;
    padding: 0.4rem 0.8rem;
  }

  .footer {
    font-size: 34px;
  }
}

/* Ads & Pre Loader CSS */

/* Ad container setup without flex */
.ad-container {
  width: 100%; /* Make sure it takes full width */
  margin: 0px;
  text-align: center; /* Center the iframe */
}

/* Ad 1 settings */
.ad-placeholder iframe {
  width: 100% !important; /* Full width */
  max-width: 100% !important; /* Remove any max-width restrictions */
  height: 90px; /* Height for desktop */
  border: none;
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    /* margin: 20px 0; */
    text-align: center; /* Ensure the iframe is centered */
  }
  .ad-placeholder iframe {
    width: 100% !important; /* Full width on small screens */
    height: 60px !important; /* Height adjusts automatically */
    display: block;
    margin: 0 auto;
  }
}

/* Medium Screens (tablets, etc.) */
@media (max-width: 991px) and (min-width: 768px) {
  .ad-placeholder iframe {
    width: 100% !important; /* Full width */
    height: 120px !important; /* Height adjusts automatically */
  }
}

/* Ad 2 settings */
.ad-placeholder2 iframe {
  width: 100% !important; /* Full width */
  max-width: 100% !important; /* No max-width restrictions */
  height: 250px; /* Height for desktop */
  border: none;
}

/* Ad 2 mobile and tablet adjustments */
@media (max-width: 767px) {
  .ad-placeholder2 iframe {
    width: 100% !important; /* Full width */
    height: auto !important; /* Height adjusts automatically */
    min-height: 250px; /* Minimum height */
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  .ad-placeholder2 iframe {
    width: 100% !important;
    height: auto !important;
    min-height: 250px; /* Minimum height */
  }
}
@media screen and (max-width: 480px) {
  .ad-container iframe[width="728"][height="90"] {
    display: none !important;
  }
}
@media screen and (min-width: 480px) {
  .ad-container iframe[width="320"][height="50"] {
    display: none !important;
  }
}

/* Style for "All Tools Categories" */
.tools-categories h2 {
  background-color: var(--primary-color) !important;
  display: inline-block; /* Reduce background width */
  padding: 10px 20px; /* Add padding */
  border-radius: 10px; /* Rounded corners */
  font-weight: bold;
}
.popular-tools h2 {
  background-color: var(--primary-color);
  display: inline-block; /* Reduce background width */
  padding: 10px 20px; /* Add padding */
  border-radius: 10px; /* Rounded corners */
  font-weight: bold;
}

main .container {
  width: 100% !important;
  margin: auto !important;
  padding: 0 !important;
}

#preloader {
  position: fixed;
  width: 100%;
  height: 100%;
  background: #0a0b27;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  caret-color: transparent;
}

#preloader img {
  width: 150px; /* Fixed width */
  height: 150px; /* Fixed height to prevent CLS */
  object-fit: contain; /* Ensures proper scaling without distortion */
}

#main-content {
  display: none; /* Initially hidden */
}
#preloader h6 {
  margin-top: 10px; /* Add some space between the image and text */
  font-weight: bold; /* Make text bold */
  color: white; /* Ensure text is visible */
  text-align: center; /* Center the text */
  font-size: 1rem; /* Default font size */
}

@media (max-width: 767px) {
  #preloader h6 {
    font-size: 0.8rem; /* Smaller font size on mobile */
  }
}

/* Announcement Section Styles */
.announcement-section {
  background-color: aquamarine;
  backdrop-filter: blur(10px);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.announcement-card {
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.announcement-card h2 {
  /* Updated from h3 to h2 */
  font-size: 1.5rem;
  font-weight: bold;
  color: black;
}

.announcement-card button {
  display: block;
  margin: 0 auto;
  cursor: pointer;
}

.announcement-card ul {
  margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 767px) {
  .announcement-card {
    padding: 0.8rem 1rem !important;
  }

  .announcement-card h2 {
    /* Updated from h3 to h2 */
    font-size: 1.2rem;
  }

  .announcement-card button {
    font-size: 1.2rem;
  }

  .announcement-card ul {
    font-size: 0.9rem;
  }

  .tools-categories h2 {
    /* Updated from h3 to h2 */
    font-size: 1.5rem;
  }
}
