/* ===== CSS Variables ===== */
:root {
  --navy: #1B2A4A;
  --navy-light: #2C3E6B;
  --orange: #E8752A;
  --orange-light: #F0924F;
  --white: #FFFFFF;
  --off-white: #F5F6FA;
  --gray: #6B7280;
  --gray-light: #E5E7EB;
  --text: #1F2937;
  --shadow: 0 2px 12px rgba(27, 42, 74, 0.10);
  --shadow-lg: 0 8px 30px rgba(27, 42, 74, 0.15);
  --radius: 8px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

/* Better tap targets for touch devices */
@media (pointer: coarse) {
  a, button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

ul {
  list-style: none;
}

/* ===== Header ===== */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

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

.logo img {
  height: 50px;
  width: auto;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--gray);
  letter-spacing: 0.5px;
}

/* Navigation */
.main-nav ul {
  display: flex;
  gap: 4px;
  align-items: center;
}

.main-nav a {
  display: block;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--navy);
  color: var(--white);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--navy);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--navy);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 60px 20px;
  max-width: 800px;
}

.hero h1 {
  font-size: 3rem;
  color: var(--white);
  margin-bottom: 12px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hero h2 {
  font-size: 1.3rem;
  color: var(--orange);
  margin-bottom: 20px;
  font-weight: 500;
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
  max-width: 600px;
  margin: 0 auto;
}

/* Service page hero (smaller) */
.hero-service {
  min-height: 320px;
}

.hero-service h1 {
  font-size: 2.5rem;
}

/* ===== Service Cards Grid ===== */
.services-section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.services-section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.services-section > p {
  text-align: center;
  color: var(--gray);
  margin-bottom: 50px;
  font-size: 1.05rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

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

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

.service-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow);
}

.service-card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
}

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

.service-card-body h3 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.service-card-body p {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.service-card-body .btn {
  font-size: 0.85rem;
  padding: 8px 20px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition);
}

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

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

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

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

/* ===== Service Page Content ===== */
.service-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px;
}

.service-content h2 {
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 16px;
}

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

.service-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 24px;
}

.service-content ul li {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Before & After Gallery */
.ba-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 40px 0;
}

.ba-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: col-resize;
  user-select: none;
  -webkit-user-select: none;
}

.ba-before,
.ba-after {
  position: relative;
}

.ba-after {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ba-after img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-before img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.ba-label {
  position: absolute;
  bottom: 12px;
  background: rgba(27, 42, 74, 0.75);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ba-before .ba-label {
  left: 12px;
}

.ba-after .ba-label {
  right: 12px;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  background: var(--white);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
  z-index: 10;
  pointer-events: none;
}

.ba-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.ba-handle::before {
  content: '\2039\2002\203A';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  z-index: 11;
  pointer-events: none;
  line-height: 1;
}

/* Work Gallery Page */
.gallery-page {
  max-width: 1100px;
}

.gallery-page h2 {
  margin-top: 40px;
}

.gallery-page h2:first-child {
  margin-top: 0;
}

.work-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0 40px;
}

.work-gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--off-white);
}

.work-gallery-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform var(--transition);
}

@media (hover: hover) {
  .work-gallery-item img:hover {
    transform: scale(1.03);
  }
}

.work-gallery-item figcaption {
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

/* CTA Section */
.cta-section {
  text-align: center;
  background: var(--off-white);
  padding: 60px 20px;
  margin-top: 40px;
  border-radius: var(--radius);
}

.cta-section h2 {
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.cta-section p {
  color: var(--gray);
  margin-bottom: 24px;
  font-size: 1.05rem;
}

/* ===== Contact Page ===== */
.contact-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 20px;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.contact-card {
  background: var(--off-white);
  padding: 30px;
  border-radius: var(--radius);
  text-align: center;
}

.contact-card .icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.contact-card h3 {
  color: var(--navy);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

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

.contact-card a {
  color: var(--orange);
  font-weight: 600;
}

.contact-card a:hover {
  color: var(--navy);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.8);
  padding: 50px 20px 30px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-col h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.footer-col p,
.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-col a:hover {
  color: var(--orange);
}

.footer-tagline {
  font-style: italic;
  color: var(--orange) !important;
  font-size: 0.95rem !important;
  margin-top: 8px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .main-nav a {
    padding: 8px 8px;
    font-size: 0.78rem;
  }
}

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

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right var(--transition);
    padding: 80px 20px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1050;
  }

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

  .main-nav ul {
    flex-direction: column;
    gap: 2px;
  }

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

  .main-nav a.active {
    background: var(--navy);
    color: var(--white);
  }

  /* Hero */
  .hero {
    min-height: 350px;
  }

  .hero-content {
    padding: 40px 16px;
  }

  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }

  .hero h2 {
    font-size: 1rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .hero-service {
    min-height: 220px;
  }

  .hero-service h1 {
    font-size: 1.6rem;
  }

  /* Services grid */
  .services-section {
    padding: 40px 16px;
  }

  .services-section h2 {
    font-size: 1.6rem;
  }

  .services-section > p {
    margin-bottom: 30px;
    font-size: 0.95rem;
  }

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

  .service-card-img {
    height: 180px;
  }

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

  /* Service page content */
  .service-content {
    padding: 40px 16px;
  }

  .service-content h2 {
    font-size: 1.5rem;
  }

  .service-content p {
    font-size: 1rem;
  }

  .service-content ul li {
    font-size: 1rem;
  }

  /* Before & After Gallery */
  .ba-gallery {
    gap: 16px;
    margin: 30px 0;
  }

  .ba-before img {
    height: 220px;
  }

  /* CTA */
  .cta-section {
    padding: 40px 16px;
    margin-top: 20px;
    border-radius: 0;
  }

  .cta-section h2 {
    font-size: 1.3rem;
  }

  .cta-section .btn {
    display: block;
    width: 100%;
    text-align: center;
    max-width: 320px;
    margin: 0 auto;
    padding: 16px 32px;
  }

  /* Buttons - larger touch targets */
  .btn {
    padding: 14px 28px;
    font-size: 1rem;
  }

  /* Contact */
  .contact-content {
    padding: 40px 16px;
  }

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

  .contact-card {
    padding: 24px 20px;
  }

  /* Footer */
  .site-footer {
    padding: 40px 16px 24px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }

  .footer-bottom {
    margin-top: 24px;
  }
}

@media (max-width: 380px) {
  .header-inner {
    height: 56px;
    padding: 0 12px;
  }

  .logo img {
    height: 36px;
  }

  .logo-text {
    font-size: 0.85rem;
  }

  .logo-text span {
    font-size: 0.55rem;
  }

  .hero {
    min-height: 280px;
  }

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

  .hero h2 {
    font-size: 0.9rem;
  }

  .hero p {
    font-size: 0.85rem;
  }

  .hero-service {
    min-height: 180px;
  }

  .hero-service h1 {
    font-size: 1.3rem;
  }

  .services-section {
    padding: 30px 12px;
  }

  .service-content {
    padding: 30px 12px;
  }

  .ba-gallery {
    grid-template-columns: 1fr;
  }

  .ba-before img {
    height: 200px;
  }

  .contact-details {
    grid-template-columns: 1fr;
  }

  .cta-section {
    padding: 30px 12px;
  }

  .footer-inner {
    gap: 20px;
  }
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1040;
  -webkit-tap-highlight-color: transparent;
}

.nav-overlay.open {
  display: block;
}

/* Prevent iOS bounce scrolling when menu is open */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Safe area insets for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
  .site-header {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .site-footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .main-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
