/* OlaMat Public Site Surface
   Hero, navigation, features, footer, guide pages.
   Loaded only by public-facing pages via header.php. */

@layer surfaces {

  /* ============================================
     CONTAINER
     ============================================ */

  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }

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

  header {
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .navbar {
    padding: var(--space-4) 0;
  }

  .navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
  }

  .logo {
    flex-shrink: 0;
    align-self: center;
  }

  .logo h1 {
    font-size: var(--text-2xl);
    margin: 0;
    color: var(--color-primary);
    white-space: nowrap;
    line-height: 1.1;
  }

  .logo-mark {
    display: block;
    height: 48px;
    width: auto;
  }

  .logo a {
    color: var(--color-primary);
    white-space: nowrap;
  }

  /* Hamburger (hidden on desktop) */
  .hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    z-index: 1001;
  }

  .hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    gap: var(--space-2);
    align-items: flex-end;
    flex-wrap: nowrap;
  }

  .nav-links li {
    white-space: nowrap;
  }

  .nav-links a {
    font-weight: 500;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease);
    display: inline-block;
    white-space: nowrap;
    line-height: 1.1;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: var(--color-primary);
    color: var(--color-surface);
  }

  .nav-links a.nav-btn {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
    padding: var(--space-2) var(--space-4);
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
  }

  .nav-links a.nav-btn:hover {
    background: var(--color-primary);
    color: var(--color-surface);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 85, 52, 0.3);
  }

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

  .hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-surface);
    padding: var(--space-16) 0;
    text-align: center;
  }

  .hero h1 {
    font-size: 3rem;
    color: var(--color-surface);
    margin-bottom: var(--space-4);
  }

  .hero-subtitle {
    font-size: var(--text-xl);
    margin-bottom: var(--space-8);
    opacity: 0.95;
  }

  .hero-download-label {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-4);
    opacity: 0.95;
  }

  .hero-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
  }

  .store-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    min-width: 260px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease);
  }

  .store-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.2);
  }

  .store-link:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
  }

  .store-link-hint {
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .store-link-meta {
    font-size: var(--text-xs);
    opacity: 0.9;
  }

  .store-badge {
    width: auto;
    display: block;
  }

  .store-badge-hero {
    height: 60px;
  }

  .store-badge-section {
    height: 50px;
  }

  .store-links-inline {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }

  .supplier-section .section-intro {
    max-width: 780px;
    margin: calc(var(--space-2) * -1) auto var(--space-10);
    text-align: center;
    color: var(--color-text-light);
    font-size: var(--text-lg);
  }

  .supplier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-6);
  }

  .supplier-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--duration) var(--ease);
  }

  .supplier-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
  }

  .supplier-card-link:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
  }

  .supplier-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-lg);
  }

  .supplier-card__logo {
    width: 100%;
    max-width: 180px;
    height: 72px;
    object-fit: contain;
    display: block;
    margin: 0 auto var(--space-4);
  }

  .supplier-card__logo--goodlife {
    background: #5b9f63;
    border-radius: var(--radius-sm);
    padding: 8px 10px;
  }

  .supplier-card h3 {
    margin-bottom: var(--space-2);
    color: var(--color-primary);
  }

  .supplier-card p {
    margin: 0;
    color: var(--color-text-light);
    font-size: var(--text-sm);
  }

  .supplier-footer-note {
    margin-top: var(--space-8);
    text-align: center;
    color: var(--color-text-light);
  }

  .content-text .store-link {
    background: #fff;
    border-color: var(--color-border);
    color: var(--color-text);
  }

  .content-text .store-link:hover {
    background: #f8fbf8;
  }

  .hero-small {
    background: var(--color-primary);
    color: var(--color-surface);
    padding: var(--space-12) 0;
    text-align: center;
  }

  .hero-small h1 {
    color: var(--color-surface);
    margin-bottom: var(--space-2);
  }

  .hero-small p {
    font-size: var(--text-lg);
    opacity: 0.9;
  }

  /* Hero buttons: primary uses accent, secondary uses white border */
  .hero .btn-primary,
  .hero-buttons .btn-primary {
    background: var(--color-accent);
    color: var(--color-surface);
    border-color: var(--color-accent);
  }

  .hero .btn-primary:hover,
  .hero-buttons .btn-primary:hover {
    background: #e68900;
    border-color: #e68900;
  }

  .hero .btn-secondary,
  .hero-buttons .btn-secondary {
    background: transparent;
    color: var(--color-surface);
    border-color: var(--color-surface);
  }

  .hero .btn-secondary:hover,
  .hero-buttons .btn-secondary:hover {
    background: var(--color-surface);
    color: var(--color-primary);
  }

  /* ============================================
     SECTIONS
     ============================================ */

  .section {
    padding: var(--space-16) 0;
  }

  .section h2 {
    text-align: center;
    margin-bottom: var(--space-12);
    font-size: var(--text-4xl);
  }

  .bg-light {
    background: var(--color-bg);
  }

  /* ============================================
     CONTENT GRID
     ============================================ */

  .content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
  }

  .content-text ul {
    list-style: none;
    margin-left: 0;
  }

  .content-text ul li {
    padding-left: var(--space-6);
    position: relative;
  }

  .content-text ul li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--color-primary-light);
    font-weight: bold;
  }

  .placeholder-image {
    background: var(--color-bg);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-12);
    text-align: center;
    color: var(--color-text-light);
  }

  .placeholder-image span {
    font-size: var(--text-4xl);
    display: block;
    margin-bottom: var(--space-4);
  }

  /* ============================================
     FEATURES GRID
     ============================================ */

  .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
  }

  .feature-card {
    background: var(--color-surface);
    padding: var(--space-8);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: all var(--duration) var(--ease);
    text-align: center;
  }

  .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }

  .feature-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-4);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #edf6ef 0%, #d7e8db 100%);
    color: var(--color-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  .feature-icon svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .feature-icon--extension {
    color: #295f3a;
    background: linear-gradient(145deg, #edf8ef 0%, #d5ebd9 100%);
  }

  .feature-icon--members {
    color: #1e5f58;
    background: linear-gradient(145deg, #ecf8f7 0%, #d4ece9 100%);
  }

  .feature-icon--admin {
    color: #4d4f8f;
    background: linear-gradient(145deg, #f2f0fc 0%, #dfdcf4 100%);
  }

  .feature-icon--sharing {
    color: #896133;
    background: linear-gradient(145deg, #fff8ec 0%, #f3e4cd 100%);
  }

  .feature-icon--payments {
    color: #7a4c18;
    background: linear-gradient(145deg, #fff4e9 0%, #f4dfc8 100%);
  }

  .feature-icon--reports {
    color: #355789;
    background: linear-gradient(145deg, #eef4ff 0%, #d9e5f8 100%);
  }

  .feature-card h3 {
    margin-bottom: var(--space-4);
    color: var(--color-primary);
  }

  /* ============================================
     GETTING STARTED STEPS
     ============================================ */

  .getting-started {
    max-width: 800px;
    margin: 0 auto var(--space-12);
  }

  .step {
    display: flex;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
    padding: var(--space-8);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
  }

  .step-number {
    width: 60px;
    height: 60px;
    background: var(--color-primary);
    color: var(--color-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    font-weight: bold;
    flex-shrink: 0;
  }

  .step-content h3 {
    margin-top: 0;
  }

  .getting-started .step-content a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: color var(--duration) var(--ease);
  }

  .getting-started .step-content a:hover,
  .getting-started .step-content a:focus-visible {
    color: var(--color-primary-dark);
  }

  /* ============================================
     LINKS GRID
     ============================================ */

  .links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-8);
  }

  .link-card {
    background: var(--color-surface);
    padding: var(--space-8);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--duration) var(--ease);
    border: 2px solid transparent;
  }

  .link-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }

  .link-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
  }

  .link-card h3 {
    color: var(--color-primary);
    margin-bottom: var(--space-2);
  }

  .link-card p {
    color: var(--color-text-light);
    margin: 0;
  }

  /* ============================================
     CTA BOX
     ============================================ */

  .cta-box {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-surface);
    padding: var(--space-12);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
  }

  .cta-box h2,
  .cta-box h3 {
    color: var(--color-surface);
  }

  .cta-box p {
    font-size: var(--text-lg);
    margin-bottom: var(--space-8);
  }

  .cta-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
  }

  /* ============================================
     CONTACT
     ============================================ */

  .contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
  }

  .contact-email {
    font-size: var(--text-2xl);
  }

  .contact-email a {
    color: var(--color-primary);
    font-weight: 600;
  }

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

  footer {
    background: var(--color-text);
    color: var(--color-surface);
    padding: var(--space-12) 0 var(--space-4);
  }

  .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-8);
  }

  .footer-section h4 {
    color: var(--color-surface);
    margin-bottom: var(--space-4);
  }

  .footer-section ul {
    list-style: none;
    margin: 0;
  }

  .footer-section ul li {
    margin-bottom: var(--space-2);
  }

  .footer-section a {
    color: rgba(255, 255, 255, 0.8);
  }

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

  .footer-bottom {
    text-align: center;
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
  }

  /* ============================================
     GUIDE PAGE STYLES
     ============================================ */

  .toc {
    background: var(--color-surface);
    padding: var(--space-8);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
  }

  .toc ul {
    list-style: none;
    margin: 0;
  }

  .toc li {
    margin-bottom: var(--space-3);
  }

  .toc a {
    font-weight: 500;
    display: block;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease);
  }

  .toc a:hover {
    background: var(--color-bg);
    padding-left: var(--space-4);
  }

  .guide-section {
    scroll-margin-top: 80px;
  }

  .guide-step {
    max-width: 900px;
    margin: 0 auto;
  }

  .step-header {
    margin-bottom: var(--space-8);
  }

  .step-badge {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-surface);
    padding: var(--space-2) var(--space-4);
    border-radius: 20px;
    font-weight: 600;
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
  }

  .step-content {
    background: var(--color-surface);
    padding: var(--space-8);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
  }

  .step-content h3 {
    color: var(--color-primary);
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
  }

  .step-content h3:first-child {
    margin-top: 0;
  }

  /* ============================================
     INFO BOXES
     ============================================ */

  .info-box,
  .warning-box,
  .success-box {
    padding: var(--space-6);
    border-radius: var(--radius-md);
    margin: var(--space-8) 0;
    border-left: 4px solid;
  }

  .info-box {
    background: var(--color-info-bg);
    border-color: var(--color-info);
  }

  .warning-box {
    background: var(--color-warning-bg);
    border-color: var(--color-accent);
  }

  .success-box {
    background: var(--color-success-bg);
    border-color: var(--color-success);
  }

  .info-box strong,
  .warning-box strong,
  .success-box strong {
    display: block;
    margin-bottom: var(--space-2);
  }

  /* ============================================
     FAQ
     ============================================ */

  .faq {
    max-width: 800px;
    margin: 0 auto;
  }

  .faq-item {
    background: var(--color-surface);
    padding: var(--space-8);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-6);
  }

  .faq-item h3 {
    color: var(--color-primary);
    margin-bottom: var(--space-4);
  }

  .faq-item p:last-child {
    margin-bottom: 0;
  }

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

  @media (max-width: 768px) {
    .hamburger {
      display: flex;
    }

    .nav-links {
      position: fixed;
      top: 0;
      right: -100%;
      width: 280px;
      height: 100vh;
      background: var(--color-surface);
      flex-direction: column;
      padding: 80px 20px 20px;
      gap: 0;
      box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
      transition: right 0.3s ease;
      overflow-y: auto;
      z-index: 1000;
    }

    .nav-links.active {
      right: 0;
    }

    .nav-links li {
      width: 100%;
      margin-bottom: 0;
      border-bottom: 1px solid var(--color-border);
    }

    .nav-links a {
      display: block;
      width: 100%;
      padding: var(--space-4);
      border-radius: 0;
      text-align: left;
    }

    .nav-links a.nav-btn {
      margin: var(--space-4) 0;
      text-align: center;
      border-radius: var(--radius-sm);
    }

    body.menu-open::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      z-index: 999;
    }

    .navbar .container {
      flex-direction: row;
      align-items: center;
    }

    h1 { font-size: var(--text-3xl); }
    h2 { font-size: 1.75rem; }
    h3 { font-size: var(--text-xl); }

    .hero h1 {
      font-size: var(--text-3xl);
    }

    .hero-subtitle {
      font-size: var(--text-base);
    }

    .store-link {
      min-width: 100%;
      width: 100%;
      max-width: 360px;
    }

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

    .features-grid,
    .links-grid {
      grid-template-columns: 1fr;
    }

    .step {
      flex-direction: column;
      gap: var(--space-4);
    }

    .step-number {
      width: 50px;
      height: 50px;
      font-size: var(--text-xl);
    }

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

    .section {
      padding: var(--space-8) 0;
    }

    .hero,
    .hero-small {
      padding: var(--space-12) 0;
    }

    #arrangementer .content-grid,
    #arrangementer [style*="grid-template-columns"] {
      grid-template-columns: 1fr !important;
    }
  }

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

    .btn {
      display: block;
      width: 100%;
      margin-bottom: var(--space-2);
    }

    .hero-buttons,
    .cta-buttons {
      flex-direction: column;
    }
  }

  @media print {
    header,
    footer,
    .hero-buttons,
    .cta-box {
      display: none;
    }

    .section {
      page-break-inside: avoid;
    }
  }
}
