/* Styles for Portfolio Accordion (CodePen Inspired) */
.portfolio-section {
  position: relative;
  overflow: hidden;
}

.accordion {
  width: 100%;
  max-width: 800px;
  margin: 2rem auto;
}

.accordion-item {
  border-bottom: 1px solid #e0e0e0;
  transition: border-color 0.3s ease;
  position: relative; /* For z-index context */
  border-radius: 10px;
  border: 2px solid #f06449; /* Accent color */
  margin-bottom: 1rem;
  z-index: 2;
}

.accordion-item.open {
  border: 2px solid #f06449; /* Accent color */
  margin-bottom: 1rem;
  z-index: 2; /* To ensure the border overlaps adjacent items */
}

.accordion-trigger {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 1.5rem 1rem;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between !important; /* Force space-between alignment */
  align-items: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.accordion-trigger:hover {
  background-color: #fff3f0;
  border-radius: 10px;
  /* Accent color */
}

.accordion-trigger.active {
  background-color: #f06449;
  color: #fff;
  border-radius: 8px;
}

.accordion-trigger h4 {
  transition: color 0.3s ease;
  margin: 0;
  /* Override all h4 global styles to match .accordion-trigger */
  font-size: 1.1rem !important; /* Match .accordion-trigger font-size */
  font-weight: 500 !important; /* Match .accordion-trigger font-weight */
  font-family: inherit !important; /* Inherit from .accordion-trigger, not h4 variables */
  line-height: 1.2 !important; /* Consistent line-height */
  letter-spacing: normal !important; /* Reset letter-spacing from h4 variables */
}

.accordion-trigger.active h4 {
  color: #fff;
}

.accordion-trigger::after {
  content: '+';
  font-size: 1.8rem;
  font-weight: 300;
  transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
  color: #FF4B1F; /* Use your brand orange when closed */
}

.accordion-trigger.active::after {
  transform: rotate(45deg);
  color: #fff; /* White when open */
}

.content {
  display: none;
  padding: 0 1rem 1.5rem 1rem;
  background-color: #ffffff;
  border-top: 1px solid #f0f0f0;
}

.portfolio-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.portfolio-text {
  padding: 1rem 2rem;
  text-align: justify;
}

.portfolio-text h4 {
 /*  margin-bottom: 2rem; */
  font-weight: 600;
  color: #FF4B1F;
}

.portfolio-text p, .portfolio-text li, .portfolio-text ul {
  font-size: 1rem; /* Base font size for mobile */
}

@media (min-width: 768px) {
  .portfolio-text p, .portfolio-text li, .portfolio-text ul {
    font-size: 1.1rem; /* Slightly larger font size for desktop */
  }
  
  /* Ensure accordion titles remain consistent on desktop */
  .accordion-trigger h4 {
    font-size: 1.1rem !important;
    font-weight: 500 !important;
  }
}

/* Override h4 styles in tablet breakpoint */
@media screen and (max-width: 991px) {
  .accordion-trigger h4 {
    font-size: 1.1rem !important;
    font-weight: 500 !important;
  }
}

/* Override h4 styles in mobile breakpoint */
@media screen and (max-width: 767px) {
  .accordion-trigger h4 {
    font-size: 1.1rem !important;
    font-weight: 500 !important;
  }
}

/* Override h4 styles in small mobile breakpoint */
@media screen and (max-width: 479px) {
  .accordion-trigger h4 {
    font-size: 1.1rem !important;
    font-weight: 500 !important;
  }
}

.portfolio-image {
  padding: 1rem;
  display: flex;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex; /* Use flex for centering */
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  max-width: 90%;
  width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  /* Add !important to prevent overrides from generic button styles on mobile */
  background: transparent !important;
  border: none;
  cursor: pointer;
  padding: 0;
}

.modal-close-btn::before,
.modal-close-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%; /* Control the length of the lines */
  height: 2px; /* Control the thickness of the lines */
  /* Change color to the brand's primary orange */
  background-color: #FF4B1F;
}

.modal-close-btn::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close-btn::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.responsive-table {
  width: 100%;
  border-collapse: collapse;
}

.responsive-table th, .responsive-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

.responsive-table th {
  background-color: #fff !important;
  font-weight: bold;
  color: #111 !important;
}

@media screen and (max-width: 768px) {
  .modal-content {
    padding: 1.5rem 1rem; /* Adjust padding for smaller screens */
  }
  .modal-content h4 {
    font-size: 1.25rem; /* Smaller title in modal on mobile */
    margin-bottom: 1.5rem;
  }
  .responsive-table thead {
    display: none;
  }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td {
    display: block;
    width: 100%;
  }
  .responsive-table tr {
    margin-bottom: 1rem;
  }
  .responsive-table td {
    text-align: right;
    padding: 10px;
    padding-left: 45%;
    position: relative;
    font-size: 0.9rem;
  }
  .responsive-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 40%;
    padding-left: 10px;
    font-weight: bold;
    text-align: left;
    font-size: 0.9rem;
  }
}

.portfolio-text ul {
  text-align: left;
}

.custom-method-list {
  list-style-type: none;
  padding-left: 0;
}

