
/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1a365d;
  --secondary-color: #c4a661;
  --text-color: #333333;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Heebo', 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  direction: rtl;
  text-align: right;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  flex-direction: row-reverse;
}

.site-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo:hover {
  color: var(--secondary-color);
}

.logo-image {
  height: 156px;
  width: auto;
  max-width: 624px;
  object-fit: contain;
}

/* Navigation */
.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  font-weight: 500;
  font-size: 16px;
  padding: 10px 0;
  position: relative;
  display: block;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 5px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: var(--transition);
}

.main-navigation a:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary-color);
  padding: 10px;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(to bottom, #6c757d 0%, #495057 100%);
  color: var(--white);
  padding: 50px 0 100px 0;
  text-align: center;
  position: relative;
  min-height: 350px;
  display: flex;
  align-items: center;
}

.hero-section .container {
  width: 100%;
  text-align: center;
  padding: 0 20px;
  margin-right: 550px; /* Adjusted for 82.5% image size (376.2px width) */
}

.hero-image-frame {
  position: absolute;
  right: 50px;
  top: calc(50% + 210px);
  transform: translateY(-50%);
  border: 3.7125px solid var(--secondary-color); /* 82.5% of original 4.5px (75% * 1.1) */
  border-radius: 15px;
  padding: 6.1875px; /* 82.5% of original 7.5px (75% * 1.1) */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  height: 544.5px; /* 82.5% of original 660px (75% * 1.1) */
  width: 376.2px; /* 82.5% of original 456px (75% * 1.1) */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.hero-image {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: contain;
  display: block;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.95;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.btn {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--white);
  border-radius: 5px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 16px;
  margin: 5px;
}

.btn:hover {
  background: #b39555;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

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

/* עדין יותר לכפתורי "קרא עוד" בתחומי התמחות */
.practice-area-card .btn {
  padding: 10px 25px;
  font-size: 13px;
  font-weight: 400;
  background: rgba(196, 166, 97, 0.08);
  color: var(--secondary-color);
  border: 0.5px solid var(--secondary-color); /* קטנתי עוד יותר את המסגרת */
  border-radius: 4px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
  text-align: center;
  margin: 15px auto 0;
  width: fit-content;
  opacity: 0.9; /* הוספתי שקיפות עדינה */
}

.practice-area-card .btn:hover {
  background: var(--secondary-color);
  color: var(--white);
  border-color: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(196, 166, 97, 0.2);
  opacity: 1; /* הסרתי את השקיפות ב-hover */
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-bg {
  background: var(--light-bg);
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
  color: var(--primary-color);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: var(--secondary-color);
  margin: 20px auto 0;
}

/* Practice Areas Grid */
.practice-areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.practice-area-card {
  background: var(--white);
  padding: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-top: 3px solid var(--secondary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  height: 200px;
  width: 100%;
  box-sizing: border-box;
}

.practice-area-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.practice-area-icon {
  font-size: 48px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.practice-area-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.practice-area-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--primary-color);
  text-align: center;
  overflow: hidden;
  width: 100%;
  line-height: 1.4;
}

.practice-area-description {
  line-height: 1.8;
  color: #666;
}

/* Blog Section */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

@media (min-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Blog list as full-width horizontal buttons (scoped to blog page only) */
.blog-page .blog-grid {
  grid-template-columns: 1fr; /* single column across all widths */
  gap: 8px;
}

.blog-page .blog-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 10px; /* minimal vertical padding to reduce height */
  padding-left: 90px; /* reserve space for date on the left */
  box-shadow: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  position: relative;
  cursor: pointer;
}

.blog-page .blog-card:hover {
  transform: none;
  box-shadow: none;
  background: #ffffff; /* keep white */
  border-color: var(--secondary-color); /* gold border on hover */
}

.blog-page .blog-card-image,
.blog-page .blog-card-image.feather-image {
  width: 44px; /* icon size on blog page */
  height: 44px;
  flex: 0 0 44px;
  object-fit: contain;
  background: transparent;
  padding: 0;
}

.blog-page .blog-card-content {
  padding: 0;
}

.blog-page .blog-card-excerpt,
.blog-page .blog-card .btn {
  display: none;
}

.blog-page .blog-card-title {
  margin: 0;
  font-size: 14px; /* tighter text to minimize overall height */
  line-height: 1.1;
}

.blog-page .blog-card-title a {
  display: inline-block;
}

/* Blog section dividers inside the list */
.blog-page .blog-section-divider {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-color);
  padding: 6px 4px;
  margin: 16px 0 6px;
  border-right: 3px solid var(--secondary-color);
  background: #ffffff;
}

/* Date positioned flush to the left inside the button */
.blog-page .blog-card-date {
  display: inline-block;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary-color);
  font-size: 12px;
  white-space: nowrap;
}

/* Mobile: Move date below title */
@media (max-width: 768px) {
  .blog-page .blog-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    padding-left: 10px;
  }
  
  .blog-page .blog-card-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    order: 2;
  }
  
  .blog-page .blog-card-date {
    position: static;
    transform: none;
    order: 2;
    margin-top: 4px;
    margin-bottom: 0;
    margin-right: 0;
    font-size: 11px;
  }
  
  .blog-page .blog-card-title {
    order: 1;
    margin-bottom: 0;
  }
  
  .blog-page .blog-card-image,
  .blog-page .blog-card-image.feather-image {
    order: 0;
    margin-bottom: 8px;
  }
}

.blog-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

/* Feather variant for blog card image: show full icon without crop */
.blog-card-image.feather-image {
  height: 120px;
  object-fit: contain;
  background: #ffffff;
  padding: 10px;
}

.blog-card-content {
  padding: 30px;
}

.blog-card-date {
  color: var(--secondary-color);
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 500;
}

.blog-card-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 15px;
}

.blog-card-title a {
  color: var(--primary-color);
}

.blog-card-title a:hover {
  color: var(--secondary-color);
}

.blog-card-excerpt {
  display: none;
}

/* Smaller buttons inside blog cards */
.blog-card .btn {
  padding: 8px 18px;
  font-size: 13px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-card {
  text-align: center;
  padding: 40px 20px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.stat-number.animated {
  animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.stat-label {
  font-size: 18px;
  color: var(--primary-color);
  font-weight: 500;
}

/* Reviews Grid - Carousel */
.reviews-grid {
  display: flex;
  gap: 0;
  margin-top: 40px;
  overflow: hidden;
  width: 100%;
  position: relative;
  padding: 20px 0;
}

/* Blinking text for floating calculator button */
.floating-calculator-btn .blink-text { 
  animation: blink-text 2s steps(1, start) 3 forwards;
}

/* Hide floating calculator button on medium and small screens */
@media (max-width: 1400px) {
  .floating-calculator-btn {
    display: none !important;
  }
  
  /* Hide calculator sidebar menu on small screens only (not medium) */
  .calculator-sidebar-menu {
    display: none !important;
  }
}

/* For medium screens (between 1401px and 1800px), move calculator menu above blog posts on car-accidents page */
@media (min-width: 1401px) and (max-width: 1800px) {
  body.page .calculator-sidebar-menu {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    max-width: 100% !important;
    flex-direction: row !important;
    gap: 16px !important;
    margin: 0 auto 30px auto !important;
    padding: 20px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    opacity: 1 !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
  }
  
  body.page .calculator-sidebar-menu-item {
    flex: 0 0 auto !important;
    min-width: 200px !important;
    max-width: 250px !important;
  }
}

@keyframes blink-text {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

.reviews-grid-wrapper {
  display: flex;
  gap: 30px;
  animation: scroll-reviews 160s linear infinite;
  will-change: transform;
  flex-shrink: 0;
}

/* Homepage customer reviews: slower to match successes strip perceived speed */
.home-reviews,
.successes-reviews {
  animation-duration: 240s;
}

@keyframes scroll-reviews {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

.review-card {
  background: var(--white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-top: 3px solid var(--secondary-color);
  position: relative;
  flex: 0 0 350px;
  min-width: 350px;
}

/* הקטנת תיבות המלצות והצלחות ב-50% בדף הבית */
body.index .review-card {
  flex: 0 0 289px;
  min-width: 289px;
  padding: 15px;
  min-height: 280px;
  max-height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.index .review-card.expanded {
  max-height: none;
  min-height: auto;
  flex: 0 0 578px;
  min-width: 578px;
}

body.index .review-text {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  min-height: 0;
}

body.index .review-text.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  flex-grow: 0;
}

body.index .review-stars {
  font-size: 14px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

body.index .review-author {
  padding-top: 8px;
  margin-top: 0;
  font-size: 11px;
  flex-shrink: 0;
  order: 3;
}

body.index .review-author strong {
  font-size: 13px;
  margin-bottom: 2px;
}

body.index .review-author span {
  font-size: 10px;
}

body.index .read-more-btn {
  display: inline-block;
  margin-top: 8px;
  margin-bottom: 0;
  padding: 5px 10px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  width: 100%;
  font-weight: 500;
  flex-shrink: 0;
  order: 4;
}

body.index .read-more-btn:hover {
  background: #a68a4f;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

body.index .read-more-btn.hidden {
  display: none;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.review-stars {
  font-size: 20px;
  margin-bottom: 15px;
  text-align: center;
}

.review-text {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 20px;
  font-style: italic;
  text-align: center;
}

.review-author {
  text-align: center;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.review-author strong {
  display: block;
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.review-author span {
  color: #666;
  font-size: 14px;
}

/* Contact Section */
.contact-section {
  background: var(--light-bg);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: stretch;
}

.contact-form-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.contact-info-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.contact-form {
  background: var(--white);
  padding: 40px;
  border-radius: 10px;
  border: 1px solid #c4a661;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  min-height: 100%;
  box-sizing: border-box;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--primary-color);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: inherit;
  font-size: 16px;
  transition: var(--transition);
  direction: rtl;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(196, 166, 97, 0.1);
}

.form-group input.invalid-email,
.form-group input.invalid-email:focus {
  border: 2px solid #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* Contact Info */
.contact-info {
  background: var(--white);
  padding: 40px;
  border-radius: 10px;
  border: 1px solid #c4a661;
  box-shadow: var(--shadow);
}

.contact-info-item {
  display: flex;
  align-items: start;
  gap: 15px;
  margin-bottom: 25px;
}

.contact-info-item:last-child {
  margin-bottom: 0;
}

.contact-info-icon {
  font-size: 24px;
  min-width: 30px;
}

.contact-info-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.contact-info-content p {
  color: #666;
  line-height: 1.6;
}

/* Google Maps */
.map-container {
  width: 100%;
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 50px;
  box-shadow: var(--shadow);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Calculator */
.calculator-container {
  background: var(--white);
  padding: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto 60px;
}

/* Calculators Menu Grid */
.calculators-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.calculator-menu-card {
  background: var(--white);
  padding: 32px 24px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  border-top: 3px solid var(--secondary-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.calculator-menu-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.calculator-icon {
  font-size: 38px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.calculator-icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Fallback לאייקונים אם התמונה לא נטענת */
.calculator-icon:has(img[src*="CAL"]):not(:has(img[src*="CAL"][onerror])) {
  font-size: 38px;
}

.calculator-menu-card h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--primary-color);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calculator-menu-card p {
  color: #666;
  line-height: 1.8;
  margin-bottom: 20px;
  flex-grow: 1;
}

.calculator-menu-card .btn {
  margin-top: auto;
}

.calculator-result {
  background: var(--light-bg);
  padding: 30px;
  border-radius: 10px;
  margin-top: 30px;
  text-align: center;
  border-right: 4px solid var(--secondary-color);
}

.calculator-result h3 {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.calculator-result .amount {
  font-size: 36px;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 15px 0;
}


/* Blog post two-column layout with gold vertical bar */
.blog-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-direction: row; /* sidebar markup first -> left; main -> right */
}

.blog-main {
  flex: 0 0 66.66%;
  position: relative;
  padding-right: 0;
  border-right: none; /* gold bar handled on article for consistency */
}

.blog-sidebar {
  flex: 0 0 33.33%;
  position: sticky;
  top: 80px;
}

.blog-sidebar .contact-form,
.blog-sidebar .fixed-contact-form {
  position: static;
  width: 100%;
  left: auto;
  top: auto;
  max-height: none;
  box-shadow: var(--shadow);
}

/* Default gold vertical bar on blog article text */
.section .container > article.blog-post,
.blog-main > article.blog-post {
  border-right: 2px solid var(--secondary-color);
  padding-right: 50px; /* 50px gap between text and the gold bar */
}

/* Footer */
.site-footer {
  background: linear-gradient(to bottom, #6c757d 0%, #495057 100%);
  color: var(--white);
  padding: 60px 0 20px;
  position: relative;
  z-index: 1;
  clear: both;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-widget h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.footer-widget p {
  line-height: 1.8;
  opacity: 0.9;
}

.footer-widget ul {
  list-style: none;
}

.footer-widget ul li {
  margin-bottom: 10px;
}

.footer-widget a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer-widget a:hover {
  color: var(--white);
  padding-right: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.8;
}

/* Page Header */
.page-header {
  background: linear-gradient(to bottom, #6c757d 0%, #495057 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-header .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-title {
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.page-subtitle {
  font-size: 18px;
  margin-top: 15px;
  opacity: 0.9;
  text-align: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.page-header .hero-title {
  text-align: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.page-header .page-subtitle {
  text-align: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Alert Box */
.alert-box {
  background: #fff3cd;
  padding: 30px;
  border-radius: 10px;
  margin-top: 60px;
  text-align: center;
  border: 1px solid #ffc107;
}

.alert-box h3 {
  color: #856404;
  margin-bottom: 15px;
}

.alert-box p {
  color: #856404;
  line-height: 1.8;
}

/* Success/Error Messages */
.message {
  padding: 15px;
  border-radius: 5px;
  margin-top: 20px;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Loading Spinner */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--light-bg);
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

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

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .main-navigation.active {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }

  .main-navigation li {
    border-bottom: 1px solid var(--border-color);
  }

  .main-navigation a {
    padding: 15px 20px;
  }

  .main-navigation a::after {
    display: none;
  }

  .hero-section {
    min-height: 300px;
    padding: 60px 0;
  }

  .hero-section .container {
    margin-right: 0;
    width: 100%;
    padding: 0 20px;
    text-align: center;
  }

  .hero-image-frame {
    display: none;
  }

  .hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .section-title {
    font-size: 28px;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .practice-areas-grid,
  .blog-grid,
  .calculators-menu-grid {
    grid-template-columns: 1fr;
  }

  .review-card {
    flex: 0 0 300px;
    min-width: 300px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn {
    padding: 12px 30px;
    font-size: 14px;
  }
}


@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .site-logo {
    font-size: 18px;
  }

  .logo-image {
    height: 125px;
    max-width: 468px;
  }

  .hero-section {
    padding: 40px 0 60px 0;
    min-height: 250px;
  }

  .hero-title {
    font-size: 24px;
  }

  .section {
    padding: 50px 0;
  }
}

/* About Page Responsive */
@media (max-width: 768px) {
  .about-content-flex {
    flex-direction: column !important;
    gap: 30px !important;
  }
  
  .about-image {
    flex: none !important;
    max-width: 250px !important;
    margin: 0 auto !important;
  }
  
  .about-text {
    flex: none !important;
  }
}

/* Fixed Contact Form */
.fixed-contact-form {
  position: fixed;
  top: 120px; /* Default, will be overridden by JavaScript */
  left: 70px;
  width: 245px; /* 350px * 0.7 = 245px */
  background: white;
  padding: 14px; /* 20px * 0.7 = 14px */
  border-radius: 10px;
  border: 1px solid #c4a661;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 1000;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fixed-contact-form.aligned {
  opacity: 1;
}

/* Fixed Contact Form - Homepage specific */
body.index .fixed-contact-form {
  top: 120px; /* Default, will be overridden by JavaScript */
  width: 280px; /* 400px * 0.7 = 280px */
  max-height: calc(100vh - 140px);
}

.fixed-contact-form h3 {
  color: var(--primary-color);
  margin-bottom: 10px; /* 15px * 0.7 = 10.5px, rounded to 10px */
  text-align: center;
  font-size: 13px; /* 18px * 0.7 = 12.6px, rounded to 13px */
}

.fixed-contact-form .form-group {
  margin-bottom: 8px; /* 12px * 0.7 = 8.4px, rounded to 8px */
}

body.index .fixed-contact-form .form-group {
  margin-bottom: 7px; /* 10px * 0.7 = 7px */
}

.fixed-contact-form label {
  display: block;
  margin-bottom: 4px; /* 5px * 0.7 = 3.5px, rounded to 4px */
  font-weight: 500;
  font-size: 10px; /* 14px * 0.7 = 9.8px, rounded to 10px */
}

.fixed-contact-form input,
.fixed-contact-form select,
.fixed-contact-form textarea {
  width: 100%;
  padding: 7px; /* 10px * 0.7 = 7px */
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 10px; /* 14px * 0.7 = 9.8px, rounded to 10px */
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.fixed-contact-form input.invalid-email,
.fixed-contact-form input.invalid-email:focus {
  border: 2px solid #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.fixed-contact-form textarea {
  resize: vertical;
  min-height: 42px; /* 60px * 0.7 = 42px */
}

.fixed-contact-form button {
  width: 100%;
  padding: 8px; /* 12px * 0.7 = 8.4px, rounded to 8px */
  font-size: 10px; /* 14px * 0.7 = 9.8px, rounded to 10px */
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
}

.fixed-contact-form button:hover {
  background: var(--secondary-color);
}

.fixed-contact-form .char-count {
  text-align: left;
  font-size: 8px; /* 11px * 0.7 = 7.7px, rounded to 8px */
  color: #666;
  margin-top: 2px; /* 3px * 0.7 = 2.1px, rounded to 2px */
}

/* Contact Form Responsive */
/* New intermediate step: ~62% of original (75% of base 82.5%) when screen is reduced from full */
@media (min-width: 2001px) and (max-width: 2100px) {
  .hero-image-frame {
    height: 409px; /* ~62% of original 660px, 75% of base 544.5px */
    width: 283px; /* ~62% of original 456px, 75% of base 376.2px */
    padding: 4.65px; /* ~62% of original 7.5px */
    border-width: 2.79px; /* ~62% of original 4.5px */
    right: 45px;
    top: calc(50% + 110px); /* Moved up by 100px from original */
  }
  
  .hero-section .container {
    margin-right: 385px;
  }
}

/* First intermediate step: ~62% of original (75% of base 82.5%) when screen is reduced from full */
@media (min-width: 1951px) and (max-width: 2000px) {
  .hero-image-frame {
    height: 409px; /* ~62% of original 660px, 75% of base 544.5px */
    width: 283px; /* ~62% of original 456px, 75% of base 376.2px */
    padding: 4.65px; /* ~62% of original 7.5px */
    border-width: 2.79px; /* ~62% of original 4.5px */
    right: 45px;
    top: calc(50% + 110px); /* Moved up by 100px from original */
  }
  
  .hero-section .container {
    margin-right: 385px;
  }
}

/* Second intermediate step: ~62% of original (75% of base 82.5%) when screen is reduced further */
@media (min-width: 1901px) and (max-width: 1950px) {
  .hero-image-frame {
    height: 408px; /* ~62% of original 660px, 75% of base 544.5px */
    width: 282px; /* ~62% of original 456px, 75% of base 376.2px */
    padding: 4.64px; /* ~62% of original 7.5px */
    border-width: 2.78px; /* ~62% of original 4.5px */
    right: 45px;
    top: calc(50% + 110px); /* Moved up by 100px from original */
  }
  
  .hero-section .container {
    margin-right: 385px;
  }
}

/* Start reducing image size to ~41% of original (50% of base 82.5%) when screen is reduced further */
@media (min-width: 1801px) and (max-width: 1900px) {
  .hero-image-frame {
    height: 272.25px; /* ~41% of original 660px, 50% of base 544.5px */
    width: 188.1px; /* ~41% of original 456px, 50% of base 376.2px */
    padding: 3.09px; /* ~41% of original 7.5px */
    border-width: 1.86px; /* ~41% of original 4.5px */
    right: 40px;
    top: calc(50% + 10px); /* Moved up by 200px from original */
  }
  
  .hero-section .container {
    margin-right: 275px;
  }
}

/* Reduce image size to ~41% of original (50% of base 82.5%) on medium screens */
@media (min-width: 1401px) and (max-width: 1800px) {
  .hero-image-frame {
    height: 272.25px; /* ~41% of original 660px, 50% of base 544.5px */
    width: 188.1px; /* ~41% of original 456px, 50% of base 376.2px */
    padding: 3.09px; /* ~41% of original 7.5px */
    border-width: 1.86px; /* ~41% of original 4.5px */
    right: 30px;
    top: calc(50% + 10px);
  }
  
  .hero-section .container {
    margin-right: 253px;
  }
}

@media (max-width: 1400px) {
  /* Move image above practice areas section instead of hiding it */
  .hero-image-frame {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    display: flex !important;
    margin: 0 auto 40px auto;
    width: fit-content;
    max-width: 100%;
    height: auto;
    max-height: 400px;
  }
  
  .hero-image-frame .hero-image {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
  }

  .hero-section .container {
    margin-right: 0;
    width: 100%;
    padding: 0 20px;
    text-align: center;
  }
  
  /* Style for image when moved above practice areas */
  body.index .practice-areas-section .hero-image-frame {
    margin: 0 auto 30px auto;
    text-align: center;
  }
  
  body.index .practice-areas-section .container {
    position: relative;
  }

  .fixed-contact-form {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: calc(100% - 40px);
    max-width: 500px;
    margin: 0 auto;
    max-height: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  
  body.index .fixed-contact-form {
    top: auto;
    width: calc(100% - 40px);
    max-width: 500px;
    max-height: none;
    margin: 0 auto;
  }
  
  /* Hide contact form placeholder on homepage in small screens */
  body.index #contact-form-placeholder {
    display: none;
  }
  
  .fixed-contact-form h3 {
    font-size: 16px;
  }
  
  .fixed-contact-form .form-group {
    margin-bottom: 12px;
  }
  
  .fixed-contact-form input,
  .fixed-contact-form select,
  .fixed-contact-form textarea {
    padding: 8px;
    font-size: 14px;
  }
  
  .fixed-contact-form button {
    padding: 10px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .fixed-contact-form {
    width: calc(100% - 20px);
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
    display: block;
  }
  
  body.index .fixed-contact-form {
    width: calc(100% - 20px);
    max-width: 100%;
    margin: 0 auto;
  }
  
  .fixed-contact-form h3 {
    font-size: 14px;
    margin-bottom: 10px;
  }
  
  .fixed-contact-form .form-group {
    margin-bottom: 10px;
  }
  
  .fixed-contact-form label {
    font-size: 12px;
  }
  
  .fixed-contact-form input,
  .fixed-contact-form select,
  .fixed-contact-form textarea {
    padding: 6px;
    font-size: 12px;
  }
  
  .fixed-contact-form button {
    padding: 8px;
    font-size: 12px;
  }
  
  .fixed-contact-form .char-count {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .fixed-contact-form {
    width: calc(100% - 16px);
    max-width: 100%;
    margin: 0 auto;
    padding: 12px;
  }
  
  body.index .fixed-contact-form {
    width: calc(100% - 16px);
    max-width: 100%;
    margin: 0 auto;
  }
  
  .fixed-contact-form h3 {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .fixed-contact-form .form-group {
    margin-bottom: 8px;
  }
  
  .fixed-contact-form label {
    font-size: 11px;
    margin-bottom: 4px;
  }
  
  .fixed-contact-form input,
  .fixed-contact-form select,
  .fixed-contact-form textarea {
    padding: 8px;
    font-size: 14px;
  }
  
  .fixed-contact-form button {
    padding: 10px;
    font-size: 14px;
  }
  
  .fixed-contact-form .char-count {
    font-size: 9px;
  }
}
