/* module-styles.css - Styling for all modules */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


.module-palette .module-item.pattern-item { display: none; visibility: hidden;}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: #333;
}

h1,h2,h3,h4,h5,h6 { font-family: "Montserrat", system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-weight: 700;}

/* Text Module */
.module-text {
  margin: 0;
}

/* Image Module */
.module-image {
  margin: 0;
}

.module-image img {
  display: block;
}

.module-image .caption {
  padding: 10px;
  font-size: 14px;
  color: #666;
  text-align: center;
}

/* Button Module */
.module-button {
  text-align: center;
  margin: 20px 0;
}

.button {
  display: inline-block;
  padding: 12px 30px;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s;
  font-weight: 600;
}

.button-primary {
  background: #007bff;
  color: white;
}

.button-primary:hover {
  background: #0056b3;
}

.button-secondary {
  background: #6c757d;
  color: white;
}

.button-ghost {
  background: transparent;
  border: 2px solid #007bff;
  color: #007bff;
}

.button-small {
  padding: 8px 20px;
  font-size: 14px;
}

.button-medium {
  padding: 12px 30px;
  font-size: 16px;
}

.button-large {
  padding: 16px 40px;
  font-size: 18px;
}

/* Section Layouts */
.module-section {
  display: block;
  width: 100%;
}

.layout-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
}

.layout-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.layout-three-column {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.layout-sidebar {
  display: grid;
  grid-template-columns: 2fr 1fr;
}

@media (max-width: 768px) {

  .layout-two-column,
  .layout-three-column,
  .layout-sidebar {
    grid-template-columns: 1fr;
  }
}

/* Canvas Module */
.module-canvas {
  position: relative;
  overflow: hidden;
}

.canvas-point {
  cursor: pointer;
}

.point-marker {
  width: 12px;
  height: 12px;
  background: #ff4444;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.point-content {
  display: none;
  position: absolute;
  top: 20px;
  left: 0;
  background: white;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 10;
}

.canvas-point:hover .point-content {
  display: block;
}

.point-content h4 {
  margin-bottom: 8px;
  color: #333;
}

.point-content p {
  color: #666;
  font-size: 14px;
}

/* Error styling */
.error {
  padding: 20px;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  margin: 20px 0;
}


/* NAV */

/* Navigation Module */
.module-navigation {
  width: 100%;
  padding: 15px 20px;
}

.nav-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  align-items: center;
}

/* Horizontal navigation (default) */
.nav-horizontal .nav-items {
  flex-direction: row;
  justify-content: flex-start;
}

/* Vertical navigation */
.nav-vertical .nav-items {
  flex-direction: column;
  align-items: flex-start;
}

.nav-item {
  list-style: none;
}

.nav-item a {
  text-decoration: none;
  padding: 8px 15px;
  display: block;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.nav-item a:hover {
  opacity: 0.8;
}

/* Position variants */
.nav-top {
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-bottom {
  position: sticky;
  bottom: 0;
  z-index: 100;
}

/* ROW MODULE - Flexible row container */
.module-row {
  width: 100%;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.row-empty-state,
.section-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: #999;
  font-style: italic;
  border: 2px dashed #ddd;
  border-radius: 8px;
  background: #f9f9f9;
  width: 100%;
}

.section-empty-state {
  padding: 20px;
  font-size: 14px;
}

/* Section as flex child */
.module-section {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

@media (max-width: 768px) {
  .module-row {
    flex-direction: column;
  }

  .module-section {
    min-width: 100%;
  }
}
/* ========================================
   FLUID GRID SYSTEM
   Smoothly scales spacing with viewport
   No breakpoints needed!
   ======================================== */

:root {
  /* Fluid spacing values - scale with viewport width */
  --grid-gap: clamp(0.5rem, 2vw, 2rem);      /* 8px → 32px */
  --section-padding: clamp(1rem, 5vw, 5rem); /* 16px → 80px */
  --vertical-spacing: clamp(1rem, 3vw, 3rem); /* 16px → 48px */
}

/* Base module styling */
.module-editable,
.module-content,
.module-text,
.module-image,
.module-button,
.module-form,
.module-section {
  box-sizing: border-box;
  margin-bottom: var(--vertical-spacing); /* Smooth vertical rhythm */
}

/* 2 COLUMNS - Fluid spacing */
.r2c.c1,
.r2c.c2 {
  display: inline-block;
  width: calc(50% - var(--grid-gap) / 2);
  vertical-align: top;
  box-sizing: border-box;
}

.r2c.c1 {
  margin-right: var(--grid-gap);
}

/* 3 COLUMNS - Fluid spacing */
.r3c.c1,
.r3c.c2,
.r3c.c3 {
  display: inline-block;
  width: calc(33.333% - var(--grid-gap) * 2 / 3);
  vertical-align: top;
  box-sizing: border-box;
}

.r3c.c1,
.r3c.c2 {
  margin-right: var(--grid-gap);
}

/* 4 COLUMNS - Fluid spacing */
.r4c.c1,
.r4c.c2,
.r4c.c3,
.r4c.c4 {
  display: inline-block;
  width: calc(25% - var(--grid-gap) * 3 / 4);
  vertical-align: top;
  box-sizing: border-box;
}

.r4c.c1,
.r4c.c2,
.r4c.c3 {
  margin-right: var(--grid-gap);
}

/* MOBILE - Stack when too narrow (only ONE breakpoint for stacking) */
@media (max-width: 768px) {
  .r2c.c1, .r2c.c2,
  .r3c.c1, .r3c.c2, .r3c.c3,
  .r4c.c1, .r4c.c2, .r4c.c3, .r4c.c4 {
    width: 100% !important;
    margin-right: 0 !important;
    display: block;
  }
}

/* Sections also get fluid padding */
.module-section {
  padding: var(--section-padding);
}

/* ========================================
   BONUS: Fluid Typography (if you want)
   ======================================== */

/*
:root {
  --fluid-text-base: clamp(1rem, 2vw, 1.125rem);
  --fluid-text-lg: clamp(1.25rem, 3vw, 1.5rem);
  --fluid-text-xl: clamp(1.5rem, 4vw, 2rem);
  --fluid-text-2xl: clamp(2rem, 5vw, 3rem);
}

.module-text h1 { font-size: var(--fluid-text-2xl); }
.module-text h2 { font-size: var(--fluid-text-xl); }
.module-text h3 { font-size: var(--fluid-text-lg); }
.module-text p { font-size: var(--fluid-text-base); }
*/
