/* Global styles to prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Sticky footer layout */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
}

/* Navigation */
.navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: all 0.3s ease;
}

.navigation.scrolled {
  background: var(--background-main);
  padding: 0.75rem 0;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

.nav-brand h3 {
  margin: 0;
  color: var(--white);
  font-size: 2.2rem;
  font-family: 'Alex Brush', cursive;
  font-weight: 400;
}

@media (max-width: 768px) {
    .nav-brand h3 {
        font-size: 1.7rem;
    }
}

.nav-brand h3 small {
  font-size: 0.7em;
  opacity: 0.9;
}

.navigation.scrolled .nav-brand h3 {
  color: var(--text-on-background);
}

.navigation.scrolled .nav-brand h3 small {
  color: var(--text-on-background);
}

/* Navigation Logo */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-direction: row;
  text-decoration: none;
  color: inherit;
}

.nav-brand:hover,
.nav-brand:focus,
.nav-brand:active {
  text-decoration: none;
  color: inherit;
  outline: none;
  border: none;
}

.nav-brand > div {
  display: flex;
  flex-direction: column;
}

.nav-logo {
  width: 75px;
  height: 75px;
  background: var(--white);
  border-radius: 50%;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo img {
  width: 130%;
  height: 130%;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
}

.nav-subtitle {
  font-size: 0.75rem;
  color: var(--white);
  opacity: 0.9;
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.navigation.scrolled .nav-subtitle {
  color: var(--text-on-background);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  transition: opacity 0.3s ease;
}

.nav-menu a:hover {
  opacity: 0.8;
}

.navigation.scrolled .nav-menu a {
  color: var(--text-on-background);
}

/* Hero Section */
.hero {
  position: relative;
  height: 85vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--white);
  margin-top: 0;
}

@media (max-width: 768px) {
    .hero {
        height: 92vh;
        min-height: fit-content !important;
    }
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(31, 62, 150, 0.4) 0%, rgba(31, 62, 150, 0.6) 100%);
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  text-align: center;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-title {
  color: var(--white);
  display: flex;
  flex-direction: column;
  font-family: 'Alex Brush', cursive;
  font-weight: 400;
  font-size: clamp(3rem, 6vw, 5rem);
}

.title-line-1,
.title-line-2 {
  display: block;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 1rem;
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
}

.hero-description {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--white);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  line-height: 1.8;
}

.hero-description p {
  color: var(--white);
  margin-bottom: 1rem;
}

.hero-description p:last-child {
  margin-bottom: 0;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-bottom-text {
  font-family: 'Alex Brush', cursive;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--white);
  font-weight: 400;
  line-height: 1.8;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.hero-bottom-text p {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.hero-bottom-text p:last-child {
  margin-bottom: 0;
}

.btn-primary {
  background-color: transparent;
  color: var(--white);
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 2px solid var(--white);
  padding: calc(1rem - 2px) calc(2.5rem - 2px);
  border-radius: 0;
}

.btn-primary:hover {
  background-color: var(--white);
  color: var(--primary-color);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: calc(1rem - 2px) calc(2.5rem - 2px);
  border-radius: 0;
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--primary-color);
}

/* Button for light backgrounds */
.btn-on-light {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: calc(1rem - 2px) calc(2.5rem - 2px);
  border-radius: 0;
}

.btn-on-light:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Text Highlights - Only used in hero with good contrast */
.text-highlight {
  color: var(--accent-color);
}

/* Decorative Quote */
.quote-text {
  position: relative;
}

/* 50:50 Split Section */
.section-5050 {
  min-height: 600px;
  background: var(--background-main);
}

.split-container {
  display: flex;
  min-height: 600px;
}

.image-half {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.image-half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.text-half {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 4rem;
  background: var(--background-main);
}

.text-content h2 {
  font-family: 'Alex Brush', cursive;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--text-on-background);
  margin-bottom: 1.5rem;
}

.text-content p {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-on-background);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.text-content .lead {
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--text-on-background);
}

.text-content .lead.quote-text {
    margin-bottom: 1rem;
}

.text-content .lead p {
  color: var(--text-on-background);
  margin-bottom: 0.5rem;
}

.text-content .lead p:last-child {
  margin-bottom: 0;
}

.about-content p {
  color: var(--text-on-background);
  margin-bottom: 1.5rem;
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* Services Section with Round Images */
.services-section {
  background: var(--background-main);
  padding: 3.5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 1rem;
  font-family: 'Alex Brush', cursive;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--text-on-background);
}

.section-subtitle {
  text-align: center;
  margin: 0 auto 4rem;
  font-size: 1.25rem;
  font-family: 'Open Sans', sans-serif;
  color: var(--text-on-background);
}

.section-subtitle p {
  color: var(--text-on-background);
  margin-bottom: 0.5rem;
}

.section-subtitle p:last-child {
  margin-bottom: 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 2rem;
  max-width: none;
  margin: 0;
  padding: 0;
}

.service-item {
  text-align: center;
  padding: 0;
}

.service-image-wrapper {
  width: 280px;
  height: 280px;
  margin: 0 auto 2rem;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
}

.service-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-item h3 {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.75rem;
  color: var(--text-on-background);
  margin-bottom: 1rem;
  font-weight: 600;
  hyphens: auto;
}

.service-item p {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-on-background);
  line-height: 1.7;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.service-content p {
  color: var(--text-on-background);
  margin-bottom: 0.5rem;
}

.service-content p:last-child {
  margin-bottom: 0;
}

.service-item .btn {
  margin-top: 1.5rem;
}

/* Contact Section */
.contact-section {
  background-color: var(--background-main);
  padding: 3.5rem 0;
}

.contact-content {
  gap: 3rem;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
  color: var(--text-on-background);
}

.contact-info h3 {
  color: var(--text-on-background);
  margin-bottom: 0.5rem;
  font-family: 'Alex Brush', cursive;
  font-size: 2.5rem;
  font-weight: 400;
}

.contact-subtitle {
  color: var(--text-on-background);
  margin-bottom: 2rem;
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.875rem;
  opacity: 0.9;
}

.contact-item {
  margin-bottom: 2rem;
}

.contact-item strong {
  color: var(--text-on-background);
  display: block;
  margin-bottom: 0.5rem;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
}

/* Contact Form */
.contact-form {
  background: var(--white);
  padding: 3rem;
  border-radius: 0;
}

.contact-form h3 {
  font-family: 'Alex Brush', cursive;
  font-size: 2rem;
  font-weight: 400;
  color: var(--text-on-white);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-on-white);
  font-weight: 500;
  font-family: 'Open Sans', sans-serif;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem;
  border: 1px solid rgba(31, 62, 150, 0.2);
  border-radius: 0;
  font-size: 1rem;
  font-family: 'Open Sans', sans-serif;
  background-color: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Footer */
.footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 2rem 0;
}

.footer p {
  color: var(--white);
  margin-bottom: 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
}

.footer-links a:hover {
  opacity: 0.8;
}

.footer-instagram {
  color: var(--white);
  display: inline-flex;
  align-items: center;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.footer-instagram svg {
  fill: var(--white);
}

.footer-instagram:hover {
  opacity: 0.7;
}

.footer-instagram:active,
.footer-instagram:visited,
.footer-instagram:focus {
  color: var(--white);
  outline: none;
}

.footer-instagram:active svg,
.footer-instagram:visited svg,
.footer-instagram:focus svg {
  fill: var(--white);
}

/* Alerts */
.alert {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0;
}

.alert-success {
  background-color: var(--accent-color);
  color: var(--primary-color);
  border: 1px solid var(--accent-color);
}

/* WordPress specific */
.wp-block-group__inner-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Page Template Styles */
.page-hero {
  background: var(--primary-color);
  padding: 4rem 0 2rem;
  margin-top: 0;
}

.page-title {
  color: var(--white);
  text-align: center;
  font-family: 'Alex Brush', cursive;
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 0;
}

.page-content {
  background: var(--background-main);
  padding: 4rem 0;
  min-height: 50vh;
}

.page-content .entry-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
  color: var(--primary-color);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.page-content h2 {
  font-size: 2.5rem;
}

.page-content h3 {
  font-size: 2rem;
}

.page-content p {
  color: var(--text-on-background);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.page-content ul,
.page-content ol {
  color: var(--text-on-background);
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.page-content li {
  margin-bottom: 0.5rem;
}

.page-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-content a:hover {
  text-decoration: none;
}

.page-content img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
}

.page-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 2rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-on-background);
}

/* Contact Form 7 Styling */
.wpcf7 {
  width: 100%;
}

.wpcf7 form {
  width: 100%;
}

.wpcf7 p {
  margin-bottom: 1.5rem;
  width: 100%;
}

.wpcf7 label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-on-white);
  font-weight: 500;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100% !important;
  padding: 1rem;
  border: 1px solid rgba(31, 62, 150, 0.2);
  border-radius: 0;
  font-size: 1rem;
  font-family: 'Open Sans', sans-serif;
  background-color: var(--white);
  color: var(--text-on-white);
  box-sizing: border-box;
  display: block;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 input[type="date"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.wpcf7 input[type="submit"],
.wpcf7 input[type="button"] {
  display: inline-block;
  padding: calc(1rem - 2px) calc(2.5rem - 2px);
  background-color: transparent;
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 0;
  font-weight: 500;
  border: 2px solid var(--primary-color);
  cursor: pointer;
  font-size: 1rem;
  font-family: 'Open Sans', sans-serif;
  letter-spacing: 0.5px;
  box-shadow: none;
  transition: all 0.3s ease;
}

.wpcf7 input[type="submit"]:hover,
.wpcf7 input[type="button"]:hover {
  background-color: var(--primary-color);
  color: var(--text-on-primary);
}

/* Contact Form 7 Messages */
.wpcf7 .wpcf7-response-output {
  margin: 2rem 0;
  padding: 1rem;
  border-radius: 0;
}

.wpcf7 .wpcf7-validation-errors,
.wpcf7 .wpcf7-acceptance-missing {
  border: 1px solid #f44336;
  background-color: #ffebee;
  color: #f44336;
}

.wpcf7 .wpcf7-mail-sent-ok {
  border: 1px solid var(--accent-color);
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.wpcf7 .wpcf7-mail-sent-ng,
.wpcf7 .wpcf7-spam-blocked {
  border: 1px solid #ff9800;
  background-color: #fff3e0;
  color: #ff9800;
}

.wpcf7 .wpcf7-not-valid-tip {
  color: #f44336;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* No form notice */
.no-form-notice {
  color: var(--text-on-white);
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu a {
    color: var(--primary-color);
  }

  /* 50:50 Section Mobile */
  .split-container {
    flex-direction: column;
  }

  .image-half,
  .text-half {
    min-height: 400px;
  }

  .text-half {
    padding: 3rem 2rem;
  }

  .text-content h2 {
    font-size: 2.25rem;
  }

  /* Services Mobile */
  .service-image-wrapper {
    width: 220px;
    height: 220px;
  }

  .services-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
  }

  /* Contact Mobile */
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .hero-title {
    font-size: clamp(2.5rem, 8vw, 3rem);
    margin-top: calc(94px + env(safe-area-inset-top, 0px));
  }
  
  /* Page template mobile */
  .page-hero {
    padding: 6rem 0 3rem;
  }
  
  .page-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }
  
  .page-content {
    padding: 3rem 0;
  }
  
  .page-content .entry-content {
    padding: 0 1rem;
  }
}

/* Additional page styles */
.post-meta {
  text-align: center;
  color: var(--white);
  opacity: 0.9;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Page Logo Section */
.page-logo-section {
  position: relative;
  margin-top: -50px;
  margin-bottom: -50px;
  z-index: 10;
}

.page-logo {
  width: 100px;
  height: 100px;
  background: var(--white);
  border-radius: 50%;
  padding: 10px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 12% !important;
  text-decoration: none;
  color: inherit;
}

.page-logo:hover,
.page-logo:focus,
.page-logo:active {
  text-decoration: none;
  outline: none;
  border: none;
}

@media (max-width: 768px) {

.page-logo-section {
  position: relative;
  margin-top: -30px;
  margin-bottom: -30px;
  z-index: 10;
}

  .page-logo {
    margin-left: 2% !important;
    width: 60px;
    height: 60px;
  }
}

.page-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.post-tags {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(31, 62, 150, 0.2);
}

.post-tags .tag-label {
  font-weight: 600;
  margin-right: 0.5rem;
}

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

.page-content .btn-primary {
  margin-top: 2rem;
}

#main-navigation > .container {
    margin-left: 3%;
}
@media (max-width: 768px) {
    #main-navigation > .container {
        margin-left: 5%;
    }
}

.tribe-events-page-template {
    .nav-brand h3 {
        color: var(--text-on-background) !important;
    }
}