/* ============================================
   Pictrix Theme - Main Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #376CFF;
  --color-primary-light: #00A6FF;
  --color-primary-dark: #2B56CC;
  --color-accent: #7B61FF;
  --color-accent-light: #A78BFA;
  --color-gradient: linear-gradient(135deg, #7B61FF 0%, #376CFF 40%, #00A6FF 100%);
  --color-gradient-reverse: linear-gradient(135deg, #00A6FF 0%, #376CFF 60%, #7B61FF 100%);
  --color-gradient-subtle: linear-gradient(135deg, rgba(55,108,255,0.08) 0%, rgba(0,166,255,0.08) 100%);
  --color-text: #1A1A2E;
  --color-text-light: #64748B;
  --color-text-white: #FFFFFF;
  --color-bg: #FFFFFF;
  --color-bg-light: #F8FAFF;
  --color-bg-dark: #0D1B3E;
  --color-bg-card: #FFFFFF;
  --color-border: #E2E8F0;
  --font-primary: 'M PLUS 1p', sans-serif;
  --font-display: 'M PLUS 1p', sans-serif;
  --shadow-sm: 0 1px 3px rgba(55,108,255,0.06);
  --shadow-md: 0 4px 20px rgba(55,108,255,0.1);
  --shadow-lg: 0 12px 40px rgba(55,108,255,0.15);
  --shadow-xl: 0 20px 60px rgba(55,108,255,0.2);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  --container-width: 1280px;
  --container-narrow: 960px;
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--color-primary-light);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
h4 { font-size: clamp(1rem, 2vw, 1.4rem); }

p {
  margin-bottom: 1em;
}

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

.container--narrow {
  max-width: var(--container-narrow);
}

/* --- Utility Classes --- */
.text-gradient {
  background: var(--color-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.section-padding {
  padding: 100px 0;
}

.section-padding--sm {
  padding: 60px 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 36px;
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.btn--primary {
  background: var(--color-gradient);
  color: var(--color-text-white);
  box-shadow: 0 4px 20px rgba(55,108,255,0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(55,108,255,0.4);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-text-white);
  transform: translateY(-2px);
}

.btn--white {
  background: #fff;
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.btn--white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--color-primary);
}

.btn--lg {
  padding: 18px 48px;
  font-size: 17px;
}

.btn svg, .btn .btn-icon {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.btn:hover svg, .btn:hover .btn-icon {
  transform: translateX(4px);
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: all var(--transition-smooth);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(255,255,255,0.95);
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

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

.site-logo img,
.site-logo .custom-logo {
  height: 36px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  border-radius: 100px;
  transition: all var(--transition-fast);
  position: relative;
}

.main-nav a:hover,
.main-nav a.current {
  color: var(--color-primary);
  background: rgba(55,108,255,0.06);
}

.main-nav .nav-cta {
  background: var(--color-gradient);
  color: #fff !important;
  padding: 10px 24px;
  margin-left: 8px;
}

.main-nav .nav-cta:hover {
  box-shadow: 0 4px 16px rgba(55,108,255,0.3);
  transform: translateY(-1px);
  color: #fff !important;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 6px auto;
  transition: all var(--transition-fast);
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img,
.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,27,62,0.6) 0%, rgba(13,27,62,0.8) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-text-white);
  padding: 0 24px;
  max-width: 900px;
  animation: heroFadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 32px;
  border: 1px solid rgba(255,255,255,0.15);
  animation: heroFadeUp 1s 0.2s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  color: #fff;
  animation: heroFadeUp 1s 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.hero-title .highlight {
  background: var(--color-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  line-height: 1.8;
  opacity: 0.85;
  margin-bottom: 40px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  animation: heroFadeUp 1s 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: heroFadeUp 1s 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  letter-spacing: 0.1em;
  animation: scrollBounce 2s infinite;
}

.hero-scroll-indicator .scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Section Header --- */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header .section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.section-header .section-label::before,
.section-header .section-label::after {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--color-gradient);
  border-radius: 2px;
}

.section-header h2 {
  margin-bottom: 16px;
}

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

/* --- Services Section --- */
.services-section {
  background: var(--color-bg-light);
  position: relative;
}

.services-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 20% 0%, rgba(55,108,255,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 100%, rgba(0,166,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  position: relative;
  z-index: 1;
}

.service-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  position: relative;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(55,108,255,0.2);
}

.service-card-image {
  position: relative;
  height: 260px;
  overflow: hidden;
}

.service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-card-image img {
  transform: scale(1.06);
}

.service-card-image .service-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.04em;
}

.service-card-body {
  padding: 32px;
}

.service-card-body h3 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.service-card-body .service-sub {
  font-size: 14px;
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 16px;
}

.service-card-body p {
  color: var(--color-text-light);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 24px;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
}

.service-card-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.service-card:hover .service-card-link svg {
  transform: translateX(4px);
}

/* --- Works / Portfolio Section --- */
.works-section {
  background: var(--color-bg);
}

.works-filter {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.works-filter button {
  padding: 10px 24px;
  border: 1px solid var(--color-border);
  background: transparent;
  border-radius: 100px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.works-filter button:hover,
.works-filter button.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

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

.work-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  group: true;
}

.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-item:hover img {
  transform: scale(1.08);
}

.work-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(13,27,62,0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.work-item:hover .work-item-overlay {
  opacity: 1;
}

.work-item-overlay .work-category {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: 8px;
}

.work-item-overlay h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.work-item-overlay p {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  line-height: 1.6;
}

/* Feature work (large) */
.work-item--large {
  grid-column: span 2;
  aspect-ratio: 2/1;
}

/* --- About / Message Section --- */
.about-section {
  position: relative;
  overflow: hidden;
}

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

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

.about-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.about-image .about-accent {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 180px;
  height: 180px;
  background: var(--color-gradient);
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: 0.3;
}

.about-content {
  padding: 20px 0;
}

.about-content .about-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.about-content h2 {
  margin-bottom: 24px;
}

.about-content p {
  color: var(--color-text-light);
  font-size: 1.05rem;
  line-height: 2;
  margin-bottom: 16px;
}

.about-content .about-signature {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.about-content .about-signature .sig-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
}

.about-content .about-signature .sig-title {
  font-size: 14px;
  color: var(--color-text-light);
}

/* --- News Section --- */
.news-section {
  background: var(--color-bg-light);
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.news-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all var(--transition-smooth);
}

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

.news-card-image {
  height: 200px;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.news-card-body {
  padding: 24px;
}

.news-card-body .news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.news-card-body .news-date {
  font-size: 13px;
  color: var(--color-text-light);
}

.news-card-body .news-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(55,108,255,0.08);
  color: var(--color-primary);
}

.news-card-body h4 {
  font-size: 1rem;
  line-height: 1.6;
}

/* --- CTA Section --- */
.cta-section {
  position: relative;
  background: var(--color-bg-dark);
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(55,108,255,0.25) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(123,97,255,0.2) 0%, transparent 60%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-text-white);
}

.cta-content h2 {
  color: #fff;
  margin-bottom: 20px;
}

.cta-content p {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Contact Form Section --- */
.contact-section {
  background: var(--color-bg-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.contact-info h3 {
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--color-text-light);
  margin-bottom: 32px;
}

.contact-info-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-info-item .info-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--color-gradient-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info-item .info-icon svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
}

.contact-info-item .info-text .info-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.contact-info-item .info-text .info-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
}

.contact-form {
  background: var(--color-bg-card);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.form-group label .required {
  color: #EF4444;
  margin-left: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 15px;
  color: var(--color-text);
  background: #fff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(55,108,255,0.1);
}

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

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

/* --- Footer --- */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-brand .footer-logo img {
  height: 32px;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 24px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

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

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--color-primary-light);
}

.footer-bottom {
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
}

.footer-bottom a:hover {
  color: var(--color-primary-light);
}

/* --- Page Hero --- */
.page-hero {
  position: relative;
  height: 50vh;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-dark);
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,27,62,0.7) 0%, rgba(13,27,62,0.85) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
}

.page-hero-content .breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.6);
}

.page-hero-content .breadcrumb a {
  color: rgba(255,255,255,0.6);
}

.page-hero-content .breadcrumb a:hover {
  color: var(--color-primary-light);
}

.page-hero-content h1 {
  color: #fff;
  margin-bottom: 16px;
}

.page-hero-content p {
  font-size: 1.1rem;
  opacity: 0.8;
  max-width: 560px;
  margin: 0 auto;
}

/* --- Stats Bar --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 48px 0;
}

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

.stat-item .stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  background: var(--color-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 8px;
}

.stat-item .stat-label {
  font-size: 14px;
  color: var(--color-text-light);
  font-weight: 500;
}

/* --- Message / Representative Page --- */
.message-section {
  background: var(--color-bg);
}

.message-layout {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.message-content .message-lead {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 2;
  margin-bottom: 32px;
}

.message-content p {
  font-size: 1.05rem;
  color: var(--color-text-light);
  line-height: 2;
  margin-bottom: 20px;
}

.message-sidebar {
  position: sticky;
  top: 120px;
}

.message-sidebar .rep-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.message-sidebar .rep-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.message-sidebar .rep-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.message-sidebar .rep-title {
  font-size: 14px;
  color: var(--color-text-light);
  margin-bottom: 20px;
}

.message-sidebar .rep-bio {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* --- Scroll Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .message-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .message-sidebar {
    position: static;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
  }

  .message-sidebar .rep-photo {
    width: 180px;
    margin-bottom: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-item--large {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 100px 32px 40px;
    gap: 4px;
    box-shadow: -8px 0 40px rgba(0,0,0,0.1);
    transition: right var(--transition-smooth);
    z-index: 999;
  }

  .main-nav.open {
    right: 0;
  }

  .main-nav a {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: var(--radius-sm);
  }

  .main-nav .nav-cta {
    margin-left: 0;
    margin-top: 16px;
    text-align: center;
  }

  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
  }

  .mobile-overlay.active {
    display: block;
  }

  .hero-title {
    font-size: clamp(1.8rem, 7vw, 3rem);
  }

  .section-padding {
    padding: 64px 0;
  }

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

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

  .work-item--large {
    grid-column: span 1;
  }

  .work-item-overlay {
    opacity: 1;
  }

  .news-list {
    grid-template-columns: 1fr;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .message-layout {
    display: flex;
    flex-direction: column;
  }

  .message-sidebar {
    display: block;
    order: -1;
  }

  .message-content {
    order: 1;
  }

  .message-sidebar .rep-photo {
    width: 100%;
    max-width: 280px;
    margin-bottom: 20px;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn--lg {
    width: 100%;
    max-width: 300px;
  }

  .contact-form {
    padding: 24px;
  }

  .page-hero {
    min-height: 280px;
  }
}

/* --- WordPress Specific --- */
.wp-block-image img {
  border-radius: var(--radius-sm);
}

.alignleft {
  float: left;
  margin-right: 24px;
  margin-bottom: 12px;
}

.alignright {
  float: right;
  margin-left: 24px;
  margin-bottom: 12px;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* --- Loading animation --- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
