/* Base styles for Fiesta Pizza website */

/* CSS Variables for easy theming */
:root {
  --color-accent: #d33f49; /* warm red */
  --color-secondary: #f7b32b; /* golden yellow */
  --color-dark: #2f2f2f; /* dark text */
  --color-light: #ffffff; /* light background */
  --color-muted: #f5f5f5; /* muted section background */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --max-width: 1100px;
  --radius: 6px;
}

/* Reset some default styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover,
a:focus {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-accent);
  color: white;
  padding: 8px 12px;
  z-index: 100;
  transition: top 0.3s;
}
.skip-link:focus {
  top: 0;
}

/* Containers */
.container {
  max-width: var(--max-width);
  width: 90%;
  margin: 0 auto;
  padding: 3rem 0;
}

/* Buttons */
.button {
  display: inline-block;
  background-color: var(--color-accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease-in-out;
}
.button.small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}
.button:hover,
.button:focus {
  background-color: #b72e38;
  text-decoration: none;
  outline: 2px solid var(--color-secondary);
}

/* Header */
.site-header {
  background-color: var(--color-light);
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 50;
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.nav-link {
  color: var(--color-dark);
  font-weight: 500;
  padding: 0.5rem;
}
.nav-link:hover,
.nav-link:focus {
  color: var(--color-accent);
}

.order-nav-link {
  background: var(--color-accent);
  color: white;
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
}
.order-nav-link:hover,
.order-nav-link:focus {
  background: #b72e38;
  color: white;
}

/* Hero */
.hero {
  position: relative;
  background-image: url('../assets/hero-bg.png');
  background-size: cover;
  background-position: center;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-overlay {
  background: rgba(0, 0, 0, 0.5);
  padding: 2rem;
  border-radius: var(--radius);
  color: white;
}
.hero-title {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}
.hero-cta {
  font-size: 1.1rem;
}

/* Highlights */
.highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  background-color: var(--color-muted);
  padding: 2rem 1rem;
  border-radius: var(--radius);
}
.highlight-item {
  flex: 1 1 250px;
  text-align: center;
  padding: 1rem;
}
.highlight-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.highlight-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.highlight-desc {
  font-size: 0.95rem;
  margin: 0;
}

/* Section titles */
.section-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--color-dark);
}

/* Cards (Popular section) */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background-color: var(--color-light);
  border: 1px solid #eee;
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}
.card-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  color: var(--color-accent);
}
.card-desc {
  font-size: 0.9rem;
  flex-grow: 1;
}
.card-price {
  font-weight: bold;
  margin: 0.5rem 0;
}

/* Trust section */
.trust {
  text-align: center;
  background-color: var(--color-muted);
  padding: 2rem 1rem;
  border-radius: var(--radius);
  margin-top: 2rem;
}
.rating {
  font-size: 1.5rem;
  color: var(--color-secondary);
  margin: 0.5rem 0;
}
.trust-desc {
  margin-bottom: 1rem;
}
.map-link {
  font-weight: 600;
  text-decoration: underline;
}

/* Footer */
.site-footer {
  background-color: #1d1d1d;
  color: #ddd;
  padding: 2rem 0;
  margin-top: auto;
}
.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-section {
  flex: 1 1 200px;
}
.footer-section h3 {
  color: var(--color-secondary);
  margin-top: 0;
}
.footer-section a {
  color: #ddd;
}
.footer-section a:hover,
.footer-section a:focus {
  color: var(--color-secondary);
  text-decoration: none;
}
.newsletter input[type="email"] {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid #666;
}
.newsletter .form-message {
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
/* Error messages */
.form-message.error,
.newsletter .error {
  color: #e45555;
}
.privacy-note {
  font-size: 0.75rem;
  text-align: center;
  margin-top: 2rem;
  color: #aaa;
}

/* Floating Order button on mobile */
.floating-order {
  display: none;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 100;
  background-color: var(--color-accent);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
@media (max-width: 700px) {
  .floating-order {
    display: block;
  }
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Error pages */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}
.error-page h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--color-accent);
}
.error-page p {
  margin-bottom: 2rem;
}