/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ===== VARIABLES ===== */
:root {
  --color-primary: #2563EB;
  --color-secondary: #10B981;
  --color-accent: #7C3AED;
  --color-dark: #1F2937;
  --color-light: #F3F4F6;
  --color-white: #FFFFFF;
  --font-heading: "Cursive Bold", 'Inter', sans-serif; /* Mantenemos "Cursive Bold" según Ward anterior */
  --font-body: 'Inter', 'Plus Jakarta Sans', sans-serif;
  --color-button-hover: #50309a;
}

/* ===== RESET ===== */
body {
  font-family: var(--font-body);
  color: var(--color-dark);
  margin: 0;
  line-height: 1.6;
  background-color: #fff;
}

/* ===== HERO ===== */
.pixelup-hero {
  background: linear-gradient(135deg, var(--color-dark), var(--color-primary));
  color: var(--color-white);
  text-align: center;
  padding: 100px 20px;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.hero-content {
   width: 100%;
   max-width: 800px;
   margin: 0 auto;
}
.hero-content h1 {
  font-family: var(--font-heading);
  font-weight: bold;
  font-size: 2.2rem;
  margin-top: 0;
  margin-bottom: 30px;
  line-height: 1.4;
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  color: var(--color-white);
}
.hero-static-text {
  flex-shrink: 0;
  margin-right: 0.4em;
  white-space: nowrap; 
}
section.pixelup-hero .hero-content h1 .changing-word-container {
  position: relative;
  min-width: 180px;
  text-align: left;
  vertical-align: baseline;
  display: inline-block;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: var(--color-secondary) !important;
}
section.pixelup-hero .hero-content h1 .changing-word {
  transition: opacity 0.5s ease-in-out;
  opacity: 1;
  display: inline-block;
}
.hero-content p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-white);
    opacity: 0.9;
    max-width: 600px;
    margin: -10px auto 35px auto;
    text-align: center;
}

/* Botón CTA Genérico */
.cta-button {
  background: var(--color-secondary) !important;
  color: var(--color-white) !important;
  padding: 15px 35px !important;
  border-radius: 50px !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  font-weight: bold !important;
  text-decoration: none !important;
  display: inline-block !important;
  transition: all 0.3s ease !important;
  border: none !important;
  cursor: pointer !important;
  line-height: normal !important;
  text-align: center !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  box-shadow: none !important;
}
.cta-button:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
  background: var(--color-button-hover) !important;
}

/* ===== RUEDA SVG FUNCIONAL ===== */
.service-wheel-section {
  padding: 4rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-light);
}
.service-wheel {
  display: flex;
  flex-direction: row;
  align-items: flex-start; /* Alineado arriba */
  justify-content: center;
  gap: 3rem;
  max-width: 1200px;
  width: 100%;
  flex-wrap: wrap;
}
.wheel-svg-container {
  flex-shrink: 0;
  width: 340px;
  height: 340px;
  box-sizing: border-box;
}
.wheel-svg {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}
.wheel-slice {
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.85;
}
.wheel-slice:hover,
.wheel-slice.active {
  opacity: 1;
  transform: scale(1.03);
  transform-origin: center center;
}
.wheel-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: bold;
  fill: var(--color-white) !important;
  pointer-events: none;
  text-shadow: 0 0 3px rgba(0,0,0,0.5);
  user-select: none;
  text-anchor: middle;
  dominant-baseline: middle;
}
.wheel-details {
  flex: 1;
  min-width: 280px;
  max-width: 500px;
  padding-top: 1rem;
}
.wheel-detail {
  display: none;
  animation: fadeIn 0.4s ease;
}
.wheel-detail.active {
  display: block;
}
.service-wheel-section .wheel-detail h3 {
  font-family: var(--font-heading);
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}
.wheel-detail ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}
.wheel-detail li {
  font-family: var(--font-body);
  margin-bottom: 0.5rem;
  font-size: 1rem;
  line-height: 1.5;
  padding-left: 1.2em;
  position: relative;
  color: var(--color-dark);
  text-align: left;
}
.wheel-detail li::before {
  content: '✓';
  color: var(--color-secondary);
  position: absolute;
  left: 0;
  font-weight: bold;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== STATS COUNTER SECTION ===== */
.stats-counter-section {
  padding: 4rem 1rem;
  background-color: var(--color-white);
  text-align: center;
}
.stats-counter-section .container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}
.stats-counter-section h2.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-dark);
    margin-bottom: 3rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.stat-item {
  padding: 1.5rem;
}
.stat-icon svg {
  width: 50px;
  height: 50px;
  fill: var(--color-primary);
  margin-bottom: 1rem;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--color-dark);
  display: block;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-dark);
  opacity: 0.8;
  margin: 0;
}

/* ===== INTERACTIVE CONTACT SECTION ===== */
.interactive-contact-section {
    padding: 4rem 1rem;
    background-color: var(--color-light);
}
.interactive-contact-section .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}
.interactive-contact-section h2 {
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 2.2rem;
    line-height: 1.4;
    color: var(--color-dark);
    text-align: center;
    margin-bottom: 2.5rem;
}
.form-contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 1.5rem;
    margin-bottom: 1.5rem;
}
.contact-fields-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.contact-options-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
#pixelup-interactive-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}
#pixelup-interactive-form .form-group label,
#pixelup-interactive-form fieldset legend {
    display: block;
    font-family: var(--font-body);
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
}
#pixelup-interactive-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
}
#pixelup-interactive-form fieldset legend .small-text {
    font-weight: normal;
    font-size: 0.85em;
    opacity: 0.7;
}
#pixelup-interactive-form input[type="text"],
#pixelup-interactive-form input[type="email"],
#pixelup-interactive-form input[type="tel"],
#pixelup-interactive-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 1rem;
    box-sizing: border-box;
    background-color: var(--color-white);
    transition: border-color 0.3s ease;
}
#pixelup-interactive-form input[type="text"]:focus,
#pixelup-interactive-form input[type="email"]:focus,
#pixelup-interactive-form input[type="tel"]:focus,
#pixelup-interactive-form textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
#pixelup-interactive-form textarea {
    min-height: 80px;
    resize: vertical;
}
#pixelup-interactive-form .required {
    color: var(--color-secondary);
    font-weight: bold;
    margin-left: 0.25em;
}
#pixelup-interactive-form .checkbox-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding-top: 0.25rem;
}
#pixelup-interactive-form .checkbox-group div {
    display: flex;
    align-items: center;
    margin-bottom: 0.1rem;
}
#pixelup-interactive-form .checkbox-group label {
    font-weight: normal;
    margin-bottom: 0;
    margin-left: 0.5rem;
    cursor: pointer;
    color: var(--color-dark);
}
#pixelup-interactive-form input[type="checkbox"] {
    width: auto;
    margin-right: 0.3rem;
    accent-color: var(--color-primary);
    transform: scale(1.3);
    cursor: pointer;
    position: relative;
    top: -1px;
}
.form-divider {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 2.5rem 0;
}
.service-toggle-group {
    background-color: var(--color-white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 0; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.service-toggle-group .toggle-button-content {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.service-toggle-group .toggle-button-text-wrapper {
    flex-grow: 1;
    pointer-events: none;
}
.service-toggle-group .toggle-button {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--color-dark);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 0;
}
.service-toggle-group .toggle-button-content:hover .toggle-button {
    color: var(--color-primary);
}
.service-toggle-group .toggle-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
    transition: transform 0.3s ease;
    margin-left: 10px;
    flex-shrink: 0;
    pointer-events: none;
}
.service-toggle-group .toggle-icon::before {
    content: '+';
}
.service-toggle-group[aria-expanded="true"] .toggle-icon::before {
    content: '−';
}
.service-toggle-group[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}
.service-toggle-group .toggle-main-explanation {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.25rem;
    margin-bottom: 0;
    padding-left: 0;
    line-height: 1.5;
}
.service-toggle-group .toggle-content {
    padding: 0 1.5rem;
    margin-top: 0;
    border-top: none; 
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding-top 0.4s ease-out, padding-bottom 0.4s ease-out, margin-top 0.4s ease-out, border-top-width 0.1s 0.3s ease-out;
}
.service-toggle-group .toggle-content.open {
    max-height: 1000px;
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-top: 0.75rem;
    border-top: 1px solid #eee;
    transition: max-height 0.4s ease-in, padding-top 0.4s ease-in, padding-bottom 0.4s ease-in, margin-top 0.4s ease-in, border-top-width 0.1s ease-in;
}
.service-toggle-group .checkbox-option {
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}
.service-toggle-group .checkbox-option label {
    font-weight: 500;
    margin-left: 0.5rem;
    color: var(--color-dark);
}
.service-toggle-group .checkbox-option input[type="checkbox"] {
     margin-right: 0.5rem;
}
.service-toggle-group .option-explanation {
    font-size: 0.85rem;
    color: #666;
    margin-left: calc(1em + 1.2rem);
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.project-details-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}
.form-submit-area {
    text-align: center;
    margin-top: 2.5rem;
}
.form-confirmation-message {
    margin-top: 1.5rem;
    color: var(--color-secondary);
    font-weight: bold;
    font-size: 1.1em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .service-wheel { gap: 2rem; }
    .wheel-svg-container { width: 300px; height: 300px; }
    .wheel-details { min-width: 250px; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

@media (max-width: 768px) {
  .pixelup-hero {
    padding: 60px 15px; /* MODIFICADO para que el h1 no se desborde tanto */
  }
  .hero-content h1 { 
    font-size: 1.6rem !important; 
    overflow-wrap: break-word;
    word-break: break-word;
    margin-bottom: 20px;
  }
  .hero-static-text { 
    white-space: normal !important; 
    margin-right: 0.3em; 
  }
  section.pixelup-hero .hero-content h1 .changing-word-container { 
    min-width: unset !important;
    display: inline-block !important;
    text-align: left; 
    width: auto; /* Para que no intente ocupar más de lo necesario */
  }
  .hero-content p { font-size: 0.95rem !important; max-width: 95%; margin-bottom: 30px; }
  
  .cta-button {
      font-size: 0.9rem !important;
      padding: 12px 25px !important;
  }

  .service-wheel { flex-direction: column; align-items: center; gap: 2rem; }
  .wheel-svg-container { width: 90%; max-width: 320px; height: auto; margin: 0 auto; }
  .wheel-label { font-size: 12px !important; }
  .wheel-details { width: 90%; max-width: 400px; padding-top: 0; }
  .service-wheel-section .wheel-detail h3 { 
    font-size: 1.2rem !important; 
    text-align: center;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .wheel-detail ul { text-align: center; }
  .wheel-detail li { padding-left: 1.2em; text-align: left; font-size: 0.95rem !important; display: inline-block; max-width: 100%; }
  
  .stats-counter-section { padding: 3rem 1rem; }
  .stats-counter-section h2.section-title { font-size: 1.8rem !important; margin-bottom: 2rem; }
  .stats-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .stat-number { font-size: 2rem !important; }
  .stat-label { font-size: 0.9rem !important; }
  
  .interactive-contact-section { padding: 3rem 1rem; }
  .interactive-contact-section h2 { font-size: 1.8rem !important; }
  .contact-fields-row, .contact-options-row { grid-template-columns: 1fr; margin-bottom: 0; }
  .contact-fields-row .form-group, .contact-options-row .form-group { margin-bottom: 1.5rem; }
  .contact-options-row .form-group:last-child { margin-bottom: 0; }
  #pixelup-interactive-form .checkbox-group { gap: 0.5rem; flex-direction: column; align-items: flex-start; }
  #pixelup-interactive-form .checkbox-group div { width: auto; }
  .service-toggle-group .toggle-button { font-size: 1.1rem !important; }
  .service-toggle-group .toggle-main-explanation { font-size: 0.85rem !important; }
  .service-toggle-group .checkbox-option label { font-size: 0.9rem !important; }
  .service-toggle-group .option-explanation { font-size: 0.8rem !important; margin-left: calc(1em + 0.8rem); }
}