/* --- Google Fonts & CSS Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
    --primary-color: #0f172a;
    --secondary-color: #475569;
    --accent-color: #2563eb;
    --accent-color-dark: #1d4ed8;
    --urgent: #b91c1c; /* red */
    --urgent-dark: #991b1b;
    --text-color: #0f172a;
    --muted: #64748b;
    --surface: #ffffff;
    --surface-alt: #f7f9fc;
    --border: #e5e7eb;
    --font-heading: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-brand: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --transition-speed: 0.2s ease;
    --container-width: 1180px;
    --radius: 12px;
}

/* --- Base --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--text-color);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; color: var(--primary-color); margin-bottom: .85rem; line-height: 1.2; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }
p { color: var(--secondary-color); margin-bottom: 1rem; }

a { color: var(--accent-color); text-decoration: none; }
a:hover { color: var(--accent-color-dark); }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 1.25rem; }
section { padding: 4rem 0; }
.section-title { text-align: center; margin-bottom: 2rem; }
.section-title::after { content: ''; display: block; width: 48px; height: 2px; margin: .6rem auto 0; background: var(--border); }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: 11px 16px; border-radius: 10px; font-weight: 600; border: 1px solid var(--border); transition: background var(--transition-speed), color var(--transition-speed), transform var(--transition-speed); cursor: pointer; }
.btn-primary { background: var(--accent-color); color: #fff; border-color: var(--accent-color); }
.btn-primary:hover { background: var(--accent-color-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--primary-color); }
.btn-secondary:hover { transform: translateY(-1px); }
.btn-urgent { background: var(--urgent); color: #fff; border-color: var(--urgent); }
.btn-urgent:hover { background: var(--urgent-dark); }

/* --- Header --- */
.header { position: fixed; inset: 0 0 auto 0; height: 64px; z-index: 1000; background: linear-gradient(180deg, rgba(37,99,235,0.05), rgba(37,99,235,0.0)); border-bottom: 1px solid var(--border); }
.navbar { height: 64px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; max-width: var(--container-width); margin: 0 auto; padding: 0 1.25rem; }
.nav-left { display: inline-flex; align-items: center; gap: .6rem; }
.nav-logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--primary-color); }
.logo-img { height: 28px; width: auto; display: block; }
.brand-text { font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.right-actions { display: inline-flex; align-items: center; gap: .5rem; }

/* Menu only header */
.nav-menu { position: fixed; left: -100%; top: 64px; width: 100%; height: calc(100vh - 64px); display: flex; flex-direction: column; gap: 0; background: var(--surface); border-top: 1px solid var(--border); transition: left .25s ease; }
.nav-menu.active { left: 0; }
.nav-link { display: block; padding: 1.1rem 1rem; color: var(--primary-color); font-weight: 600; border-bottom: 1px solid var(--border); }
.menu-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--primary-color); cursor: pointer; }
.menu-btn:hover { background: var(--surface-alt); }
.menu-btn svg { color: var(--accent-color); }

/* Right icon actions */
.icon-action { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--urgent); color: #fff; border: 1px solid var(--urgent); }
.icon-action:hover { background: var(--urgent-dark); }

/* --- Hero --- */
.hero { min-height: 58vh; display: grid; place-items: center; text-align: center; color: var(--primary-color); padding-top: 64px; background: var(--surface); }
.hero .hero-inner { max-width: 820px; padding: 0 1rem; }
.hero h1 { font-size: 2.2rem; margin-bottom: .4rem; }
.hero p { font-size: 1.02rem; color: var(--muted); margin-bottom: 1.1rem; height: 1.6em; }
.typing { display: inline-block; border-right: 2px solid var(--accent-color); white-space: nowrap; overflow: hidden; }

/* --- Services --- */
.services-overview { background: var(--surface); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.service-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; transform: translateY(10px); opacity: 0; animation: cardIn .6s var(--delay,0s) forwards; }
.service-card:hover { transform: translateY(0); border-color: #d8dde6; }
.service-card h3 { margin-bottom: .2rem; font-size: .98rem; color: var(--primary-color); }
.learn-more { font-size: .85rem; color: var(--muted); }

/* Staggered delays */
.services-grid.long .service-card:nth-child(1) { --delay: .05s; }
.services-grid.long .service-card:nth-child(2) { --delay: .1s; }
.services-grid.long .service-card:nth-child(3) { --delay: .15s; }
.services-grid.long .service-card:nth-child(4) { --delay: .2s; }
.services-grid.long .service-card:nth-child(5) { --delay: .25s; }
.services-grid.long .service-card:nth-child(6) { --delay: .3s; }
.services-grid.long .service-card:nth-child(7) { --delay: .35s; }
.services-grid.long .service-card:nth-child(8) { --delay: .4s; }
.services-grid.long .service-card:nth-child(9) { --delay: .45s; }
.services-grid.long .service-card:nth-child(10) { --delay: .5s; }
.services-grid.long .service-card:nth-child(11) { --delay: .55s; }
.services-grid.long .service-card:nth-child(12) { --delay: .6s; }

@keyframes cardIn { to { transform: translateY(0); opacity: 1; } }

/* --- Features --- */
.why-choose-us { background: var(--surface-alt); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.feature-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: transform var(--transition-speed); }
.feature-item:hover { transform: translateY(-3px); }
.feature-item img { width: 100%; height: 180px; object-fit: cover; }
.feature-item h3 { padding: .9rem 1rem .25rem; font-size: 1.05rem; }
.feature-item p { padding: 0 1rem 1rem; }

/* --- Success Stories (Story Book) --- */
.story-book { background: var(--surface); }
.story-wrapper { position: relative; }
.story-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: .9rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .25rem; }
.story-card { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; min-height: 200px; }
.story-title { font-weight: 700; color: var(--primary-color); margin-bottom: .25rem; }
.story-meta { font-size: .82rem; color: var(--muted); margin-bottom: .6rem; }
.story-nav { position: absolute; inset: -48px 0 auto 0; display: flex; justify-content: space-between; pointer-events: none; }
.story-nav button { pointer-events: auto; border: 1px solid var(--border); background: var(--surface); width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; }

/* --- Testimonials --- */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.testimonial-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.testimonial-card strong { display: block; margin-top: .4rem; color: var(--primary-color); }

/* --- Footer --- */
.footer { background: #0b0b0b; color: #d1d5db; }
.footer a { color: #e5e7eb; }
.footer a:hover { color: #fff; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.25rem; padding: 2.25rem 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: .9rem 0; text-align: center; }

/* --- Page specific minimal styles --- */
.page-header { padding: 5rem 0 2rem; margin-top: 64px; text-align: center; background: var(--surface); }

.all-services { padding-top: 1.5rem; }
.service-block { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; margin-bottom: 3rem; }
.service-block.reverse .service-block-image { order: 2; }
.service-block-image img { width: 100%; height: 340px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.service-block-content h3 { font-size: 1.4rem; }

.contact-page-section { padding-top: 1.5rem; }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
.contact-form-container { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .4rem; font-weight: 600; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px; font-family: var(--font-body); }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-color); }
.info-item { margin-bottom: 1rem; }

.blog-listing { padding-top: 1.5rem; }
.blog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.blog-card-image { width: 100%; height: 220px; object-fit: cover; }
.blog-card-content { padding: 1rem; }
.blog-category { display: inline-block; padding: .2rem .6rem; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: .7rem; }

/* --- Animations --- */
.animate-on-scroll { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; }
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* --- Responsive --- */
@media (max-width: 1200px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 992px) {
  .features-grid, .testimonial-grid { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service-block { grid-template-columns: 1fr; }
  .service-block-image img { height: 260px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .features-grid, .testimonial-grid, .blog-grid { grid-template-columns: 1fr; }
}

/* Long services grid tweaks */
.services-grid.long { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1200px) { .services-grid.long { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 992px) { .services-grid.long { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .services-grid.long { grid-template-columns: repeat(2, 1fr); } }

/* Right actions with text labels */
.right-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto; /* Push to right edge */
}

.icon-action.labeled {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: var(--urgent);
    color: #fff;
    border: 1px solid var(--urgent);
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.icon-action.labeled:hover {
    background: var(--urgent-dark);
}

.icon-action.labeled svg {
    flex-shrink: 0;
}
.hero-text-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.typing {
    height: 1.6em;
    min-height: 1.6em;
    font-size: 1.02rem;
    color: var(--muted);
    border-right: 2px solid var(--accent-color);
    white-space: nowrap;
    overflow: hidden;
}
.header-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 6px 12px;
    border-radius: 8px;
    background-color: var(--urgent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--urgent);
    transition: background 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.header-button svg {
    stroke: currentColor;
}

.header-button:hover {
    background-color: var(--urgent-dark);
    transform: translateY(-1px);
}

.right-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}


.section-about-us {
    padding: 4rem 0;
    background: var(--surface-alt);
  }
  .about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
  }
  .about-item {
    text-align: center;
  }
  .about-icon {
    margin-bottom: 1rem;
    stroke: var(--accent-color);
  }
  .about-item h3 {
    margin-bottom: 0.5rem;
  }
  .about-item p {
    color: var(--secondary-color);
  }
  
  .btn-primary {
    background-color: #007bff; /* your button bg */
    color: #fff;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border-radius: 4px;
  }
  
  .btn-primary:hover {
    background-color: #0056b3; /* darker blue for hover */
    color: #fff; /* keep text white */
  }
  
  @media (max-width: 768px) {
    .header-button span {
        display: none;
    }
}

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: transparent;
    transition: background 0.3s ease;
}

.scrolled .header {
    background: rgba(255, 255, 255, 0.95); /* Adjust color to match theme */
    backdrop-filter: blur(8px);
}
