/* =========================================================
   01. Reset & Base
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}


/* =========================================================
   02. Layout Primitives
   ========================================================= */

main {
    min-height: calc(100vh - 200px);
}

.container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   03. Header & Navigation
   ========================================================= */

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

header.header--hidden {
    transform: translateY(-100%);
}

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

.logo {
    flex-shrink: 0;
    margin-right: 2rem;
}

.logo img {
    height: 80px;
    width: auto;
    display: block;
}

nav ul.navbar {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

nav ul.navbar li {
    margin: 0 1.5rem;
}

nav ul.navbar a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: opacity 0.3s ease, text-shadow 0.3s ease;
}

nav ul.navbar a:hover {
    opacity: 0.8;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* ---- Hamburger toggle — hidden on desktop --------------- */

.nav-toggle {
    display: none;
    appearance: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    margin-left: auto;
    /* Provide a generous tap target on touch devices */
    min-width: 44px;
    min-height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ---- Mobile: hamburger layout --------------------------- */

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        row-gap: 0;
    }

    .logo {
        margin-right: auto;
    }

    .logo img {
        height: 56px;
    }

    .nav-toggle {
        display: inline-flex;
        order: 3;
    }

    /* Auth container sits between logo and hamburger on mobile.
       On narrow screens the avatar button still shows, keeping the
       sign-in state visible without requiring the menu to open. */
    .auth-container {
        order: 2;
        margin-left: 0 !important;
    }

    /* The nav drops below the top row as a collapsible panel.
       Full-width, slide-down behavior on toggle. */
    nav {
        order: 4;
        flex-basis: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    nav.nav--open {
        max-height: 60vh;
        overflow-y: auto;
    }

    nav ul.navbar {
        flex-direction: column;
        flex-wrap: nowrap;
        padding: 0.5rem 0 0.75rem;
        gap: 2px;
    }

    nav ul.navbar li {
        margin: 0;
    }

    nav ul.navbar a {
        display: block;
        padding: 0.75rem 0.5rem;
        border-radius: 6px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    nav ul.navbar a:hover {
        background: rgba(255, 255, 255, 0.1);
        opacity: 1;
        text-shadow: none;
    }
}


/* =========================================================
   04. Typography
   ========================================================= */

h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #764ba2;
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 1.8rem;
    color: #667eea;
    margin: 2rem 0 1rem;
}

h3 {
    font-size: 1.3rem;
    color: #764ba2;
    margin: 1.5rem 0 0.75rem;
}

h4 {
    font-size: 1.1rem;
    color: #667eea;
    margin: 1.25rem 0 0.75rem;
}

h5 {
    font-size: 1rem;
    color: #764ba2;
    margin: 1rem 0 0.5rem;
}

h6 {
    font-size: 0.9rem;
    color: #667eea;
    margin: 1rem 0 0.5rem;
}

p {
    margin-bottom: 1rem;
    text-align: justify;
}

small {
    font-size: 0.85rem;
    color: #666;
}

strong {
    font-weight: 600;
}


/* =========================================================
   05. Links & Buttons
   ========================================================= */

a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    margin: 0.5rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Contextual CTA links */
main a[href*="/contact/"],
main a[href*="/schedule/"] {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 5px;
    margin: 0.5rem 0;
}

main a[href*="/contact/"]:hover,
main a[href*="/schedule/"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}


/* =========================================================
   06. Lists & Content Elements
   ========================================================= */

ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666;
    font-style: italic;
}

hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2rem 0;
}


/* =========================================================
   07. Code & Preformatted
   ========================================================= */

code {
    background-color: #f0f0f0;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #764ba2;
}

pre {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    overflow-x: auto;
    border-left: 4px solid #667eea;
}


/* =========================================================
   08. Forms
   ========================================================= */

form {
    margin: 1.5rem 0;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 1rem;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}


/* =========================================================
   09. Tables
   ========================================================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th,
td {
    padding: 0.75rem;
    border: 1px solid #ddd;
}

th {
    background-color: #f5f7fa;
    font-weight: 600;
}


/* =========================================================
   10. Media
   ========================================================= */

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

figure {
    margin: 1.5rem 0;
}

figcaption {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
}


/* =========================================================
   11. Hero Section
   ========================================================= */

.hero {
    position: relative;
    padding: 4rem 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%);
    overflow: hidden;
    border-radius: 8px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("/images/Hero_Background.webp");
    background-size: cover;
    background-position: center;
    opacity: 0.12;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}


/* =========================================================
   12. Footer
   ========================================================= */

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    color: #ffffff;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.social-links a:hover {
    text-decoration: none;
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.9);
    color: #ffffff;
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: #e8ecff;
}

footer a:hover {
    color: #ffffff;
}


/* =========================================================
   13. Blog
   ========================================================= */

.blog-list {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.blog-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e6e8ef;
}

.blog-list li a {
    font-weight: 600;
}

.blog-list .date {
    flex-shrink: 0;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background-color: #eef1ff;
    color: #4a57aa;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.pagination {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.blog-post {
    max-width: 760px;
    margin: 0 auto;
}

.blog-post-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e6e8ef;
}

.blog-post-header h1 {
    margin-bottom: 0.65rem;
}

.blog-meta {
    display: inline-block;
    margin: 0;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    background-color: #eef1ff;
    color: #4a57aa;
    font-size: 0.88rem;
    font-weight: 600;
}

.blog-content p,
.blog-content ul,
.blog-content ol,
.blog-content blockquote,
.blog-content pre {
    margin-bottom: 1.1rem;
}

.blog-post-nav {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e6e8ef;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.blog-post-nav > div {
    flex: 1;
}

.blog-post-nav > div:last-child {
    text-align: right;
}

.blog-post-nav a {
    font-weight: 600;
}

.blog-post-nav .nav-placeholder {
    color: #8e92a1;
    font-weight: 600;
    opacity: 0.9;
}

.blog-back-link {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid #e6e8ef;
}

.blog-back-link a {
    font-weight: 600;
}


/* =========================================================
   13. Utilities
   ========================================================= */

.text-center { text-align: center; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }


/* =========================================================
   14. Accessibility
   ========================================================= */

:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}


/* =========================================================
   15. Responsive Adjustments
   ========================================================= */

@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 1rem;
    }

    .blog-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-post-header h1 {
        font-size: 1.85rem;
    }

    .blog-post-nav {
        flex-direction: column;
        gap: 0.7rem;
    }

    .blog-post-nav > div:last-child {
        text-align: left;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    nav ul.navbar {
        flex-direction: column;
        align-items: center;
    }

    nav ul.navbar li {
        margin: 0.5rem 0;
    }

    main {
        min-height: calc(100vh - 150px);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }

    .container {
        margin: 0.5rem;
        padding: 0.75rem;
    }
}

/* =========================================================
   16. Business funnels Specific Styles
   ========================================================= */

   .business-funnel h1 {
  color: #333;
}

.business-funnel .disclaimer {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

.business-funnel .cta {
  margin-top: 2rem;
}

.business-funnel .secondary {
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* =========================================================
   17. Campaign Section Styling
   ========================================================= */

.problem,
.solution,
.process,
.positioning,
.closing {
    max-width: 900px;
    margin: 3rem auto;
    padding: 2.5rem 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

/* Alternate background separation for rhythm */
.solution,
.positioning {
    background: #f8f9fc;
}

/* Section Headings */
.problem h2,
.solution h2,
.process h2,
.positioning h2,
.closing h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    border-bottom: none;
}

/* Problem Section — slightly stronger tone */
.problem {
    border-left: 5px solid #764ba2;
}

.problem p {
    font-size: 1.05rem;
}

/* Solution Section — confidence */
.solution ul {
    list-style: none;
    margin-left: 0;
}

.solution ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
}

.solution ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* Process Section */
.process ol {
    margin-left: 1.5rem;
}

.process ol li {
    margin-bottom: 0.75rem;
    font-weight: 500;
}

/* Positioning Section — subtle authority */
.positioning {
    text-align: center;
}

.positioning p {
    max-width: 700px;
    margin: 0 auto 1rem auto;
    font-size: 1.05rem;
}

/* Closing Section — conversion focus */
.closing {
    text-align: center;
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
}

.closing .btn {
    font-size: 1.1rem;
    padding: 0.85rem 2rem;
}

/* Improve spacing for CTA repetition */
.process .btn,
.closing .btn {
    margin-top: 1.5rem;
}

/* Responsive tightening */
@media (max-width: 768px) {
    .problem,
    .solution,
    .process,
    .positioning,
    .closing {
        margin: 2rem 1rem;
        padding: 1.5rem;
    }
}


/* =========================================================
   Auth UI
   ========================================================= */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: 1rem;
    flex-shrink: 0;
}

.auth-skeleton {
    width: 80px;
    height: 36px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.25);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    background-repeat: no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.35);
    animation: auth-skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes auth-skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.auth-signin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    min-width: 80px;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.18);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    font-family: inherit;
}

.auth-signin-btn:hover,
.auth-signin-btn:focus-visible {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.auth-user {
    position: relative;
}

.auth-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 8px;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}

.auth-user-btn:hover,
.auth-user-btn:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.auth-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.auth-avatar--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.auth-firstname {
    font-size: 14px;
    color: white;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .auth-firstname {
        display: none;
    }
}

.auth-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    z-index: 100;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
}

.auth-dropdown[hidden] {
    display: none;
}

.auth-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    background: transparent;
    border: none;
    color: #333;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
}

.auth-dropdown-item:hover,
.auth-dropdown-item:focus-visible {
    background: #f5f5f5;
    outline: none;
}

.auth-dropdown-signout {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    color: #E24B4A;
}

.auth-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 360px;
    padding: 12px 16px;
    background: #2b2b2b;
    color: white;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    font-size: 0.9rem;
    animation: auth-toast-in 0.2s ease-out;
}

@keyframes auth-toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-toast-message {
    flex: 1;
}

.auth-toast-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.8;
}

.auth-toast-close:hover {
    opacity: 1;
}


/* =========================================================
   Service Worker Update Banner
   ========================================================= */

.sw-update-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #1D9E75;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
    animation: sw-banner-in 0.3s ease-out;
}

@keyframes sw-banner-in {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.sw-update-banner span {
    flex: 1;
}

.sw-update-refresh {
    background: white;
    color: #1D9E75;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.sw-update-refresh:hover {
    background: rgba(255, 255, 255, 0.9);
}

.sw-update-dismiss {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.8;
}

.sw-update-dismiss:hover {
    opacity: 1;
}
