/* style.css */

/* CSS Variables for consistency */
:root {
  --primary-color: #007BFF;
  --primary-color-dark: #0056b3;
  --background-color: #f5f5f5;
  --text-color: #333;
  --header-bg: #333;
  --footer-bg: #222;
  --header-text: #fff;
  --footer-text: #fff;
  --transition-duration: 0.3s;
  --border-radius: 8px;
}

/* Global resets and body styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  padding-top: 80px;  /* Header space */
  padding-bottom: 80px; /* Footer space */
}

/* Header styling */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--header-bg);
  color: var(--header-text);
  padding: 15px 20px;
  z-index: 1000;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

header h1 {
  font-size: 1.8em;
  margin-bottom: 5px;
}

/* Header h2 inherits white from header; remove/comment it in index.php if not needed */
header h2 {
  font-size: 1.2em;
  margin-bottom: 10px;
  color: var(--header-text);
}

/* Language selector styling */
nav select {
  padding: 8px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1em;
}

/* Main content area */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Section styling */
section {
  background-color: #fff;
  margin: 20px 0;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-duration) ease, box-shadow var(--transition-duration) ease;
}

section:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

section h2 {
  margin-bottom: 15px;
}

/* Form styling */
form {
  margin: 20px 0;
  text-align: center;
}

form input[type="file"] {
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
}

form button {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background var(--transition-duration) ease;
}

form button:hover {
  background-color: var(--primary-color-dark);
}

/* Filter preview container */
.filter-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.filter-preview {
  text-align: center;
  padding: 10px;
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-duration) ease, box-shadow var(--transition-duration) ease;
  cursor: pointer;
}

.filter-preview:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.filter-preview img {
  max-width: 150px;
  border-radius: var(--border-radius);
  transition: transform var(--transition-duration) ease;
}

.filter-preview:hover img {
  transform: scale(1.05);
}

.filter-preview p {
  margin-top: 10px;
  font-size: 1em;
}

/* Error message styling */
.error {
  color: red;
  font-weight: bold;
  text-align: center;
  margin: 10px 0;
}

/* Footer styling */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 15px;
  text-align: center;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
}

/* Responsive styling */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.5em;
  }
  header h2 {
    font-size: 1em;
  }
  main {
    padding: 15px;
  }
  .filter-container {
    flex-direction: column;
    align-items: center;
  }
}
