/*
Theme Name: MyRDH Spa - Elegant
Description: Elegant Tailwind CSS Theme
Author: MyRDH
Author URI: https://www.myrdh.ca/
Version: 3.0
*/

:root {
  --primary-teal: #00647F;
  --primary-orange: #E66D46;
  --accent: #938B8E;
}

.text-primary-teal { color: var(--primary-teal) !important; }
.bg-primary-teal { background-color: var(--primary-teal) !important; }
.border-primary-teal { border-color: var(--primary-teal) !important; }
.text-primary-orange { color: var(--primary-orange) !important; }
.bg-primary-orange { background-color: var(--primary-orange) !important; }
.border-primary-orange { border-color: var(--primary-orange) !important; }
.text-accent { color: var(--accent) !important; }
.bg-accent { background-color: var(--accent) !important; }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #00647F;
  background-color: #FAF9F6;
  font-weight: 300;
}

.font-serif {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

html {
  scroll-behavior: smooth;
}

a:focus,
button:focus {
  outline: 2px solid var(--primary-orange);
  outline-offset: 2px;
}

.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay:not(.hidden) {
  display: flex;
}

.lightbox-panel {
  display: none;
}

.lightbox-panel:not(.hidden) {
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  color: white;
}

.wpcf7-form {
  background: rgba(250, 249, 246, 0.8);
  padding: 2rem;
  border-radius: 0;
  border: 1px solid rgba(0, 100, 127, 0.2);
}

.wpcf7-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 300;
  color: #00647F;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.wpcf7-form-control-wrap {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  padding: 0.875rem;
  font-size: 0.875rem;
  border: 1px solid rgba(0, 100, 127, 0.3);
  border-radius: 0;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  background: white;
  color: #00647F;
  font-weight: 300;
}

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

.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
  border-color: var(--primary-orange);
  outline: none;
  box-shadow: 0 0 0 1px var(--primary-orange);
}

.wpcf7-form input[type="submit"] {
  background-color: var(--primary-orange);
  color: white;
  padding: 0.875rem 2rem;
  font-size: 0.75rem;
  font-weight: 300;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.wpcf7-form input[type="submit"]:hover {
  background-color: rgba(230, 109, 70, 0.9);
}

.prose a {
  color: var(--primary-orange);
  text-decoration: none;
  transition: color 0.3s;
}

.prose a:hover {
  color: var(--primary-orange);
  opacity: 0.8;
}

.prose h2,
.prose h3,
.prose h4 {
  color: #00647F;
  font-weight: 300;
}

.prose ul,
.prose ol {
  margin-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.clear {
  clear: both;
}

/* Post Content Styles */
.post-content {
  color: var(--primary-teal);
  font-weight: 300;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  color: rgba(0, 100, 127, 0.8);
  font-weight: 300;
  line-height: 1.8;
}

.post-content h2 {
  font-size: 2rem;
  font-weight: 300;
  color: var(--primary-teal);
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

.post-content h3 {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--primary-teal);
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.post-content h4 {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--primary-teal);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.post-content a {
  color: var(--primary-orange);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 300;
}

.post-content a:hover {
  color: var(--primary-orange);
  opacity: 0.8;
  text-decoration: underline;
}

.post-content ul,
.post-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: rgba(0, 100, 127, 0.8);
}

.post-content li {
  margin-bottom: 0.75rem;
  font-weight: 300;
  line-height: 1.8;
}

.post-content strong {
  font-weight: 400;
  color: var(--primary-teal);
}

.post-content em {
  font-style: italic;
}

.post-content blockquote {
  border-left: 3px solid var(--primary-orange);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: rgba(0, 100, 127, 0.7);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  border: 1px solid rgba(0, 100, 127, 0.2);
}

.post-content table th {
  background-color: rgba(0, 100, 127, 0.1);
  color: var(--primary-teal);
  font-weight: 300;
  padding: 1rem;
  text-align: left;
  border: 1px solid rgba(0, 100, 127, 0.2);
  font-size: 0.95rem;
}

.post-content table td {
  padding: 1rem;
  border: 1px solid rgba(0, 100, 127, 0.2);
  color: rgba(0, 100, 127, 0.8);
  font-weight: 300;
  font-size: 0.95rem;
}

.post-content table tr:nth-child(even) {
  background-color: rgba(250, 249, 246, 0.5);
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 0.125rem;
}

.post-content code {
  background-color: rgba(0, 100, 127, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.125rem;
  font-size: 0.9em;
  color: var(--primary-teal);
}

.post-content pre {
  background-color: rgba(0, 100, 127, 0.1);
  padding: 1.5rem;
  border-radius: 0.125rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.post-content pre code {
  background-color: transparent;
  padding: 0;
}

/* Image Alignment Styles */
.alignright {
  float: right;
  margin: 10px;
}

.alignleft {
  float: left;
  margin: 10px;
}

/* Responsive Enhancements */
@media (max-width: 640px) {
  /* Ensure text doesn't overflow on small screens */
  h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Prevent horizontal scrolling */
  body {
    overflow-x: hidden;
  }
  
  /* Ensure images don't overflow */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Better spacing on mobile */
  .post-content {
    font-size: 0.95rem;
  }
  
  .post-content h2 {
    font-size: 1.5rem;
  }
  
  .post-content h3 {
    font-size: 1.25rem;
  }
  
  /* Table responsiveness */
  .post-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  
  .post-content table th,
  .post-content table td {
    min-width: 100px;
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }
  
  /* Better button touch targets */
  a[class*="px-10"],
  button[class*="px-10"] {
    min-height: 44px;
    padding: 0.875rem 1.5rem;
  }
  
  /* Prevent text overflow in hero */
  .text-3xl,
  .text-4xl,
  .text-5xl,
  .text-6xl {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  /* Trust indicators wrap better */
  .flex-wrap {
    gap: 1rem !important;
  }
}

@media (max-width: 768px) {
  /* Medium screens adjustments */
  .post-content table {
    font-size: 0.9rem;
  }
  
  .post-content table th,
  .post-content table td {
    padding: 0.875rem;
  }
}

/* Ensure all containers respect viewport */
.container,
.max-w-\[1400px\],
.max-w-5xl,
.max-w-4xl,
.max-w-3xl,
.max-w-2xl {
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Prevent long URLs from breaking layout */
.post-content a {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Ensure floated images clear properly on mobile */
@media (max-width: 640px) {
  .alignright,
  .alignleft {
    float: none;
    display: block;
    margin: 1.5rem auto;
    max-width: 100%;
  }
}

/* Gallery grid responsiveness */
@media (max-width: 640px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .md\:grid-cols-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .grid-cols-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .md\:grid-cols-5,
  .grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Hero section mobile adjustments */
@media (max-width: 640px) {
  .min-h-\[95vh\] {
    min-height: 85vh;
  }
  
  .pt-36 {
    padding-top: 6rem;
  }
  
  .text-4xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  
  .text-5xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  
  .text-6xl {
    font-size: 2.5rem;
    line-height: 2.75rem;
  }
}

/* Ensure cards don't overflow */
@media (max-width: 640px) {
  .bg-white,
  .border {
    max-width: 100%;
    overflow: hidden;
  }
}

/* Better spacing on very small screens */
@media (max-width: 375px) {
  .px-6 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .gap-16 {
    gap: 2rem;
  }
  
  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* ============================================
   HEADER & NAVIGATION STYLES
   ============================================ */

/* Financing Container */
#financingContainer {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 800px;
  max-width: 90%;
  padding: 10px;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transform: translate(-50%, -50%) translateX(-100vw);
  transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#financingContainer.show {
  transform: translate(-50%, -50%) translateX(0);
}

#closeBtn {
  background: #f7f7f7;
  border: none;
  width: 100%;
  height: auto;
}

#financingContainer img {
  max-width: 100%;
  display: block;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: #FAF9F6;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 100, 127, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.site-nav {
  max-width: 1920px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 1024px) {
  .site-nav {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 7rem;
}

.site-logo {
  display: block;
}

.site-logo img {
  height: 3.5rem;
}

/* Desktop Menu */
.desktop-menu {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .desktop-menu {
    display: flex;
  }
}

.nav-link {
  color: rgba(0, 100, 127, 0.8);
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--primary-teal);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary-orange);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-button {
  color: rgba(0, 100, 127, 0.8);
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
}

.nav-dropdown-button:hover {
  color: var(--primary-teal);
}

.nav-dropdown-button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary-orange);
  transition: width 0.3s ease;
}

.nav-dropdown-button:hover::after {
  width: 100%;
}

.nav-dropdown-icon {
  width: 0.75rem;
  height: 0.75rem;
  transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-icon {
  transform: rotate(180deg);
}

.nav-dropdown-spacer {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0.5rem;
}

.nav-dropdown-menu {
  position: absolute;
  left: 0;
  top: 100%;
  padding-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.nav-dropdown-panel {
  background-color: #FAF9F6;
  border: 1px solid rgba(0, 100, 127, 0.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  min-width: 280px;
  padding: 0.375rem 0;
}

.nav-dropdown-panel-alt {
  background-color: #F5F3F0;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  background-color: rgba(255, 255, 255, 0.6);
  border-left: 2px solid transparent;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-dropdown-item:nth-child(even) {
  background-color: rgba(245, 243, 240, 0.5);
}

.nav-dropdown-item:hover {
  border-left-color: rgba(230, 109, 70, 0.4);
  background-color: rgba(0, 100, 127, 0.03);
}

.nav-dropdown-item img {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: cover;
  border-radius: 0.125rem;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.nav-dropdown-item:hover img {
  opacity: 1;
}

.nav-dropdown-item-text {
  color: rgba(0, 100, 127, 0.7);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.nav-dropdown-item:hover .nav-dropdown-item-text {
  color: var(--primary-orange);
}

.nav-dropdown-divider {
  height: 1px;
  background-color: rgba(0, 100, 127, 0.05);
  margin: 0 0.75rem;
}

/* Book Appointment Button */
.book-appointment-btn {
  margin-left: 1rem;
  padding: 0.75rem 2rem;
  background-color: var(--primary-orange);
  color: white;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.book-appointment-btn:hover {
  background-color: rgba(230, 109, 70, 0.9);
}

/* Hamburger Button */
.hamburger-button {
  display: block;
  padding: 0.75rem;
  color: var(--primary-teal);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 50;
}

@media (min-width: 1024px) {
  .hamburger-button {
    display: none;
  }
}

.hamburger-icon {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.375rem;
}

.hamburger-line {
  display: block;
  height: 1px;
  width: 1.5rem;
  background-color: currentColor;
  transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background-color: #FAF9F6;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transform: translateX(100%);
  transition: transform 0.5s ease-in-out;
}

@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }
}

.mobile-menu.open {
  display: block;
  transform: translateX(0);
}

.mobile-menu-content {
  height: 100%;
  overflow-y: auto;
  padding: 1.5rem;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4rem;
}

.mobile-menu-logo {
  height: 2.5rem;
}

.mobile-menu-close {
  color: rgba(0, 100, 127, 0.6);
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.mobile-menu-close:hover {
  color: var(--primary-teal);
}

.mobile-menu-close svg {
  width: 2rem;
  height: 2rem;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: block;
  padding: 1rem 0;
  color: var(--primary-teal);
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 300;
  border-bottom: 1px solid rgba(0, 100, 127, 0.1);
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-nav-link:hover {
  color: var(--primary-orange);
}

.mobile-nav-link-secondary {
  color: rgba(0, 100, 127, 0.8);
  font-size: 0.875rem;
}

/* Mobile Dropdown */
.mobile-dropdown {
  border-bottom: 1px solid rgba(0, 100, 127, 0.1);
}

.mobile-dropdown-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  color: rgba(0, 100, 127, 0.8);
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 300;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-dropdown-toggle svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s ease;
}

.mobile-dropdown-content {
  display: none;
  padding-left: 1rem;
  padding-bottom: 0.5rem;
}

.mobile-dropdown-content.open {
  display: block;
}

.mobile-dropdown-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.mobile-dropdown-link {
  display: block;
  padding: 0.75rem 0;
  color: rgba(0, 100, 127, 0.7);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 300;
  border-bottom: 1px solid rgba(0, 100, 127, 0.05);
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-dropdown-link:hover {
  color: var(--primary-orange);
}

.mobile-dropdown-link:last-child {
  border-bottom: none;
}

.mobile-book-btn {
  display: block;
  margin-top: 2rem;
  padding: 1rem 2rem;
  background-color: var(--primary-orange);
  color: white;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 300;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.mobile-book-btn:hover {
  background-color: rgba(230, 109, 70, 0.9);
}
