/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://bedriva.se
 Description:  GeneratePress Child Theme for Bedriva
 Author:       Bedriva
 Author URI:   https://bedriva.se
 Template:     generatepress
 Version:      1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,400&display=swap');

:root {
  --color-dark: #2A313E;
  --color-teal: #38807D;
  --color-pink: #DA1451;
  --color-pink-hover: #b80f42;
  --color-yellow: #FDDF19;
  --color-white: #ffffff;
  --color-drawer-bg: #F5EFE9;
  --font-family-base: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

body {
  font-family: var(--font-family-base);
  color: var(--color-dark);
  background-color: #ffffff !important;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Full-bleed home container */
body.home {
  background-color: #ffffff !important;
}

.home #page,
.home .site,
.home #content,
.home .grid-container.container,
.home .site-content,
.home .content-area,
.home .site-main,
.home .inside-article,
.home .entry-content,
.home article {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Content Links */
.entry-content a {
  color: var(--color-pink);
  text-decoration: none;
}

.entry-content a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Site Header & Navigation
   ========================================================================== */
.site-header {
  background-color: #ffffff;
  padding: 26px 0;
}

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

.site-logo img {
  height: 48px;
  width: auto;
  max-width: 220px;
  display: block;
}

.site-branding {
  display: none;
}

.main-navigation .main-nav ul li a {
  font-family: var(--font-family-base);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-dark);
  padding: 10px 16px;
  transition: color 0.2s ease;
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a {
  color: var(--color-teal);
  background: transparent;
}

/* Nav button "Kontakta oss" */
.main-navigation .main-nav ul li.nav-button-contact a {
  background-color: var(--color-dark);
  color: #ffffff !important;
  border-radius: 40px;
  padding: 12px 28px;
  margin-left: 12px;
  line-height: 1;
  display: inline-block;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.main-navigation .main-nav ul li.nav-button-contact a:hover {
  background-color: #1e242e;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   Home Hero Section
   ========================================================================== */
.bedriva-hero {
  background-color: #ffffff;
  padding: 60px 0 0 0;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.bedriva-hero-inner {
  max-width: 800px;
  margin: auto auto 60px auto;
  padding: 0 20px;
}

.bedriva-hero h1 {
  font-size: 64px;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.15;
  margin: 0 0 24px 0;
}

.bedriva-hero p.hero-lead {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-dark);
  line-height: 1.8;
  margin: 0 0 38px 0;
}

.btn-pink {
  display: inline-block;
  background-color: var(--color-pink);
  color: #ffffff !important;
  font-family: var(--font-family-base);
  font-size: 15px;
  font-weight: 700;
  padding: 15px 36px;
  border-radius: 40px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-pink:hover {
  background-color: var(--color-pink-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.hero-wave-divider {
  width: 100%;
  line-height: 0;
  margin-bottom: -1px;
}

.hero-wave-divider img,
.hero-wave-divider svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Services Grid (Teal Section)
   ========================================================================== */
.bedriva-services {
  background-color: var(--color-teal);
  padding: 20px 0 40px 0;
  color: #ffffff;
}

.bedriva-services-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.service-card {
  padding: 10px;
}

.service-icon-wrapper {
  width: 110px;
  height: 110px;
  background-color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.service-icon-wrapper svg {
  width: 48px;
  height: 48px;
  fill: var(--color-dark);
}

.service-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px 0;
  text-transform: capitalize;
}

.service-card p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #ffffff;
  margin: 0;
}

/* ==========================================================================
   Global Footer with Wave
   ========================================================================== */
.site-footer {
  background: transparent !important;
  margin-top: 0 !important;
}

.bedriva-footer-wave {
  width: 100%;
  line-height: 0;
  margin-bottom: -1px;
}

/* On front page, wave connects seamlessly to the teal section */
.home .bedriva-footer-wave {
  background-color: var(--color-teal);
  margin-top: -1px;
}

.bedriva-footer-wave img,
.bedriva-footer-wave svg {
  width: 100%;
  height: auto;
  display: block;
}

.bedriva-footer-main {
  background-color: var(--color-dark);
  color: #ffffff;
  padding: 60px 0 80px 0;
}

.bedriva-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.footer-col h4 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 16px 0;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.footer-contact-list li {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 300;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-pill-small {
  background-color: var(--color-pink);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 30px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s;
}

.btn-pill-small:hover {
  background-color: var(--color-pink-hover);
}

.social-fb-icon {
  width: 34px;
  height: 34px;
  background-color: #3b5998;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.social-fb-icon:hover {
  opacity: 0.85;
}

.social-fb-icon svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

/* ==========================================================================
   Category / Archive Hero
   ========================================================================== */
.bedriva-archive-hero {
  background-color: var(--color-yellow);
  padding: 50px 20px;
  text-align: center;
}

.bedriva-archive-hero h1 {
  font-size: 38px;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0;
}

/* Hide default duplicate archive title */
.archive .page-header,
.blog .page-header {
  display: none !important;
}

/* Archive content width */
.archive #page,
.blog #page,
.archive .site-content,
.blog .site-content {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* Post list styling */
.archive .post,
.blog .post {
  clear: both;
  margin-bottom: 50px;
}

/* Two-column layout when post has featured image */
.archive .post.has-post-thumbnail .inside-article,
.blog .post.has-post-thumbnail .inside-article {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-areas:
    "thumb header"
    "thumb summary";
  column-gap: 30px;
  row-gap: 8px;
  align-items: start;
}

.archive .post-image,
.blog .post-image {
  grid-area: thumb;
  margin: 0;
  max-width: 200px;
}

.archive .entry-header,
.blog .entry-header {
  grid-area: header;
  margin: 0;
}

.archive .entry-summary,
.blog .entry-summary {
  grid-area: summary;
  margin: 0;
}

.archive .post-image img,
.blog .post-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.archive .entry-title,
.blog .entry-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 6px 0;
}

.archive .entry-title a,
.blog .entry-title a {
  color: var(--color-dark);
  text-decoration: none;
}

.archive .entry-title a:hover,
.blog .entry-title a:hover {
  color: var(--color-teal);
}

.archive .entry-meta,
.blog .entry-meta {
  font-size: 13px;
  color: #777777;
  margin-bottom: 12px;
}

/* Hide categories, tags and entry-footer */
.entry-footer,
.cat-links,
.tags-links,
.comments-link {
  display: none !important;
}

/* Read more link on its own line, not bold, pink */
.archive .read-more-container,
.blog .read-more-container {
  margin-top: 14px;
  clear: both;
}

.archive a.read-more,
.blog a.read-more,
.archive .read-more-container a,
.blog .read-more-container a {
  display: inline-block;
  font-weight: 400 !important;
  color: var(--color-pink) !important;
  text-decoration: none;
}

.archive a.read-more:hover,
.blog a.read-more:hover,
.archive .read-more-container a:hover,
.blog .read-more-container a:hover {
  text-decoration: underline;
}

/* Mobile: stack image above text */
@media (max-width: 600px) {
  .archive .post.has-post-thumbnail .inside-article,
  .blog .post.has-post-thumbnail .inside-article {
    display: block;
  }
  .archive .post-image,
  .blog .post-image {
    max-width: 100%;
    margin-bottom: 16px;
  }
}

/* ==========================================================================
   Single Post Hero
   ========================================================================== */
.bedriva-post-hero {
  background-color: var(--color-dark);
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 90px 20px 70px 20px;
  color: #ffffff;
}

.bedriva-post-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(1, 22, 64, 0.72);
  z-index: 1;
}

.bedriva-post-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.bedriva-post-hero-date {
  font-size: 14px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bedriva-post-hero h1 {
  font-size: 42px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin: 0;
}

/* Single post & Page content container & image visibility */
.single .featured-image,
.single .page-header-image,
.single .page-header-image-single,
.single .post-image,
.page:not(.home) .featured-image,
.page:not(.home) .page-header-image,
.page:not(.home) .page-header-image-single,
.page:not(.home) .post-image,
div.sharedaddy,
.sharedaddy,
.sd-sharing-enabled,
.post-navigation {
  display: none !important;
}

.single #page,
.single .site-content,
.page:not(.home) #page,
.page:not(.home) .site-content {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

/* Back to all news link on single posts */
.bedriva-single-back-nav {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #eeeeee;
  clear: both;
}

.bedriva-back-to-news {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-pink) !important;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.bedriva-back-to-news:hover {
  color: var(--color-pink-hover) !important;
  text-decoration: underline;
  transform: translateX(-3px);
}

/* Single page hero (Dark banner) */
.bedriva-page-hero {
  background-color: var(--color-dark);
  padding: 60px 20px;
  color: #ffffff;
}

.bedriva-page-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.bedriva-page-hero h1 {
  font-size: 40px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

/* ==========================================================================
   Off-Canvas Contact Drawer
   ========================================================================== */
.bedriva-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bedriva-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.bedriva-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  max-width: 90vw;
  height: 100vh;
  background-color: var(--color-drawer-bg);
  background-image: url('/wp-content/uploads/2023/03/detalj-graf.svg');
  background-position: bottom center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 99999;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.bedriva-drawer.is-open {
  transform: translateX(0);
}

.bedriva-drawer-header {
  display: flex;
  justify-content: flex-end;
  padding: 24px 28px 0 28px;
}

.bedriva-drawer-close {
  background-color: var(--color-pink);
  color: #ffffff;
  border: none;
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  transition: background-color 0.2s;
}

.bedriva-drawer-close:hover {
  background-color: var(--color-pink-hover);
}

.bedriva-drawer-body {
  padding: 30px 48px;
  overflow-y: auto;
}

.bedriva-drawer-body h2 {
  font-size: 30px;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0 0 16px 0;
}

.bedriva-drawer-body p.drawer-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-dark);
  margin: 0 0 30px 0;
}

.bedriva-drawer-form .form-group {
  margin-bottom: 24px;
}

.bedriva-drawer-form label {
  display: block;
  font-size: 16px;
  font-weight: 400;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.bedriva-drawer-form input[type="text"],
.bedriva-drawer-form input[type="email"],
.bedriva-drawer-form input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-dark);
  background: #ffffff;
  font-family: var(--font-family-base);
  font-size: 16px;
  color: var(--color-dark);
  box-sizing: border-box;
}

.bedriva-drawer-form input:focus {
  outline: 2px solid var(--color-pink);
  border-color: var(--color-pink);
}

.bedriva-drawer-form button[type="submit"] {
  background-color: var(--color-pink);
  color: #ffffff;
  border: none;
  font-family: var(--font-family-base);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 40px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.bedriva-drawer-form button[type="submit"]:hover {
  background-color: var(--color-pink-hover);
}

.bedriva-drawer-success {
  display: none;
  padding: 16px;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  margin-top: 20px;
  border-radius: 4px;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 900px) {
  .bedriva-services-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }
  .bedriva-hero h1 {
    font-size: 42px;
  }
  .bedriva-footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-actions {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .bedriva-services-inner {
    grid-template-columns: 1fr;
  }
  .bedriva-hero h1 {
    font-size: 32px;
  }
  .bedriva-hero p.hero-lead {
    font-size: 16px;
  }
  .bedriva-drawer {
    width: 100vw;
  }
  .bedriva-drawer-body {
    padding: 24px;
  }
}
