/*
Theme Name: ToolsHub
Description: A modern multi-tool website theme with beautiful gradients and animations
Version: 1.0
Author: ToolsHub Team
*/

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color System */
  --background: hsl(240, 10%, 99%);
  --foreground: hsl(240, 10%, 3.9%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(240, 10%, 3.9%);
  --primary: hsl(262, 83%, 58%);
  --primary-foreground: hsl(210, 40%, 98%);
  --primary-glow: hsl(262, 83%, 68%);
  --secondary: hsl(220, 14.3%, 95.9%);
  --secondary-foreground: hsl(220, 8.9%, 46.1%);
  --muted: hsl(220, 14.3%, 95.9%);
  --muted-foreground: hsl(220, 8.9%, 46.1%);
  --border: hsl(220, 13%, 91%);
  
  /* Gradients */
  --hero-gradient: linear-gradient(135deg, hsl(262, 83%, 58%), hsl(281, 83%, 60%), hsl(300, 83%, 62%));
  --card-gradient: linear-gradient(135deg, hsl(0, 0%, 100%), hsl(220, 14.3%, 98%));
  --hover-gradient: linear-gradient(135deg, hsl(262, 83%, 95%), hsl(281, 83%, 95%));
  
  /* Shadows */
  --shadow-elegant: 0 10px 30px -10px hsl(262, 83%, 58%, 0.2);
  --shadow-glow: 0 0 40px hsl(262, 83%, 68%, 0.15);
  --shadow-card: 0 4px 20px -4px hsl(220, 13%, 91%, 0.4);
  
  /* Radius */
  --radius: 1rem;
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Styles */


.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(240, 242, 248, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  padding: 0 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--hero-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.875rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: bold;
  background: var(--hero-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-clip: text;
}

.nav {
  display: none;
  gap: 1.5rem;
}

.nav a {
  text-decoration: none;
  color: var(--foreground);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition-smooth);
}

.nav a:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--background), hsl(262, 83%, 58%, 0.05), hsl(262, 83%, 68%, 0.1));
  padding-top: 6rem;
}

.hero-content {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero-text {
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: bold;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-title-gradient {
  background: var(--hero-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  max-width: 32rem;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--hero-gradient);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-elegant);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--hover-gradient);
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-green { background: #10b981; }
.status-blue { background: #3b82f6; }
.status-purple { background: #8b5cf6; }

@media (min-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .hero-buttons {
    flex-direction: row;
  }
}

/* Tools Section */
/* ===== PROFESSIONAL TOOL GRID DESIGN ===== */

/* Clean Grid Container with Ad Space Consideration */
.tools-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 2rem 0;
  
}

/* Professional Tool Card */
.tool-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #eaeaea;
  transition: all 0.2s ease;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  height: 100%;
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
}

/* Clean Hover Effect */
.tool-card:hover {
  border-color: #007bff;
  box-shadow: 0 4px 16px rgba(0, 123, 255, 0.12);
  transform: translateY(-2px);
}

.tool-card-content {
  padding: 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Icon Container */
.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.tool-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f0f0f0;
}

.tool-icon svg {
  width: 24px;
  height: 24px;
  color: #007bff;
}

/* Category Badge */
.tool-category {
  background: #f8f9fa;
  color: #6c757d;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #e9ecef;
}

/* Title Styling */
.tool-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

/* Description */
.tool-description {
  color: #6c757d;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* Status Indicator */
.tool-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
  margin-top: auto;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28a745;
}

.status-text {
  font-size: 0.75rem;
  color: #6c757d;
}

/* Category Colors */
.category-pdf .tool-category {
  background: #e8f4ff;
  color: #007bff;
  border-color: #cfe2ff;
}

.category-image .tool-category {
  background: #fff4e6;
  color: #fd7e14;
  border-color: #ffe5d0;
}

.category-text .tool-category {
  background: #f0f9ff;
  color: #0dcaf0;
  border-color: #d1f1fa;
}

.category-utility .tool-category {
  background: #f8f9fa;
  color: #6c757d;
  border-color: #e9ecef;
}

.category-calculator .tool-category {
  background: #f0fff4;
  color: #198754;
  border-color: #d1f1e1;
}

/* ===== AD SENSE OPTIMIZED LAYOUT ===== */

/* Ad Container Styles */
.ad-container {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px dashed #dee2e6;
  text-align: center;
}

.ad-label {
  display: block;
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

/* Grid with Ads Integration */
.tools-grid-with-ads {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Ad Block as Grid Item */
.ad-block {
  grid-column: span 1;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px dashed #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  color: #6c757d;
  font-size: 0.875rem;
}

/* Responsive Grid for Mobile */
@media (min-width: 374px) and (max-width: 767px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
  
  .tool-card-content {
    padding: 1rem;
  }
  
  .tool-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }
  
  .tool-icon svg {
    width: 18px;
    height: 18px;
  }
  
  .tool-category {
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
  }
  
  .tool-title {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .tool-description {
    font-size: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
  }
  
  .tool-status {
    padding-top: 0.75rem;
    margin-top: auto;
  }
  
  /* Ad containers on mobile */
  .ad-container {
    margin: 1.5rem 0;
    padding: 1rem;
  }
  
  .ad-block {
    min-height: 200px;
    grid-column: span 3; /* Full width ads on mobile */
  }
}

/* Very small screens */
@media (max-width: 373px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .tool-card-content {
    padding: 0.875rem;
  }
  
  .tool-title {
    font-size: 0.8125rem;
  }
  
  .tool-description {
    display: none;
  }
  
  .tool-status {
    display: none;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .tools-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
  
  .ad-block {
    min-height: 280px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
  }
  
  /* Optional: Insert ad after every 5th item */
  .tools-grid .tool-card:nth-child(5n) {
    margin-bottom: 2rem;
  }
  
  .tools-grid .tool-card:nth-child(5n)::after {
    content: '';
    display: block;
    height: 2rem;
  }
  
  .ad-block {
    min-height: 300px;
  }
}

/* ===== ALTERNATIVE: CARD VARIATIONS ===== */

/* Variation 1: Minimal Cards */
.tool-card.minimal {
  background: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: none;
}

.tool-card.minimal:hover {
  border-color: #007bff;
  background: #f8fbff;
}

/* Variation 2: Colored Cards */
.tool-card.colored {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 1px solid #e9ecef;
}

/* Variation 3: Bordered Cards */
.tool-card.bordered {
  border: 2px solid #e9ecef;
  box-shadow: none;
}

.tool-card.bordered:hover {
  border-color: #007bff;
  background: #fff;
}

/* ===== GRID LAYOUT OPTIONS ===== */

/* Option 1: Clean grid with ads between rows */
.grid-with-ads {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Option 2: Masonry style grid */
.masonry-grid {
  column-count: 3;
  column-gap: 1.5rem;
}

.masonry-grid .tool-card {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

/* Option 3: Flexible grid with fixed aspect ratio */
.tools-grid.fixed-ratio {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.tools-grid.fixed-ratio .tool-card {
  aspect-ratio: 4/3;
}


/* Footer */

.footer {
    background: var(--background, #fff);
    border-top: 1px solid var(--border, #97baff);
    padding: 3rem 1rem 1.5rem;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Brand Section */
.footer-brand {
    width: 100%;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--hero-gradient);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
}

.footer-logo .logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--muted-foreground, #6b7280);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

/* Newsletter */
.newsletter-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--foreground, #111827);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 300px;
}

.newsletter-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    font-size: 0.875rem;
    min-width: 0;
}

.newsletter-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

/* Links Grid */
.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    width: 100%;
}

.footer-links {
    min-width: 0;
}

.footer-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--foreground, #111827);
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-list li a {
    color: var(--muted-foreground, #6b7280);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.2s;
    display: inline-block;
}

.footer-list li a:hover {
    color: #2563eb;
}

/* Bottom Section */
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border, #e5e7eb);
}

.made-with {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--muted-foreground, #6b7280);
}

.heart-icon {
    color: #ef4444;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: var(--muted-foreground, #6b7280);
    transition: color 0.2s;
}

.footer-social a:hover {
    color: #2563eb;
}

/* Copyright */
.footer-copyright {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #e5e7eb);
    font-size: 0.75rem;
    color: var(--muted-foreground, #6b7280);
}

.footer-copyright p {
    margin-bottom: 0.5rem;
}

.footer-legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: var(--muted-foreground, #6b7280);
    text-decoration: none;
}

.footer-legal-links a:hover {
    color: #2563eb;
}

.footer-legal-links span {
    color: var(--muted-foreground, #9ca3af);
}

/* Responsive Design */
@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 3rem;
    }
    
    .footer-brand {
        flex: 0 0 250px;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        flex: 1;
    }
    
    .footer-links {
        min-width: 0;
    }
}

@media (min-width: 1024px) {
    .footer-content {
        gap: 4rem;
    }
    
    .footer-brand {
        flex: 0 0 300px;
    }
}

@media (max-width: 767px) {
    .footer {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-links-grid {
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .newsletter-form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .footer-links-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-legal-links {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .footer-legal-links span {
        display: none;
    }
}


/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Responsive Design */
/* Simple 3-column layout starting at 374px */
@media (min-width: 374px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  
  .tool-card-content {
    padding: 0.75rem;
  }
  
  .tool-title {
    font-size: 13px;
    margin-bottom: 4px;
  }
  
  .tool-description {
    font-size: 11px;
    display: none; /* Hide description on small 3-column layout */
  }
  
  .tool-icon {
    width: 28px;
    height: 28px;
  }
  
  .tool-category {
    font-size: 10px;
    padding: 2px 4px;
  }
}

/* Show description on larger screens */
@media (min-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
  
  .tool-description {
    display: block;
    font-size: 12px;
  }
  
  .tool-title {
    font-size: 16px;
  }
}



@media (min-width: 1024px) {
  .tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  
  .section-title {
    font-size: 4rem;
  }
  
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 1280px) {
  .tools-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
