/**
 * About Core Values Block Styles - Authentic Printmax Design
 * Grid layout for values with icons
 * Sharp corners, red accent borders
 */

/* Block container */
.about-core-values-block {
    padding: 5rem 0;
}

/* Background utility */
.bg-gray-50 {
    background-color: var(--gray-50, #f8f9fa);
}

/* Text utilities */
.text-primary {
    color: var(--wp--preset--color--primary) !important;
}

.text-center {
    text-align: center;
}

/* Margin utilities */
.mb-5 {
    margin-bottom: 3rem;
}

/* Section heading */
.about-core-values-block h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Section subtitle */
.about-core-values-block .text-center p {
    font-size: 1.25rem;
    color: var(--gray-600, #6c757d);
    margin-bottom: 0;
}

/* Grid layout */
.grid {
    display: grid;
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gap-4 {
    gap: 2rem;
}

/* Service card styling - Authentic Printmax (sharp corners, red accent) */
.service-card {
    background: var(--white, #ffffff);
    padding: 2rem;
    border-radius: var(--radius, 4px);
    text-align: center;
    transition: all var(--transition-normal, 250ms ease-out);
    border: 1px solid var(--gray-200, #e9ecef);
    border-top: 3px solid var(--wp--preset--color--secondary, #E31E24);
    height: 100%;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.08));
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Service card hover effect */
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--wp--preset--color--secondary, #E31E24);
}

/* Service icon container */
.service-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full, 9999px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: transform var(--transition-normal, 250ms ease-out);
}

/* Icon hover effect */
.service-card:hover .service-icon {
    transform: scale(1.1);
}

/* Icon styling */
.service-icon i,
.service-icon svg {
    width: 24px;
    height: 24px;
}

/* Card heading */
.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--gray-900, #212529);
}

/* Card description */
.service-card p {
    color: var(--gray-600, #6c757d);
    margin-bottom: 0;
    flex-grow: 1;
    line-height: 1.6;
}

/* Fade in animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.7s ease-out forwards;
}

.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === MOBILE-FIRST RESPONSIVE DESIGN === */

/* Base: Mobile-first single column - Higher specificity to override global utilities */
.grid.grid-cols-4 {
  grid-template-columns: 1fr !important;
  gap: 1.5rem !important;
}

/* Tablet: 2 columns */
@media (min-width: 640px) {
  .grid.grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
  }
}

/* Desktop: Full columns */
@media (min-width: 1024px) {
  .grid.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2rem !important;
  }
}

/* Add minimum width to prevent cramping and ensure centered design */
.service-card {
  min-width: 260px; /* Critical: Prevents text cramping on narrow screens */
  text-align: center; /* Ensure content stays centered */
  display: flex;
  flex-direction: column;
}

/* Ensure icons stay centered */
.service-icon {
  margin: 0 auto 1.5rem; /* Critical: auto margins center the icon */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ensure titles stay centered */
.service-card h3 {
  text-align: center; /* Explicit centering */
}

/* Ensure descriptions stay centered */
.service-card p {
  text-align: center; /* Explicit centering */
  flex-grow: 1;
}

/* Extra small screens */
@media (max-width: 479px) {
  .about-core-values-block {
    padding: 2.5rem 0;
  }
  
  .service-card {
    padding: 1.25rem;
    min-width: 260px; /* Maintain minimum width even on smallest screens */
  }
  
  .gap-4 {
    gap: 1rem;
  }
  
  .about-core-values-block h2 {
    font-size: 1.875rem;
  }
  
  .about-core-values-block .text-center p {
    font-size: 1rem;
  }
}

/* Small screens adjustments */
@media (max-width: 768px) {
  .about-core-values-block {
    padding: 3rem 0;
  }
  
  .service-card {
    padding: 1.5rem;
  }
  
  .gap-4 {
    gap: 1.5rem;
  }
  
  .about-core-values-block h2 {
    font-size: 2rem;
  }
  
  .about-core-values-block .text-center p {
    font-size: 1.125rem;
  }
}

/* Medium screens (tablet) - ensure proper 2-column layout */
@media (min-width: 640px) and (max-width: 959px) {
  .grid-cols-4 {
    /* Let auto-fit handle the layout naturally */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* Large desktop */
@media (min-width: 1440px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
    }
}