/* ==========================================
   SARENSYS - Components Stylesheet
   Reusable UI Components
   ========================================== */

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

.btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: 48px;
  font-family: var(--font-body);
}

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

.btn-primary:hover {
  background: var(--color-orange-dark);
  border-color: var(--color-orange-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--color-orange);
  border-color: var(--color-orange);
}

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

.btn-outline {
  background: transparent;
  color: var(--color-black);
  border-color: var(--color-gray-light);
}

.btn-outline:hover {
  background: var(--color-gray-bg);
  border-color: var(--color-gray);
}

.btn-large {
  padding: 16px 48px;
  font-size: var(--text-lg);
}

.btn-small {
  padding: 8px 24px;
  font-size: var(--text-sm);
  min-height: 40px;
}

/* ==========================================
   CARDS
   ========================================== */

.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card__image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.card__content {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
  color: var(--color-black);
}

.card__description {
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  line-height: 1.6;
  flex: 1;
}

.card__footer {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-gray-light);
}

/* ==========================================
   PROJECT CARDS
   ========================================== */

.project-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card__image-wrapper {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-gray-bg);
}

.project-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-card__image {
  transform: scale(1.05);
}

.project-card__status {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-white);
  backdrop-filter: blur(8px);
}

.project-card__status--completed {
  background: rgba(16, 185, 129, 0.9);
}

.project-card__status--ongoing {
  background: rgba(219, 134, 78, 0.9);
}

.project-card__content {
  padding: var(--space-4);
}

.project-card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
  color: var(--color-black);
}

.project-card__location {
  font-size: var(--text-sm);
  color: var(--color-gray);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.project-card__description {
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

.project-card__cta {
  width: 100%;
}

/* ==========================================
   SERVICE CARDS
   ========================================== */

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  vertical-align: middle;
  line-height: 1;
}

.icon svg {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--xs { font-size: 12px; }
.icon--sm { font-size: 14px; }
.icon--md { font-size: 18px; }
.icon--lg { font-size: 24px; }
.icon--xl { font-size: 32px; }
.icon--2xl { font-size: 48px; }
.icon--3xl { font-size: 80px; }

.icon-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.icon-list li {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.service-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  text-align: center;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  background: var(--color-orange-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--color-orange-dark);
}

.service-card__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
  color: var(--color-black);
}

.service-card__description {
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

/* ==========================================
   STATS CARDS
   ========================================== */

.stat-card {
  text-align: center;
  padding: var(--space-4);
}

.stat-card__value {
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  color: var(--color-orange);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-card__label {
  font-size: var(--text-lg);
  color: var(--color-text);
}

/* ==========================================
   HERO SECTIONS
   ========================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--color-white);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: var(--space-6);
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: var(--space-4);
  color: var(--color-white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero__description {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  margin-bottom: var(--space-6);
  color: var(--color-white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero__cta {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* Page Hero */
.page-hero {
  position: relative;
  height: 40vh;
  min-height: 300px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.page-hero__title {
  position: relative;
  z-index: 1;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--color-white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   SECTION HEADERS
   ========================================== */

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-8);
}

.section-header__subtitle {
  font-size: var(--text-sm);
  color: var(--color-orange);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-2);
}

.section-header__title {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  margin-bottom: var(--space-3);
  color: var(--color-black);
}

.section-header__description {
  font-size: var(--text-lg);
  color: var(--color-text);
  line-height: 1.6;
}

.section-header--light .section-header__subtitle,
.section-header--light .section-header__title,
.section-header--light .section-header__description {
  color: var(--color-white);
}

.section-header--light .section-header__subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.section--light {
  color: var(--color-white);
}

.section--light h1,
.section--light h2,
.section--light h3,
.section--light h4,
.section--light h5,
.section--light h6,
.section--light p {
  color: var(--color-white);
}

.fields-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-detail-grid {
  grid-template-columns: 1fr 2fr;
  gap: var(--space-6);
  align-items: center;
}

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

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-2);
  color: var(--color-black);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  font-size: var(--text-base);
  font-family: var(--font-body);
  border: 2px solid var(--color-gray-light);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px rgba(219, 134, 78, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-gray);
}

.form-input.error,
.form-textarea.error,
.form-select.error {
  border-color: #EF4444;
}

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

.form-response {
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
}

.form-response.success {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #10B981;
}

.form-response.error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #EF4444;
}

/* ==========================================
   MODAL
   ========================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.modal--open {
  display: flex;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal__container {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-md);
  max-width: 900px;
  max-height: 90vh;
  width: 100%;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: var(--color-white);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  z-index: 1;
}

.modal__close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: rotate(90deg);
}

.modal__content {
  padding: var(--space-6);
}

/* ==========================================
   BADGES
   ========================================== */

.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-sm);
}

.badge-primary {
  background: var(--color-orange-light);
  color: var(--color-orange-dark);
}

.badge-success {
  background: #D1FAE5;
  color: #065F46;
}

.badge-warning {
  background: #FEF3C7;
  color: #92400E;
}

/* ==========================================
   SOCIAL LINKS
   ========================================== */

.social-links {
  display: flex;
  gap: var(--space-3);
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--color-white);
  font-size: 18px;
  transition: all var(--transition-base);
}

.social-link:hover {
  background: var(--color-orange);
  transform: translateY(-2px);
  color: var(--color-white);
}

/* ==========================================
   PROJECT FILTERS
   ========================================== */

.project-filters {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.filter-btn {
  padding: 10px 24px;
  background: var(--color-white);
  border: 2px solid var(--color-gray-light);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-base);
}

.filter-btn:hover {
  border-color: var(--color-orange);
  color: var(--color-orange);
}

.filter-btn.active {
  background: var(--color-orange);
  border-color: var(--color-orange);
  color: var(--color-white);
}

/* ==========================================
   GRIDS
   ========================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

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