/*
Theme Name: Restaurants1 - Restaurant Recommendations
Theme URI: https://restaurants1.com
Author: Restaurants1 Team
Author URI: https://restaurants1.com
Description: A modern, responsive theme for restaurant recommendations and reviews
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: restaurants1
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4

This theme is built with mobile-first responsive design principles.
*/

/* ============================================================================
   CSS Reset & Base Styles
   ============================================================================ */

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

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fafafa;
}

a {
  color: #d97757;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #b85c45;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================================================
   Typography
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  font-weight: 600;
}

h1 {
  font-size: 2rem;
}

/* Add top spacing to headings to improve layout and readability */
h1 {
  margin-top: 1rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

/* ============================================================================
   Container & Layout
   ============================================================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5rem;
}

.col {
  padding: 0 0.5rem;
}

/* Mobile-first: full width by default */
.col-1 { width: 100%; }
.col-2 { width: 100%; }
.col-3 { width: 100%; }
.col-4 { width: 100%; }
.col-6 { width: 100%; }

/* Tablet breakpoint */
@media (min-width: 768px) {
  .col-1 { width: 8.333%; }
  .col-2 { width: 16.666%; }
  .col-3 { width: 25%; }
  .col-4 { width: 33.333%; }
  .col-6 { width: 50%; }
}

/* Desktop breakpoint */
@media (min-width: 1024px) {
  .col-1 { width: 8.333%; }
  .col-2 { width: 16.666%; }
  .col-3 { width: 25%; }
  .col-4 { width: 33.333%; }
  .col-6 { width: 50%; }
}

/* ============================================================================
   Header & Navigation
   ============================================================================ */

.site-header {
  background: linear-gradient(135deg, #1f2a36 0%, #2c3e50 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: white;
  text-decoration: none;
}

.site-description {
  font-size: 0.85rem;
  opacity: 0.9;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 0;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Main Navigation */
.main-navigation {
  display: none;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

.main-navigation.active {
  display: flex;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.main-navigation li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-navigation a {
  display: block;
  color: white;
  padding: 0.75rem 0;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.main-navigation a:hover {
  opacity: 0.9;
  color: #f3c88f;
}

/* Desktop Navigation */
@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .main-navigation {
    display: flex !important;
    flex-direction: row;
    background-color: transparent;
    margin-top: 0;
  }

  .main-navigation ul {
    flex-direction: row;
    width: 100%;
  }

  .main-navigation li {
    border-bottom: none;
    margin-left: 1.5rem;
  }

  .main-navigation a {
    padding: 0;
  }
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero-section {
  background: linear-gradient(135deg, rgba(217, 119, 87, 0.9) 0%, rgba(194, 101, 74, 0.9) 100%), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23D97757" width="1200" height="600"/></svg>');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 3rem 1rem;
  text-align: center;
}

.hero-title,
.hero-content h1 {
  color: white;
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-section .btn {
  display: inline-block;
}

@media (min-width: 768px) {
  .hero-section {
    padding: 5rem 1rem;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .hero-content p {
    font-size: 1.25rem;
  }
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #d97757;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-weight: 600;
}

.btn:hover {
  background-color: #b85c45;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 87, 0.3);
}

.btn-secondary {
  background-color: #f39c12;
}

.btn-secondary:hover {
  background-color: #e67e22;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid #d97757;
  color: #d97757;
}

.btn-outline:hover {
  background-color: #d97757;
  color: white;
}

/* ============================================================================
   Post/Restaurant Cards
   ============================================================================ */

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0;
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.restaurant-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.restaurant-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.restaurant-card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background-color: #e0e0e0;
}

.restaurant-card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.restaurant-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.restaurant-card-meta {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 1rem;
}

.restaurant-location {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.restaurant-location:before {
  content: "📍";
  margin-right: 0.5rem;
}

.restaurant-category {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.restaurant-category:before {
  content: "🍽️";
  margin-right: 0.5rem;
}

.restaurant-card-excerpt {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.restaurant-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.read-more-link {
  color: #d97757;
  font-weight: 600;
  font-size: 0.9rem;
}

.post-date {
  font-size: 0.85rem;
  color: #95a5a6;
}

/* ============================================================================
   [restaurant] shortcode cards (scoped so legacy image cards are untouched)
   ============================================================================ */

.restaurant-card:has(.restaurant-card__name) {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  scroll-margin-top: 90px; /* so anchor jumps from the table clear the header */
}

.restaurant-card__name {
  font-size: 1.3rem;
  margin: 0 0 0.75rem;
  color: #2c3e50;
}

.restaurant-card__meta {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.95rem;
  color: #555;
  display: grid;
  gap: 0.3rem;
}

.restaurant-card__meta strong {
  color: #2c3e50;
}

.restaurant-card__meta a {
  color: #d97757;
  font-weight: 600;
}

.restaurant-card__description {
  color: #333;
  line-height: 1.65;
  margin: 0;
}

.restaurant-card__description p:last-child {
  margin-bottom: 0;
}

/* ============================================================================
   Content tables (at-a-glance, etc.)
   ============================================================================ */

.main-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.main-content th,
.main-content td {
  padding: 0.65rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #ececec;
}

.main-content thead th {
  background: #2c3e50;
  color: #fff;
  font-weight: 600;
}

.main-content tbody tr:nth-child(even) {
  background: #fafafa;
}

.main-content td a {
  color: #d97757;
  font-weight: 600;
}

@media (max-width: 600px) {
  /* let wide tables scroll instead of breaking the layout on phones */
  .main-content table {
    display: block;
    overflow-x: auto;
  }
}

/* ============================================================================
   Main Content
   ============================================================================ */

.site-content {
  padding: 2rem 0;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  /* Only reserve the 300px sidebar column when a sidebar is actually present.
     With no active widgets the page.php template omits the sidebar, so the
     content should use the full width instead of leaving an empty gap. */
  .content-wrapper:has(.sidebar) {
    grid-template-columns: 1fr 300px;
  }
}

.main-content {
  min-height: 400px;
}

/* ============================================================================
   Sidebar
   ============================================================================ */

.sidebar {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  height: fit-content;
}

.widget {
  margin-bottom: 2rem;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #d97757;
}

.widget ul {
  list-style: none;
}

.widget li {
  margin-bottom: 0.75rem;
}

.widget a {
  color: #d97757;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.widget a:hover {
  color: #b85c45;
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero-section {
  /* Use the uploaded image as the hero background; center-crop with cover */
  background-image: url('https://restaurants1.com/wp-content/uploads/2026/05/restaurants1.jpg');
  background-color: #c2654a; /* fallback */
  background-size: cover;
  background-position: center center; /* ensures middle of image is shown */
  background-repeat: no-repeat;
  color: white;
  padding: 3rem 1rem;
  text-align: center;
  position: relative;
  min-height: 50vh; /* reduce excessive height while keeping visual impact */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  /* subtle dark overlay to improve text contrast */
  background: linear-gradient(180deg, rgba(28,36,45,0.18), rgba(28,36,45,0.25));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 1rem;
}

.hero-title,
.hero-content h1 {
  color: white;
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

@media (min-width: 768px) {
  .hero-section {
    padding: 5rem 1rem;
    min-height: 60vh;
  }

  .hero-title,
  .hero-content h1 {
    font-size: 3rem;
  }

  .hero-content p {
    font-size: 1.25rem;
  }
}

.post-body {
  line-height: 1.8;
  color: #444;
}

.post-body p {
  margin-bottom: 1.5rem;
}

.post-body h2,
.post-body h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* ============================================================================
   Footer
   ============================================================================ */

.site-footer {
  background: linear-gradient(135deg, #1f2a36 0%, #2c3e50 100%);
  color: #ecf0f1;
  padding: 3rem 0 1rem;
  margin-top: 3rem;
}

.footer-widgets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Footer navigation (menu) styling */
.footer-navigation {
  text-align: center;
  margin-bottom: 1rem;
}

.footer-navigation .footer-menu,
.footer-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-navigation a,
.footer-navigation .footer-menu a {
  color: #ffffff;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s ease;
}

.footer-navigation a:hover,
.footer-navigation .footer-menu a:hover {
  color: #f3c88f;
}

@media (min-width: 768px) {
  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-widgets {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-widget h3 {
  color: #ecf0f1;
  margin-bottom: 1rem;
}

.footer-widget ul {
  list-style: none;
}

.footer-widget ul li {
  margin-bottom: 0.75rem;
}

.footer-widget a {
  color: #ffffff;
  transition: color 0.3s ease;
}

.footer-widget a:hover {
  color: #f3c88f;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: #bdc3c7;
}

.footer-bottom a {
  color: #ffffff;
}

/* ============================================================================
   Comments
   ============================================================================ */

.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #ecf0f1;
}

.comments-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.comment-list {
  list-style: none;
  margin-bottom: 2rem;
}

.comment-item {
  padding: 1.5rem;
  background-color: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.comment-author {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.comment-date {
  font-size: 0.85rem;
  color: #95a5a6;
  margin-bottom: 0.75rem;
}

.comment-content {
  color: #555;
  line-height: 1.6;
}

.comment-form {
  background-color: #f9f9f9;
  padding: 2rem;
  border-radius: 8px;
}

.comment-form p {
  margin-bottom: 1rem;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
}

.comment-form textarea {
  resize: vertical;
  min-height: 150px;
}

/* ============================================================================
   Search & Archive
   ============================================================================ */

.archive-header,
.search-header {
  background: linear-gradient(135deg, #2c3e50 0%, #1f2a36 100%);
  color: white;
  padding: 3rem 1rem;
  margin-bottom: 2rem;
  border-radius: 8px;
}

.archive-title,
.search-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.archive-description,
.search-description {
  font-size: 1rem;
  opacity: 0.95;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #2c3e50;
}

/* ============================================================================
   404 Page
   ============================================================================ */

.error-404 {
  text-align: center;
  padding: 4rem 1rem;
}

.error-404 h1 {
  font-size: 4rem;
  color: #d97757;
  margin-bottom: 1rem;
}

.error-404 p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ============================================================================
   Responsive Images & Media
   ============================================================================ */

@media (max-width: 767px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .site-content {
    padding: 1.5rem 0;
  }
}

/* ============================================================================
   Accessibility
   ============================================================================ */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

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

/* ============================================================================
   Utilities
   ============================================================================ */

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

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

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

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.pt-1 { padding-top: 1rem; }
.pt-2 { padding-top: 2rem; }
.pb-1 { padding-bottom: 1rem; }
.pb-2 { padding-bottom: 2rem; }

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
