/* Page-specific styles for case-studies.html */
/* Hero */

      .hero { 
        position: relative; 
        overflow: hidden; 
        border-bottom: 1px solid var(--border); 
        background: radial-gradient(1200px 500px at 70% -10%, rgba(217,181,69,0.08), transparent),
          linear-gradient(var(--bg), var(--bg)); 
        min-height: 240px;
        display: flex;
        align-items: center;
        padding: 80px 0; 
      }
      .hero-background {
        position: absolute;
        inset: 0;
        overflow: hidden;
        z-index: 0;
      }
      .hero-background picture {
        position: absolute;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
      }
      .hero-background img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 50%;
        position: absolute;
        inset: 0;
        display: block;
        filter: saturate(110%);
      }
      .hero-background::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(to top, rgba(10,10,10,1) 0%, rgba(10,10,10,0.98) 10%, rgba(10,10,10,0.95) 18%, rgba(10,10,10,0.88) 25%, rgba(10,10,10,0.78) 32%, rgba(10,10,10,0.65) 38%, rgba(10,10,10,0.5) 43%, rgba(10,10,10,0.35) 47%, rgba(10,10,10,0.2) 50%, rgba(10,10,10,0.1) 52%, rgba(10,10,10,0.05) 53%, rgba(10,10,10,0.02) 54%, rgba(10,10,10,0) 55%);
        z-index: 2;
      }
      .hero-blur-layer {
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.98) 10%, rgba(0,0,0,0.95) 18%, rgba(0,0,0,0.88) 25%, rgba(0,0,0,0.78) 32%, rgba(0,0,0,0.65) 38%, rgba(0,0,0,0.5) 43%, rgba(0,0,0,0.35) 47%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 52%, rgba(0,0,0,0.05) 53%, rgba(0,0,0,0.02) 54%, rgba(0,0,0,0) 55%);
        -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.98) 10%, rgba(0,0,0,0.95) 18%, rgba(0,0,0,0.88) 25%, rgba(0,0,0,0.78) 32%, rgba(0,0,0,0.65) 38%, rgba(0,0,0,0.5) 43%, rgba(0,0,0,0.35) 47%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 52%, rgba(0,0,0,0.05) 53%, rgba(0,0,0,0.02) 54%, rgba(0,0,0,0) 55%);
      }
      .hero-inner { 
        text-align: center; 
        max-width: 1000px; 
        margin: 0 auto; 
        position: relative;
        z-index: 1;
      }

      .eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: 0.18em; font-size: 1.2em; margin-bottom: 10px; }

      .hero h1 { font-size: 48px; line-height: 1.15; margin: 0 0 20px; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.25), 0 6px 12px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.15); }

      .hero p { font-size: 1.3em; line-height: 1.4; color: var(--muted); margin: 0; }
      html.pref-high-contrast .hero-background::before {
        background: linear-gradient(to top, rgba(248,250,252,1) 0%, rgba(248,250,252,0.98) 10%, rgba(248,250,252,0.95) 18%, rgba(248,250,252,0.88) 25%, rgba(248,250,252,0.78) 32%, rgba(248,250,252,0.65) 38%, rgba(248,250,252,0.5) 43%, rgba(248,250,252,0.35) 47%, rgba(248,250,252,0.2) 50%, rgba(248,250,252,0.1) 52%, rgba(248,250,252,0.05) 53%, rgba(248,250,252,0.02) 54%, rgba(248,250,252,0) 55%);
      }
      html.pref-high-contrast .hero-blur-layer {
        mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.98) 10%, rgba(0,0,0,0.95) 18%, rgba(0,0,0,0.88) 25%, rgba(0,0,0,0.78) 32%, rgba(0,0,0,0.65) 38%, rgba(0,0,0,0.5) 43%, rgba(0,0,0,0.35) 47%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 52%, rgba(0,0,0,0.05) 53%, rgba(0,0,0,0.02) 54%, rgba(0,0,0,0) 55%);
        -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.98) 10%, rgba(0,0,0,0.95) 18%, rgba(0,0,0,0.88) 25%, rgba(0,0,0,0.78) 32%, rgba(0,0,0,0.65) 38%, rgba(0,0,0,0.5) 43%, rgba(0,0,0,0.35) 47%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 52%, rgba(0,0,0,0.05) 53%, rgba(0,0,0,0.02) 54%, rgba(0,0,0,0) 55%);
      }

      /* Content Sections */

      section { padding: 15px 0; }

      .section-title { font-size: 36px; margin: 0 0 20px; text-align: center; }

      .section-subtitle { font-size: 1.2em; color: var(--muted); text-align: center; margin: 0 0 60px; max-width: 600px; margin-left: auto; margin-right: auto; }



      /* Filter Tabs */

      .filter-tabs { display: flex; justify-content: center; gap: 16px; margin-bottom: 60px; flex-wrap: wrap; }

      .filter-tab { padding: 12px 24px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; color: var(--muted); cursor: pointer; transition: all 0.3s ease; }

      .filter-tab:hover, .filter-tab.active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }



      /* Case Studies Grid */

      .case-studies-grid { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }

      .case-study-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; max-width: 500px; width: 100%; transition: all 0.3s ease; cursor: pointer; }

      .case-study-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

      .case-study-image { position: relative; height: 250px; background: var(--bg-2); overflow: hidden; }

      .case-study-image img { width: 100%; height: 100%; object-fit: cover; }

      .case-study-content { padding: 30px; }

      .case-study-category { color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-bottom: 8px; }

      .case-study-title { font-size: 20px; margin: 0 0 12px; font-weight: 600; }

      .case-study-description { color: var(--muted); margin: 0 0 20px; font-size: 14px; }

      .case-study-details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

      .case-study-detail { text-align: center; }

      .case-study-detail .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }

      .case-study-detail .value { font-size: 16px; font-weight: 600; color: var(--accent); }



      /* Before/After Section */

      .before-after { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 40px; margin: 80px 0; }

      .before-after-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

      .before-after-image { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; height: 300px; display: flex; align-items: center; justify-content: center; color: var(--muted); }

      .before-after-label { text-align: center; margin-top: 16px; font-weight: 600; }

      .before-after-label.before { color: #ef4444; }

      .before-after-label.after { color: #10b981; }



      /* Testimonial Section */

      .testimonial-section { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 40px; text-align: center; margin: 60px 0; }

      .testimonial-quote { font-size: 1.3em; font-style: italic; margin: 0 0 24px; color: var(--text); }

      .testimonial-author { display: flex; align-items: center; justify-content: center; gap: 16px; }

      .testimonial-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--accent-contrast); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }

      .testimonial-info h4 { margin: 0 0 4px; }

      .testimonial-info p { margin: 0; color: var(--muted); font-size: 14px; }



      /* Case Study Showcase Gallery - rolling horizontal */
      .showcase-gallery {
        display: flex !important;
        gap: 30px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 20px 20px 10px 20px;
        margin-top: 40px;
        margin-bottom: -20px;
        scroll-behavior: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
      }
      .showcase-gallery::-webkit-scrollbar { display: none; }
      .showcase-gallery > div {
        flex: 0 0 auto;
        width: 400px;
        min-width: 300px;
      }
      .showcase-gallery img {
        width: 100%;
        height: 280px;
        object-fit: cover;
        border-radius: 12px;
        border: 1px solid var(--border);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
      }
      .showcase-gallery img:hover {
        transform: scale(1.02);
        box-shadow: 0 8px 24px rgba(217, 181, 69, 0.2);
      }
      @media (max-width: 720px) {
        .showcase-gallery > div { width: 300px; min-width: 250px; }
        .showcase-gallery img { height: 200px; }
      }

      .case-gallery-header {
        max-width: 1350px;
        margin: 0 auto 40px;
        text-align: center;
      }
      .case-gallery-header .section-subtitle {
        max-width: 1350px;
      }

      /* CTA Section */

      .cta-section { background: var(--card); border: 1px solid var(--border); border-radius: 0; padding: 40px 60px; text-align: center; margin: 40px 0 0; }

      .cta-section h2 { font-size: 32px; margin: 0 0 16px; }

      .cta-section p { font-size: 1.1em; color: var(--muted); margin: 0 0 30px; }

      .btn-primary { display: inline-flex; align-items: center; gap: 10px; padding: 16px 24px; background: var(--accent); color: var(--accent-contrast); border-radius: 12px; font-weight: 700; border: none; cursor: pointer; font-size: 16px; text-decoration: none; }

      .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(217,181,69,0.3); }



      

      /* Editable text highlighting */

      [contenteditable="true"] {

        outline: 1px dashed rgba(217, 181, 69, 0.3);

        outline-offset: 2px;

        cursor: text;

      }

      [contenteditable="true"]:hover {

        outline: 1px dashed rgba(217, 181, 69, 0.6);

        background: rgba(217, 181, 69, 0.05);

      }

      [contenteditable="true"]:focus {

        outline: 2px solid var(--accent);

        background: rgba(217, 181, 69, 0.08);

      }



      /* Responsive */

      @media (max-width: 960px) {

        .case-studies-grid { grid-template-columns: 1fr; }

        .before-after-grid { grid-template-columns: 1fr; gap: 20px; }

        .case-study-details { grid-template-columns: 1fr; }

        .hero h1 { font-size: 36px; }

        .footer-grid { grid-template-columns: 1fr 1fr; }

      }

        @media (max-width: 720px) {

          .header-top { padding: 12px 20px; }

          .header-bottom { padding: 10px 20px; position: relative; }

            .menu { display: none; }

        .footer-grid { grid-template-columns: 1fr; }

        .hero h1 { font-size: 28px; }

        .section-title { font-size: 28px; }

        .filter-tabs { justify-content: flex-start; overflow-x: auto; padding-bottom: 10px; }

        /* Case studies gallery - show only 2 images on mobile */
        .case-studies-gallery > div:nth-child(n+3) {
          display: none;
        }
        .case-studies-gallery {
          grid-template-columns: 1fr !important;
          gap: 20px !important;
        }

        .filter-tab { white-space: nowrap; }

      }
