/*
Theme Name: Rick's Bar
Theme URI: https://www.ricks-bar.com/
Author: MSP (User)
Description: A modern, responsive WordPress theme for Rick's Bar in Fargo. This theme retains the original colour palette and branding while offering a clean layout, improved typography and subtle animations. It includes a custom navigation menu, mobile-friendly design and custom post types for events and specials so the bar can easily update their offerings.
Version: 1.0
License: GPLv2 or later
Text Domain: ricks-bar
*/

/*
 * Root colour variables. Adjusting these values will update the theme's
 * colour palette globally. Colours are chosen to echo the beige and rich
 * red tones from the original site while providing better contrast and
 * readability on modern screens.
 */
:root {
  --primary-color: #8E000F;       /* dark red accent colour */
  --secondary-color: #d8d1b5;     /* warm beige used for navigation and cards */
  --background-color: #f8f5ea;    /* light beige page background */
  --text-color: #33211d;          /* dark brown for readable body text */
  --heading-font: 'Cinzel', serif;
  --body-font: 'Open Sans', sans-serif;
  --transition-speed: 0.3s;
}

/* ------------------------------------------------------------------ */
/* Additional rules to refine imagery and form presentation             */
/* ------------------------------------------------------------------ */

/* Remove the default checkerboard transparency pattern on uploaded
   PNGs and ensure transparent areas blend with the site palette. */
.entry-content img,
.page-content img,
.wp-block-image img {
  background-color: var(--secondary-color);
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 4px;
}

/* Contact form container */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--secondary-color);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.contact-form .form-field {
  margin-bottom: 1rem;
}
.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  background-color: #fff;
  font-family: var(--body-font);
  font-size: 1rem;
  resize: vertical;
}
.contact-form textarea {
  min-height: 150px;
}
.contact-form button {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}
.contact-form button:hover,
.contact-form button:focus {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

/* Success and error messages for contact form */
.success-message {
  background-color: #dff0d8;
  border: 1px solid #c3e6cb;
  color: #3c763d;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.error-messages {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* Global resets and typography */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--background-color);
  font-family: var(--body-font);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  color: var(--primary-color);
  margin-top: 0;
}

p {
  margin: 0 0 1.2rem 0;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}
a:hover,
a:focus {
  color: darken(var(--primary-color), 15%);
}

/* Utility classes */
.button {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}
.button:hover,
.button:focus {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}
.button.small {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
}

/* Navigation bar */
header {
  position: relative;
  z-index: 1000;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--primary-color);
  padding: 1rem 2rem;
  color: var(--secondary-color);
  position: relative;
}
.navbar .logo img {
  height: 60px;
  width: auto;
}
.navbar ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}
.navbar li {
  margin-left: 1rem;
}
.navbar a {
  color: var(--secondary-color);
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.navbar a:hover,
.navbar a:focus {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

/* Hamburger toggle for mobile */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  color: var(--secondary-color);
  cursor: pointer;
  border: none;
  background: transparent;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--background-color) 100%);
  position: relative;
  overflow: hidden;
  animation: fadeInUp var(--transition-speed) ease-out;
}
.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.2rem;
  max-width: 650px;
  margin: 0 auto;
  color: var(--text-color);
}

/* Hero image styling: ensures the new hero graphic scales nicely on all
   screen sizes and separates it from the heading and tagline. */
.hero-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section styling */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem;
}
.section h2 {
  margin-bottom: 2rem;
  font-size: 2.5rem;
  text-align: center;
}
.card {
  background-color: var(--secondary-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  margin-bottom: 2rem;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.card-image img {
  width: 100%;
  border-radius: 6px 6px 0 0;
}
.card-content {
  padding: 1rem 0;
}
.card-title {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}
.card-excerpt {
  margin-bottom: 1rem;
  color: var(--text-color);
}

/* Grid layouts for archives */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Page content */
.page-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.page-content .content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1rem;
}

/* Footer styling */
footer {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  text-align: center;
  padding: 2rem 1rem;
}
footer p {
  margin: 0;
  font-size: 0.9rem;
}

/* Responsive behaviour */
@media (max-width: 768px) {
  .navbar ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    flex-direction: column;
    display: none;
    margin-top: 0.5rem;
  }
  .navbar ul.active {
    display: flex;
  }
  .navbar li {
    margin: 0;
    text-align: center;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .menu-toggle {
    display: block;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
}