/* ============================================
   CELSIA - Soluciones Energéticas
   ============================================ */

:root {
  --primary: #0b6e4f;
  --primary-light: #14a076;
  --primary-dark: #084a36;
  --accent: #f4a223;
  --accent-hover: #db8f18;
  --text: #2d2d2d;
  --text-light: #5a5a5a;
  --bg: #ffffff;
  --bg-light: #f4f7f5;
  --bg-dark: #071f17;
  --border: #dce5df;
  --shadow: 0 2px 18px rgba(11,110,79,0.07);
  --shadow-lg: 0 10px 36px rgba(11,110,79,0.12);
  --radius: 10px;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ============================================
   HEADER
   ============================================ */
.header {
  background: var(--bg);
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo .logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
}

.nav-list {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-list a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition);
  position: relative;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav-list a:hover::after,
.nav-list a.active::after { width: 100%; }

.nav-list a:hover { color: var(--primary); }

.btn-nav {
  background: var(--primary);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background var(--transition);
}

.btn-nav:hover { background: var(--primary-dark); }
.btn-nav::after { display: none !important; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 26px; height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 140px 0 90px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(244,162,35,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-text h1 span { color: var(--accent); }

.hero-text p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-graphic {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  border: 2px solid rgba(255,255,255,0.12);
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244,162,35,0.3);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: #fff;
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-green {
  background: var(--primary);
  color: #fff;
}

.btn-green:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11,110,79,0.3);
}

/* ============================================
   TRUST BAR
   ============================================ */
.trust-bar {
  background: var(--bg-light);
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}

.trust-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
  text-align: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

.trust-item .t-icon {
  font-size: 1.4rem;
}

/* ============================================
   SECCIONES
   ============================================ */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-light); }

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title p {
  color: var(--text-light);
  max-width: 580px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ============================================
   SERVICIOS
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--primary);
}

.service-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: #fff;
}

.service-card h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-image {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius);
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 5rem;
  position: relative;
  overflow: hidden;
}

.about-image::after {
  content: '';
  position: absolute;
  bottom: -20%; right: -20%;
  width: 200px; height: 200px;
  background: rgba(244,162,35,0.2);
  border-radius: 50%;
}

.about-content h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.about-content p {
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.7;
}

.check-list { margin: 20px 0; }

.check-list li {
  padding: 8px 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-list li::before {
  content: '\2713';
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 20px;
}

/* ============================================
   STATS
   ============================================ */
.stats {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  text-align: center;
  color: #fff;
}

.stat-item h3 {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

.stat-item p { font-size: 0.95rem; opacity: 0.85; }

/* ============================================
   PROCESO
   ============================================ */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.process-step {
  text-align: center;
  padding: 30px 20px;
  position: relative;
}

.step-number {
  width: 52px; height: 52px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 auto 16px;
}

.process-step h3 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.process-step p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ============================================
   TESTIMONIOS
   ============================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.testimonial-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 16px; right: 24px;
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.15;
  font-family: Georgia, serif;
}

.testimonial-card .stars {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 14px;
}

.testimonial-card p {
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.testimonial-author .name {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.testimonial-author .role {
  font-size: 0.83rem;
  color: var(--text-light);
}

/* ============================================
   CTA
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 70px 0;
  text-align: center;
  color: #fff;
}

.cta-section h2 { font-size: 2rem; margin-bottom: 14px; }

.cta-section p {
  opacity: 0.9;
  max-width: 540px;
  margin: 0 auto 30px;
  font-size: 1.05rem;
}

/* ============================================
   CONTACTO
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.contact-info > p {
  color: var(--text-light);
  margin-bottom: 24px;
  line-height: 1.7;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.contact-item-icon {
  width: 46px; height: 46px; min-width: 46px;
  border-radius: 12px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
}

.contact-item h4 {
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 2px;
}

.contact-item span {
  color: var(--text-light);
  font-size: 0.9rem;
}

.contact-form {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.contact-form h3 {
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border var(--transition);
  background: var(--bg);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11,110,79,0.12);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11,110,79,0.25);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-dark);
  color: #b5c4bc;
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.footer-col ul li { margin-bottom: 8px; }

.footer-col ul li a {
  color: #8fa99b;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: #8fa99b;
  transition: color var(--transition);
}

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

.footer-links { display: flex; gap: 20px; }

/* ============================================
   PAGE HEADER (subpáginas)
   ============================================ */
.page-header {
  padding: 130px 0 60px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  text-align: center;
}

.page-header h1 { font-size: 2.4rem; margin-bottom: 10px; }
.page-header p { opacity: 0.85; font-size: 1.05rem; }

/* ============================================
   LEGAL
   ============================================ */
.legal-content { max-width: 800px; margin: 0 auto; }

.legal-content h2 {
  font-size: 1.4rem;
  color: var(--primary);
  margin: 30px 0 12px;
}

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

.legal-content p {
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.7;
}

.legal-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 14px;
}

.legal-content ul li {
  color: var(--text-light);
  margin-bottom: 6px;
  line-height: 1.6;
}

/* ============================================
   SERVICE DETAIL
   ============================================ */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  margin-bottom: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border);
}

.service-detail:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.service-detail:nth-child(even) { direction: rtl; }
.service-detail:nth-child(even) > * { direction: ltr; }

.service-detail-img {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius);
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 4rem;
}

.service-detail-content h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 14px;
}

.service-detail-content p {
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.7;
}

.service-detail-content ul { list-style: none; }

.service-detail-content ul li {
  padding: 6px 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-detail-content ul li::before {
  content: '\2713';
  color: var(--primary);
  font-weight: 700;
}

/* ============================================
   FAQ
   ============================================ */
.faq-list { max-width: 740px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 18px 22px;
  background: var(--bg);
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  transition: background var(--transition);
}

.faq-question:hover { background: var(--bg-light); }

.faq-question .icon {
  font-size: 1.2rem;
  transition: transform var(--transition);
}

.faq-item.active .faq-question .icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer-inner {
  padding: 0 22px 18px;
  color: var(--text-light);
  line-height: 1.7;
}

.faq-item.active .faq-answer { max-height: 300px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { display: none; }
  .hero-buttons { justify-content: center; }
  .services-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .service-detail { grid-template-columns: 1fr; gap: 30px; }
  .service-detail:nth-child(even) { direction: ltr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .nav-list {
    position: fixed;
    top: 72px; left: 0; width: 100%;
    background: var(--bg);
    flex-direction: column;
    padding: 20px;
    gap: 0;
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    transition: transform var(--transition);
  }

  .nav-list.active { transform: translateY(0); }

  .nav-list li { width: 100%; }

  .nav-list a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-list a::after { display: none; }
  .btn-nav { text-align: center; margin-top: 8px; }

  .hero { padding: 120px 0 60px; }
  .hero-text h1 { font-size: 2rem; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .section-title h2 { font-size: 1.6rem; }
  .page-header { padding: 110px 0 40px; }
  .page-header h1 { font-size: 1.8rem; }
  .trust-bar .container { gap: 24px; }
}

@media (max-width: 576px) {
  .services-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-text h1 { font-size: 1.7rem; }
  .hero-text p { font-size: 1rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .trust-bar .container { flex-direction: column; gap: 16px; }
}
