/* ======================
   BASE STYLES & VARIABLES
   ----------------------
   Defines global styles, color variables and reusable properties
   that are used throughout the stylesheet for consistency.
   ====================== */
:root {
  /* Wood & Metal Color Variables */
  --card-bg: #f5f0e9a0; /* Parchment with transparency */
  --card-hover: #d4c9b8; /* Weathered wood */
  --primary: #8B7D65; /* Aged bronze */
  --primary-dark: #5C4B3A; /* Dark walnut */
  --secondary: #C0C0C0; /* Silver metal */
  
  /* Effect Variables */
  --shadow: 0 2px 8px rgba(74, 62, 45, 0.1);
  --shadow-hover: 0 4px 12px rgba(74, 62, 45, 0.15);
  --transition: all 0.3s ease;
  --border-radius: 4px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: 
    linear-gradient(rgba(245, 240, 233, 0.2), rgba(245, 240, 233, 0.2)),
    url('img/metal_texture.png');
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #3A3329; /* Darkened text for better contrast */
  line-height: 1.7;
  margin: 0;
  background-blend-mode: overlay, normal;
}


/* ======================
   HEADER & NAVIGATION
   ----------------------
   Styles for the site header including:
   - Background texture and gradient overlay
   - Typography and text effects
   - Decorative elements like the underline
   ====================== */
header {
  background:url('img/wood_texture.png');
  border-bottom: 2px solid #000000;
  padding: 0;
  text-align: center;
  width: 100%;
  position: relative;
}

header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(42,33,24,0.3) 0%,
    rgba(42,33,24,0.1) 100%);
  pointer-events: none;
}

header h1 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 3.5rem;
  color: #F5F0E5;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
  text-shadow: 
    2px 2px 0 rgba(0,0,0,0.3),
    4px 4px 0 rgba(0,0,0,0.2);
  position: relative;
  display: inline-block;
}

header h1::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8B7D65, #4A3E2D, #8B7D65);
  border-radius: 3px;
}

header p {
  font-size: 1.2rem;
  color: #D3D3D3;
  font-weight: 500;
}

.main-nav {
  background-color: #1A120B;
  padding: 0.4rem 0;
  border-top: 1px solid #3A2E1F;
  border-bottom: 1px solid #3A2E1F;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s ease;
  padding: 0.1rem;
  border-radius: 4px;
}

.main-nav a:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.main-nav a:active {
  color: #C0C0C0;
}


/* ======================
   MAIN CONTENT SECTIONS
   ----------------------
   Styles for content sections including:
   - Transparent backgrounds with blur effect
   - Consistent spacing and borders
   - Heading styles and decorative elements
   ====================== */
section {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 0 2rem;
  margin: clamp(1rem, 3vw, 2rem) auto;
  max-width: min(960px, 90vw);
  width: min(85%, 100% - 2rem);
  box-shadow: 
    0 6px 24px rgba(74, 62, 45, 0.2),
    0 2px 4px rgba(74, 62, 45, 0.1);
  backdrop-filter: blur(4px);
}

section h2 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 2.8rem;
  color: #5C4B3A;
  margin: 0 0 1rem 0;
  border-bottom: 2px solid #8B7D65;
  display: inline-block;
  padding-bottom: 0.3rem;
}


/* ======================
   CARD COMPONENTS
   ----------------------
   Interactive card elements featuring:
   - Hover animations and transitions
   - Image container with fixed aspect ratio
   - Text overlay effects on hover
   - Mobile-responsive layout changes
   ====================== */
.card {
  /* Layout */
  position: relative;
  overflow: hidden;
  padding: 0;
  aspect-ratio: 16/9;
  
  /* Visual */
  border: 1px solid #e0e0e0;
  border-radius: 8px 2px 8px 2px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: var(--transition);
  
  /* Content */
  text-align: center;
  display: flex;
  flex-direction: column;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.2;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  background-color: var(--card-hover);
}

.card-img-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  margin: 0;
  padding: 0;
  min-height: 0; /* Fixes flexbox overflow */
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
  padding: 0;
  transition: transform 0.3s ease;
  filter: sepia(0.4) contrast(1.1);
  min-width: 100%;
  min-height: 100%;
}

.card-content {
  padding: 0;
  position: relative;
  z-index: 2;
  background: var(--card-bg);
}

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

.card h3 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.5rem 1rem;
  z-index: 2;
  transition: all 0.4s ease;
  
  /* Visual */
  background: rgba(74, 62, 45, 0.7);
  
  /* Typography */
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 1.3rem;
  color: #F5F0E5;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.card p {
  position: absolute;
  bottom: -100%;
  left: 0;
  right: 0;
  margin: 0;
  padding: 1rem;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 1;
  
  /* Visual */
  background: rgba(79, 67, 67, 0.8);
  border-top: 1px solid #5C4B3A;
  
  /* Typography */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.1rem;
  color: #F5F0E5;
  text-align: center;
  line-height: 1.5;
}

.card:hover h3 {
  bottom: 8rem;
}

.card:hover p {
  bottom: 0;
  opacity: 1;
}


/* ======================
   GRID LAYOUTS
   ----------------------
   Responsive grid systems for:
   - Services/portfolio items
   - Contact information blocks
   - Automatic column adjustment based on viewport
   ====================== */
.service-grid,
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  margin: clamp(1rem, 2vw, 2rem) 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  margin: clamp(0.75rem, 1.5vw, 1.5rem) 0;
}

.contact-item {
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(122, 107, 84, 0.2);
  border-radius: 8px;
  transition: var(--transition);
  background-color: var(--card-bg);
}

.contact-item:hover {
  transform: translateY(-3px);
}

.contact-item img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.contact-item a {
  color: #5C4B3A;
  text-decoration: none;
  transition: var(--transition);
  font-weight: bold;
}

.contact-item a:hover {
  text-decoration: none;
  padding: 0.2rem 0.5rem;
}


/* ======================
   FOOTER
   ----------------------
   Site footer styling with:
   - Dark background matching header
   - Subtle top border
   - Italicized secondary text
   ====================== */
footer {
  background-color: #000000;
  text-align: center;
  padding: 1rem 0;
  color: #FFFFFF;
  font-size: 0.9rem;
  font-style: italic;
  border-top: 1px solid #5C4B3A;
  width: 100%;
}
