/* ==================== COMPONENT STYLES ==================== */

/* Primary CTA Button */
.btn-primary {
  display: inline-block;
  background-color: #B90000;
  color: #FFFFFF;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease-out, transform 0.2s ease-out, box-shadow 0.2s ease-out;
  text-decoration: none;
  position: relative;
}

.btn-primary:hover {
  background-color: #a00000;
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(185, 0, 0, 0.3);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:focus {
  outline: 2px solid #0F284B;
  outline-offset: 2px;
}

/* Magnetic Button Effect */
.btn-primary.magnetic {
  transition: transform 0.2s ease-out;
}

@media (hover: hover) {
  .btn-primary.magnetic:hover {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

/* Secondary CTA Button */
.btn-secondary {
  display: inline-block;
  background-color: #0F284B;
  color: #FFFFFF;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease-out, transform 0.2s ease-out;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: #1f385b;
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: scale(0.98);
}

/* Tertiary CTA / Text Link */
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0F284B;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease-out;
}

.btn-text:hover {
  color: #B90000;
}

.btn-text svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease-out;
}

.btn-text:hover svg {
  transform: translateX(4px);
}

/* ==================== SERVICE/PROJECT CARD ==================== */
.card {
  background: #FFFFFF;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-out;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 25px;
}

.card-content h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.card-content p {
  color: #333333;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #B90000;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out, color 0.2s ease-out;
}

.card:hover .card-link {
  opacity: 1;
  transform: translateY(0);
}

.card-link:hover {
  color: #a00000;
}

.card-link svg {
  width: 16px;
  height: 16px;
}

/* ==================== ACCORDION ITEM ==================== */
.accordion-item {
  border-bottom: 1px solid #E0E0E0;
}

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0F284B;
}

.accordion-header:focus {
  outline: 2px solid #B90000;
  outline-offset: 2px;
}

.accordion-icon {
  width: 24px;
  height: 24px;
  position: relative;
  flex-shrink: 0;
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  background-color: #0F284B;
  transition: transform 0.3s ease-in-out;
}

.accordion-icon::before {
  width: 16px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.accordion-icon::after {
  width: 2px;
  height: 16px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.accordion-item.active .accordion-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

.accordion-content p {
  padding-bottom: 20px;
  color: #333333;
  line-height: 1.7;
}

.accordion-item.active .accordion-content {
  max-height: 500px;
}

/* ==================== FORM STYLES ==================== */
.form-group {
  margin-bottom: 25px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #0F284B;
  font-size: 0.95rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 16px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  border: 2px solid #E0E0E0;
  border-radius: 4px;
  background: #FFFFFF;
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #0F284B;
  box-shadow: 0 0 0 3px rgba(15, 40, 75, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #999999;
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

/* Form Field Border Animation */
.form-input.animate-border:focus,
.form-textarea.animate-border:focus {
  position: relative;
}

.form-input.animate-border:focus::before,
.form-textarea.animate-border:focus::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #0F284B;
  animation: borderDraw 0.4s ease-out forwards;
}

@keyframes borderDraw {
  to { width: 100%; }
}

/* ==================== STATISTICS COUNTER ==================== */
.stat-item {
  text-align: center;
  padding: 30px 20px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: #B90000;
  line-height: 1;
  margin-bottom: 10px;
  display: block;
}

.stat-label {
  font-size: 1rem;
  color: #333333;
  font-weight: 500;
}

/* ==================== TESTIMONIAL CARD ==================== */
.testimonial-card {
  background: #FFFFFF;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
}

.testimonial-quote-mark {
  position: absolute;
  top: 20px;
  left: 30px;
  font-size: 80px;
  color: #E0E0E0;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  color: #333333;
  margin-bottom: 25px;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  font-weight: 600;
  color: #B90000;
  display: block;
}

.testimonial-role {
  color: #666666;
  font-size: 0.9rem;
}

/* ==================== PROCESS TIMELINE ==================== */
.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #E0E0E0;
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  padding-bottom: 40px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 11px;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #B90000;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(185, 0, 0, 0.3);
}

.timeline-content h4 {
  margin-bottom: 10px;
}

.timeline-content p {
  color: #333333;
  margin: 0;
}

/* ==================== TRUST BADGES ==================== */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.trust-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 25px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 4px;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.trust-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.trust-badge img {
  max-height: 40px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.2s ease-out, opacity 0.2s ease-out;
}

.trust-badge:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* ==================== PROJECT GALLERY ==================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-out;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(15, 40, 75, 0.9));
  padding: 30px 20px 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h4 {
  color: #FFFFFF;
  margin-bottom: 5px;
}

.gallery-overlay p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin: 0;
}

/* ==================== FILTER BUTTONS ==================== */
.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  justify-content: center;
}

.filter-btn {
  padding: 10px 20px;
  background: #0F284B;
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease-out, transform 0.2s ease-out;
}

.filter-btn:hover {
  background-color: #1f385b;
}

.filter-btn.active {
  background-color: #B90000;
}

.filter-btn:focus {
  outline: 2px solid #0F284B;
  outline-offset: 2px;
}

/* ==================== MAP SECTION ==================== */
.map-container {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==================== EMERGENCY NOTICE ==================== */
.emergency-notice {
  background: #B90000;
  color: #FFFFFF;
  padding: 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.emergency-notice svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.emergency-notice p {
  margin: 0;
  font-size: 0.95rem;
}

/* ==================== TEAM MEMBER CARD ==================== */
.team-card {
  text-align: center;
  padding: 30px;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.team-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 20px;
  overflow: hidden;
  border: 4px solid #E0E0E0;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  color: #0F284B;
  margin-bottom: 5px;
}

.team-role {
  color: #B90000;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.team-bio {
  color: #333333;
  font-size: 0.9rem;
  margin: 0;
}

/* ==================== VALUE CARD ==================== */
.value-card {
  text-align: center;
  padding: 40px 30px;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease-out;
}

.value-card:hover {
  transform: translateY(-5px);
}

.value-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #B90000;
  border-radius: 50%;
}

.value-icon svg {
  width: 35px;
  height: 35px;
  fill: #FFFFFF;
}

.value-card h3 {
  margin-bottom: 15px;
}

.value-card p {
  color: #333333;
  margin: 0;
}

/* ==================== CTA SECTION ==================== */
.cta-section {
  background: #B90000;
  color: #FFFFFF;
  text-align: center;
  padding: 60px 20px;
}

.cta-section h2 {
  color: #FFFFFF;
  margin-bottom: 15px;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.cta-section .btn-primary {
  background: #FFFFFF;
  color: #B90000;
}

.cta-section .btn-primary:hover {
  background: #f0f0f0;
  color: #a00000;
}

/* ==================== RESPONSIVE ADJUSTMENTS FOR COMPONENTS ==================== */
@media (max-width: 767px) {
  .card-content {
    padding: 20px;
  }

  .testimonial-card {
    padding: 25px;
  }

  .testimonial-quote-mark {
    font-size: 60px;
    top: 15px;
    left: 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .timeline::before {
    left: 15px;
  }

  .timeline-item {
    padding-left: 50px;
  }

  .timeline-marker {
    left: 6px;
    width: 18px;
    height: 18px;
  }

  .stat-number {
    font-size: 2.5rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-number {
    font-size: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card:hover,
  .card:hover .card-image img,
  .card-link,
  .gallery-item:hover img,
  .gallery-item:hover .gallery-overlay,
  .trust-badge:hover,
  .filter-btn,
  .value-card:hover {
    transform: none;
  }

  .gallery-overlay {
    transform: translateY(0);
  }

  .card-link {
    opacity: 1;
  }
}