/* ================================
   BRIAN TEMPLETON BOOKS - CSS
   Green & White Brand Theme
   ================================ */

/* ----------------
   BASE RESET
   ---------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----------------
   TYPOGRAPHY
   ---------------- */

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--brand-green-dark);
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.3px;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

/* Paragraphs */
p {
  margin-bottom: 1.25rem;
  color: var(--text-gray);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Links */
a {
  color: var(--brand-green-medium);
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
  color: var(--brand-green-dark);
  opacity: 0.85;
}

/* Quotes */
blockquote {
  font-style: italic;
  font-size: 1.2rem;
  color: var(--brand-green-dark);
  border-left: 4px solid var(--brand-green-medium);
  padding-left: 1.5rem;
  margin: 2rem 0;
  line-height: 1.6;
}

/* Strong/Bold */
strong, b {
  font-weight: 600;
  color: var(--brand-green-dark);
}

/* Emphasis */
em, i {
  font-style: italic;
}

/* ----------------
   LAYOUT
   ---------------- */

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Sections */
section {
  padding: 80px 0;
}

section.hero {
  padding: 120px 0;
}

/* ----------------
   HEADER/NAVIGATION
   ---------------- */

header {
  background-color: var(--white);
  border-bottom: 1px solid var(--medium-gray);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-light);
}

.site-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brand-green-dark);
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

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

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

nav a:hover,
nav a.active {
  color: var(--brand-green-dark);
}

/* ----------------
   BUTTONS
   ---------------- */

.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: 'Georgia', serif;
}

/* Primary Button - Green */
.btn-primary {
  background-color: var(--brand-green-dark);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--brand-green-medium);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* Secondary Button - Outline */
.btn-secondary {
  background-color: transparent;
  color: var(--brand-green-dark);
  border: 2px solid var(--brand-green-dark);
}

.btn-secondary:hover {
  background-color: var(--brand-green-dark);
  color: var(--white);
}

/* Light Button - For dark backgrounds */
.btn-light {
  background-color: var(--white);
  color: var(--brand-green-dark);
}

.btn-light:hover {
  background-color: var(--brand-green-pale);
}

/* ----------------
   HERO SECTION
   ---------------- */

.hero {
  background: linear-gradient(135deg, var(--brand-green-pale) 0%, var(--white) 100%);
  text-align: center;
  padding: 120px 20px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--brand-green-dark);
}

.hero p {
  font-size: 1.3rem;
  color: var(--text-gray);
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* ----------------
   BOOK CARDS
   ---------------- */

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  padding: 40px 0;
}

.book-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.book-cover {
  width: 100%;
  height: auto;
  display: block;
}

.book-details {
  padding: 30px;
}

.book-title {
  font-size: 1.5rem;
  color: var(--brand-green-dark);
  margin-bottom: 0.5rem;
}

.book-description {
  font-size: 1rem;
  color: var(--text-gray);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.book-meta {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 1.5rem;
}

/* ----------------
   BLOG/POSTS
   ---------------- */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  padding: 40px 0;
}

.blog-post-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.post-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.post-content {
  padding: 25px;
}

.post-title {
  font-size: 1.3rem;
  color: var(--brand-green-dark);
  margin-bottom: 0.75rem;
}

.post-date {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 1rem;
}

.post-excerpt {
  font-size: 1rem;
  color: var(--text-gray);
  line-height: 1.6;
}

/* ----------------
   ABOUT SECTION
   ---------------- */

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.author-photo {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-medium);
  margin-bottom: 30px;
}

.testimonials {
  background-color: var(--light-gray);
  padding: 60px 30px;
  border-radius: 8px;
  margin-top: 60px;
}

.testimonial {
  background-color: var(--white);
  padding: 30px;
  border-radius: 6px;
  margin-bottom: 20px;
  border-left: 4px solid var(--brand-green-medium);
}

.testimonial-text {
  font-style: italic;
  color: var(--text-gray);
  margin-bottom: 15px;
}

.testimonial-author {
  font-weight: 600;
  color: var(--brand-green-dark);
  font-size: 0.95rem;
}

/* ----------------
   FOOTER
   ---------------- */

footer {
  background-color: var(--brand-green-dark);
  color: var(--white);
  padding: 50px 20px 30px;
  text-align: center;
}

footer h3 {
  color: var(--white);
  margin-bottom: 20px;
}

footer a {
  color: var(--white);
  text-decoration: none;
}

footer a:hover {
  color: var(--brand-green-light);
  opacity: 1;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
  margin: 25px 0;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
}

.copyright {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ----------------
   UTILITY CLASSES
   ---------------- */

.text-center {
  text-align: center;
}

.text-green {
  color: var(--brand-green-dark);
}

.bg-green {
  background-color: var(--brand-green-dark);
  color: var(--white);
}

.bg-green-light {
  background-color: var(--brand-green-pale);
}

.bg-light {
  background-color: var(--light-gray);
}

.bg-white {
  background-color: var(--white);
}

.mb-small {
  margin-bottom: 1rem;
}

.mb-medium {
  margin-bottom: 2rem;
}

.mb-large {
  margin-bottom: 3rem;
}

.mt-small {
  margin-top: 1rem;
}

.mt-medium {
  margin-top: 2rem;
}

.mt-large {
  margin-top: 3rem;
}

/* ----------------
   MOBILE OPTIMIZATION
   ---------------- */

/* Tablet and below (768px) */
@media (max-width: 768px) {
  
  /* Typography */
  html {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.4rem;
  }
  
  /* Hero */
  .hero {
    padding: 80px 20px;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  /* Sections */
  section {
    padding: 60px 0;
  }
  
  /* Navigation */
  nav ul {
    gap: 20px;
    flex-direction: column;
    align-items: center;
  }
  
  /* Books Grid */
  .books-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  /* Blog Grid */
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  /* Buttons */
  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    width: 100%;
    max-width: 300px;
  }
  
  /* Container */
  .container,
  .container-narrow {
    padding: 0 15px;
  }
  
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  
  html {
    font-size: 14px;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .hero {
    padding: 60px 15px;
  }
  
  .hero h1 {
    font-size: 1.9rem;
  }
  
  section {
    padding: 40px 0;
  }
  
  .book-details,
  .post-content {
    padding: 20px;
  }
  
  blockquote {
    font-size: 1.1rem;
    padding-left: 1rem;
  }
  
}

/* ----------------
   ACCESSIBILITY
   ---------------- */

/* Focus states for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 3px solid var(--brand-green-medium);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--brand-green-dark);
  color: var(--white);
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* ----------------
   ANIMATIONS
   ---------------- */

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Smooth transitions */
.smooth-transition {
  transition: all 0.3s ease;
}

/* ----------------
   PRINT STYLES
   ---------------- */

@media print {
  header,
  footer,
  nav,
  .btn,
  .no-print {
    display: none !important;
  }
  
  body {
    color: #000;
    background: #fff;
  }
  
  a {
    text-decoration: underline;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
}