/* =============================================
   Basic Styles.css
   Clean, modern, and mobile-friendly base styles
   ============================================= */
:root {
  --primary: #111111;
  --text: #222222;
  --gray: #555555;
  --light-gray: #f8f8f8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #ffffff;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* NAVIGATION */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid #eeeeee;
  transition: all 0.3s ease;
}

.navbar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 75px;
  width: auto;
  
  /* filter: brightness(0); */
  transition: filter 0.3s ease;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--primary);
}

/* Search */
.search-container {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.search-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--gray);
  transition: stroke 0.3s ease;
}

.search-icon:hover svg {
  stroke: var(--primary);
}

#search-input {
  width: 0;
  padding: 0;
  border: none;
  background: #f4f4f4;
  font-size: 1rem;
  border-radius: 9999px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-shadow: 0 0 0 3px transparent;
}

#search-input.expanded {
  width: 260px;
  padding: 12px 20px;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.1);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--primary);
  margin: 6px 0;
  transition: all 0.3s ease;
  border-radius: 3px;
}

/* Mobile Menu */
.nav-menu.mobile {
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  background: white;
  flex-direction: column;
  padding: 2rem;
  gap: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu.mobile.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .nav-menu.mobile {
    display: flex;
  }
}

/* HERO */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  color: var(--primary);
  padding-top: 1.0rem;
  margin-bottom: 1.0rem;
}

.hero-text p {
  font-size: 1.4rem;
  color: var(--gray);
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--primary);
  color: white;
  padding: 16px 32px;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px -5px rgba(17, 17, 17, 0.3);
}

.cta-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(17, 17, 17, 0.3);
}

.hero-visual {
  position: relative;
}

.hero-visual::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(17,17,17,0.08) 0%, transparent 70%);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
}

/* SECTIONS */
section {
  padding: 120px 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.75rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--gray);
  font-size: 1.25rem;
  max-width: 520px;
  margin: 0 auto;
}

/* Fade-in animation */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* SERVICES */
#services .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.service-card {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.service-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* PORTFOLIO */
#portfolio .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.portfolio-card {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
}

.portfolio-card:hover {
  transform: scale(1.03);
}

.portfolio-image {
  height: 260px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease;
  text-align: center;
  padding: 1.5rem;
}

/* Dark overlay */
.portfolio-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
  transition: opacity 0.4s ease;
}

/* Text layer - stays bright white and above overlay */
.portfolio-image .image-text {
  position: relative;
  z-index: 2;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  transition: all 0.4s ease;
}

/* Hover effect - remove overlay */
.portfolio-image:hover::before {
  opacity: 0;
}

.portfolio-image:hover {
  transform: scale(1.03);
}

.portfolio-image:hover .image-text {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.portfolio-info {
  padding: 1.75rem;
  background: white;
}

/* BLOG SECTION REWRITE */
#blog .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
}

.blog-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  
  /* In case you wrap the whole card in an <a> */
}

.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.blog-image {
  position: relative;
  height: 240px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

/* The Dark Overlay */
.blog-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  
  /* Default dark state */
  transition: opacity 0.4s ease;
  z-index: 1;
}

/* The Title Text inside the image */
.blog-image h4 {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-size: 1.4rem;
  text-align: center;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Hover State: Fade out the overlay */
.blog-card:hover .blog-image::before {
  opacity: 0.1;
  
  /* Keeps a tiny bit of contrast so text stays readable */
}

.blog-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.blog-content p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.read-more {
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s ease;
}

.blog-card:hover .read-more {
  gap: 12px;
}

/* ABOUT */
#about {
  background: #f8f8f8;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

/* CONTACT */
#contact form {
  max-width: 620px;
  margin: 0 auto;
  background: white;
  padding: 3rem;
  border-radius: 24px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

input, textarea {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #eeeeee;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  transition: border 0.3s ease;
}

input:focus, textarea:focus {
  border-color: var(--primary);
  outline: none;
}

button[type="submit"] {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 18px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
}

button[type="submit"]:hover {
  background: #222;
}

/* FOOTER */
footer {
  background: #111111;
  color: #aaaaaa;
  padding: 4rem 2rem 2rem;
  text-align: center;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: 80px 1.5rem;
  }
}

/* CLIENTS SECTION */
#clients {
  background: #f8f8f8;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
  justify-items: center;
}

.client-logo {
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  
  /* Slightly more subtle starting position */
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 20px;
  text-align: center;
  filter: grayscale(100%);
  
  /* Full grayscale looks cleaner for professional logos */
}

.client-logo img {
  max-height: 95px;
  width: auto;
  transition: all 0.6s ease;
  filter: inherit;
}

.client-logo.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.client-logo:hover {
  filter: grayscale(0%);
  transform: scale(1.08);
}

.client-logo:hover img {
  filter: grayscale(0%);
}

/* Notebook Mockup – Improved Responsive Sizing */
.notebook-wrapper {
  max-width: 100%;
  margin: 4rem auto;
  padding: 0 20px;
}

.notebook {
  max-width: 100%;
  margin: 0 auto;
  position: relative;
}

.screen {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.screen-content {
  position: relative;
  width: 100%;
  max-width: 100vw;
  
  /* Prevents overflowing the viewport */
  height: 0;
  padding-top: 72.25%;
  
  /* Keep your original aspect ratio */
  margin: 0 auto;
  background-size: contain;
  
  /* or 'cover' if you prefer */
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Extra safety for mobile / iPhone */
@media (max-width: 768px) {
  .screen-content {
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 8px;
  }

  .notebook-wrapper {
    padding: 0 10px;
  }
}

.center-image {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  
  /* Prevents the image from being wider than the screen */
  height: auto;
}

/* ── Search Dropdown (navbar) ────────────────────────────────── */
.bw-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 420px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15);
  z-index: 2000;
  overflow: hidden;
  animation: bwDropIn 0.2s ease;
}
@keyframes bwDropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bw-search-result {
  display: block;
  text-decoration: none;
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s ease;
}
.bw-search-result:last-of-type { border-bottom: none; }
.bw-search-result:hover { background: #fafafa; }
.bw-search-result-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bw-search-result-inner img,
.bw-search-result-placeholder {
  width: 48px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f0f0f0;
}
.bw-search-result-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bw-search-result-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bw-search-result-excerpt {
  font-size: 0.78rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bw-search-result-type {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bbb;
  flex-shrink: 0;
}
.bw-search-empty {
  padding: 1.25rem 1rem;
  font-size: 0.9rem;
  color: #888;
}
.bw-search-more {
  display: block;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  background: #fafafa;
  border-top: 1px solid #eee;
  text-align: center;
  transition: background 0.15s ease;
}
.bw-search-more:hover { background: #f0f0f0; }
.bw-search-dropdown mark {
  background: #fff3cd;
  color: #111;
  border-radius: 2px;
  padding: 0 1px;
}
@media (max-width: 768px) {
  .bw-search-dropdown { width: calc(100vw - 2rem); right: -1rem; }
}
