/* ============================================
   RESPONSIVE GLOBAL STYLES & COMPONENTS
   ============================================ */

/* MEDIA QUERIES BREAKPOINTS */
:root {
  --primary-color: #14502C;
  --secondary-color: #F5A31F;
  --white: #fff;
  --black: #000000;
  --primary-font: "Urbanist", sans-serif;
  --secondary-font: "Urbanist", sans-serif;
  
  /* Spacing */
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 20px;
  --spacing-lg: 40px;
  --spacing-xl: 60px;
  --spacing-xxl: 100px;
  
  /* Border Radius */
  --border-radius-sm: 10px;
  --border-radius-md: 30px;
  --border-radius-lg: 60px;
  
  /* Typography */
  --heading-size-lg: clamp(2rem, 5vw, 5.5rem);
  --heading-size-md: clamp(1.5rem, 3vw, 3rem);
  --heading-size-sm: clamp(1.2rem, 2vw, 1.8rem);
  --body-font-size: 18px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--secondary-font);
  font-size: var(--body-font-size);
  line-height: 1.6;
  color: var(--black);
  position: relative;
  max-width: 1920px;
  margin: 0 auto;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--primary-font);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem 0;
}

h1 {
  font-size: var(--heading-size-lg);
  color: var(--primary-color);
}

h2 {
  font-size: var(--heading-size-md);
  color: var(--primary-color);
}

h3 {
  font-size: var(--heading-size-sm);
  color: var(--primary-color);
}

p {
  margin: 0 0 1rem 0;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.container {
  width: 100%;
  max-width: 1572px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

.clearfix {
  clear: both;
  overflow: hidden;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn,
button,
input[type="submit"],
input[type="button"],
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--secondary-color);
  color: var(--black);
  border: none;
  border-radius: var(--border-radius-lg);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
.btn-primary:hover {
  background: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--primary-color);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--black);
}

/* ============================================
   FORMS
   ============================================ */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
textarea,
select {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius-lg);
  font-family: var(--secondary-font);
  font-size: 1rem;
  color: var(--black);
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(245, 163, 31, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: var(--black);
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-error {
  color: #d92800;
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
}

.form-success {
  background: #d4edda;
  color: #155724;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--spacing-lg);
}

.form-error-message {
  background: #f8d7da;
  color: #721c24;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--spacing-lg);
}

/* Checkbox & Radio */
input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: var(--spacing-sm);
  cursor: pointer;
}

/* ============================================
   RESPONSIVE IMAGES
   ============================================ */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.img-responsive {
  width: 100%;
  height: auto;
}

figure {
  margin: 0;
  padding: 0;
}

figure img {
  display: block;
}

/* ============================================
   LINKS & NAVIGATION
   ============================================ */

nav a {
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--secondary-color);
}

/* ============================================
   UTILITIES
   ============================================ */

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

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

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

.mt-sm {
  margin-top: var(--spacing-sm);
}

.mt-md {
  margin-top: var(--spacing-md);
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.p-sm {
  padding: var(--spacing-sm);
}

.p-md {
  padding: var(--spacing-md);
}

.p-lg {
  padding: var(--spacing-lg);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   RESPONSIVE GRID
   ============================================ */

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ============================================
   MOBILE RESPONSIVE (< 768px)
   ============================================ */

@media (max-width: 767px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  h1, .heading-lg {
    font-size: 1.75rem;
  }
  
  h2, .heading-md {
    font-size: 1.5rem;
  }
  
  h3, .heading-sm {
    font-size: 1.2rem;
  }
  
  body {
    font-size: 16px;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  input[type="time"],
  textarea,
  select {
    padding: var(--spacing-md) var(--spacing-sm);
    font-size: 16px;
  }
  
  .btn,
  button,
  input[type="submit"] {
    width: 100%;
    padding: var(--spacing-md);
    font-size: 1rem;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .hidden-mobile {
    display: none !important;
  }
}

/* ============================================
   TABLET RESPONSIVE (768px - 1024px)
   ============================================ */

@media (min-width: 768px) and (max-width: 1024px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hidden-tablet {
    display: none !important;
  }
}

/* ============================================
   DESKTOP RESPONSIVE (> 1024px)
   ============================================ */

@media (min-width: 1025px) {
  .hidden-desktop {
    display: none !important;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}
/* ============================================
   PROJECT GALLERY
   ============================================ */

.project-gallery-container {
  width: 100%;
  padding: var(--spacing-lg) 0;
}

.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #f5f5f5;
  aspect-ratio: 4 / 3;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
}

/* Responsive gallery grid */
@media (max-width: 1024px) {
  .project-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-md);
  }
}

@media (max-width: 768px) {
  .project-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--spacing-md);
  }
  
  .gallery-item {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) {
  .project-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
  }
  
  .project-gallery-container {
    padding: var(--spacing-md) 0;
  }
}