/* OTSYSTEMS Static Site Styles */
:root {
  --background: hsl(220 15% 97%);
  --foreground: hsl(220 25% 15%);
  --surface: hsl(220 10% 99%);
  --surface-secondary: hsl(220 8% 95%);

  --card: hsl(0 0% 100%);
  --card-foreground: hsl(220 25% 15%);
  --card-hover: hsl(220 8% 98%);

  --primary: hsl(220 85% 25%);
  --primary-foreground: hsl(0 0% 100%);
  --primary-light: hsl(220 70% 45%);
  --primary-glow: hsl(220 85% 65%);

  --secondary: hsl(220 15% 92%);
  --secondary-foreground: hsl(220 25% 15%);
  --accent: hsl(195 85% 50%);
  --accent-foreground: hsl(0 0% 100%);
  --accent-glow: hsl(195 85% 70%);

  --muted: hsl(220 15% 94%);
  --muted-foreground: hsl(220 15% 45%);

  --border: hsl(220 15% 88%);
  --input: hsl(220 15% 90%);
  --ring: hsl(220 85% 25%);

  --gradient-primary: linear-gradient(135deg, hsl(220, 85%, 25%) 0%, hsl(220, 70%, 45%) 100%);
  --gradient-accent: linear-gradient(135deg, hsl(195, 85%, 50%) 0%, hsl(220, 85%, 55%) 100%);
  --gradient-surface: linear-gradient(180deg, hsl(220, 15%, 97%) 0%, hsl(220, 10%, 99%) 100%);
  --gradient-hero: linear-gradient(135deg, hsl(220, 85%, 15%) 0%, hsl(220, 70%, 35%) 50%, hsl(195, 85%, 45%) 100%);

  --shadow-sm: 0 2px 8px hsl(220 25% 25% / 0.08);
  --shadow-md: 0 4px 16px hsl(220 25% 25% / 0.12);
  --shadow-lg: 0 8px 32px hsl(220 25% 25% / 0.16);
  --shadow-primary: 0 8px 32px hsl(220 85% 25% / 0.25);
  --shadow-accent: 0 8px 32px hsl(195 85% 50% / 0.25);

  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.filters--pill { background: var(--surface-secondary); border: 1px solid var(--border); padding: 0.5rem; border-radius: 9999px; box-shadow: var(--shadow-sm); }
.filters--pill .filter { background: transparent; border-color: transparent; }
.filters--pill .filter:hover { background: color-mix(in srgb, var(--muted) 60%, transparent); }
.filters--pill .filter.active { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-sm); border-color: var(--border); }
.filter svg { width: 1em; height: 1em; margin-right: 0.4rem; vertical-align: -0.125em; opacity: 0.9; }
.filter:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 2px; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 18px;
  color: var(--foreground);
  background: var(--background);
}
/* Image styles */
img { 
  max-width: 100%; 
  display: block; 
  height: auto;
  object-fit: cover;
  aspect-ratio: 16/9;
}

/* Card images */
.card img {
  width: 100%;
  height: 200px; /* Fixed height for card images */
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Logo image */
.nav__logo {
  height: 36px;
  width: auto;
  object-fit: contain; /* Keep logo aspect ratio */
}

/* Hero image */
.hero img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

/* Portfolio grid images */
#portfolioGrid .card img {
  height: 220px; /* Slightly taller for portfolio items */
}

/* Service images */
.service__icon img {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  object-fit: contain;
}

/* Ensure SVG icons maintain aspect ratio */
svg {
  max-width: 100%;
  height: auto;
}

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 1rem; }
.center { text-align: center; }
.small { font-size: 0.875rem; }
.muted { color: hsl(220 15% 45%); }
.lead { font-size: 1.125rem; color: hsl(220 15% 40%); max-width: 48rem; margin: 0.5rem auto 0; }
.primary { color: var(--primary); }
.accent { color: var(--accent-glow); text-shadow: 0 0 24px hsl(195 85% 60% / 0.3); }
.strong { font-weight: 600; }

/* Nav */
.nav {
  position: sticky; top: 0; inset-inline: 0; z-index: 50;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 1rem; height: 64px; }
.nav__brand { font-weight: 800; font-size: 1.25rem; background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav__logo { height: 36px; width: auto; display: block; object-fit: contain; }
@media (min-width: 768px) { .nav__logo { height: 44px; width: auto; } }
.nav__links { display: none; list-style: none; gap: 1rem; margin: 0; padding: 0; overflow: visible; white-space: normal; }
.nav__links a { display: inline-block; padding: 0.5rem 0.75rem; border-radius: 8px; color: var(--foreground); text-decoration: none; transition: var(--transition); }
.nav__links a:hover { color: var(--primary); background: var(--muted); }
.nav__links a.active { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); font-weight: 600; }
.nav__cta { display: none; }

.nav__toggle { margin-left: auto; width: 40px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); display: grid; place-content: center; gap: 4px; cursor: pointer; }
.nav__bar { display: block; width: 20px; height: 2px; background: var(--foreground); }

@media (min-width: 768px) {
  .nav__links { display: flex; margin-left: auto; }
  .nav__cta { display: inline-flex; margin-left: 1rem; }
  .nav__toggle { display: none; }
}

/* Mobile menu open */
.nav--open .nav__inner { height: auto; align-items: flex-start; flex-wrap: wrap; padding-bottom: 0.5rem; }
.nav--open #navLinks { display: grid; gap: 0.5rem; padding: 0.5rem; border-top: 1px solid var(--border); width: 100%; background: var(--card); border-radius: 0 0 12px 12px; }

/* Hero */
.hero { position: relative; min-height: 90vh; display: flex; align-items: center; background: var(--gradient-hero); color: white; }
.hero__overlay { position: absolute; inset: 0; opacity: 0.12; background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.35"%3E%3Ccircle cx="30" cy="30" r="2"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E'); }
.hero__content { position: relative; padding-block: 5rem; }
.hero__title { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); font-weight: 800; line-height: 1.1; margin: 0 0 1rem; }
.hero__subtitle { font-size: 1.125rem; color: rgb(255 255 255 / 0.9); max-width: 58ch; }
.hero__features { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.5rem 1rem; margin: 1.25rem 0 1.5rem; padding: 0; list-style: none; }
.hero__features li { display: flex; align-items: center; gap: 0.5rem; }
.hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.hero__stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; margin-top: 2rem; }
.stat { font-weight: 800; font-size: 1.75rem; color: var(--accent-glow); }

/* Sections */
.section { padding-block: 5rem; background: var(--gradient-surface); }
.section--alt { background: var(--surface); }
.section__header { text-align: center; margin-bottom: 3rem; }
.section__header h2 { font-size: clamp(1.75rem, 2vw + 1rem, 2.75rem); margin: 0.5rem 0; }
.badge { display: inline-block; border: 1px solid var(--primary); color: var(--primary); padding: 0.25rem 0.5rem; border-radius: 999px; font-size: 0.875rem; }

/* Grid */
.grid { display: grid; gap: 2rem; }
.grid.two { grid-template-columns: 1fr; }
.grid.three { grid-template-columns: 1fr; }
.grid.two.gap { gap: 1rem; }
.two-span { grid-column: span 2; }
@media (min-width: 768px) { .grid.two { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .grid.three { grid-template-columns: repeat(3,1fr); } }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; transition: var(--transition); }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card__body { padding: 1rem; }
.chip { display: inline-block; font-size: 0.75rem; background: var(--secondary); color: var(--secondary-foreground); padding: 0.25rem 0.5rem; border-radius: 999px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: var(--transition); font-weight: 600; }
.btn--primary { color: var(--primary-foreground); background: var(--gradient-primary); box-shadow: var(--shadow-primary); }
.btn--primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn--accent { color: var(--accent-foreground); background: var(--accent); box-shadow: var(--shadow-accent); }
.btn--accent:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn--outline { background: transparent; color: white; border-color: rgb(255 255 255 / 0.3); }
.btn--outline:hover { background: rgb(255 255 255 / 0.1); border-color: rgb(255 255 255 / 0.5); }
.btn--block { width: 100%; }

/* Services */
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2rem; }
.tab { padding: 0.5rem 0.75rem; border-radius: 999px; border: 1px solid var(--border); background: var(--card); cursor: pointer; transition: var(--transition); }
.tab:hover { background: var(--muted); }
.tab.active { background: var(--gradient-primary); color: white; box-shadow: var(--shadow-primary); border-color: transparent; }

/* Portfolio Filters (navbar-like under the section title) */
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 2rem; }
.filter { padding: 0.6rem 0.9rem; border-radius: 999px; border: 1px solid var(--border); background: var(--card); cursor: pointer; transition: var(--transition); }
.filter:hover { background: var(--muted); }
.filter.active { background: var(--gradient-primary); color: white; box-shadow: var(--shadow-primary); border-color: transparent; }
.filter span { position: relative; }
.filter span::after { content: ""; position: absolute; left: 0; right: 0; bottom: -0.2em; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; opacity: .8; }
.filter:hover span::after { transform: scaleX(1); }
.filter.active span::after { transform: scaleX(1); }

/* Mobile friendliness for portfolio filters */
@media (max-width: 480px) {
  .filters { justify-content: flex-start; overflow-x: auto; white-space: nowrap; padding-bottom: 0.25rem; -ms-overflow-style: none; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; }
}
.service__title { font-size: 1.75rem; margin: 0.25rem 0 0.5rem; }
.service__desc { color: var(--muted-foreground); margin-bottom: 1rem; }
.service__features { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.5rem 1rem; }
.service__features li { display: flex; align-items: center; gap: 0.5rem; }
.gallery { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(3, minmax(0,1fr)); } }

/* Services gallery robustness */
.gallery { margin-top: 0.5rem; }
.gallery .card { display: block; }
.gallery .card img { width: 100%; height: 200px; object-fit: cover; display: block; }
@media (min-width: 1024px) { .gallery .card img { height: 220px; } }

/* Contact */
.contact { align-items: start; }
.contact__info .info { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.contact__info .info + .info { margin-top: 1rem; }
.why { margin-top: 1.5rem; background: var(--gradient-primary); color: var(--primary-foreground); border-radius: var(--radius); padding: 1rem; }
.why ul { margin: 0.5rem 0 0; padding-left: 1rem; }
.contact__form .field { display: grid; gap: 0.375rem; margin-bottom: 1rem; }
.contact__form input, .contact__form select, .contact__form textarea { width: 100%; padding: 0.625rem 0.75rem; border-radius: 8px; border: 1px solid var(--input); background: var(--background); outline: none; transition: var(--transition); }
.contact__form input:focus, .contact__form select:focus, .contact__form textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 25%, transparent); }

/* CTA */
.cta { margin-top: 3rem; }
.cta__inner { background: var(--gradient-primary); color: var(--primary-foreground); border-radius: 16px; padding: 2rem; text-align: center; }
.cta__inner h3 { margin: 0 0 0.5rem; }
.cta__inner p { margin: 0 0 1rem; }

/* Footer */
.footer { background: var(--primary); color: var(--primary-foreground); padding: 2rem 0; }
.footer h3 { margin: 0 0 0.5rem; }
.footer p { margin: 0 0 0.5rem; color: color-mix(in srgb, var(--primary-foreground) 90%, transparent); }

/* Floating WhatsApp Widget */
.wa-widget { position: fixed; right: 16px; bottom: 16px; z-index: 9999; display: grid; place-items: center; }
.wa-button { position: relative; display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 9999px; background: #25D366; color: white; box-shadow: 0 8px 20px rgb(37 211 102 / 0.35); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; animation: wa-bounce 1.6s ease-in-out infinite; }
.wa-button:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 24px rgb(37 211 102 / 0.45); }
.wa-button:active { transform: translateY(0) scale(0.98); }
.wa-icon { width: 28px; height: 28px; display: block; }
.wa-badge { position: absolute; top: -6px; right: -6px; background: #ff3b30; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 999px; box-shadow: 0 6px 14px rgb(255 59 48 / 0.35); }
@keyframes wa-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
  60% { transform: translateY(-3px); }
}
@media (min-width: 768px) {
  .wa-button { width: 64px; height: 64px; }
  .wa-icon { width: 30px; height: 30px; }
}
