/*
 * Main stylesheet for AI Text Humanizer
 *
 * This file defines a modern, approachable look for the web site.
 * It employs an animated gradient background, card‑like containers,
 * subtle shadows, smooth transitions and responsive layouts.
 */

/* Base styles and variables */
:root {
  --primary-color: #6c63ff;
  --secondary-color: #ff6f61;
  --accent-color: #fbb13c;
  --text-color: #222;
  --bg-color: #ffffff;
  --bg-gradient-start: #8e2de2;
  --bg-gradient-end: #4a00e0;
  --container-max-width: 1200px;
  --border-radius: 0.75rem;
  --transition-duration: 0.3s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Animated background gradient */
body {
  margin: 0;
  padding: 0;
  color: var(--text-color);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Layout containers */
.container {
  width: 90%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

header nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem 0;
}

header nav a {
  color: var(--bg-color);
  text-decoration: none;
  font-weight: bold;
  position: relative;
  padding: 0.5rem;
}

header nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width var(--transition-duration) ease;
}

header nav a:hover::after {
  width: 100%;
}

h1, h2, h3 {
  color: var(--primary-color);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  text-align: center;
}

/* Form styles */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

textarea {
  width: 100%;
  min-height: 150px;
  padding: 1rem;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  resize: vertical;
  font-size: 1rem;
  font-family: inherit;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.options label {
  margin-right: 0.25rem;
  font-weight: 600;
}

select {
  padding: 0.5rem;
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  font-family: inherit;
}

button {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background var(--transition-duration) ease;
  align-self: start;
}

button:hover {
  background: var(--secondary-color);
}

/* Article content styles */
article p {
  margin-bottom: 1.25rem;
  text-align: justify;
}

article ul {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}

article li {
  margin-bottom: 0.5rem;
}

.list-block {
  background: #f3f4f7;
  padding: 1rem;
  border-left: 4px solid var(--primary-color);
  border-radius: var(--border-radius);
}

.table-block {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.table-block table {
  width: 100%;
  border-collapse: collapse;
}

.table-block th,
.table-block td {
  padding: 0.75rem;
  border: 1px solid #ddd;
  text-align: left;
}

.table-block th {
  background: var(--primary-color);
  color: #fff;
}

figure {
  margin: 1.5rem 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

figcaption {
  margin-top: 0.5rem;
  font-style: italic;
  color: #555;
}

blockquote {
  background: #f9f9f9;
  border-left: 4px solid var(--secondary-color);
  padding: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
}

.highlight {
  background: var(--accent-color);
  color: #fff;
  padding: 1rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  margin: 1.5rem 0;
}

/* Video block */
.video-block {
  position: relative;
  margin: 2rem 0;
  text-align: center;
}

.video-block img {
  width: 100%;
  max-width: 640px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.video-block .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 50%;
  pointer-events: none;
}

/* FAQ section */
.faq-section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.faq-item {
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: #f3f4f7;
  transition: background var(--transition-duration) ease;
}

.faq-item:hover {
  background: #e8eaf6;
}

.faq-item .question {
  padding: 1rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

.faq-item .question::after {
  content: '+';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  transition: transform var(--transition-duration) ease;
}

.faq-item.active .question::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-item .answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-duration) ease;
  padding: 0 1rem;
}

.faq-item.active .answer {
  max-height: 500px;
  padding-bottom: 1rem;
}

/* Forms on the contact page */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  padding: 0.5rem;
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  font-family: inherit;
}

footer {
  text-align: center;
  padding: 1.5rem 0;
  color: #fff;
}

/* Responsive layout tweaks */
@media (max-width: 768px) {
  .options {
    flex-direction: column;
    align-items: flex-start;
  }
  .faq-item .question::after {
    right: 0.75rem;
  }
}

/* Image gallery styles */
.image-gallery {
  margin: 2rem 0;
  text-align: center;
}

.image-gallery h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.gallery img {
  width: 32%;
  min-width: 200px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-duration) ease;
}

.gallery img:hover {
  transform: translateY(-6px);
}