:root {
  --bg: #f9fafc;
  --card: #ffffff;
  --text: #222;
  --border: #ddd;
  --primary: #2d3e86;
  --font: "Poppins", sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
}

.main-header {
  text-align: center;
  padding: 2rem 0;
  color: var(--primary);
}

.component-section {
  max-width: 1100px;
  margin: 24px auto;
  background: var(--card);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  padding: 2rem;
}

.component-row {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.figma-tree {
  flex: 1;
  background: #f3f4f7;
  border-radius: 8px;
  padding: 1rem;
  font-family: monospace;
}

.figma-tree pre {
  font-family: "Fira Code", monospace;
  white-space: pre;
  line-height: 1.4;
  font-size: 0.9rem;
}

.component-description {
  flex: 2;
  background: #eef0f5;
  border-radius: 8px;
  padding: 1.5rem;
}

/* Preview */
.component-preview {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.preview-header {
  background: #f4f4f8;
  padding: 0.8rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 1rem;
  cursor: pointer;
}

iframe {
  width: 100%;
  height: 280px;
  border: none;
  transition: all 0.5s ease;
}

iframe.simulate-mobile {
  width: 375px;
  height: 667px;
  border: 4px solid #ccc;
  border-radius: 20px;
  margin: 0 auto;
  display: block;
}

/* Specific Frames */
#header-frame {
  height: 120px;
}

#hero-frame {
  height: 700px;
}

#about-frame{
  height: 350px;
}

#favorites-frame{
  height: 550px;
}

#cta-frame{
  height: 450px;
}

#footer-frame{
  height: 200px;
}
/* Code section */
.code-row {
  display: flex;
  gap: 2rem;
}

.code-box {
  flex: 1;
  background: #212529;
  color: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 320px;
}

.code-header {
  background: #343a40;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copy-btn {
  background: transparent;
  border: none;
  color: #f8f9fa;
  cursor: pointer;
}

pre {
  margin: 0;
  padding: 1rem;
  overflow-y: auto;
  flex-grow: 1;
}

.code-content {
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  line-height: 1.4;
}


/* === BOTÓN DESCARGA === */
.btn-download {
  display: inline-block;
  background-color: var(--primary);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 1rem;
  transition: background 0.3s ease;
}

.btn-download:hover {
  background-color: #1e2c70;
}

/* === SECCIÓN PARA BASIC STYLES=== */
.styles-layout {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.styles-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-link {
  background: var(--primary);
  color: white;
  text-decoration: none;
  text-align: center;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  display: inline-block;
  font-weight: 500;
  transition: background 0.3s ease;
}

.btn-link:hover {
  background-color: #1e2c70;
}

.code-box.large {
  flex: 2;
  height: 420px;
}

#figma-css {
  font-family: "Fira Code", monospace;
  background: #f3f4f7;
  padding: 1rem;
  border-radius: 8px;
  white-space: pre;
  overflow-x: auto;
}
