/*
Theme Name: Kryssningar.se Blog
Theme URI: https://kryssningar.se
Description: Custom WordPress theme matching the kryssningar.se design for blog content.
Version: 1.0
Author: Kryssningar.se
Text Domain: kryssningar
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  color: #212121;
  background-color: #f8f8f8;
  line-height: 1.6;
}

a {
  color: #D04357;
  text-decoration: none;
  transition: color 0.3s ease-in-out;
}

a:hover {
  color: #0E587F;
}

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

/* ===== HEADER ===== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-logo img {
  height: 46px;
  width: auto;
}

.site-logo a {
  display: flex;
  align-items: center;
}

/* Desktop Nav */
.main-nav {
  display: none;
  flex: 1;
  justify-content: center;
}

.main-nav > ul {
  list-style: none;
  display: flex;
  gap: 0;
  align-items: center;
}

.main-nav > ul > li {
  position: relative;
}

.main-nav > ul > li > a {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.75rem;
  color: #0E587F;
  font-size: 1rem;
  font-weight: 700;
  transition: color 0.3s ease-in-out;
  height: 70px;
  line-height: 70px;
}

.main-nav > ul > li > a:hover {
  color: #15A2BE;
}

.main-nav > ul > li > a.active {
  color: #15A2BE;
  font-weight: 700;
}

/* Dropdown Arrow */
.nav-arrow {
  width: 10px;
  height: 10px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.main-nav > ul > li:hover .nav-arrow {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown {
  display: none;
  position: absolute;
  top: 70px;
  left: 0;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-top: 3px solid #15A2BE;
  border-radius: 0 0 10px 10px;
  box-shadow: 0px 4px 12px -1px #00000020;
  padding: 0.5rem 0;
  z-index: 200;
  list-style: none;
}

.main-nav > ul > li:hover .dropdown {
  display: block;
}

.dropdown li a {
  display: block;
  padding: 0.5rem 1.25rem;
  color: #212121;
  font-size: 0.85rem;
  font-weight: 400;
  transition: all 0.2s ease;
}

.dropdown li a:hover {
  color: #15A2BE;
  background: #f8f8f8;
}

/* Multi-column dropdown */
.dropdown.dropdown-wide {
  min-width: 480px;
  display: none;
  padding: 1rem;
}

.main-nav > ul > li:hover .dropdown.dropdown-wide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.dropdown.dropdown-wide li a {
  padding: 0.4rem 0.75rem;
}

/* Header Right */
.header-right {
  display: none;
  align-items: center;
  gap: 1rem;
}

.header-contact {
  text-align: right;
}

.header-contact-label {
  font-size: 0.7rem;
  color: #D04357;
  font-weight: 500;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #D04357;
  font-size: 0.95rem;
  font-weight: 700;
}

.header-phone svg {
  width: 14px;
  height: 14px;
  fill: #D04357;
}

.btn-min-resa {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1.5px solid #212121;
  border-radius: 20px;
  padding: 0.4rem 1rem;
  color: #212121;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-min-resa:hover {
  border-color: #15A2BE;
  color: #15A2BE;
}

.btn-min-resa svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  fill: #212121;
}

/* Mobile Menu */
.mobile-nav {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 900;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav-inner {
  background: #ffffff;
  padding: 1rem;
  max-height: 80vh;
  overflow-y: auto;
}

.mobile-nav > .mobile-nav-inner > ul {
  list-style: none;
}

.mobile-nav .mobile-menu-item > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  color: #212121;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
}

.mobile-nav .mobile-menu-item > a .nav-arrow {
  width: 12px;
  height: 12px;
  fill: #9e9e9e;
  transition: transform 0.2s ease;
}

.mobile-nav .mobile-menu-item.open > a .nav-arrow {
  transform: rotate(180deg);
}

.mobile-nav .mobile-dropdown {
  display: none;
  list-style: none;
  padding: 0 0 0.5rem 1rem;
}

.mobile-nav .mobile-menu-item.open .mobile-dropdown {
  display: block;
}

.mobile-nav .mobile-dropdown li a {
  display: block;
  padding: 0.4rem 0;
  color: #757575;
  font-size: 0.9rem;
  font-weight: 400;
}

/* ===== BLOG CONTENT ===== */
.site-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Blog Header */
.blog-header {
  margin-bottom: 2rem;
}

.blog-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #0E587F;
}

.blog-header p {
  color: #757575;
  margin-top: 0.5rem;
}

/* Post Grid */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Post Card */
.post-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0px 1px 5px -1px #00000040;
  transition: box-shadow 0.3s ease-in-out;
}

.post-card:hover {
  box-shadow: 0px 4px 12px -1px #00000040;
}

.post-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card-content {
  padding: 1.25rem;
}

.post-card-category {
  display: inline-block;
  background: #15A2BE;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.post-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #212121;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.post-card-title a {
  color: inherit;
}

.post-card-title a:hover {
  color: #15A2BE;
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: #757575;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #9e9e9e;
}

/* Post Card Meta */
.post-card-meta-sep {
  color: #c0c0c0;
}

.post-card-author {
  color: #9e9e9e;
  font-size: inherit;
}

.post-card-author:hover {
  color: #15A2BE;
}

/* Author Page */
.author-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: #ffffff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0px 1px 5px -1px #00000040;
  margin-bottom: 2rem;
}

.author-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0E587F;
  margin-bottom: 0.5rem;
}

.author-bio {
  color: #757575;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.author-post-count {
  font-size: 0.85rem;
  color: #9e9e9e;
  font-weight: 500;
}

@media (max-width: 767px) {
  .author-header {
    flex-direction: column;
    text-align: center;
  }

  .author-avatar img {
    width: 80px;
    height: 80px;
  }
}

/* Single Post */
.single-post-header {
  margin-bottom: 2rem;
}

.single-post-header .post-category {
  display: inline-block;
  background: #15A2BE;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.single-post-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #0E587F;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.single-post-meta {
  color: #9e9e9e;
  font-size: 0.875rem;
}

.single-post-featured-image {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 2rem;
}

/* Post Content */
.post-content {
  background: #ffffff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0px 1px 5px -1px #00000040;
  line-height: 1.8;
}

.post-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0E587F;
  margin: 2rem 0 1rem;
}

.post-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0E587F;
  margin: 1.5rem 0 0.75rem;
}

.post-content p {
  margin-bottom: 1rem;
  color: #212121;
}

.post-content ul, .post-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  border-left: 4px solid #15A2BE;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: #f8f8f8;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #757575;
}

.post-content img {
  border-radius: 10px;
  margin: 1rem 0;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 1rem 0;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease-in-out;
}

.pagination a {
  background: #ffffff;
  color: #212121;
  box-shadow: 0px 1px 5px -1px #00000040;
}

.pagination a:hover {
  background: #15A2BE;
  color: #ffffff;
}

.pagination .current {
  background: #15A2BE;
  color: #ffffff;
}

/* ===== SIDEBAR ===== */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.sidebar .widget {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0px 1px 5px -1px #00000040;
  margin-bottom: 1.5rem;
}

.sidebar .widget h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0E587F;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #15A2BE;
}

.sidebar .widget ul {
  list-style: none;
}

.sidebar .widget ul li {
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar .widget ul li:last-child {
  border-bottom: none;
}

.sidebar .widget ul li a {
  color: #212121;
  font-size: 0.9rem;
}

.sidebar .widget ul li a:hover {
  color: #15A2BE;
}

/* ===== SEARCH ===== */
.search-form {
  display: flex;
  gap: 0;
}

.search-input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e0e0e0;
  border-right: none;
  border-radius: 6px 0 0 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  color: #212121;
  background: #f8f8f8;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  border-color: #15A2BE;
  background: #ffffff;
}

.search-input::placeholder {
  color: #9e9e9e;
}

.search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  background: #15A2BE;
  color: #ffffff;
  border: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.search-button:hover {
  opacity: 0.85;
}

.no-results {
  background: #ffffff;
  border-radius: 10px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0px 1px 5px -1px #00000040;
  color: #757575;
  font-size: 1rem;
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
  margin-top: 3rem;
}

/* Footer Social Bar */
.footer-social-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.footer-social-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #212121;
}

.footer-social-icons {
  display: flex;
  gap: 0.5rem;
}

.footer-social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #212121;
  transition: color 0.2s ease;
}

.footer-social-icons a:hover {
  color: #15A2BE;
}

.footer-social-icons a svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.footer-social-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-social-right a {
  color: #212121;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: underline;
}

.footer-social-right a:hover {
  color: #15A2BE;
}

/* Footer Main Content */
.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
  align-items: center;
}

.footer-logo img {
  height: 60px;
  width: auto;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-column {
  text-align: center;
}

.footer-column h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1d1d1b;
  margin-bottom: 0.75rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  padding: 0.25rem 0;
}

.footer-column ul li a {
  color: #757575;
  font-size: 0.9rem;
  transition: color 0.3s ease-in-out;
}

.footer-column ul li a:hover {
  color: #15A2BE;
}

/* Footer Bottom */
.footer-bottom-bar {
  background: #f0f0f0;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: #9e9e9e;
}

.footer-bottom-bar span {
  font-weight: 400;
}

.footer-bottom-bar strong {
  font-weight: 700;
  color: #757575;
}

.footer-bottom-bar a {
  color: #15A2BE;
  font-size: 0.8rem;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== CTA BUTTON ===== */
.btn-primary {
  display: inline-block;
  background: #15A2BE;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.625rem 1.5rem;
  height: 40px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.3s ease-in-out;
  text-align: center;
}

.btn-primary:hover {
  opacity: 0.85;
  color: #ffffff;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }

  .header-right {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .blog-layout {
    grid-template-columns: 1fr 300px;
  }

  .footer-columns {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (min-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .single-post-header h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 767px) {
  .site-header {
    height: 50px;
  }

  .header-inner {
    height: 50px;
  }

  .site-logo img {
    height: 36px;
  }

  .mobile-nav {
    top: 50px;
  }

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

  .footer-social-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
