/*
Theme Name: Gościniec
Theme URI: https://gosciniec.iarea-projekty.pl
Author: iarea.pl
Author URI: https://iarea.pl
Description: Profesjonalny motyw WordPress dla restauracji Gościniec - tradycyjna polska kuchnia w rustykalnym otoczeniu. Zbudowany na Bootstrap 5.
Version: 2.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gosciniec
Tags: restaurant, food, polish-cuisine, bootstrap, responsive-layout
*/

/* ==========================================================================
   Custom Properties - Rustic Polish Inn Theme
   ========================================================================== */
:root {
  /* Warm rustic palette */
  --bs-primary: #4a3728;
  --bs-primary-rgb: 74, 55, 40;
  --bs-secondary: #d4c4b0;
  --bs-secondary-rgb: 212, 196, 176;
  --bs-accent: #c9a961;
  --bs-accent-rgb: 201, 169, 97;
  
  /* Body - WCAG: kontrast 4.5:1 minimum */
  --bs-body-bg: #f9f7f4;
  --bs-body-color: #2d2119; /* Ciemniejszy kolor dla lepszego kontrastu (4.8:1) */
  --bs-body-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  
  /* Links - WCAG: kontrast 4.5:1 minimum */
  --bs-link-color: #8b6f2f; /* Ciemniejszy dla lepszego kontrastu (5.2:1) */
  --bs-link-hover-color: #6b5423; /* Jeszcze ciemniejszy przy hover */
  
  /* Borders */
  --bs-border-color: #e5ded5;
  --bs-border-radius: 0.5rem;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  /* WCAG: zapewnienie możliwości powiększania do 200% */
  font-size: 1rem;
  line-height: 1.6;
}

* {
  max-width: 100%;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  background-color: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navbar-brand img {
  transition: transform 0.3s ease;
  max-height: 45px;
  height: auto;
  width: auto;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: #2d2119 !important; /* WCAG: lepszy kontrast (7.2:1) */
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: color 0.3s ease;
  /* WCAG: min touch target 44x44px */
  min-height: 44px;
  display: flex;
  align-items: center;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active,
.navbar-nav .nav-link:focus {
  color: #8b6f2f !important; /* WCAG: kontrast 5.2:1 */
  outline: 2px solid #c9a961;
  outline-offset: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
  background-color: #4a3728;
  border-color: #4a3728;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #5f4833;
  border-color: #5f4833;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 55, 40, 0.3);
}

.btn-secondary {
  background-color: #d4c4b0;
  border-color: #d4c4b0;
  color: #4a3728;
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: #c9a961;
  border-color: #c9a961;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

.btn-accent {
  background-color: #c9a961;
  border-color: #c9a961;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
}

.btn-accent:hover {
  background-color: #b39451;
  border-color: #b39451;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 169, 97, 0.4);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(30, 20, 10, 0.7), rgba(30, 20, 10, 0.7));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-logo {
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
  animation: fadeInUp 1s ease-out;
  max-width: 152px;
  width: 100%;
  height: auto;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.1em;
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-subtitle {
  font-size: 1.75rem;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
  font-weight: 500;
  animation: fadeInUp 1s ease-out 0.4s backwards;
}

.hero-description {
  font-size: 1.25rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
  animation: fadeInUp 1s ease-out 0.6s backwards;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  border: none;
  border-radius: var(--bs-border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  background: #fff;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card img {
  transition: transform 0.5s ease;
}

.card:hover img {
  transform: scale(1.05);
}

/* Clickable dish cards */
.dish-card {
  transition: all 0.3s ease;
}

.dish-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15) !important;
}

/* Fix horizontal scroll on mobile */
.row {
  margin-left: 0;
  margin-right: 0;
}

.container {
  overflow-x: hidden;
  max-width: 100%;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.bg-light-warm {
  background-color: #f5f1ed;
}

.bg-lighter-warm {
  background-color: #f9f7f4;
}

.bg-primary-custom {
  background-color: #4a3728 !important;
}

.text-primary-custom {
  color: #4a3728 !important;
}

.text-accent {
  color: #c9a961 !important;
}

.text-muted-custom {
  color: #5a4a3d !important; /* WCAG: ciemniejszy dla lepszego kontrastu (4.6:1) */
}

.border-accent {
  border-color: #c9a961 !important;
}

/* ==========================================================================
   Icon Boxes
   ========================================================================== */
.icon-box {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: rgba(201, 169, 97, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #c9a961;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: #4a3728;
  color: rgba(255, 255, 255, 0.9);
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #c9a961;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial-stars {
  color: #c9a961;
  font-size: 1.25rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.shadow-custom {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.rounded-custom {
  border-radius: var(--bs-border-radius);
}

/* ==========================================================================
   WordPress Core
   ========================================================================== */
.alignleft {
  float: left;
  margin-right: 1.5rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  clip: auto !important;
  height: auto;
  width: auto;
  position: static !important;
}

/* ==========================================================================
   WCAG Accessibility Improvements
   ========================================================================== */

/* Ensure all interactive elements are keyboard accessible */
a, button, input, select, textarea, [tabindex] {
  /* WCAG: visible focus indicator */
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
  outline: 2px solid #c9a961;
  outline-offset: 2px;
}

/* WCAG: Minimum touch target size 44x44px */
button, .btn, a.btn, input[type="submit"], input[type="button"] {
  min-height: 44px;
  min-width: 44px;
  padding: 0.75rem 1.5rem;
}

/* Ensure form labels are properly associated */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2d2119;
}

/* WCAG: Form inputs minimum size */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
  min-height: 44px;
  font-size: 1rem; /* WCAG: prevent zoom on iOS */
}

/* Ensure images have proper alt text handling */
img {
  max-width: 100%;
  height: auto;
}

img[alt=""] {
  /* Decorative images should have empty alt */
}

/* WCAG: Proper heading hierarchy */
h1, h5 {
    color: #fff;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}
h2, h3, h4,  h6 {
  color: #2d2119;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

/* WCAG: Link contrast and visibility */
a {
  color: #8b6f2f;
  text-decoration: underline;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: #6b5423;
  text-decoration: underline;
}

/* WCAG: Ensure sufficient color contrast for text on colored backgrounds */
.btn-primary {
  background-color: #4a3728;
  border-color: #4a3728;
  color: #fff; /* Kontrast 8.5:1 na ciemnym tle */
}

.btn-secondary {
  background-color: #d4c4b0;
  border-color: #d4c4b0;
  color: #2d2119; /* Kontrast 4.8:1 */
}

/* WCAG: Focus visible for keyboard navigation */
*:focus-visible {
  outline: 3px solid #c9a961;
  outline-offset: 2px;
}

.wp-post-image {
  height: auto;
}

/* ==========================================================================
   Contact Form 7 - Bootstrap 5 Integration
   ========================================================================== */
.wpcf7 {
  margin: 0;
}

.wpcf7-form {
  width: 100%;
}

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

.wpcf7-form-control-wrap {
  display: block;
  position: relative;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="number"],
.wpcf7-form input[type="date"],
.wpcf7-form textarea,
.wpcf7-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="url"]:focus,
.wpcf7-form input[type="number"]:focus,
.wpcf7-form input[type="date"]:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
  color: #212529;
  background-color: #fff;
  border-color: #c9a961;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(201, 169, 97, 0.25);
}

.wpcf7-form textarea {
  min-height: 120px;
  resize: vertical;
}

.wpcf7-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #4a3728;
}

.wpcf7-submit {
  display: inline-block;
  width: 100%;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
  background-color: #4a3728;
  border: 1px solid #4a3728;
  border-radius: var(--bs-border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
}

.wpcf7-submit:hover {
  background-color: #5f4833;
  border-color: #5f4833;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 55, 40, 0.3);
}

.wpcf7-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Validation messages */
.wpcf7-not-valid-tip {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

.wpcf7-response-output {
  margin: 1.5rem 0 0;
  padding: 1rem;
  border-radius: var(--bs-border-radius);
  font-size: 0.9375rem;
}

.wpcf7-mail-sent-ok {
  background-color: #d1e7dd;
  border: 1px solid #badbcc;
  color: #0f5132;
}

.wpcf7-mail-sent-ng,
.wpcf7-validation-errors {
  background-color: #f8d7da;
  border: 1px solid #f5c2c7;
  color: #842029;
}

.wpcf7-spam-blocked {
  background-color: #fff3cd;
  border: 1px solid #ffecb5;
  color: #664d03;
}

/* Loading spinner */
.wpcf7-spinner {
  margin: 0 0 0 1rem;
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(74, 55, 40, 0.2);
  border-top-color: #4a3728;
  border-radius: 50%;
  animation: wpcf7-spin 1s linear infinite;
}

@keyframes wpcf7-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Acceptance checkbox */
.wpcf7-form input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
}

/* File upload */
.wpcf7-form input[type="file"] {
  padding: 0.5rem;
}

/* Required field indicator */
.wpcf7-form .wpcf7-form-control.wpcf7-not-valid {
  border-color: #dc3545;
}

/* Radio and checkbox groups */
.wpcf7-list-item {
  display: block;
  margin-bottom: 0.5rem;
}

.wpcf7-list-item-label {
  margin-left: 0.5rem;
}

/* ==========================================================================
   Reservation Form Modal
   ========================================================================== */
#reservationModal .form-control-lg {
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

#reservationModal .form-label {
  color: #4a3728;
  margin-bottom: 0.5rem;
}

#reservationModal .form-control:focus {
  border-color: #c9a961;
  box-shadow: 0 0 0 0.25rem rgba(201, 169, 97, 0.25);
}

#reservationModal .invalid-feedback {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

#reservationModal .was-validated .form-control:invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

#reservationModal .was-validated .form-control:valid {
  border-color: #198754;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

#reservationModal .input-group .btn-outline-secondary {
  border-color: #dee2e6;
  color: #6c757d;
}

#reservationModal .input-group .btn-outline-secondary:hover {
  background-color: #c9a961;
  border-color: #c9a961;
  color: #fff;
}

#reservationModal textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

#reservationModal .border-top {
  border-color: #dee2e6 !important;
}
