@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

:root {
  --primary: #c33233;
  --primary-light: #e25a5b;
  --secondary: #fff;
  --bg: #fff;
  --accent: #c33233;
  --card-bg: #fff;
  --radius: 20px;
  --shadow: 0 8px 32px 0 rgba(195, 50, 51, 0.13);
  --frost: rgba(255,255,255,0.80);
}

/* General Reset & Body */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Montserrat', Arial, sans-serif;
  background: var(--bg);
  color: var(--accent);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Header & Navigation (same as contact.css) */
.header {
  width: 100%;
  padding: 18px 5%;
  background: #fff;
  border-bottom: 3px solid var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 48px;
  margin-right: 18px;
}

.logo h1 {
  font-size: 1.6rem;
  letter-spacing: 1.5px;
  color: var(--primary);
  font-weight: 700;
}

.navbar a {
  color: var(--primary);
  text-decoration: none;
  font-size: 1.08rem;
  margin: 0 1.2rem;
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}

.navbar a::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transition: transform 0.3s;
}

.navbar a:hover {
  color: var(--primary-light);
}

.navbar a:hover::before {
  transform: scaleX(1);
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  min-height: 340px;
  background: linear-gradient(100deg, #fff 70%, #c3323317 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding-top: 28px;
  padding-bottom: 16px;
}

.hero-content {
  z-index: 2;
  position: relative;
  text-align: center;
  margin-top: 44px;
}

.hero-title {
  color: var(--primary);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 1.2px;
  opacity: 0;
  transform: translateY(32px);
  animation: fadein-up 1.1s 0.1s cubic-bezier(.77,.03,.38,1.07) forwards;
}

.hero-subtitle {
  color: #a63c3c;
  font-size: 1.22rem;
  margin-bottom: 0;
  opacity: 0;
  transform: translateY(32px);
  animation: fadein-up 1.1s 0.27s cubic-bezier(.77,.03,.38,1.07) forwards;
}

/* Hero background circles animation */
.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 70% 40%, rgba(195,50,51,0.13) 0%, transparent 65%),
    radial-gradient(circle at 20% 60%, rgba(226,90,91,0.13) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

.animated-circles {
  position: absolute;
  width: 100%; height: 100%;
  top: 0; left: 0; z-index: 1;
  pointer-events: none;
}
.animated-circles::before,
.animated-circles::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  background: var(--primary);
  animation: floatCircle 7s infinite alternate;
}
.animated-circles::before {
  width: 200px; height: 200px; left: 7vw; top: 30%;
  animation-delay: 0.2s;
}
.animated-circles::after {
  width: 120px; height: 120px; right: 10vw; top: 14%;
  background: var(--primary-light);
  animation-delay: 1.1s;
}

@keyframes floatCircle {
  0% { transform: translateY(0) scale(1);}
  100% { transform: translateY(-20px) scale(1.04);}
}

/* Section Title */
.section-title {
  text-align: center;
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 32px;
  letter-spacing: 1.2px;
  font-weight: 700;
}

/* Service Cards (Policies List) */
.services {
  background: #fff;
  padding-bottom: 54px;
}
.service-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px 26px;
  margin: 0 auto;
  max-width: 1360px;
}
.service-card {
  background: var(--frost);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 22px 18px 22px;
  width: 320px;
  min-width: 210px;
  text-align: left;
  border-top: 3px solid var(--primary);
  border-bottom: 2px solid #e25a5b22;
  transition: box-shadow 0.19s, transform 0.16s, border-color 0.23s;
  margin-bottom: 14px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(36px) scale(0.98);
  will-change: transform, box-shadow, opacity;
}
.service-card.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: all 0.67s cubic-bezier(.56,1.1,.22,.98);
}
.service-card:hover {
  box-shadow: 0 12px 36px 0 #c3323344;
  transform: translateY(-5px) scale(1.045);
  border-color: var(--primary-light);
}
.service-card img {
  width: 57px;
  height: 57px;
  margin-bottom: 11px;
  display: block;
}
.service-card h3 {
  font-size: 1.11rem;
  color: var(--primary);
  margin-bottom: 7px;
  font-weight: 700;
}
.service-card p {
  font-size: 0.98rem;
  color: #8e3636;
  min-height: 36px;
  margin-bottom: 18px;
}
.view-detail-btn {
  background: linear-gradient(90deg,var(--primary),var(--primary-light));
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 0.68em 1.1em;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.23s, transform 0.18s;
  box-shadow: 0 2px 8px #e25a5b22;
}
.view-detail-btn:hover {
  background: linear-gradient(90deg,var(--primary-light),var(--primary));
  transform: scale(1.08);
}

/* Policy Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 1100;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(20, 14, 16, 0.32);
  align-items: center;
  justify-content: center;
  transition: background 0.22s;
  overflow-y: auto;
}
.modal[style*="flex"] { /* When open, using JS */
  animation: fadein-modal-bg 0.17s;
}
@keyframes fadein-modal-bg {
  from { background: rgba(20,14,16,0.0);}
  to { background: rgba(20,14,16,0.32);}
}
.modal-content {
  background: #fff;
  padding: 38px 34px 30px 34px;
  border-radius: 18px;
  max-width: 410px;
  width: 95vw;
  margin: 0 12px;
  box-shadow: 0 16px 44px 0 #c3323344;
  position: relative;
  text-align: center;
  animation: fadein-up 0.36s cubic-bezier(.77,.03,.38,1.07);
}
@keyframes fadein-up {
  from { opacity: 0; transform: translateY(36px);}
  to { opacity: 1; transform: translateY(0);}
}
.modal-content img {
  width: 64px; height: 64px;
  margin-bottom: 12px;
}
.modal-content h3 {
  color: var(--primary);
  font-size: 1.22rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.modal-content p {
  color: #a63c3c;
  font-size: 1.01rem;
  margin-bottom: 0;
  line-height: 1.7;
  text-align: left;
}
.pdf-link {
  display: block;
  margin: 22px auto 0 auto;
  font-weight: 700;
  color: #c33233;
  background: #fbeaea;
  padding: 9px 18px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 8px #e25a5b22;
  transition: background 0.18s, color 0.18s, transform 0.16s;
  font-size: 1.01rem;
}
.pdf-link:hover {
  background: #ffeaea;
  color: var(--primary-light);
  transform: scale(1.04);
}
.modal-close {
  position: absolute;
  top: 13px; right: 13px;
  background: #fff;
  border: none;
  color: #c33233;
  font-size: 2.1rem;
  line-height: 1;
  border-radius: 50%;
  width: 38px; height: 38px;
  cursor: pointer;
  box-shadow: 0 1px 4px #c3323322;
  transition: background 0.17s, color 0.17s;
  z-index: 10;
}
.modal-close:hover, .modal-close:focus {
  background: #fbeaea;
  color: #e25a5b;
  outline: none;
}

/* Footer */
.footer {
  background: var(--primary);
  padding: 26px 10% 18px 10%;
  text-align: center;
  color: #fff;
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
.footer a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s;
}
.footer a:hover {
  color: #c33233;
}
/* Animations */
@keyframes fadein-up {
  from { opacity: 0; transform: translateY(36px);}
  to { opacity: 1; transform: translateY(0);}
}

/* Responsive design */
@media (max-width: 1160px) {
  .services { padding-left: 2%; padding-right: 2%; }
}
@media (max-width: 1020px) {
  .service-cards {
    gap: 18px 12px;
  }
}
@media (max-width: 940px) {
  .service-cards {
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }
  .service-card {
    width: 96vw;
    max-width: 380px;
  }
  .footer {
    flex-direction: column;
    gap: 8px;
    font-size: .97rem;
  }
}
@media (max-width: 700px) {
  .header {
    flex-direction: column;
    gap: 8px;
    padding: 16px 2%;
  }
  .logo h1 {
    font-size: 1.2rem;
  }
  .navbar a {
    margin: 0 0.7rem;
    font-size: 1rem;
  }
  .hero-title, .section-title {
    font-size: 1.38rem;
  }
  .hero-subtitle {
    font-size: 1.01rem;
  }
  .service-cards, .services {
    padding: 0 2%;
  }
  .service-card {
    width: 97vw;
    max-width: 350px;
    margin: 0 auto 14px auto;
    padding: 20px 8px 14px 8px;
  }
  .modal-content {
    padding: 21px 7px 19px 7px;
    max-width: 96vw;
  }
  .modal-content img { width: 52px; height: 52px; }
  .footer {
    flex-direction: column;
    gap: 8px;
    padding: 16px 3% 10px 3%;
    font-size: .99rem;
  }
}

/* Accessibility: Hide modal when not open */
.modal[aria-modal="true"]:not([style*="flex"]) {
  visibility: hidden !important;
  pointer-events: none !important;
}