/* ===== SERVICES PAGE SPECIFIC STYLES ===== */
/* This file contains styles specific to the services page layout and components */

/* ===== CUSTOM TEXT SELECTION HIGHLIGHT ===== */
::selection {
  background-color: rgba(252, 163, 17, 0.3); /* Light orange with transparency */
  color: #14213d; /* Dark blue text for better readability */
}

::-moz-selection {
  background-color: rgba(252, 163, 17, 0.3); /* Light orange with transparency for Firefox */
  color: #14213d; /* Dark blue text for better readability */
}

/* ===== SERVICES PAGE HEADER STYLES ===== */
.services-header-section {
  background-color: #f5f5f5;
  padding: var(--spacing-3xl) 0;
  text-align: center;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.services-header-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('images/texture.png') repeat;
  opacity: 0.05;
}

.services-header-wrapper {
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  position: relative;
  z-index: 1;
}

.services-page-title {
  font-size: var(--font-5xl);
  font-weight: 800;
  margin-bottom: var(--spacing-lg);
  color: #14213d;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.services-page-subtitle {
  font-size: var(--font-xl);
  color: #333;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== SERVICES GRID SECTION STYLES ===== */
.services-grid-section {
  padding: var(--spacing-3xl) 0;
  background-color: var(--background-color);
}

.services-grid-wrapper {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-2xl);
}

/* ===== MODERN SERVICE CARD STYLES ===== */
.service-modern-card {
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
  position: relative;
}

.service-modern-card:hover {
  box-shadow: var(--shadow-large);
  transform: translateY(-8px);
}

.service-card-header {
  padding: var(--spacing-xl);
  text-align: center;
  background: rgba(20, 33, 61, 0.03);
  border-bottom: 1px solid var(--border-color);
}

.service-card-title {
  font-size: var(--font-2xl);
  font-weight: 700;
  color: #14213d !important; /* Explicit dark blue color for titles */
  margin-bottom: var(--spacing-sm);
}

.service-card-subtitle {
  font-size: var(--font-base);
  color: #000000 !important; /* Explicit white color with !important to override any other styles */
  margin: 0;
}

.service-card-preview {
  position: relative;
  height: 200px;
  overflow: hidden;
  cursor: pointer;
}

.service-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.service-modern-card:hover .service-preview-image {
  transform: scale(1.1);
}

.service-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(20, 33, 61, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
  cursor: pointer;
  pointer-events: auto;
}

.service-card-preview:hover .service-preview-overlay {
  opacity: 1;
}

.view-details-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: #ffffff;
  font-weight: 600;
  font-size: var(--font-lg);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.view-details-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.service-card-footer {
  padding: var(--spacing-lg) var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(0, 0, 0, 0.02);
  border-top: 1px solid var(--border-color);
}

.service-category {
  background: #14213d;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--font-sm);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.service-expand-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: #e5e5e5 !important; /* Explicit grey background with !important */
  border: none;
  color: #000000 !important; /* Explicit black text with !important */
  font-size: var(--font-sm);
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px; /* Explicit padding instead of variables */
  border-radius: 8px; /* Explicit border radius */
  transition: all 0.3s ease;
}

.service-expand-btn:hover {
  background: #d0d0d0 !important; /* Explicit darker grey on hover with !important */
  color: #000000 !important; /* Explicit black text on hover with !important */
  transform: translateY(-1px); /* Subtle lift effect */
}

.expand-icon {
  transition: transform var(--transition-normal);
}

/* ===== SERVICE DETAILS PANEL ===== */
.service-details-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
}

.service-details-panel.active {
  max-height: 300px;
  padding: var(--spacing-xl);
}

.service-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.feature-item {
  background-color: rgba(20, 33, 61, 0.1);
  color: #14213d;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: var(--font-sm);
  font-weight: 500;
  border: 1px solid rgba(20, 33, 61, 0.2);
}

.service-cta-btn {
  display: inline-block;
  background: #14213d;
  color: #ffffff;
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-light);
}

.service-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  background: rgba(218, 223, 233, 0.9);
}

/* ===== SERVICE MODAL STYLES ===== */
.service-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease-out;
  contain: layout style paint;
}

.service-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.service-modal-content {
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  overflow: hidden;
  position: relative;
  transform: scale(0.8) translateY(50px);
  transition: transform 0.4s ease-out, opacity 0.3s ease-out;
  box-shadow: var(--shadow-large);
  opacity: 0;
  will-change: transform, opacity;
  contain: layout style paint;
}

.service-modal.active .service-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.service-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: var(--text-secondary);
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
}

.service-modal-close:hover {
  background: rgba(255, 255, 255, 1);
  color: #14213d;
  transform: scale(1.1);
}

.service-modal-header {
  padding: var(--spacing-xl);
  text-align: center;
  background: #14213d;
  color: white; /* Changed to white for visibility */
}

.service-modal-header h3 {
  font-size: var(--font-2xl);
  font-weight: 700;
  margin: 0;
  color: white; /* Changed to white for visibility */
}

.service-modal-body {
  padding: var(--spacing-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}

.service-modal-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-medium);
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.service-modal-image:hover {
  transform: scale(1.05);
}

/* Full-screen image viewer */
.image-viewer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: none;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.image-viewer-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.image-viewer-overlay.grabbing {
  cursor: grabbing;
}

.image-viewer-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-viewer-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transition: transform 0.2s ease-out;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.image-viewer-image:active {
  cursor: grabbing;
}

.image-viewer-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 12px;
  z-index: 2001;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.image-viewer-controls:hover {
  opacity: 1;
}

.image-viewer-btn {
  background: rgba(176, 173, 173, 0.95);
  border: none;
  border-radius: 12px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  font-weight: 600;
  color: #282525;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.image-viewer-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.image-viewer-btn:active {
  transform: scale(1.05);
}

.image-viewer-zoom-info {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  min-width: 80px;
  text-align: center;
}

/* Loading state */
.image-viewer-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #697081;
  font-size: 18px;
  opacity: 0.8;
}

/* Instructions overlay */
.image-viewer-instructions {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 20px;
  font-size: 14px;
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
  pointer-events: none;
}

.image-viewer-instructions.show {
  opacity: 1;
}

.mobile-instructions {
  display: none;
}

@media (max-width: 768px) {
  .desktop-instructions {
    display: none;
  }
  
  .mobile-instructions {
    display: inline;
  }
}

/* Mobile specific styles */
@media (max-width: 768px) {
  .image-viewer-controls {
    bottom: 30px;
    top: auto;
    right: 20px;
    flex-direction: row;
    gap: 10px;
    opacity: 1;
  }
  
  .image-viewer-btn {
    width: 48px;
    height: 48px;
    font-size: 20px;
    border-radius: 10px;
  }
  
  .image-viewer-zoom-info {
    bottom: 100px;
    font-size: 18px;
    padding: 14px 24px;
  }
  
  .image-viewer-image {
    max-width: 95vw;
    max-height: 85vh;
  }
  
  .image-viewer-instructions {
    bottom: 180px;
    font-size: 12px;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .image-viewer-controls {
    gap: 8px;
    right: 15px;
    bottom: 25px;
  }
  
  .image-viewer-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  
  .image-viewer-zoom-info {
    bottom: 90px;
    font-size: 16px;
    padding: 10px 18px;
  }
}

.service-modal-info p {
  font-size: var(--font-base);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-lg);
}

.modal-features-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.modal-feature-tag {
  background: rgba(20, 33, 61, 0.1);
  color: #14213d;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: var(--font-sm);
  font-weight: 500;
  border: 1px solid rgba(20, 33, 61, 0.2);
}

.service-modal-footer {
  padding: var(--spacing-xl);
  background-color: rgba(0, 0, 0, 0.02);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.service-modal-cta {
  display: inline-block;
  background: #14213d;
  color: white; /* Changed to white for visibility */
  padding: var(--spacing-md) var(--spacing-2xl);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-lg);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-medium);
}

.service-modal-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
  background: rgba(20, 33, 61, 0.9);
}

/* ===== CALL TO ACTION SECTION ===== */
.services-cta-section {
  background-color: #f5f5f5;
  padding: var(--spacing-3xl) 0;
  text-align: center;
  color: var(--text-primary);
}

.services-cta-wrapper {
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.services-cta-heading {
  font-size: var(--font-4xl);
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: #14213d;
}

.services-cta-description {
  font-size: var(--font-xl);
  margin-bottom: var(--spacing-2xl);
  color: black; /* Changed to black for better contrast */
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.services-cta-button {
  display: inline-block;
  background: lightgray;
  color: var(--primary-color);
  padding: var(--spacing-lg) var(--spacing-2xl);
  border-radius:25px;
  text-decoration: none;
  font-weight: 700;
  font-size: var(--font-lg);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-medium);
}

.services-cta-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-large);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .services-grid-wrapper {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .service-modal {
    align-items: flex-start;
    padding: 20px 10px;
    overflow-y: auto;
  }
  
  .service-modal-content {
    width: 95vw;
    max-height: calc(100vh - 40px);
    margin: auto;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
  }
  
  .service-modal.active .service-modal-content {
    transform: scale(1) translateY(0);
  }
  
  .service-modal-body {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    max-height: calc(70vh - 100px);
    overflow-y: auto;
  }
  
  .service-card-footer {
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: stretch;
  }
  
  .service-expand-btn {
    justify-content: center;
    background: #e5e5e5 !important;
    color: #000000 !important;
  }
  
  .service-features-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

@media (max-width: 480px) {
  .services-page-title {
    font-size: var(--font-4xl);
  }
  
  .services-page-subtitle {
    font-size: var(--font-lg);
  }
  
  .service-card-header {
    padding: var(--spacing-lg);
  }
  
  .service-card-title {
    font-size: var(--font-xl);
  }
  
  .service-card-preview {
    height: 150px;
  }
  
  .service-modal-header,
  .service-modal-body,
  .service-modal-footer {
    padding: var(--spacing-lg);
  }
  
  .modal-features-list {
    gap: 6px;
  }
  
  .modal-feature-tag {
    font-size: 12px;
    padding: 4px 8px;
  }
}
