/* CSS Custom Properties */
:root {
  /* Font family variables */
  --primary-font: "Inter", sans-serif;
  --secondary-font: "Macondo", cursive;
  /* Color variables */
   --primary-color: #3D1E05;
   --secondary-color: #aa9581;
   --highlight-color: #416a8e;
   --light-highlight-color: #7a9fc2;
}

/* Inter Font Styles - Various font weights for Inter font */
.inter-regular {
  font-family: "Inter";
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.inter-medium {
  font-family: "Inter";
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

.inter-semibold {
  font-family: "Inter";
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}

.inter-bold {
  font-family: "Inter";
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
}

/* Global Styles */
/* Apply Inter font to the entire page */
body {
  font-family: var(--primary-font);
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

/* Typography */
h1, h2, h3 {
    font-family: var(--secondary-font);
    color: var(--primary-color);
}

h1 {
    text-transform: uppercase;
}

/* Layout */
.section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Utility Classes */
/* Sub-heading color class */
.sub-heading-color {
  color: var(--highlight-color);
}

/* Macondo Font Style - Utility class for applying Macondo font */
.macondo-regular {
  font-family: "Macondo", cursive;
  font-weight: 400;
  font-style: normal;
}

/* grid visualisation CSS for testing */
/* Only apply borders to specific test containers, not all Bootstrap containers */
.test-container,
.test-row {
    border: 2px solid black;
}

.test-col {
    border: 2px solid white;
    background-color: lightgray;
}

/* Navbar Styling */
#navbar {
  background-color: var(--primary-color) !important;
}

/* Ensure navbar links are visible on dark background */
#navbar .navbar-nav .nav-link {
  color: white !important;
}

/* Book Now Button Styling */
#navbar .btn-primary,
#navbar .btn-light,
#navbar .btn {
  background-color: var(--highlight-color) !important;
  border-color: var(--highlight-color) !important;
  color: white !important;
  font-weight: 600;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#navbar .btn-primary:hover,
#navbar .btn-light:hover,
#navbar .btn:hover {
  background-color: var(--light-highlight-color) !important;
  border-color: var(--light-highlight-color) !important;
  color: white !important;
  transform: translateY(-1px);
}

#navbar .navbar-brand {
  color: white !important;
  font-family: var(--secondary-font);
  font-weight: bold;
}

/* Social Links Styling */
.social-links {
  margin-top: 1rem;
}

.social-links a {
  display: inline-block;
  margin-right: 1rem;
  font-size: 1.5rem;
  color: var(--highlight-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: white;
}

.social-links a:last-child {
  margin-right: 0;
}

/* Footer Styling */
footer {
  background-color: var(--primary-color);
  color: white;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

footer h2 {
  color: white !important;
}

footer h3 {
  color: var(--highlight-color) !important;
}

footer p {
  color: white;
}

/* Opening Times Table Styling */
.opening-times-table {
  width: 100%;
  background-color: transparent;
  color: white;
  border-collapse: collapse;
  margin-top: 1rem;
}

.opening-times-table th,
.opening-times-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.opening-times-table th {
  font-weight: bold;
  background-color: transparent;
}

.opening-times-table td[colspan="2"] {
  text-align: center;
  font-style: italic;
}

/* Medium devices (tablets, 768px and up) */
@media screen and (min-width: 768px) {
  /* Make all service cards the same height for consistency */
  #services .card {
    height: 100%;
  }
  #services .card-body {
    min-height: 280px;
  }
}


@media screen and (min-width: 992px) {
  /* Make all service cards the same height for consistency */
  #services .card {
    height: 100%;
  }
  #services .card-body {
    min-height: 240px;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media screen and (min-width: 1200px) {
  /* Make all service cards the same height for consistency */
  #services .card {
    height: 100%;
  }
  #services .card-body {
    min-height: 220px;
  }
}

/* Extra extra large devices (larger desktops, 1400px and up) */
@media screen and (min-width: 1400px) {
  /* Make all service cards the same height for consistency */
  #services .card {
    height: 100%;
  }
  #services .card-body {
    min-height: 240px;
  }
}

/* Booking Form Styling */
.booking-form {
  background-color: #f8f9fa;
  padding: 3rem;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.booking-form .form-label {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.booking-form .form-control,
.booking-form .form-select {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: white;
}

.booking-form .form-control:focus,
.booking-form .form-select:focus {
  border-color: var(--highlight-color);
  box-shadow: 0 0 0 0.2rem rgba(65, 106, 142, 0.25);
  outline: none;
}

.booking-form .form-control::placeholder {
  color: #6c757d;
  opacity: 0.8;
}

.booking-form .btn-primary {
  background-color: var(--highlight-color);
  border-color: var(--highlight-color);
  padding: 1rem 3rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.booking-form .btn-primary:hover {
  background-color: var(--light-highlight-color);
  border-color: var(--light-highlight-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(65, 106, 142, 0.3);
}

.booking-form h1 {
  color: var(--primary-color);
  font-family: var(--secondary-font);
  font-weight: 400;
  letter-spacing: 2px;
}

/* Responsive adjustments for booking form */
@media screen and (max-width: 768px) {
  .booking-form {
    padding: 2rem 1.5rem;
  }
  
  .booking-form h1 {
    font-size: 2.5rem;
  }
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

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

/* Form validation states */
.form-control.is-valid,
.form-select.is-valid {
  border-color: #28a745;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.7-.4 1.81-2.54-.81-.54L2.78 5.18l-.8-1.04-.81.55.13.04z'/%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);
}

.form-control.is-invalid,
.form-select.is-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 d='m5.8 4.6 4.5 4.5M5.8 9.2l4.5-4.5'/%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);
}

.invalid-feedback {
  display: block;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.valid-feedback {
  display: block;
  color: #28a745;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Enhanced form interactions */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(65, 106, 142, 0.25);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Success animation for form submission */
@keyframes formSuccess {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.form-success {
  animation: formSuccess 0.3s ease-in-out;
  border: 2px solid #28a745 !important;
  background-color: #d4edda !important;
}

/* Real-time validation feedback */
.form-control.real-time-valid {
  border-color: #28a745;
  box-shadow: 0 0 0 0.1rem rgba(40, 167, 69, 0.25);
}

.form-control.real-time-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.1rem rgba(220, 53, 69, 0.25);
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--highlight-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(65, 106, 142, 0.3);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--light-highlight-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(65, 106, 142, 0.4);
}