/* ===== Certificados Madrid - Premium Styles ===== */
:root {
  --primary: #00A651;
  --primary-dark: #008C44;
  --secondary: #0A3D62;
  --secondary-light: #0E4D7A;
  --accent: #0052CC;
  --text: #1a1a1a;
  --text-light: #555;
  --light: #f5f7fa;
  --white: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* ===== Header ===== */
.header {
  background: var(--white);
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

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

.logo img {
  height: 52px;
  width: auto;
}

.logo-text {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--secondary);
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
}

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

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--secondary-light);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-whatsapp {
  background: #25D366;
  color: white;
}

.btn-whatsapp:hover {
  background: #1da851;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--secondary);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--secondary) 0%, #0E5A8A 100%);
  color: var(--white);
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 45%;
  height: 100%;
  background: url('../images/edificio.jpg') center/cover no-repeat;
  opacity: 0.18;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
}

.hero h1 span {
  color: #7CFC9A;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.95;
  margin-bottom: 28px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.9rem;
  opacity: 0.9;
}

.hero-badges span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== Sections ===== */
.section {
  padding: 70px 0;
}

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

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 10px;
}

.section-title p {
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto;
}

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

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 52px;
  height: 52px;
  background: rgba(0,166,81,0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--primary);
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--secondary);
}

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

/* ===== Pricing ===== */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.pricing-table th,
.pricing-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.pricing-table th {
  background: var(--secondary);
  color: var(--white);
  font-weight: 600;
}

.pricing-table tr:last-child td {
  border-bottom: none;
}

.pricing-table tr:hover td {
  background: rgba(0,166,81,0.04);
}

.price {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.15rem;
}

.price-note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 20px;
  text-align: center;
}

/* ===== Process steps ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  counter-reset: step;
}

.step {
  text-align: center;
  position: relative;
}

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

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--secondary);
}

.step p {
  font-size: 0.92rem;
  color: var(--text-light);
}

/* ===== Testimonials ===== */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.testimonial {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.testimonial .stars {
  color: #f5a623;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.testimonial p {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 16px;
}

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

.testimonial .author span {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-light);
}

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

.about-content h2 {
  font-size: 1.9rem;
  color: var(--secondary);
  margin-bottom: 18px;
}

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

.colegiados {
  background: var(--light);
  padding: 18px 22px;
  border-radius: var(--radius);
  margin-top: 20px;
  border-left: 4px solid var(--primary);
}

.colegiados strong {
  color: var(--secondary);
}

/* ===== Blog / News ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.news-card-body {
  padding: 22px;
}

.news-card .date {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.news-card h3 {
  font-size: 1.15rem;
  color: var(--secondary);
  margin-bottom: 10px;
}

.news-card p {
  font-size: 0.92rem;
  color: var(--text-light);
}

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

.contact-info h3 {
  color: var(--secondary);
  margin-bottom: 16px;
}

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

.contact-item .icon {
  width: 42px;
  height: 42px;
  background: rgba(0,166,81,0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-form {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.92rem;
}

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

.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(0,166,81,0.15);
}

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

/* ===== Footer ===== */
.footer {
  background: var(--secondary);
  color: rgba(255,255,255,0.85);
  padding: 50px 0 25px;
}

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

.footer h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.footer p, .footer a {
  font-size: 0.92rem;
  margin-bottom: 8px;
  display: block;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* ===== WhatsApp Floating ===== */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  z-index: 999;
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37,211,102,0.5);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow);
    gap: 16px;
  }

  .nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .about-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero::before {
    width: 100%;
    opacity: 0.1;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 50px 0 60px;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .section {
    padding: 50px 0;
  }

  .section-title h2 {
    font-size: 1.6rem;
  }
}

/* Utility */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.highlight { color: var(--primary); font-weight: 600; }
