:root {
  --primary-dark: #1c272f;
  --primary-blue: #4a90e2;
  --white: #ffffff;
  --gray: #555;
  --transition: 0.3s ease;
  --accent: #0f1d4e;
}

/* ========== Hero Section ========== */
.hero {
  min-height: 300px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue));
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 2rem;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background: url("../images/pexels-njeromin-15352968.jpg") center/cover;
  opacity: 0.1;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1,
.hero p,
.contacts-info {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s forwards;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  animation-delay: 0.3s;
}

.contacts-info {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
  animation-delay: 0.6s;
}

.contact-pill {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.contact-pill:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ========== Services Section ========== */
.services {
  padding: 3rem 2rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: var(--primary-blue);
  margin: 1rem auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: #faf8f8;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(30px);
  position: relative;
  overflow: hidden;
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-blue);
  transform: scaleX(0);
  transform-origin: center;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-top {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.service-icon {
  font-size: 2.5rem;
  color: var(--accent);
}

.service-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
}

.service-description {
  color: #333; /* Darker gray for better readability */
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
  font-weight: 400; /* Optional: makes text a bit bolder without being too heavy */
}

.service-features {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  color: var(--gray);
}

.service-features li {
  display: flex;
  align-items: center;
  font-size: 16px;
  margin-bottom: 8px;
}

.service-features li i {
  color: var(--accent);
  margin-right: 10px;
}

.cta-buttons {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

.learn-more {
  font-size: 16px;
  color: var(--accent);
  font-weight: bold;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

.learn-more:hover {
  text-decoration: underline;
}

.btn-quote {
  padding: 8px 18px;
  background-color: var(--accent);
  color: white;
  border-radius: 4px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-quote:hover {
  background-color: #16a085;
}

/* ========== Contact Sidebar ========== */
.contact-sidebar {
  position: fixed;
  top: 35%;
  right: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--primary-dark);
  padding: 10px 0;
  border-radius: 0 10px 10px 0;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.contact-sidebar a {
  color: #e8f3eb;
  display: flex;
  align-items: center;
  padding: 10px 15px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.contact-sidebar a i {
  font-size: 20px;
  margin-right: 10px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.contact-sidebar a span {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.contact-sidebar a:hover {
  background-color: #788a96;
  color: #fff;
}

.contact-sidebar a:hover i {
  transform: scale(1.2);
  color: #9addbb;
}

.contact-sidebar a:hover span {
  opacity: 1;
  width: auto;
  margin-left: 8px;
}

/* ========== Social Icons ========== */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

/* ========== Modal ========== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0; /* shorthand for top, right, bottom, left: 0 */
  padding: 50px 20px;
  background-color: rgba(0, 0, 0, 0.6);
  overflow-y: auto; /* allows scrolling if content overflows */
  backdrop-filter: blur(5px); /* subtle blur effect */
}

.modal-content {
  background-color: #ffffff;
  margin: auto;
  padding: 2.5rem;
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: fadeInScale 0.35s ease-in-out;
  transition: transform 0.3s ease;
}

.modal h2 {
  font-size: 1.8rem;
  color: #222;
  margin-bottom: 1rem;
  font-weight: 700;
}

.modal p {
  font-size: 1rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.modal ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.modal ul li {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  color: #444;
}

.modal ul li i {
  color: var(--accent, #4CAF50); /* fallback if --accent is not defined */
  margin-right: 0.75rem;
  font-size: 1.2rem;
}

.modal img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Optional: animation for modal appearance */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #444;
}

.close:hover {
  color: #f44336;
}

/* ========== Animations ========== */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .contacts-info {
    flex-direction: column;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}
