/*
Theme Name: MIR Theme
Theme URI: https://ptmir.co.id
Author: PT Mataram Inovasi Rekayasa
Author URI: https://ptmir.co.id
Description: Custom minimalist theme for PT Mataram Inovasi Rekayasa
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mir-theme
*/

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brand colors — navy blue palette */
  --primary:     #0F2854;   /* navy dark  */
  --primary-mid: #1C4D8D;   /* navy mid   */
  --primary-std: #4988C4;   /* blue std   */
  --primary-pale:#BDE8F5;   /* blue pale  */
  --primary-bg:  #f0f7ff;   /* light bg   */

  /* Neutral */
  --gray-50:     #f9fafb;
  --gray-100:    #f0f4f8;
  --gray-200:    #e2e8f0;
  --gray-300:    #cbd5e1;
  --gray-600:    #475569;
  --gray-700:    #334155;
  --gray-800:    #1e293b;
  --gray-900:    #0f172a;
  --white:       #ffffff;
  --black:       #0a0f1e;
  --border:      #dde6f0;

  --radius:      12px;
  --radius-lg:   20px;
  --shadow:      0 2px 12px rgba(15,40,84,0.08);
  --shadow-lg:   0 8px 32px rgba(15,40,84,0.15);
  --transition:  all 0.25s ease;
  --font-body:   'DM Sans', 'Segoe UI', sans-serif;
  --font-head:   'DM Sans', 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--gray-800);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
}

/* =============================================
   UTILITIES
   ============================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--gray-900);
}

.section-subtitle {
  text-align: center;
  color: var(--gray-600);
  font-size: 1rem;
  max-width: 600px;
  margin: -24px auto 48px;
  line-height: 1.75;
}

.text-green { color: var(--primary-std); }
.bg-gray-50 { background: var(--gray-50); }
.bg-gray-100 { background: var(--gray-100); }

/* =============================================
   HEADER / NAVBAR
   ============================================= */
#site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-logo .logo-text {
  font-weight: 800;
  font-size: 14px;
  color: var(--primary-std);
  line-height: 1.25;
  max-width: 220px;
  letter-spacing: -0.01em;
}

#primary-navigation ul {
  display: flex;
  gap: 28px;
  list-style: none;
}

#primary-navigation a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  transition: var(--transition);
  position: relative;
  padding-bottom: 2px;
}

#primary-navigation a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-mid);
  transition: width 0.3s ease;
}

#primary-navigation a:hover {
  color: var(--primary-mid);
}

#primary-navigation a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--primary-std);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
}

.nav-cta:hover {
  background: var(--primary) !important;
  transform: translateY(-1px);
}

.nav-cta::after { display: none !important; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-800);
  border-radius: 2px;
  transition: var(--transition);
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
  background: linear-gradient(135deg, #0F2854 0%, #1C4D8D 100%);
  color: var(--white);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 80% 50%, rgba(73,136,196,0.15), transparent),
              radial-gradient(ellipse 50% 60% at 20% 80%, rgba(15,40,84,0.2), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero-tagline {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 18px;
}

.hero-section h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-section p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  font-weight: 300;
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-btn {
  display: inline-block;
  background: var(--white);
  color: var(--primary);
  padding: 13px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 15px;
  transition: var(--transition);
  margin: 0 8px 8px;
}

.hero-btn:hover {
  background: #f0f7ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.hero-btn.outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}

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

/* =============================================
   ABOUT SECTION
   ============================================= */
.about-section {
  padding: 80px 0;
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--primary-bg), #BDE8F5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-std);
  font-size: 4rem;
  border-radius: var(--radius-lg);
}

.about-text-box {
  background: linear-gradient(135deg, #0F2854, #1C4D8D);
  color: var(--white);
  padding: 36px;
  border-radius: var(--radius-lg);
}

.about-text-box h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 16px;
}

.about-text-box p {
  font-size: 0.95rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.88);
  text-align: justify;
  margin-bottom: 24px;
}

.btn-outline-white {
  display: inline-block;
  padding: 9px 24px;
  border: 1.5px solid rgba(255,255,255,0.7);
  border-radius: 50px;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

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

/* =============================================
   SEJARAH / TIMELINE
   ============================================= */
.sejarah-section {
  padding: 80px 0;
  background: var(--gray-50);
}

.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding-left: 48px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-std), var(--primary-pale));
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -36px;
  top: 4px;
  width: 16px;
  height: 16px;
  background: var(--primary-std);
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px rgba(73,136,196,0.25);
}

.timeline-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.timeline-item p {
  font-size: 0.93rem;
  color: var(--gray-700);
  line-height: 1.8;
  text-align: justify;
}

/* =============================================
   VISI MISI
   ============================================= */
.visimisi-section {
  padding: 80px 0;
  background: var(--white);
}

.visi-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px;
  text-align: center;
  margin-bottom: 40px;
  border: 1px solid var(--border);
}

.visi-box h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.visi-box p {
  color: var(--gray-700);
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto;
}

.misi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.misi-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}

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

.misi-card:last-child {
  grid-column: 1 / -1;
}

.misi-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: var(--primary-std);
}

.misi-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.misi-card p {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.7;
}

/* =============================================
   PRODUK / LAYANAN / PORTOFOLIO CARDS
   ============================================= */
.produk-section,
.layanan-section,
.portofolio-section,
.dokumentasi-section,
.artikel-section {
  padding: 80px 0;
}

.produk-section { background: var(--gray-50); }
.layanan-section { background: var(--gray-50); }
.portofolio-section { background: var(--gray-50); }
.dokumentasi-section { background: var(--gray-100); }
.artikel-section { background: var(--gray-50); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

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

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-image-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-bg), #BDE8F5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-std);
  font-size: 3rem;
}

.card-body {
  padding: 20px;
}

.card-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.card-body p {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* =============================================
   MITRA
   ============================================= */
.mitra-section {
  padding: 80px 0;
  background: var(--gray-50);
}

.mitra-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: center;
  justify-items: center;
}

.mitra-item img {
  max-width: 150px;
  filter: grayscale(1);
  opacity: 0.6;
  transition: var(--transition);
}

.mitra-item img:hover {
  filter: grayscale(0);
  opacity: 1;
}

/* =============================================
   KONTAK
   ============================================= */
.kontak-section {
  padding: 80px 0;
  background: var(--white);
}

.kontak-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.kontak-info p {
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 10px;
}

.kontak-info strong {
  color: var(--gray-900);
  font-weight: 600;
}

.kontak-map {
  width: 100%;
  height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 20px;
  box-shadow: var(--shadow);
}

.kontak-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.kontak-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 16px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-std);
}

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

.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--primary-std);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  background: var(--primary);
  transform: translateY(-1px);
}

/* =============================================
   FOOTER
   ============================================= */
#site-footer {
  background: var(--primary-std);
  color: var(--white);
  text-align: center;
  padding: 24px;
  font-size: 14px;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeUp 0.65s ease forwards;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .mitra-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .header-inner { padding: 0 20px; }

  #primary-navigation {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    box-shadow: var(--shadow);
  }

  #primary-navigation.open { display: block; }

  #primary-navigation ul {
    flex-direction: column;
    gap: 0;
  }

  #primary-navigation li a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
  }

  #primary-navigation li:last-child a {
    border-bottom: none;
  }

  .menu-toggle { display: flex; }

  .about-grid { grid-template-columns: 1fr; }
  .misi-grid { grid-template-columns: 1fr; }
  .misi-card:last-child { grid-column: 1; }
  .cards-grid { grid-template-columns: 1fr; }
  .cards-grid-2 { grid-template-columns: 1fr; }
  .mitra-grid { grid-template-columns: repeat(2, 1fr); }
  .kontak-grid { grid-template-columns: 1fr; }

  .hero-section { padding: 60px 20px; }
  .section-title { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .mitra-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-section h1 { font-size: 1.75rem; }
}

/* =============================================
   FIX LOGO NAVBAR
   ============================================= */
.site-logo img,
.site-logo .custom-logo {
  height: 38px !important;
  width: 38px !important;
  max-width: 38px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
}

.site-logo .custom-logo-link {
  display: flex !important;
  align-items: center !important;
  line-height: 0 !important;
}