/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

:root {
  --primary-color: #ff6600;
  --secondary-color: #222;
  --accent-color: #0072ff;
  --light-bg: #f9f9f9;
  --white: #ffffff;
  --text-dark: #333333;
  --text-medium: #555555;
  --text-light: #777777;
  --border-color: #e6e6e6;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
}

/* Body Styling */
html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  background-color: var(--light-bg);
  color: var(--text-dark);
  line-height: 1.6;
}

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Form Section */
.container {
  background-color: var(--white);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 700px;
  margin-bottom: 50px;
  transition: var(--transition);
}

.container:hover {
  box-shadow: var(--shadow-lg);
}

.form-header {
  margin-bottom: 30px;
}

.form-header h1 {
  color: var(--text-dark);
  font-size: 2.2rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 15px;
}

.form-header h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.file-input-box, .text-input-box, .textarea-container {
  position: relative;
}

label {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
  color: var(--text-medium);
  transition: var(--transition);
}

input[type="text"], textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #f8f9fa;
  transition: var(--transition);
}

input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 114, 255, 0.1);
  background-color: var(--white);
}

textarea {
  height: 180px;
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

/* Custom file input styling */
.file-input-box {
  position: relative;
}

.file-input-box label {
  display: block;
  margin-bottom: 10px;
}

.file-input-box input[type="file"] {
  position: relative;
  width: 100%;
  height: 45px;
  opacity: 0;
  z-index: 2;
  cursor: pointer;
}

.file-input-box::after {
  content: 'Choose a file...';
  position: absolute;
  top: 33px;
  left: 0;
  width: 100%;
  height: 45px;
  padding: 12px 20px;
  background: #f8f9fa;
  color: var(--text-medium);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
}

.file-input-box::before {
  content: 'Browse';
  position: absolute;
  top: 33px;
  right: 0;
  background: var(--accent-color);
  color: white;
  padding: 12px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  pointer-events: none;
  z-index: 3;
  height: 45px;
  display: flex;
  align-items: center;
}

button[type="submit"] {
  background-color: var(--primary-color);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
}

button[type="submit"]:hover {
  background-color: darken(var(--primary-color), 10%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.2);
}

/* Posts Section */
.blog-posts {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.post-card {
  display: flex;
  align-items: center;
  background-color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.post-card img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
}

.post-card .content {
  padding: 25px 30px;
  flex-grow: 1;
}

.post-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.3;
}

.post-card p {
  margin-bottom: 8px;
  color: var(--text-medium);
  font-size: 0.95rem;
}

.post-card .date,
.post-card .author {
  display: flex;
  align-items: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.post-card .date strong,
.post-card .author strong {
  margin-right: 8px;
  font-weight: 500;
}

.post-card a {
  display: inline-block;
  margin-top: 15px;
  background-color: var(--accent-color);
  color: white;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
}

.post-card a:hover {
  background-color: darken(var(--accent-color), 10%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 114, 255, 0.2);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .container {
    padding: 30px 20px;
  }
  
  .post-card {
    flex-direction: column;
  }
  
  .post-card img {
    width: 100%;
    height: 200px;
  }
  
  .post-card .content {
    padding: 20px;
    width: 100%;
  }
  
  .form-header h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  main {
    padding: 20px 15px;
  }
  
  .container {
    padding: 25px 15px;
  }
  
  .form-header h1 {
    font-size: 1.6rem;
  }
  
  .post-card h2 {
    font-size: 1.3rem;
  }
  
  .file-input-box::before {
    content: '';
    display: none;
  }
  
  .file-input-box::after {
    content: 'Upload file';
    justify-content: center;
  }
}