:root {
  --primary-color: #4f0e28;
  --secondary-color: #a25d47;
  --accent-color: #a08447;
  --text-color: #b8b884;
  --bg-color: #97aa66;
  --light-gray: #ecf0f1;
  --dark-gray: #34495e;
  --white: #ffffff;
  --transition: all 0.3s ease;
}

body,
html {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
  color: var(--light-gray);
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Account for fixed header */
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  margin-bottom: 20px;
  font-size: 30px;
  color: var(--primary-color);
  text-align: center;
}

/* Header */
header {
  background: var(--white);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

nav ul {
  padding: 0;
  list-style: none;
  display: flex;
}

nav ul li {
  margin: 0 15px;
}

nav ul li a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

nav ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

nav ul li a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.menu-toggle span {
  width: 30px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

@media (max-width: 780px) {
  .menu-toggle {
    display: flex;
  }

  nav ul {
    position: fixed;
    right: -100%;
    background: var(--white);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  nav ul.show {
    right: 0;
  }

  nav ul li {
    margin: 1rem 0;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    background-color: var(--secondary-color);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    background-color: var(--secondary-color);
  }
}

/* Hero */
.hero {
  background: linear-gradient(rgba(79, 7, 28, 0.6), rgba(80, 44, 53, 0.6)),
    url("https://images.unsplash.com/photo-1505664194779-8beaceb93744?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80")
    no-repeat center center / cover;
  color: var(--light-gray);
  padding: calc(4rem + 60px) 0 4rem;
  text-align: center;
  margin-top: 0;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 20px;
  color: var(--light-gray);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: clamp(1rem, 3vw, 1.2rem);
  margin-bottom: 30px;
  max-width: 600px;
  margin: 0 auto 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.btn,
.btn-secondary {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--light-gray);
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover,
.btn-secondary:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: var(--accent-color);
  font-size: 0.9rem;
  padding: 8px 16px;
}

.btn-secondary:hover {
  background: var(--secondary-color);
}

/* About */
.about {
  padding: 5rem 0;
  background: var(--white);
  color: var(--secondary-color);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.lawyer-photo {
  width: 100%;
  height: auto;
  max-width: 400px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  display: block;
}

.about-text {
  flex: 2;
}

.about-text ul {
  list-style-type: none;
  padding-left: 0;
}

.about-text ul li {
  margin-bottom: 10px;
  padding-left: 30px;
  position: relative;
}

.about-text ul li::before {
  content: "✓";
  color: var(--text-color);
  position: absolute;
  left: 0;
  top: 0;
}

@media (max-width: 768px) {
  .about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Services */
.services {
  padding: 5rem 0;
  background: var(--primary-color);
}

.services h2 {
  color: var(--light-gray);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-box {
  background: var(--light-gray);
  padding: 30px;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-box h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.service-icon img {
  font-size: 3rem;
  color: var(--accent-color);
  margin-bottom: 15px;
  width: 80px;
  height: 80px;
}

.service-box p {
  margin-bottom: 20px;
  color: var(--accent-color);
}

.btn-secondary {
  align-self: center;
  margin-top: auto;
}

/* Responsiveness */
@media (max-width: 1024px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    width: 90%;
    padding: 0 15px;
  }

  .hero {
    padding: 8rem 0 6rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .about-content {
    flex-direction: column;
  }

  .about-image,
  .about-text {
    flex-basis: 100%;
  }

  .lawyer-photo {
    max-width: 100%;
    margin-bottom: 2rem;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  .contact-form,
  .contact-info {
    flex-basis: 100%;
  }

  .contact-info {
    margin-top: 2rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .btn,
  .btn-secondary {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .service-box {
    padding: 20px;
  }

  .service-box h3 {
    font-size: 1.3rem;
  }

  .testimonial-item {
    padding: 15px;
  }
}

/* Testimonials */
.testimonials {
  padding: 5rem 0;
  background: var(--light-gray);
}

.testimonial-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.testimonial-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  padding: 20px;
  background: var(--white);
  border-radius: 8px;
  margin-right: 20px;
}

.testimonial-item p {
  font-style: italic;
  margin-bottom: 10px;
  color: var(--dark-gray);
}

.testimonial-item cite {
  font-weight: bold;
  color: var(--dark-gray);
}

/* Contact */
.contact {
  background: var(--primary-color);
  color: var(--white);
  padding: 5rem 0;
}

.contact h2 {
  color: var(--white);
  text-align: center;
  margin-bottom: 55px;
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: start;
  margin-top: 3rem;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--light-gray);
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 1rem;
  transition: var(--transition);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

button {
  background: var(--secondary-color);
  color: var(--white);
  padding: 12px 24px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
}

button:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #25d366;
  color: var(--white);
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  margin-top: 20px;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 300px;
}

.whatsapp-btn:hover {
  background: #128c7e;
  transform: translateY(-3px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.whatsapp-btn::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="white" d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/></svg>')
    no-repeat center center;
  background-size: contain;
}

/* Footer */
footer {
  background: var(--light-gray);
  color: var(--primary-color);
  text-align: center;
  padding: 2rem 0;
  font-style: italic;
  font-size: 13px;
}

@media (max-width: 780px) {
  .container {
    width: 90%;
  }

  .menu-toggle {
    display: flex;
  }

  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    text-align: center;
    position: absolute;
    top: 90px;
    background: var(--white);
  }

  nav ul.show {
    display: flex;
  }

  nav ul li {
    margin: 10px 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .about-content {
    flex-direction: column;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  .contact-form,
  .contact-info {
    flex-basis: 100%;
  }
  
  .contact-info {
    margin-top: 2rem;
  }

  .service-box {
    flex-basis: 100%;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Hover effects */
.service-box:hover .service-icon {
  transform: scale(1.1);
}

.btn:focus,
.whatsapp-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.5);
}

/* Map Responsiveness */
.maps {
  width: 100%;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
}

.maps iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}
