:root {
  /* Modern Color Palette */
  --primary-color: #0066cc;
  --primary-dark: #004c99;
  --primary-light: #e6f0ff;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --background-color: #f8fafc; /* Cool gray 50 */
  --surface-color: #ffffff;
  
  /* Text Colors */
  --text-primary: #1e293b; /* Slate 800 */
  --text-secondary: #475569; /* Slate 600 */
  --text-inverse: #ffffff;
  
  /* UI Elements */
  --border-color: #e2e8f0; /* Slate 200 */
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 70px;
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Optima Pro Italic Font Face */
/* Si tienes los archivos de fuente, colócalos en /assets/fonts/ y descomenta las líneas siguientes */
/*
@font-face {
  font-family: 'Optima Pro Italic';
  src: url('/assets/fonts/OptimaPro-Italic.woff2') format('woff2'),
       url('/assets/fonts/OptimaPro-Italic.woff') format('woff');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}
*/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
header {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #E60000;
  letter-spacing: 0.3px;
  text-decoration: none;
  font-family: 'Optima Pro Italic', 'Optima', 'Optima Nova', 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-style: italic;
  text-transform: none;
}

.logo:hover {
  color: #CC0000;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
}

nav a:hover, nav a.active {
  color: var(--primary-color);
}

/* Underline effect for nav links */
nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

/* Language Selector */
.lang-selector {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  background-color: var(--background-color);
  padding: 0.25rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}

.lang-btn {
  background: none;
  border: none;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--primary-color);
}

.lang-btn.active {
  background-color: var(--white);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

/* Main Content */
main {
  flex: 1;
  padding: 2rem 0 4rem; /* more compact, still leaves breathing room before footer */
}

/* Hero Section */
.hero {
  text-align: center;
  margin-top: 0.75rem; /* space below sticky header */
  padding: 1.25rem 1rem;
  background: linear-gradient(135deg, var(--white) 0%, #f0f7ff 100%);
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.hero h1 {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Cards & Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem; /* separation before footer */
}

.seo-block {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.5rem;
  margin-bottom: 2rem;
}

.seo-block h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.seo-block p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.seo-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.6rem 1.25rem;
}

.seo-list-item {
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--border-color);
}

.seo-list-link {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.seo-list-link:hover {
  color: var(--primary-color);
}

.seo-list-desc {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.seo-footnote a {
  font-weight: 600;
}

.card {
  background: var(--surface-color);
  padding: 1.5rem 1.5rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  background-color: var(--primary-light);
  padding: 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card media (image or icon) */
.card-media {
  height: 120px;
  overflow: hidden;
  margin: -1.5rem -1.5rem 1rem -1.5rem; /* Full bleed top (matches card padding) */
  width: calc(100% + 3rem);
  border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
  background-color: #f1f5f9;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-media--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.card:hover .card-media--image img {
  transform: scale(1.05);
}

/* Logo mode: do NOT crop; keep full logo visible */
.card-media.is-logo {
  background-color: #ffffff;
}

.card-media.is-logo img {
  object-fit: contain;
  padding: 12px;
}

.card:hover .card-media.is-logo img {
  transform: none;
}

/* Some logos are low-res; render smaller to avoid looking pixelated */
.card-media.is-logo img.logo-small {
  max-width: 70%;
  max-height: 70%;
  margin: 0 auto;
}

/* Product image mode: show full image (no crop), but with tighter padding than logos */
.card-media.is-product {
  background-color: #ffffff;
}

.card-media.is-product img {
  object-fit: contain;
  padding: 10px;
}

.card:hover .card-media.is-product img {
  transform: none;
}

/* Icon mode: align icon cards visually with image cards */
.card-media--icon {
  background: linear-gradient(135deg, var(--white) 0%, #f0f7ff 100%);
}

.card h2 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  flex: 1;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 50px; /* Pill shape */
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 102, 204, 0.2);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(0, 102, 204, 0.3);
  text-decoration: none;
  color: var(--white);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-light);
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: none;
}

/* Footer */
footer {
  background-color: #1e293b; /* Dark slate */
  color: #f1f5f9;
  padding: 5rem 0 2rem;
  margin-top: auto;
}

footer a {
  color: #94a3b8;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--white);
  text-decoration: none;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  font-weight: 700;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.8rem;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #334155;
  color: #64748b;
  font-size: 0.9rem;
}

/* Service Page Specifics */
.service-page header {
  /* Inherits global header styles */
}

.service-section {
  margin-bottom: 3rem;
  background: var(--surface-color);
  padding: 3rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.service-section h2 {
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  color: var(--text-primary);
  position: relative;
  padding-left: 0.9rem; /* room for the accent bar */
  line-height: 1.25; /* better multi-line wrap on mobile */
}

.service-section h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.18em; /* align bar with first line of text */
  width: 6px;
  height: 1.05em; /* scale with font-size */
  background-color: var(--primary-color);
  border-radius: 4px;
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.5rem 0;
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--primary-color);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: transform 0.3s;
  font-weight: 400;
}

.faq-question[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer p {
  padding-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-question[aria-expanded="true"] + .faq-answer {
  max-height: 1000px;
}

/* Simple info lists (ordered/unordered) used on service pages */
.info-list {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.info-list li {
  margin: 0.35rem 0;
}

.note {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-color);
  background: #fbfdff;
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Simple table for plan speeds */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.data-table th,
.data-table td {
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.data-table th {
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  background: #fbfdff;
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .mobile-menu-btn {
    display: block;
    margin-right: 1rem;
  }

  .nav-wrapper {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--surface-color);
    flex-direction: column;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    transition: transform 0.3s ease-in-out;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .nav-wrapper.active {
    transform: translateY(0);
  }

  nav ul {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  nav a {
    display: block;
    width: 100%;
    padding: 0.75rem 0;
    font-size: 1.1rem;
  }
  
  /* Reset underline for mobile */
  nav a::after {
    display: none;
  }

  .lang-selector {
    margin-top: 1rem;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
  
  .service-section {
    padding: 1.5rem;
  }
}
