/* =========================================
   SLECIC - Credit Insurance CSS (Mobile Responsive Version)
   ========================================= */

/* --- 1. Reset/Defaults --- */
.risk-section {
  padding: 50px 8%;
  background-color: #ffffff;
  width: 100%;
  box-sizing: border-box;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

/* --- 2. Page Hero (Reused from other pages, ensure consistency) --- */
.page-hero {
  position: relative;
  width: 100%;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("../images/pulication.png");
  background-size: cover;
  background-position: center;
  background-color: #4a0202;
  padding-top: 80px;
  /* Accounts for fixed header */
}

.page-hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.page-hero .container {
  position: relative;
  z-index: 2;
  text-align: center;
}

.page-hero h1 {
  font-size: 2.8rem;
  color: #ffffff;
  margin-bottom: 15px;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  color: #ffffff;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #c49a18;
}

.breadcrumb span {
  color: #d1b24a;
  font-weight: 500;
}

/* --- 3. Risk Section (Top Content) --- */
.risk-main-title {
  color: #580000;
  /* Primary Color */
  font-size: 32px;
  font-weight: 700;
  text-align: left;
  margin-bottom: 15px;
  line-height: 1.3;
}

.title-line {
  width: 70px;
  height: 4px;
  background-color: #d1b24a;
  /* Gold */
  border-radius: 2px;
  margin-bottom: 40px;
}

.risk-grid {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 50px;
}

.risk-image-wrapper {
  flex: 0 0 320px;
  /* Fixed width for desktop */
  max-width: 100%;
}

.risk-image-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 0px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  display: block;
}

.risk-content-wrapper {
  flex: 1;
}

.risk-subtitle {
  color: #580000;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 25px;
}

.risk-content-wrapper p {
  color: #858585;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
}

/* --- 4. Accordion Section --- */
.risk-accordion-area {
  margin-top: 20px;
}

.accordion-wrapper {
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #eaeaea;
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid #eaeaea;
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  font-family: 'playfair display', serif;
  width: 100%;
  background: #fff;
  padding: 25px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  outline: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  position: relative;
  overflow: hidden;
}

.accordion-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #c49a18;
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.accordion-header:hover {
  background-color: #f9f9f9;
  color: #580000;
}

.accordion-header.active {
  background-color: #580000;
  color: #fff;
}

.accordion-header.active::before {
  transform: scaleY(1);
}

.accordion-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(196, 154, 24, 0.1);
  color: #c49a18;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  /* Prevent shrinking */
}

.accordion-header.active .accordion-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #c49a18;
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: #fff;
}

.accordion-content.open {
  /* JS sets max-height, but CSS can help smooth it */
  transition: max-height 0.5s ease-in-out;
}

.content-inner {
  padding: 30px 40px;
  border-top: 1px solid #eaeaea;
}

.content-inner p {
  font-size: 15px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 15px;
  text-align: justify;
}

.content-inner h4 {
  color: #580000;
  font-size: 18px;
  margin-top: 25px;
  margin-bottom: 15px;
  font-weight: 600;
}

/* --- 5. Inner Lists Styling --- */
.benefits-list,
.risks-section {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 8px;
  margin: 20px 0;
  border-left: 4px solid #c49a18;
}

.benefits-list h4 {
  margin-top: 10px;
  /* Reset top margin for first item */
}

.solutions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.solutions-list li {
  background: #ffffff;
  border: 1px solid #eee;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.solutions-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-color: #c49a18;
}

.solutions-list li strong {
  display: block;
  color: #580000;
  font-size: 16px;
  margin-bottom: 8px;
}

.solutions-list li p {
  margin-bottom: 0;
}

.risks-detail-list {
  list-style: none;
  padding: 0;
}

.risks-detail-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 15px;
}

.risks-detail-list li::before {
  content: "•";
  color: #c49a18;
  position: absolute;
  left: 0;
  top: 0;
  font-size: 20px;
  line-height: 1;
}

.risks-detail-list li strong {
  color: #333;
  display: block;
  margin-bottom: 5px;
}

.country-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* 2 Columns on desktop */
  gap: 15px;
  list-style: none;
  padding: 0;
}

.country-list li {
  background: #fcfcfc;
  padding: 12px 15px;
  border-radius: 6px;
  border: 1px solid #eee;
  font-weight: 500;
  color: #444;
}

.accordion-note {
  margin-top: 25px;
  padding: 15px;
  background-color: #fff9e6;
  /* Light gold bg */
  border-radius: 6px;
  border: 1px solid #fae3a5;
  color: #8a6d3b;
  font-size: 14px;
}

/* =========================================
   6. RESPONSIVE QUERIES (The Critical Part)
   ========================================= */

/* Tablet & Smaller Desktops */
@media (max-width: 1024px) {
  .page-hero {
    min-height: 300px;
  }

  .page-hero h1 {
    font-size: 2.5rem;
  }

  .risk-grid {
    gap: 30px;
  }

  .risk-image-wrapper {
    flex: 0 0 280px;
  }
}

/* Mobile Devices (Portrait & Landscape) */
@media (max-width: 768px) {
  .page-hero {
    min-height: 250px;
    padding-top: 60px;
  }

  .page-hero h1 {
    font-size: 2rem;
  }

  .risk-section {
    padding: 40px 30px;
    /* Reduced side padding */
  }

  /* Stack the top grid vertically */
  .risk-grid {
    flex-direction: column;
    gap: 30px;
  }

  .risk-image-wrapper {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .risk-image-wrapper img {
    width: 100%;
    /* Ensure full width */
    max-width: 500px;
    /* But don't get too huge */
    margin: 0 auto;
    display: block;
  }

  .risk-subtitle {
    font-size: 20px;
    text-align: left;
  }

  /* Adjust text alignment if needed, usually left is best for reading */
  .risk-content-wrapper p {
    text-align: justify;
  }

  /* Accordion Adjustments */
  .accordion-header {
    padding: 20px;
    font-size: 16px;
  }

  .content-inner {
    padding: 20px;
  }

  .country-list {
    grid-template-columns: 1fr;
    /* 1 Column for countries on mobile */
  }
}

/* Very Small Screens */
@media (max-width: 480px) {
  .page-hero h1 {
    font-size: 1.8rem;
  }

  .risk-main-title {
    font-size: 26px;
  }

  .risk-subtitle {
    font-size: 18px;
  }

  .accordion-header {
    padding: 15px;
  }
}