/* =============================================================================
   styles_home.css - Home Module Styles
   ============================================================================= */

.home-redesign {
  margin: 0 auto;
}

/* Header Section */
.home-header {
  margin-bottom: 0;
}

.home-header p {
  color: var(--color-text-secondary);
}

.home-header-divider {
  height: 2px;
  background-color: var(--color-border);
  margin-bottom: 60px;
}

/* Grid Layouts */
.grid-3-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  margin-bottom: var(--gutter);
}

.grid-4-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
  margin-bottom: var(--gutter);
}

/* Card Styles */
.home-card-redesign {
  background: var(--color-white);
  border-radius: 12px;
  padding: 30px 25px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 180px;
}

.home-card-redesign:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.home-card-redesign h2 {
  color: #4C4C4C;
  margin: 0 0 8px 0;
}

.home-card-redesign h3 {
  color: #4C4C4C;
  margin: 0;
  line-height: 1.5;
}

.home-card-redesign p {
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Image Card */
.home-card-image {
  padding: 0;
  overflow: hidden;
  position: relative;
  height: 180px;
}

.home-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.9em;
}

/* Main Module Cards (4 farbige Karten) */
.main-module-card {
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 0;
  border: 0;
  width: 100%;
  font: inherit;
  cursor: pointer;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-module-card:focus-visible {
  outline: 3px solid #222;
  outline-offset: 3px;
}

.main-module-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.main-module-card h2 {
  color: var(--color-white) !important;
  margin: 0;
  padding: 0 20px;
  line-height: 1.3;
  max-width: 100%;
  word-wrap: break-word;
  text-align: center;
}

/* Farbvarianten für Hauptmodule */
.module-demografie {
  background: var(--color-secondary);
}

.module-finanzen {
  background: var(--color-accent-green);
}

.module-lebenslagen {
  background: var(--color-accent-yellow);
}

.module-teilhabe {
  background: var(--color-primary);
}

/* Info Box - Zur Gemeindestruktur */
.home-info-box {
  background: var(--color-white);
  border-radius: 12px;
  margin-top: 60px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.home-info-box-header {
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 15px 30px;
}

.home-info-box-header h3 {
  color: var(--color-white);
  margin: 0;
}

.home-info-box-content {
  padding: 25px 30px;
}

.home-info-box-content p {
  margin: 0;
}

.content-panel-home{
  padding: 40px 40px !important;
}

/* =============================================================================
   RESPONSIVE - HOME MODULE
   ============================================================================= */

@media (max-width: 1024px) {
  .grid-3-cols,
  .grid-4-cols {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .main-module-card {
    height: 160px;
  }
  
  .home-card-redesign {
    height: 160px;
  }
  
  .home-card-image {
    height: 160px;
  }
}

@media (max-width: 768px) {
  .grid-3-cols,
  .grid-4-cols {
    grid-template-columns: 1fr;
  }
  
  .home-card-redesign {
    height: 140px;
  }
  
  .home-card-image {
    height: 140px;
  }
  
  .main-module-card {
    height: 140px;
  }
}

details.welcome-details summary {
    cursor: pointer;
}

.welcome-summary {
  list-style: none;
  cursor: pointer;
}

.welcome-summary::-webkit-details-marker {
  display: none;
}

.welcome-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.welcome-intro p {
  margin: 0;
  flex: 1;
}

.welcome-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-weight: 600;
}

.summary-arrow {
  transition: transform .25s ease;
}

.welcome-details[open] .summary-arrow {
  transform: rotate(180deg);
}

.welcome-content {
  margin-top: 1rem;
}