/* ===============================================
   AESTHETIC PERFECTION & FINE-TUNING
   Final polish for a premium experience
   =============================================== */

/* ===============================================
   PERFECT SPACING SYSTEM
   =============================================== */

/* Consistent section spacing */
section {
  padding: 90px 0;
}

section:first-of-type {
  padding-top: 0;
}

/* Container spacing */
.container {
  padding-left: 20px;
  padding-right: 20px;
}

@media (min-width: 768px) {
  .container {
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (min-width: 1200px) {
  .container {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* Vertical rhythm */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1.25rem;
}

p {
  margin-bottom: 1.5rem;
}

/* ===============================================
   ENHANCED SHADOWS - Depth & Hierarchy
   =============================================== */

/* Card shadows - layered depth */
.card {
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 16px rgba(0, 0, 0, 0.06),
    0 16px 32px rgba(0, 0, 0, 0.04);
}

.card:hover {
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.06),
    0 16px 32px rgba(0, 0, 0, 0.08),
    0 32px 64px rgba(0, 0, 0, 0.08);
}

/* Production & Value cards */
.production-card,
.value-card {
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.06);
}

.production-card:hover,
.value-card:hover {
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.06),
    0 20px 48px rgba(0, 0, 0, 0.1);
}

/* Certificate cards - subtle elevation */
.certificate-card {
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.03),
    0 4px 12px rgba(0, 0, 0, 0.05);
}

.certificate-card:hover {
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.08);
}

/* Navbar shadow when scrolled */
.navbar.scrolled {
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Button shadows */
.btn-primary {
  box-shadow: 
    0 4px 12px rgba(212, 32, 39, 0.15),
    0 8px 24px rgba(212, 32, 39, 0.1);
}

.btn-primary:hover {
  box-shadow: 
    0 8px 20px rgba(212, 32, 39, 0.2),
    0 16px 40px rgba(212, 32, 39, 0.15);
}

/* ===============================================
   TYPOGRAPHY PERFECTION
   =============================================== */

/* Font smoothing */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Perfect line height */
body {
  line-height: 1.7;
}

h1, h2, h3 {
  line-height: 1.2;
}

h4, h5, h6 {
  line-height: 1.4;
}

/* Letter spacing refinement */
h1, h2 {
  letter-spacing: -0.02em;
}

.btn,
.nav-link {
  letter-spacing: 0.02em;
}

.eyebrow,
.text-uppercase {
  letter-spacing: 0.1em;
}

/* ===============================================
   COLOR REFINEMENTS
   =============================================== */

/* Text hierarchy */
.text-primary-soft {
  color: rgba(26, 26, 26, 0.8);
}

.text-muted-soft {
  color: rgba(107, 107, 107, 0.7);
}

/* Link colors */
a {
  color: var(--accent, #8b7355);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary, #1a1a1a);
}

/* ===============================================
   BORDER REFINEMENTS
   =============================================== */

/* Subtle borders */
.card,
.production-card,
.value-card {
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover,
.production-card:hover,
.value-card:hover {
  border-color: rgba(139, 115, 85, 0.15);
}

.certificate-card {
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.certificate-card:hover {
  border-color: rgba(139, 115, 85, 0.2);
}

/* ===============================================
   BACKGROUND GRADIENTS & PATTERNS
   =============================================== */

/* Subtle gradient overlays */
.about-section,
.values-section,
.production-section {
  position: relative;
}

.about-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(139, 115, 85, 0.15) 50%,
    transparent
  );
}

/* ===============================================
   IMAGE QUALITY & LOADING
   =============================================== */

/* Crisp images */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Smooth image loading */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Image placeholders */
.placeholder-media {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===============================================
   FOCUS STATES - Accessibility
   =============================================== */

/* Enhanced focus indicators */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(139, 115, 85, 0.3);
  outline-offset: 2px;
  transition: outline 0.2s ease;
}

/* Button focus states */
.btn:focus {
  outline: 3px solid rgba(212, 32, 39, 0.3);
  outline-offset: 3px;
}

/* Remove default browser outlines */
:focus:not(:focus-visible) {
  outline: none;
}

/* ===============================================
   SCROLLBAR STYLING
   =============================================== */

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8b7355, #a68b6a);
  border-radius: 6px;
  border: 2px solid #f5f5f5;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7a6449, #8b7355);
}

/* ===============================================
   SELECTION STYLING
   =============================================== */

::selection {
  background: rgba(139, 115, 85, 0.2);
  color: #1a1a1a;
}

::-moz-selection {
  background: rgba(139, 115, 85, 0.2);
  color: #1a1a1a;
}

/* ===============================================
   LOADING STATES
   =============================================== */

/* Shimmer effect for loading */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.loading {
  background: linear-gradient(
    90deg,
    #f5f5f5 0%,
    #e8e8e8 20%,
    #f5f5f5 40%,
    #f5f5f5 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

/* ===============================================
   ICON REFINEMENTS
   =============================================== */

/* Icon alignment */
i {
  vertical-align: middle;
  line-height: 1;
}

/* Icon sizing */
.fa-xs { font-size: 0.75rem; }
.fa-sm { font-size: 0.875rem; }
.fa-lg { font-size: 1.25rem; }
.fa-xl { font-size: 1.5rem; }
.fa-2x { font-size: 2rem; }
.fa-3x { font-size: 3rem; }

/* ===============================================
   UTILITY CLASSES
   =============================================== */

/* Spacing utilities */
.mb-6 { margin-bottom: 4rem !important; }
.mt-6 { margin-top: 4rem !important; }
.py-6 { padding-top: 4rem !important; padding-bottom: 4rem !important; }

/* Text utilities */
.text-gradient {
  background: linear-gradient(135deg, #8b7355, #d4a574);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 0, 0, 0.08) 50%,
    transparent
  );
  margin: 3rem 0;
}

/* Glass effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ===============================================
   PERFORMANCE OPTIMIZATIONS
   =============================================== */

/* GPU acceleration for animations */
.hover-lift,
.hover-zoom,
.card,
.production-card,
.value-card {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Will-change for frequently animated elements */
.btn:hover,
.card:hover,
.nav-link:hover {
  will-change: transform;
}

/* Contain layout shifts */
.card-img-top,
.about-image,
img {
  content-visibility: auto;
}

/* ===============================================
   PRINT OPTIMIZATIONS
   =============================================== */

@media print {
  /* Reset animations */
  * {
    animation: none !important;
    transition: none !important;
  }
  
  /* Optimize spacing */
  section {
    padding: 20px 0;
  }
  
  /* Show all content */
  .scroll-reveal,
  .scroll-reveal-left,
  .scroll-reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }
  
  /* Optimize colors for print */
  body {
    color: #000;
    background: #fff;
  }
  
  .card,
  .production-card,
  .value-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* CTA Glassmorphism Section */
.cta-glassmorphism-section {
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cta-glassmorphism-section .cta-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
      rgba(13, 110, 253, 0.87) 0%, 
      rgba(102, 126, 234, 0.87) 50%, 
      rgba(13, 110, 253, 0.87) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1;
}

.cta-glassmorphism-section .cta-background::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(5%, 5%) rotate(120deg); }
  66% { transform: translate(-5%, 5%) rotate(240deg); }
}

.cta-glassmorphism-section .cta-content {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 60px 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-glassmorphism-section .cta-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.cta-glassmorphism-section .btn-light {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-glassmorphism-section .btn-light:hover {
  background: white;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Enhanced CTA Styles */
.cta-glassmorphism-section .cta-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  animation: pulseGlow 3s ease-in-out infinite;
}

.cta-glassmorphism-section .cta-icon i {
  font-size: 36px;
  color: white;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3),
                0 0 40px rgba(255, 255, 255, 0.2);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5),
                0 0 60px rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
  }
}

.cta-glassmorphism-section .cta-title {
  font-size: 2.5rem;
  text-shadow: 0 3px 25px rgba(0, 0, 0, 0.4),
               0 6px 40px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.5px;
  line-height: 1.2;
  animation: fadeInUp 0.8s ease-out;
}

.cta-glassmorphism-section .cta-subtitle {
  font-size: 1.25rem;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
  line-height: 1.6;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.cta-glassmorphism-section .cta-button {
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.cta-glassmorphism-section .cta-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(13, 110, 253, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.cta-glassmorphism-section .cta-button:hover::before {
  width: 300px;
  height: 300px;
}

.cta-glassmorphism-section .cta-button i {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.cta-glassmorphism-section .cta-button:hover i.fa-arrow-right {
  transform: translateX(5px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .cta-glassmorphism-section .cta-title {
    font-size: 1.75rem;
  }
  
  .cta-glassmorphism-section .cta-subtitle {
    font-size: 1rem;
  }
  
  .cta-glassmorphism-section .cta-icon {
    width: 60px;
    height: 60px;
  }
  
  .cta-glassmorphism-section .cta-icon i {
    font-size: 28px;
  }
  
  .cta-glassmorphism-section .cta-content {
    padding: 40px 25px;
  }
}
