/* ========================================
   UNIWORKGROUP - Modern Styles
   ======================================== */

/* CSS Custom Properties */
:root {
  /* Colors */
  --color-primary: #b12727;
  --color-primary-dark: #8a1f1f;
  --color-primary-light: #d63a3a;
  --color-secondary: #57BBDB;
  --color-accent-1: #C5D5E2;
  --color-accent-2: #846336;
  --color-accent-3: #FD001F;
  --color-accent-4: #5EBB5E;
  --color-dark: #1a1a2e;
  --color-darker: #0f0f1a;
  --color-light: #f8f9fa;
  --color-white: #ffffff;
  --color-gray-100: #f1f3f5;
  --color-gray-200: #e9ecef;
  --color-gray-300: #dee2e6;
  --color-gray-400: #ced4da;
  --color-gray-500: #adb5bd;
  --color-gray-600: #6c757d;
  --color-gray-700: #495057;
  --color-gray-800: #343a40;
  --color-gray-900: #212529;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--color-secondary) 0%, #3aa8c7 100%);
  --gradient-dark: linear-gradient(135deg, var(--color-darker) 0%, var(--color-dark) 100%);
  --gradient-overlay-ecotech: linear-gradient(135deg, rgba(177, 35, 34, 0.95) 0%, rgba(138, 31, 31, 0.98) 100%);
  --gradient-overlay-cli: linear-gradient(135deg, rgba(87, 187, 219, 0.95) 0%, rgba(58, 168, 199, 0.98) 100%);
  --gradient-overlay-testing: linear-gradient(135deg, rgba(197, 213, 226, 0.95) 0%, rgba(170, 190, 210, 0.98) 100%);
  --gradient-overlay-certification: linear-gradient(135deg, rgba(132, 99, 54, 0.95) 0%, rgba(100, 75, 40, 0.98) 100%);
  --gradient-overlay-safety: linear-gradient(135deg, rgba(253, 0, 31, 0.95) 0%, rgba(200, 0, 25, 0.98) 100%);
  --gradient-overlay-rights: linear-gradient(135deg, rgba(94, 187, 94, 0.95) 0%, rgba(70, 150, 70, 0.98) 100%);
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3rem;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-slower: 500ms ease;
  
  /* Container */
  --container-max: 1200px;
  --container-padding: var(--space-6);
  
  /* Header Height */
  --header-height: 120px;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-gray-800);
  background-color: var(--color-light);
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20.5V18H0v-2h20v-2H0v-2h20v-2H0V8h20V6H0V4h20V2H0V0h22v20h2V0h2v20h2V0h2v20h2V0h2v20h2v2H20v-1.5zM0 20h2v20H0V20zm4 0h2v20H4V20zm4 0h2v20H8V20zm4 0h2v20h-2V20zm4 0h2v20h-2V20zm4 4h20v2H20v-2zm0 4h20v2H20v-2zm0 4h20v2H20v-2zm0 4h20v2H20v-2z' fill='%23d6d6d6' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul, ol {
  list-style: none;
}

address {
  font-style: normal;
}

/* ========================================
   Layout Utilities
   ======================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   Header
   ======================================== */
.site-header {
  position: relative;
  padding: var(--space-6) 0;
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  text-align: center;
}

.logo {
  flex-shrink: 0;
  transition: transform var(--transition-normal);
}

.logo:hover {
  transform: scale(1.02);
}

.logo img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.site-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  line-height: var(--line-height-tight);
  color: var(--color-dark);
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   Services Section
   ======================================== */
.services-section {
  padding: var(--space-16) 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
  align-items: start;
}

/* Service Card */
.service-card {
  perspective: 1000px;
}

.service-link {
  display: block;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-white);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  text-decoration: none;
  color: inherit;
}

.service-link:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
}

.service-link:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 4px;
}

/* Service Image Wrapper */
.service-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 11 / 9;
}

.service-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slower) ease-out;
}

.service-link:hover .service-image {
  transform: scale(1.05);
}

/* Service Overlay */
.service-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
  border-radius: var(--radius-xl);
}

.service-link:hover .service-overlay {
  opacity: 1;
  visibility: visible;
}

.overlay-content {
  text-align: center;
  color: var(--color-white);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.service-link:hover .overlay-content {
  transform: translateY(0);
}

.overlay-content h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-3);
}

.overlay-content p {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  opacity: 0.95;
  font-weight: 300;
}

/* Overlay Color Variants */
.overlay--ecotech { background: var(--gradient-overlay-ecotech); }
.overlay--cli { background: var(--gradient-overlay-cli); }
.overlay--testing { background: var(--gradient-overlay-testing); color: var(--color-dark); }
.overlay--certification { background: var(--gradient-overlay-certification); }
.overlay--safety { background: var(--gradient-overlay-safety); }
.overlay--rights { background: var(--gradient-overlay-rights); }

/* Service Info */
.service-info {
  padding: var(--space-5) var(--space-6);
  text-align: center;
  background: var(--color-white);
}

.service-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-dark);
  letter-spacing: -0.01em;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background: var(--color-dark);
  color: var(--color-gray-300);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-12);
}

.offices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.office-card {
  padding: var(--space-6);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.office-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(177, 35, 34, 0.3);
}

.office-card h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.office-card h3 i {
  color: var(--color-primary);
  font-size: var(--font-size-xl);
}

.office-address {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  color: var(--color-gray-400);
  margin-bottom: var(--space-3);
}

.office-phone,
.office-email {
  font-size: var(--font-size-sm);
  color: var(--color-gray-400);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transition: color var(--transition-fast);
}

.office-phone a,
.office-email a {
  color: inherit;
}

.office-phone a:hover,
.office-email a:hover {
  color: var(--color-primary-light);
}

.office-phone i,
.office-email i {
  color: var(--color-primary);
  flex-shrink: 0;
  width: 18px;
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright p {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
}

.webmail-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  color: var(--color-white);
  font-size: var(--font-size-xl);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.webmail-link:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: var(--shadow-xl);
  color: var(--color-white);
}

.developer p {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
}

.developer a {
  color: var(--color-primary-light);
  font-weight: 500;
}

.developer a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.service-card {
  animation: fadeInUp 0.6s ease-out both;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.15s; }
.service-card:nth-child(3) { animation-delay: 0.2s; }
.service-card:nth-child(4) { animation-delay: 0.25s; }
.service-card:nth-child(5) { animation-delay: 0.3s; }
.service-card:nth-child(6) { animation-delay: 0.35s; }

.office-card {
  animation: fadeInUp 0.6s ease-out both;
}

.office-card:nth-child(1) { animation-delay: 0.1s; }
.office-card:nth-child(2) { animation-delay: 0.15s; }
.office-card:nth-child(3) { animation-delay: 0.2s; }
.office-card:nth-child(4) { animation-delay: 0.25s; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  :root {
    --font-size-4xl: 2.25rem;
    --font-size-3xl: 1.75rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
  }
}

@media (max-width: 768px) {
  :root {
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.5rem;
    --space-16: 3rem;
    --space-12: 2rem;
  }
  
  .site-header {
    padding: var(--space-5) 0;
  }
  
  .header-content {
    gap: var(--space-4);
  }
  
  .logo img {
    width: 120px;
    height: 75px;
  }
  
  .site-title {
    font-size: var(--font-size-3xl);
  }
  
  .services-section {
    padding: var(--space-12) 0;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .service-image-wrapper {
    aspect-ratio: 4 / 3;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .copyright,
  .webmail-link,
  .developer {
    width: 100%;
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: var(--space-4);
  }
  
  .site-title {
    font-size: var(--font-size-2xl);
  }
  
  .overlay-content h3 {
    font-size: var(--font-size-lg);
  }
  
  .overlay-content p {
    font-size: var(--font-size-xs);
  }
  
  .service-title {
    font-size: var(--font-size-base);
  }
  
  .office-card {
    padding: var(--space-4);
  }
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .site-header,
  .service-overlay,
  .webmail-link {
    display: none !important;
  }
  
  .services-grid {
    display: block !important;
  }
  
  .service-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: var(--space-6);
    box-shadow: none !important;
    border: 1px solid var(--color-gray-300);
  }
  
  body {
    background: none !important;
    color: var(--color-dark) !important;
  }
}