/* Modern Strandsittarna Stylesheet */

/* CSS Custom Properties */
:root {
  --color-primary: #1a5276;
  --color-primary-light: #2980b9;
  --color-secondary: #5d6d7e;
  --color-accent: #3498db;
  --color-bg: #f8f9fa;
  --color-white: #ffffff;
  --color-text: #2c3e50;
  --color-text-light: #7f8c8d;
  --color-border: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --radius: 8px;
  --max-width: 1200px;
  --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

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

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

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

/* Make links in content more visible */
.content a,
.card a,
.editor-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content a:hover,
.card a:hover,
.editor-content a:hover {
  color: var(--color-primary);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo:hover {
  color: var(--color-white);
  opacity: 0.9;
}

.logo img {
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

/* Navigation */
.nav {
  display: flex;
  gap: 5px;
}

.nav a {
  color: rgba(255,255,255,0.9);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav a:hover,
.nav a.active {
  background: rgba(255,255,255,0.2);
  color: var(--color-white);
}

/* Navigation dropdown for overflow items */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  color: rgba(255,255,255,0.9);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.has-active .nav-dropdown-toggle {
  background: rgba(255,255,255,0.2);
  color: var(--color-white);
}

.dropdown-arrow {
  font-size: 0.8em;
  margin-left: 5px;
  transition: transform 0.3s;
}

.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  min-width: 200px;
  padding: 8px 0;
  display: none;
  z-index: 1000;
}

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

.nav-dropdown-menu a {
  display: block;
  color: var(--color-text) !important;
  padding: 10px 20px !important;
  border-radius: 0 !important;
  font-weight: 500;
}

.nav-dropdown-menu a:hover {
  background: var(--color-light, #f5f5f5) !important;
  color: var(--color-primary) !important;
}

.nav-dropdown-menu a.active {
  background: var(--color-primary) !important;
  color: var(--color-white) !important;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
}

/* Hero Section */
.hero {
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  padding: 80px 20px;
  text-align: center;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
}

/* Page Header (for subpages) */
.page-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-white);
  padding: 50px 20px;
  text-align: center;
}

.page-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
}

/* Main Content */
.main {
  padding: 60px 20px;
  background: var(--color-white);
}

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

.content h2 {
  color: var(--color-primary);
  font-size: 1.8rem;
  margin: 40px 0 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--color-accent);
}

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

.content p {
  margin-bottom: 1.2em;
}

.content ul {
  margin: 1em 0 1.5em 1.5em;
}

.content li {
  margin-bottom: 0.5em;
}

/* Cards */
.card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 30px;
  margin-bottom: 30px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Content Cards (insertable via editor) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
  padding: 20px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.card-grid:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  background: rgba(0, 0, 0, 0.01);
}

.content-card {
  background: var(--color-bg);
  padding: 15px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.content-card:hover {
  box-shadow: var(--shadow-sm);
}

.content-card img {
  width: 100%;
  border-radius: calc(var(--radius) - 4px);
  margin-bottom: 12px;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.content-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: var(--color-primary);
}

.content-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* Lightbox (shared by gallery and card grids) */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.lightbox-content img.slide-left {
  transform: translateX(-100px);
  opacity: 0;
}

.lightbox-content img.slide-right {
  transform: translateX(100px);
  opacity: 0;
}

.lightbox-caption {
  text-align: center;
  color: white;
  padding: 15px;
  font-size: 1.1rem;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 2001;
  line-height: 1;
  padding: 10px;
}

.lightbox-close:hover {
  color: #ccc;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 20px 15px;
  border-radius: 4px;
  transition: background 0.2s;
  z-index: 2001;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* Make card images clickable when lightbox is enabled */
.content-card.has-lightbox {
  cursor: pointer;
}

.content-card.has-lightbox img {
  transition: transform 0.2s, box-shadow 0.2s;
}

.content-card.has-lightbox:hover img {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Image Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.gallery-item:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 12px 15px;
  background: var(--color-white);
  font-size: 0.9rem;
  color: var(--color-secondary);
}

/* Document List */
.document-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.document-list li {
  margin: 0;
}

.document-list a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: var(--color-bg);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: var(--transition);
  gap: 12px;
}

.document-list a:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateX(5px);
}

.document-list .icon {
  font-size: 1.3rem;
}

/* Board Members */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.board-member {
  background: var(--color-bg);
  padding: 25px;
  border-radius: var(--radius);
  text-align: center;
  transition: var(--transition);
}

.board-member:hover {
  box-shadow: var(--shadow-sm);
}

.board-member h3 {
  color: var(--color-primary);
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.board-member .role {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.board-member a {
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

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

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

/* Footer */
.footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.9);
  padding: 40px 20px;
  text-align: center;
}

.footer p {
  margin: 5px 0;
  font-size: 0.95rem;
}

.footer a {
  color: rgba(255,255,255,0.9);
}

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

/* Extended Footer (with map and info) */
.extended-footer {
  background: var(--color-bg);
  padding: 40px 20px;
  border-top: 1px solid var(--color-border);
}

.extended-footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  align-items: start;
}

.extended-footer-content.map-right {
  direction: rtl;
}

.extended-footer-content.map-right > * {
  direction: ltr;
}

.footer-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.footer-map iframe {
  width: 100%;
  height: 300px;
  border: none;
  display: block;
}

.footer-info {
  color: var(--color-text);
  line-height: 1.8;
}

.footer-info h3 {
  color: var(--color-primary);
  margin: 0 0 15px 0;
  font-size: 1.2rem;
}

.footer-info p {
  margin: 0 0 10px 0;
}

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

.footer-info a:hover {
  color: var(--color-primary);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 25px;
  color: white;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s;
}

.social-link i {
  font-size: 1.1rem;
}

.social-link:hover {
  transform: scale(1.05);
  opacity: 0.9;
  color: white;
}

.social-facebook {
  background: #1877f2;
}

.social-instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.facebook-like-container {
  margin-top: 15px;
}

.fb-like-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f0f0f0;
  border-radius: 6px;
  color: #666;
  font-size: 0.85rem;
  cursor: default;
}

.fb-like-placeholder i {
  color: #1877f2;
}

@media (max-width: 768px) {
  .extended-footer-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .extended-footer-content.map-right {
    direction: ltr;
  }

  .footer-map iframe {
    height: 250px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 15px;
    gap: 5px;
  }

  .nav.active {
    display: flex;
  }

  .nav a {
    padding: 12px 15px;
    text-align: center;
  }

  /* Mobile dropdown styles */
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-toggle {
    width: 100%;
    text-align: center;
    padding: 12px 15px;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,0.1);
    border-radius: 0;
    margin-top: 5px;
  }

  .nav-dropdown-menu a {
    color: rgba(255,255,255,0.9) !important;
    text-align: center;
  }

  .nav-dropdown-menu a:hover {
    background: rgba(255,255,255,0.2) !important;
    color: var(--color-white) !important;
  }

  .nav-dropdown-menu a.active {
    background: rgba(255,255,255,0.3) !important;
    color: var(--color-white) !important;
  }

  .hero {
    padding: 50px 20px;
    min-height: 250px;
  }

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

  .hero p {
    font-size: 1rem;
  }

  .page-header {
    padding: 35px 20px;
  }

  .page-header h1 {
    font-size: 1.7rem;
  }

  .main {
    padding: 40px 15px;
  }

  .content h2 {
    font-size: 1.5rem;
  }

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

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

@media (max-width: 480px) {
  .logo {
    font-size: 1.2rem;
  }

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

  .card {
    padding: 20px;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-2 { margin-top: 20px; }
.mt-4 { margin-top: 40px; }
.mb-2 { margin-bottom: 20px; }
.mb-4 { margin-bottom: 40px; }
