/* ============================================
   CASAVIVA MULTI-PAGE WEBSITE
   Shared CSS for all pages
   ============================================ */

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

:root {
    --accent-color: #c97642;
    --primary-color: #3a3633;
    --secondary-color: #f7f5f2;
    --bg-light: #ede8e0;
    --bg-lighter: #f5f1e8;
    --text-color: #3a3633;
    --text-light: #8b8680;
    --border-color: #e0d9d0;
    --white: #ffffff;
    --radius: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--secondary-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container--wide {
    max-width: 1760px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
    transition: var(--transition);
}

#site-header.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo:hover {
    opacity: 0.8;
}

.logo-image {
    height: 64px;
    width: auto;
}

nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

nav a:hover {
    color: var(--accent-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

/* ============================================
   FOOTER
   ============================================ */

#site-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4rem 0;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.75rem;
    margin-bottom: 3rem;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.footer-section h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-section p {
    color: rgba(245, 241, 232, 0.7);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(245, 241, 232, 0.7);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(245, 241, 232, 0.2);
    padding-top: 2rem;
    text-align: center;
    color: rgba(245, 241, 232, 0.7);
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

main {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 1rem auto;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(58, 54, 51, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background-color: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--accent-color);
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

/* ============================================
   CARD LAYOUTS
   ============================================ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.75rem;
}

.card {
    background-color: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-top: 1.75rem;
}

.product-card {
    background-color: var(--secondary-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.product-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-card-image {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
}

.product-card-content {
    padding: 1.5rem;
}

.product-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #3a3633;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.product-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* ============================================
   CATEGORY ITEMS
   ============================================ */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.75rem;
}

.category-item {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.category-item:hover {
    background-color: var(--accent-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(201, 118, 66, 0.2);
}

.category-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.category-item p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background-color: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(201, 118, 66, 0.3);
    transition: var(--transition);
    z-index: 40;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
}

.scroll-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(201, 118, 66, 0.4);
}

.scroll-to-top.show {
    display: flex;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    nav {
        gap: 1rem;
    }

    nav a {
        font-size: 0.9rem;
    }

    section {
        padding: 2rem 0;
    }

    .hero {
        height: 400px;
    }

    .card-grid,
    .product-grid {
        grid-template-columns: 1fr;
    }
}

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

    .header-content {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    nav {
        gap: 0.5rem;
    }

    nav a {
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}


/* =====================
   Actona-like About page layout
   ===================== */
.section { padding: 3.25rem 0; }
.bg-white { background: var(--white); }
.bg-soft { background: var(--bg-lighter); }

.eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.display-title {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 56ch;
}

    display: grid;
    gap: 0.5rem;
    margin-bottom: 2.25rem;
    max-width: 70ch;
}

.section-head p { color: var(--text-light); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.stat-value { font-weight: 700; font-size: 1.15rem; }
.stat-label { color: var(--text-light); margin-top: 0.4rem; }

.feature-rows {
    display: grid;
    gap: 2.5rem;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: center;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
}

.feature-row--reverse .feature-row__media { order: 2; }
.feature-row--reverse .feature-row__copy { order: 1; }

.feature-row__media img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: 14px;
}

.checklist {
    margin-top: 1rem;
    padding-left: 1.1rem;
    color: var(--text-light);
}

.checklist li { margin: 0.4rem 0; }

.text-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent-color);
    font-weight: 600;
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.focus-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
}

.focus-card__title {
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.focus-card ul { padding-left: 1.1rem; color: var(--text-light); }
.focus-card__cta { display: inline-block; margin-top: 1rem; color: var(--accent-color); font-weight: 700; }

.anchor-sections { display: grid; gap: 1rem; }
.anchor-block {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
}

.cta-band {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-lighter);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 2rem;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) and (min-width: 901px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .split-hero__grid { grid-template-columns: 1fr; }
    .split-hero__media img { height: 380px; }
    .stat-grid { grid-template-columns: 1fr; }
    .feature-row { grid-template-columns: 1fr; }
    .feature-row--reverse .feature-row__media,
    .feature-row--reverse .feature-row__copy { order: initial; }
    .feature-row__media img { height: 280px; }
    .focus-grid { grid-template-columns: 1fr; }
    .cta-band { flex-direction: column; align-items: flex-start; }
}


/* ============================================
   ACTONA-LIKE PAGE MODULES
   ============================================ */

.anchor-bar {
  padding: 0.5rem 0 1.25rem;
  margin-top: 88px;
}
.anchor-bar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pill-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  background: var(--white);
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.9rem;
}
.pill-link:hover { border-color: rgba(0,0,0,0.18); }

.module { padding: 2.75rem 0; }
.module--tight { padding: 1.75rem 0; }

.module__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  max-width: 920px;
}
.module__head p { color: var(--text-muted); }

.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--3 { grid-template-columns: 1fr; } }

.card--link { text-decoration: none; color: inherit; }
.card__media img { width: 100%; height: 200px; object-fit: cover; display: block; border-radius: 14px; }
.card__body { padding-top: 0.9rem; }
.card__body h3 { margin: 0 0 0.4rem; }
.card__cta { display: inline-block; margin-top: 0.75rem; font-weight: 700; color: var(--accent-color); }

.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: 14px;
  background: rgba(0,0,0,0.03);
}
@media (max-width: 640px) { .callout { flex-direction: column; align-items: flex-start; } }

.two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
}
@media (max-width: 1024px) { .two-col { grid-template-columns: 1fr; } }

.panel {
  padding: 1.5rem;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  background: var(--white);
}
.panel--soft { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.05); }

.form { display: grid; gap: 0.9rem; }
.form-row { display: grid; gap: 0.35rem; }
.form input, .form textarea {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  font: inherit;
}
.form input:focus, .form textarea:focus { outline: none; border-color: rgba(0,0,0,0.28); }

.kv { display: grid; gap: 0.75rem; margin-top: 0.5rem; }
.kv__item { display: grid; gap: 0.2rem; }
.kv__k { font-weight: 700; }
.kv__v { color: var(--text-muted); }

.mini-callout { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(0,0,0,0.10); }
.checklist { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--text-muted); }
.checklist li { margin: 0.3rem 0; }

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
}
.social-links { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.75rem; }
.social-links a { color: rgba(255,255,255,0.85); text-decoration: none; }
.social-links a:hover { color: var(--white); }


/* =====================
   WIDE HERO / FULL BLEED
   ===================== */
.hero--wide {
    min-height: 72vh;
    display: flex;
    align-items: flex-end;
    background-image:
      linear-gradient(180deg, rgba(20,18,17,0.25), rgba(20,18,17,0.65)),
      url('../img/hero-home.jpg');
    background-size: cover;
    background-position: center;
    padding: 0;
}

.hero--wide .hero-content {
    width: 100%;
    max-width: 980px;
    padding: 3.25rem 1rem 3.25rem;
    margin: 0 auto;
    text-align: left;
}

.hero--wide h1 {
    font-size: clamp(2.6rem, 4.4vw, 4.4rem);
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.hero--wide p {
    font-size: 1.15rem;
    max-width: 60ch;
}

.full-bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}
/* Wide Banner Style Modifications */

/* Make split-hero full width */
/* Fixed Banner Layout - Text within banner area only */

/* Split Hero Section - 确保有足够高度 */
.split-hero {
    padding: 0;
    background: var(--secondary-color);
    position: relative;
    min-height: 600px;
    overflow: hidden;
}

/* Grid布局改为全宽背景 */
.split-hero__grid {
    display: block;
    position: relative;
    height: 600px;
}

/* Banner图片 - 全宽背景 */
.split-hero__media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.split-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* 文字框 - 限制在banner区域内 */
.split-hero__copy {
    position: absolute;
    z-index: 10;
    max-width: 600px;
    padding: 3rem 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    top: 50%;
    transform: translateY(-50%);
}

/* 左侧位置 - About Us, Product Development */
.page-about .split-hero__copy,
.page-product-dev .split-hero__copy {
    left: 8%;
    right: auto;
}

/* 居中位置 - Why Us, Contact */
.page-why .split-hero__copy,
.page-contact .split-hero__copy {
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
}

/* 右侧位置 - Categories, Insights */
.page-categories .split-hero__copy,
.page-insights .split-hero__copy {
    left: auto;
    right: 8%;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .split-hero {
        min-height: 500px;
    }
    
    .split-hero__grid {
        height: 500px;
    }
    
    .split-hero__copy {
        max-width: 500px;
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .split-hero {
        min-height: 400px;
    }
    
    .split-hero__grid {
        height: 400px;
    }
    
    .split-hero__copy {
        position: absolute;
        left: 5% !important;
        right: 5% !important;
        max-width: none;
        transform: translateY(-50%) !important;
        padding: 2rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .split-hero__copy .display-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .split-hero {
        min-height: 350px;
    }
    
    .split-hero__grid {
        height: 350px;
    }
    
    .split-hero__copy {
        padding: 1.5rem 1rem;
    }
    
    .split-hero__copy .display-title {
        font-size: 1.5rem;
    }
}

.section-head {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 2.25rem;
    max-width: 70ch;
}
.section-head p { color: var(--text-light); }

/* ============================================
   HOW IT WORKS - ALTERNATING LAYOUT
   Scoped styles for OneStopSourcing page
   ============================================ */

/* Desktop: Alternating layout (>= 1024px) */
@media (min-width: 1024px) {
  /* Step 1 & 3: Image on left, text on right */
  .how-it-works-step--img-left {
    grid-template-columns: 1fr 1fr;
  }
  
  .how-it-works-step--img-left .feature-row__media {
    order: 1;
  }
  
  .how-it-works-step--img-left .feature-row__copy {
    order: 2;
  }
  
  /* Step 2 & 4: Text on left, image on right */
  .how-it-works-step--img-right {
    grid-template-columns: 1fr 1fr;
  }
  
  .how-it-works-step--img-right .feature-row__copy {
    order: 1;
  }
  
  .how-it-works-step--img-right .feature-row__media {
    order: 2;
  }
}

/* Mobile: Unified top image, bottom text (< 1024px) */
@media (max-width: 1023px) {
  .how-it-works-step {
    grid-template-columns: 1fr !important;
    display: flex;
    flex-direction: column;
  }
  
  /* Image always on top */
  .how-it-works-step .feature-row__media {
    order: 1 !important;
  }
  
  /* Text always on bottom */
  .how-it-works-step .feature-row__copy {
    order: 2 !important;
  }
}

/* Consistent spacing for all steps */
.how-it-works-steps {
  display: grid;
  gap: 3.5rem; /* 56px between steps */
}

/* Ensure vertical centering on desktop */
@media (min-width: 1024px) {
  .how-it-works-step {
    align-items: center;
  }
}
