/* ============================================
   Machamer Electric - Main Stylesheet
   Professional & Clean Design
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a3a5c;
  --primary-light: #2a5a8c;
  --primary-dark: #0f2440;
  --accent: #d4a843;
  --accent-hover: #c49a33;
  --text: #333333;
  --text-light: #666666;
  --bg: #ffffff;
  --bg-light: #f5f7fa;
  --bg-dark: #e8ecf1;
  --border: #dde2e8;
  --white: #ffffff;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  color: var(--primary);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.75rem; }

p { margin-bottom: 1rem; }

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  position: relative;
  display: block;
  padding-bottom: 0.75rem;
}

.section-header h2::after {
  content: '';
  display: block;
  margin: 0.75rem auto 0;
  width: 40%;
  min-width: 120px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 650px;
  margin: 1rem auto 0;
}

/* --- Header / Navigation --- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-img {
  height: 44px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 26px;
  height: 26px;
  fill: var(--accent);
}

.profile-photo-container {
  background: none !important;
}

.profile-photo-container::after {
  display: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-tagline {
  font-size: 0.7rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-links a {
  display: block;
  padding: 0.5rem 1.1rem;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--bg-light);
  color: var(--primary);
}

.nav-links a.active {
  color: var(--primary);
  font-weight: 600;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(212, 168, 67, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-content {
  max-width: 720px;
  flex: 1;
}

.hero-image {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image video {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(212, 168, 67, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 0.5rem;
  line-height: 1.15;
}

.hero .hero-subtitle {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.1rem;
  line-height: 1.8;
  opacity: 0.92;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0.3rem;
  display: block;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(212, 168, 67, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  color: var(--white);
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.card-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.card-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  color: var(--primary);
}

.card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* --- Projects / Experience --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.project-img {
  height: 180px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-img svg {
  width: 48px;
  height: 48px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  opacity: 0.7;
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  margin-bottom: 0.5rem;
}

.project-tag {
  display: inline-block;
  background: var(--bg-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-top: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Licenses Bar --- */
.license-bar {
  background: var(--primary);
  color: var(--white);
  padding: 2.5rem 0;
}

.license-grid {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

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

.license-state {
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
}

.license-label {
  font-size: 0.8rem;
  opacity: 0.75;
  display: block;
  margin-top: 0.2rem;
}

/* --- About Section --- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-img {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius);
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.about-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: var(--accent);
  opacity: 0.15;
  border-radius: 50% 0 0 0;
}

.about-img svg {
  width: 80px;
  height: 80px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1;
  opacity: 0.5;
}

.about-text h2 {
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.highlight {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.highlight svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 2px;
}

.highlight span {
  font-size: 0.9rem;
  font-weight: 500;
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.cta-banner h2 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-banner p {
  opacity: 0.9;
  max-width: 550px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

/* --- Contact Form --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.5;
}

.contact-info-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.contact-info-item p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0;
}

.contact-form {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-light);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42, 90, 140, 0.1);
  background: var(--white);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn-submit {
  width: 100%;
  padding: 0.9rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-submit:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(26, 58, 92, 0.25);
}

/* --- Footer --- */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo-name {
  color: var(--white);
  font-size: 1.3rem;
}

.footer-brand .logo-tagline {
  color: rgba(255, 255, 255, 0.5);
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.7;
  line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a,
.footer-contact a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--accent);
}

.footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  opacity: 0.5;
}

/* --- Page Headers (inner pages) --- */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 4rem 0 3rem;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  opacity: 0.85;
  font-size: 1.1rem;
}

/* --- Service Detail --- */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

.service-detail:last-child {
  border-bottom: none;
}

.service-detail:nth-child(even) {
  direction: rtl;
}

.service-detail:nth-child(even) > * {
  direction: ltr;
}

.service-visual {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  border-radius: var(--radius);
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-visual svg {
  width: 64px;
  height: 64px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.2;
  opacity: 0.6;
}

.service-text h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-text p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.service-list {
  list-style: none;
  margin-top: 1rem;
}

.service-list li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-light);
  font-size: 0.95rem;
}

.service-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  padding-left: 2.5rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 3px var(--bg-light);
}

.timeline-year {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}

.timeline-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.timeline-item p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .hero-image {
    display: none;
  }

  .hero-layout {
    display: block;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .about-layout,
  .contact-layout,
  .service-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .service-detail:nth-child(even) {
    direction: ltr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  .section {
    padding: 3rem 0;
  }
}
