/* ============================================
   Pedágio Digital - Main Stylesheet
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #1a3c6e;
  --primary-light: #2a5ca8;
  --secondary: #e8a517;
  --accent: #2ecc71;
  --text: #333333;
  --text-light: #666666;
  --bg: #ffffff;
  --bg-light: #f7f9fc;
  --bg-alt: #eef2f7;
  --border: #dce3ed;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--secondary);
}

/* Tap targets - mobile friendly */
a, button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  padding-left: 1.5rem;
}

/* ============================================
   Header & Navigation
   ============================================ */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.logo img {
  height: 40px;
  width: auto;
}

.logo-img {
  height: 40px;
  width: auto;
}

.logo-placeholder {
  height: 40px;
  width: 40px;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}

/* Hamburger menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.3rem;
  padding: 0;
}

.nav-menu li a {
  display: block;
  padding: 0.5rem 0.9rem;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
}

.nav-menu li a:hover,
.nav-menu li a.active {
  background: var(--bg-alt);
  color: var(--primary);
}

.nav-cta a {
  background: var(--primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.nav-cta a:hover {
  background: var(--primary-light) !important;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  background: var(--bg);
  padding: 4rem 1.5rem;
  text-align: center;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.92;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-cta {
  display: inline-block;
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero-cta img {
  border-radius: var(--radius);
}

.hero-logo {
  max-height: 450px;
  width: 600px;
  max-width: 100%;
  border-radius: var(--radius);
  cursor: pointer;
}

/* Fallback text button if image not loaded */
.btn-primary {
  display: inline-block;
  background: var(--secondary);
  color: #fff;
  padding: 0.9rem 2.2rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  background: #d4950f;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* ============================================
   Content Sections
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--bg-light);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 700px;
}

/* Article Content */
.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content h2 {
  font-size: 1.6rem;
  color: var(--primary);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.article-content h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin: 2rem 0 0.8rem;
}

.article-content p {
  margin-bottom: 1.2rem;
  color: var(--text);
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.2rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--bg-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-light);
}

/* ============================================
   Cards Grid
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

.card a {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.92rem;
}

/* ============================================
   Info Box / Highlight
   ============================================ */
.info-box {
  background: var(--bg-alt);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
}

.info-box h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.warning-box {
  background: #fef9e7;
  border-left: 4px solid var(--secondary);
  padding: 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
}

/* ============================================
   CTA Banner
   ============================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  text-align: center;
  padding: 3rem 1.5rem;
  margin: 2rem 0;
  border-radius: var(--radius);
}

.cta-banner h2 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.cta-banner p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Contact Form
   ============================================ */
.contact-form {
  max-width: 600px;
  margin: 2rem auto;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition);
  background: var(--bg);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42,92,168,0.1);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-required {
  color: #e74c3c;
}

/* ============================================
   Table
   ============================================ */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.styled-table thead {
  background: var(--primary);
  color: #fff;
}

.styled-table th,
.styled-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.95rem;
}

.styled-table tbody tr {
  border-bottom: 1px solid var(--border);
}

.styled-table tbody tr:nth-child(even) {
  background: var(--bg-light);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.85);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-col p,
.footer-col li {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.75);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--secondary);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.footer-bottom a {
  color: rgba(255,255,255,0.7);
}

.footer-bottom a:hover {
  color: var(--secondary);
}

/* ============================================
   Page Header (for internal pages)
   ============================================ */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Breadcrumbs */
.breadcrumbs {
  background: var(--bg-light);
  padding: 0.8rem 1.5rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}

.breadcrumbs-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.breadcrumbs a {
  color: var(--text-light);
}

.breadcrumbs span {
  color: var(--text-light);
  margin: 0 0.4rem;
}

/* ============================================
   Utility
   ============================================ */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ============================================
   Responsive - Tables
   ============================================ */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    box-shadow: var(--shadow);
    z-index: 99;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu li a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero {
    padding: 2.5rem 1rem;
  }

  .hero-cta img {
    max-width: 90%;
    height: auto;
  }

  .hero-logo {
    max-height: 280px;
  }

  .section {
    padding: 2.5rem 0;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .page-header {
    padding: 2rem 1rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .page-header p {
    font-size: 0.95rem;
  }

  .article-content h2 {
    font-size: 1.3rem;
  }

  .article-content h3 {
    font-size: 1.1rem;
  }

  /* Contact page 2-column grid → single column */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .contact-form {
    margin: 0;
  }

  /* Table scroll on mobile */
  .styled-table {
    font-size: 0.85rem;
  }

  .styled-table th,
  .styled-table td {
    padding: 0.6rem 0.7rem;
    white-space: nowrap;
  }

  /* CTA banner */
  .cta-banner {
    padding: 2rem 1rem;
  }

  .cta-banner h2 {
    font-size: 1.3rem;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  /* Info/warning boxes */
  .info-box,
  .warning-box {
    padding: 1rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-col {
    text-align: center;
  }

  .footer-bottom {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .header-inner {
    padding: 0.6rem 1rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  .hero h1 {
    font-size: 1.35rem;
  }

  .hero p {
    font-size: 0.92rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .article-content p,
  .article-content li {
    font-size: 0.95rem;
  }

  .styled-table th,
  .styled-table td {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
}
