/* ===========================
   Kassa Solutions – style.css
   =========================== */

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    scroll-behavior: smooth;
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    transition: background .3s, color .3s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: .3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.muted {
    color: var(--muted);
}

/* Theme Tokens */
:root {
    --bg: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --border: #e2e8f0;
    --card: #f8fafc;
    --primary: #14b8a6;
}

html[data-theme="dark"] {
    --bg: #0f172a;
    --text: #e2e8f0;
    --muted: #a0aec0;
    --border: #1e293b;
    --card: #1e293b;
    --primary: #22d3ee;
}

/* Header / Nav */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .site-header {
    background: rgba(15, 23, 42, .8);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.brand img {
    height: 42px;
    width: auto;
}

.links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.links a {
    font-weight: 500;
    padding: 8px 10px;
    border-radius: 8px;
}

.links a:hover,
.links a.active {
    color: var(--primary);
}

.hamburger {
    display: none;
    background: none;
    border: 0;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
}

/* Theme toggle (sun/moon) — improved visibility */
.theme-toggle {
    background: rgba(0, 0, 0, .06);
    border: 0;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background .25s, box-shadow .25s, transform .2s;
}

.theme-toggle:hover {
    transform: translateY(-1px);
}

.theme-toggle .icon {
    position: absolute;
    line-height: 0;
    opacity: 0;
    transform: scale(.7);
    transition: opacity .28s, transform .28s;
}

html[data-theme="light"] .theme-toggle .sun {
    opacity: 1;
    transform: scale(1);
    color: #f59e0b;
    filter: drop-shadow(0 0 3px rgba(245, 158, 11, .45));
}

html[data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, .12);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .14) inset;
}

html[data-theme="dark"] .theme-toggle .moon {
    opacity: 1;
    transform: scale(1);
    color: #f8fafc;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, .55));
}

/* Buttons */
.btn {
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1.05rem;
}

.btn.pill {
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
}

.btn.primary {
    background: var(--primary);
    color: #fff;
    transition: .3s;
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(20, 184, 166, .3);
}

.btn.ghost {
    border: 1px solid var(--border);
    color: var(--text);
}

/* Hero */
.section-hero {
    position: relative;
    color: #fff;
    text-align: center;
    padding: clamp(80px, 10vw, 140px) 0;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    --hero-c1: #0ea5e9;
    --hero-c2: #14b8a6;
    --hero-c3: #22d3ee;
}

.section-hero .container {
    position: relative;
    z-index: 2;
}

.section-hero h1 {
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 800;
    margin-bottom: 8px;
}

.section-hero .lead-tight {
    max-width: 760px;
    margin: 0 auto;
    opacity: .95;
}

.section-hero .hero-actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.section-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(800px 400px at 15% 20%, var(--hero-c1), transparent 70%),
        radial-gradient(800px 400px at 85% 10%, var(--hero-c2), transparent 70%),
        radial-gradient(900px 500px at 50% 100%, var(--hero-c3), transparent 60%);
    animation: heroShift 16s ease-in-out infinite alternate;
}

.section-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .25);
}

@keyframes heroShift {
    0% {
        filter: hue-rotate(0deg)
    }

    50% {
        filter: hue-rotate(20deg) brightness(1.1)
    }

    100% {
        filter: hue-rotate(-20deg)
    }
}

.hero-teal {
    --hero-c1: #0ea5e9;
    --hero-c2: #14b8a6;
    --hero-c3: #22d3ee;
}

/* Sections & Cards */
.section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border);
}

.grid.three {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.card {
    background: var(--card);
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: transform .3s, box-shadow .3s, border-color .3s;
    text-align: center;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(20, 184, 166, .4);
}

.feature i {
    font-size: 38px;
    margin-bottom: 12px;
    color: transparent;
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform .4s;
}

.card:hover i {
    transform: scale(1.1) rotate(-3deg);
}

/* Portfolio grid */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}

.btn-filter {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: .92rem;
}

.btn-filter.active,
.btn-filter:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .08);
}

.p-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.p-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: transform .35s, box-shadow .35s, border-color .35s;
}

.p-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 0 18px rgba(20, 184, 166, .45), 0 0 30px rgba(14, 165, 233, .25);
}

.p-thumb {
    aspect-ratio: 16/10;
    width: 100%;
    object-fit: cover;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    transition: transform .4s;
}

.p-card:hover .p-thumb {
    transform: scale(1.05);
}

.p-body {
    padding: 14px;
}

.p-title {
    margin: .4rem 0;
    font-weight: 600;
    color: var(--text);
}

.p-desc {
    font-size: .95rem;
    color: var(--muted);
}

.tag {
    display: inline-block;
    font-size: .85rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    transition: all .3s;
}

.tag:hover {
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

.tag.pulse {
    animation: tagPulse 3s ease-in-out infinite;
}

@keyframes tagPulse {
    0% {
        box-shadow: 0 0 0 rgba(14, 165, 233, .3)
    }

    50% {
        box-shadow: 0 0 12px rgba(14, 165, 233, .4)
    }

    100% {
        box-shadow: 0 0 0 rgba(14, 165, 233, .3)
    }
}

/* Blog */
.blog-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 12px;
    padding: 8px 12px;
    min-width: 260px;
}

.search input {
    border: 0;
    background: transparent;
    outline: none;
    color: var(--text);
    width: 100%;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.blog-card {
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
    transition: transform .25s, box-shadow .25s;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .12);
}

.blog-cover {
    aspect-ratio: 16/10;
    object-fit: cover;
    width: 100%;
}

.blog-body {
    padding: 14px;
}

.blog-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: .85rem;
    margin-bottom: 6px;
}

/* Forms */
.clean-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.clean-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.clean-form .field-span {
    grid-column: 1/-1;
}

.clean-form input,
.clean-form textarea,
.clean-form select {
    width: 100%;
    padding: .75rem .85rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    transition: border .2s, box-shadow .2s;
}

.clean-form input:focus,
.clean-form textarea:focus,
.clean-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 25%, transparent);
}

.clean-form textarea {
    resize: vertical;
    min-height: 130px;
}

.clean-form .form-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* CTA Section */
.section.reveal {
    text-align: center;
    padding: 100px 20px;
    background: var(--card);
    border-top: 1px solid var(--border);
}

.section.reveal h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.section.reveal .lead {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 650px;
    margin: 0 auto 30px;
}

/* Footer */
.site-footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    margin-top: 40px;
    padding: 40px 0;
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.follow-us {
    font-weight: 700;
    color: var(--text);
}

.social-icons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 6px;
}

.social-icons a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    transition: transform .3s;
}

.social-icons a.facebook {
    background: #1877F2;
}

.social-icons a.twitter {
    background: #000;
}

.social-icons a.linkedin {
    background: #0077B5;
}

.social-icons a.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-icons a.youtube {
    background: #FF0000;
}

.social-icons a.tiktok {
    background: linear-gradient(45deg, #25F4EE, #FE2C55);
}

.social-icons a:hover {
    transform: translateY(-3px);
}

.rights {
    color: var(--muted);
    font-size: .95rem;
}

/* Reveal / Back-to-top */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .6s, transform .6s;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

#toTop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 100;
}

#toTop.show {
    opacity: 1;
    visibility: visible;
}
/* ==============================new added===================== */
/* Header layout safety */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px; /* safe spacing */
  position: relative;
}

/* Make brand sit on its own and not shrink too much */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  z-index: 1400; /* keep above background but below controls if needed */
}

/* shrink logo a bit on small screens so it doesn't crowd header */
.brand img {
  height: 42px; /* default */
  width: auto;
}

/* Mobile adjustments */
@media (max-width: 820px) {
  /* smaller logo on phones */
  .brand img {
    height: 34px;         /* reduce so header fits */
  }

  /* place hamburger on the right */
  .hamburger {
    display: block;
    position: absolute;
    right: 12px;          /* move to the right edge */
    top: 10px;
    z-index: 1500;
  }

  /* theme toggle next to hamburger (left of it) */
  .theme-toggle {
    position: absolute;
    right: 56px;          /* adjust so it doesn't overlap hamburger; tweak as needed */
    top: 10px;
    z-index: 1450;
  }

  /* ensure brand is not overlapped - give brand left padding if needed */
  .nav .brand {
    padding-left: 12px;
  }

  /* make sure links dropdown does not overlay header buttons */
  .links {
    z-index: 100;
  }
}

/* ==============================new added===================== */

/* Responsive Nav */
@media(max-width:820px) {
    .links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        align-items: center;
        max-height: 0;
        overflow: hidden;
        transition: max-height .4s;
    }

    .links[hidden] {
        max-height: 0;
        padding: 0;
    }

    .links:not([hidden]) {
        max-height: 340px;
        padding: 16px 0;
    }

    .hamburger {
        display: block;
    }

    .clean-form .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Thanks / Error page helpers (used already) */
.thanks-section,
.error-section {
    min-height: 70vh;
}

/* Animations */
@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}