/*
 * Stylesheet for Tardis Garden website
 * This file defines the colours, layout and responsive styling for the site.
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');

/* Colour palette inspired by the TARDIS and deep space */
:root {
  --primary-color: #0b3d91; /* deep tardis blue */
  --secondary-color: #001f5b; /* darker blue for footer */
  --accent-color: #007acc; /* vibrant blue accent */
  --background-color: #070d1c; /* midnight sky */
  --text-color: #f0f8ff; /* almost white text */
  --card-bg: rgba(255, 255, 255, 0.06); /* translucent card background */
  --card-border: rgba(255, 255, 255, 0.1); /* subtle border */
}

/* Global styles */
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Navigation bar */
nav {
  background-color: var(--primary-color);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

nav .logo {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 1px;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}

nav li {
  margin: 0;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--accent-color);
}

/* Hero section on index page */
.hero {
  height: calc(100vh - 70px);
  background-image: url('images/tardis-background.png'),
    linear-gradient(to bottom right, rgba(0, 0, 51, 0.7), rgba(0, 0, 0, 0.9));
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero .cta {
  padding: 0.75rem 1.5rem;
  background-color: var(--accent-color);
  color: #fff;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.hero .cta:hover {
  background-color: #005fa3;
}

/* Container used across pages */
.container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Generic card styling for diary entries and other blocks */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
}

.card img {
  width: 100%;
  border-radius: 10px;
  max-height: 300px;
  object-fit: cover;
  margin-bottom: 1rem;
}

/* Form elements */
.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

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

.form-group input,
.form-group textarea {
  padding: 0.5rem;
  border-radius: 5px;
  border: none;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 0 0 5px var(--accent-color);
}

button.submit-btn {
  padding: 0.75rem 1.5rem;
  background-color: var(--accent-color);
  border: none;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button.submit-btn:hover {
  background-color: #005fa3;
}

/* Gallery grid layout */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Diary entry layout */
.diary-entry {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.diary-entry img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
}

.diary-entry .entry-text {
  flex: 1;
  min-width: 200px;
}

/* Footer styling */
footer {
  background-color: var(--secondary-color);
  color: var(--text-color);
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}

/* Contact form container */
.contact-form {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
}

.contact-form button {
  width: 100%;
}