/* Pages Layout Styles - Static content pages with white viewport */

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

body.pages-layout {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  min-height: 100vh;
  line-height: 1.6;
}

.pages-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.pages-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px 40px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.pages-logo-link {
  display: block;
  justify-self: center;
}

.pages-logo {
  height: 50px;
  width: auto;
}

.pages-header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.pages-header-left {
  justify-self: start;
}

.pages-header-right {
  justify-self: end;
}

.pages-header-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.pages-header-nav a:hover {
  opacity: 0.8;
}

.pages-header-nav .btn-outline {
  border: 2px solid white;
  padding: 8px 20px;
  border-radius: 8px;
}

.pages-header-nav .btn-outline:hover {
  background: rgb(255 255 255 / 10%);
}

/* Main Content */
.pages-content {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* White content card */
.content-card {
  background: white;
  border-radius: 16px;
  padding: 40px 50px;
  box-shadow: 0 10px 40px rgb(0 0 0 / 15%);
}

.content-card h1 {
  font-size: 2.2rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 700;
}

.content-card .subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid #f0f0f0;
}

.content-card h2 {
  font-size: 1.5rem;
  color: #333;
  margin-top: 32px;
  margin-bottom: 16px;
  font-weight: 600;
}

.content-card h3 {
  font-size: 1.2rem;
  color: #444;
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: 600;
}

.content-card p {
  color: #555;
  margin-bottom: 16px;
  line-height: 1.7;
}

.content-card ul,
.content-card ol {
  margin-bottom: 16px;
  padding-left: 24px;
  color: #555;
}

.content-card li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.content-card a {
  color: #667eea;
  text-decoration: none;
}

.content-card a:hover {
  text-decoration: underline;
}

.content-card code {
  background-color: #f5f5f5;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.9em;
}

.content-card pre {
  background-color: #f5f5f5;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.content-card pre code {
  padding: 0;
  background: none;
}

/* Feature boxes for use-case pages */
.feature-box {
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
  border: 1px solid #e0e8ff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.feature-box h3 {
  margin-top: 0;
  color: #667eea;
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-box .icon {
  font-size: 1.5rem;
}

.feature-box p:last-child {
  margin-bottom: 0;
}

/* Content images (photos and screenshots inline in content) */
.content-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgb(0 0 0 / 12%);
  margin: 24px 0;
  display: block;
}

.content-image.screenshot {
  border: 1px solid #e0e0e0;
}

/* Comparison table */
.comparison-table {
  margin: 24px 0;
  overflow-x: auto;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.comparison-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}

.comparison-table th:first-child {
  border-radius: 8px 0 0;
}

.comparison-table th:last-child {
  border-radius: 0 8px 0 0;
}

.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  color: #555;
}

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

.comparison-table tr:last-child td:first-child {
  border-radius: 0 0 0 8px;
}

.comparison-table tr:last-child td:last-child {
  border-radius: 0 0 8px;
}

.comparison-table tbody tr:nth-child(even) {
  background: #f8f9fa;
}

/* CTA box for story page */
.cta-box {
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
  border: 1px solid #e0e8ff;
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
  text-align: center;
}

.cta-box h3 {
  margin-top: 0;
  color: #667eea;
}

.cta-box .btn {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.cta-box .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-box .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(102 126 234 / 30%);
  text-decoration: none;
}

/* Image placeholders */
.image-placeholder {
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  color: #888;
  margin: 24px 0;
}

.image-placeholder .placeholder-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
}

.image-placeholder p {
  margin: 0;
  color: #888;
}

/* Guide images (actual screenshots) */
.guide-image {
  margin: 24px 0;
  text-align: center;
}

.guide-image .screenshot {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
  border: 1px solid #e0e0e0;
}

.guide-image .image-caption {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

/* Info callout boxes */
.info-callout {
  background: #e8f4fd;
  border-left: 4px solid #2196f3;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
}

.info-callout.tip {
  background: #e8f5e9;
  border-left-color: #4caf50;
}

.info-callout.warning {
  background: #fff3e0;
  border-left-color: #ff9800;
}

.info-callout p:last-child {
  margin-bottom: 0;
}

.info-callout strong {
  display: block;
  margin-bottom: 4px;
}

/* Glossary-specific styles */
.glossary-term {
  border-bottom: 1px solid #eee;
  padding: 20px 0;
}

.glossary-term:first-of-type {
  padding-top: 0;
}

.glossary-term:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.glossary-term dt {
  font-weight: 600;
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 8px;
}

.glossary-term dd {
  color: #555;
  margin: 0;
  line-height: 1.6;
}

/* FAQ-specific styles */
.faq-item {
  border-bottom: 1px solid #eee;
  padding: 24px 0;
}

.faq-item:first-of-type {
  padding-top: 0;
}

.faq-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-question {
  font-weight: 600;
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
}

.faq-question::before {
  content: "Q";
  background: #667eea;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.faq-answer {
  padding-left: 40px;
  color: #555;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* Steps/numbered lists for guides */
.guide-steps {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
}

.guide-steps li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 48px;
  margin-bottom: 24px;
}

.guide-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Guide step screenshots */
.guide-screenshot {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
  border: 1px solid #e0e0e0;
}

/* Section divider and intro for calendar setup page */
.section-divider {
  margin-top: 40px;
  margin-bottom: 12px;
  padding-top: 32px;
  border-top: 2px solid #f0f0f0;
  font-size: 1.3rem;
  color: #666;
  font-weight: 600;
}

.section-intro {
  color: #666;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* OAuth benefits list */
.oauth-benefits {
  background: linear-gradient(135deg, #f0fff4 0%, #e6ffed 100%);
  border: 1px solid #b7e4c7;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
}

.oauth-benefits ul {
  margin: 0;
  padding-left: 20px;
}

.oauth-benefits li {
  margin-bottom: 8px;
  color: #2d6a4f;
}

.oauth-benefits li:last-child {
  margin-bottom: 0;
}

/* Device display cards */
.device-card {
  display: flex;
  gap: 24px;
  background: #fafafa;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.device-card .device-icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.device-card .device-info h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.device-card .device-info p:last-child {
  margin-bottom: 0;
}

/* Collapsible sections */
.collapsible-section {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.collapsible-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #f8f9fa;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  transition: background 0.2s;
}

.collapsible-toggle:hover {
  background: #f0f0f0;
}

.collapsible-toggle .toggle-icon {
  font-size: 0.8rem;
  color: #666;
  transition: transform 0.2s;
}

.collapsible-content {
  padding: 20px;
  border-top: 1px solid #e0e0e0;
}

.collapsible-content p:last-child,
.collapsible-content ul:last-child,
.collapsible-content ol:last-child {
  margin-bottom: 0;
}

.collapsible-section.collapsed .collapsible-content {
  display: none;
}

.collapsible-section.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

/* Back to landing link */
.back-link {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid #f0f0f0;
}

.back-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

/* Footer */
.pages-footer {
  background: rgb(0 0 0 / 20%);
  padding: 40px 20px 24px;
  margin-top: auto;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  max-width: 800px;
  margin: 0 auto 32px;
}

.footer-section h4 {
  color: white;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  opacity: 0.9;
}

.footer-section a {
  display: block;
  color: rgb(255 255 255 / 80%);
  text-decoration: none;
  margin-bottom: 8px;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 20%);
}

.footer-bottom p {
  color: rgb(255 255 255 / 70%);
  font-size: 0.9rem;
  margin: 0;
}

/* Responsive */
@media (width <= 768px) {
  .pages-header {
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 16px;
  }

  .pages-logo {
    height: 40px;
  }

  .pages-header-nav {
    gap: 16px;
  }

  .content-card {
    padding: 24px;
  }

  .content-card h1 {
    font-size: 1.75rem;
  }

  .content-card h2 {
    font-size: 1.3rem;
  }

  .device-card {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
    text-align: center;
  }
}

@media (width <= 480px) {
  .pages-header-nav {
    width: 100%;
    justify-content: center;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}

/* Pricing cards */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.pricing-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-card.featured {
  border-color: #4a90d9;
  border-width: 2px;
  box-shadow: 0 4px 12px rgb(74 144 217 / 15%);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #4a90d9;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.pricing-header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 16px;
}

.pricing-header h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: #333;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  line-height: 1;
}

.pricing-period {
  color: #666;
  font-size: 0.9rem;
  margin-top: 4px;
}

.pricing-annual {
  color: #28a745;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 8px;
}

.pricing-features {
  flex: 1;
}

.pricing-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-features li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-cta {
  margin-top: 24px;
  text-align: center;
}

.pricing-cta .btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
}

.pricing-cta .btn-primary {
  background: #4a90d9;
  color: white;
}

.pricing-cta .btn-primary:hover {
  background: #3a7bc8;
}

.pricing-cta .btn-secondary {
  background: #f5f5f5;
  color: #333;
}

.pricing-cta .btn-secondary:hover {
  background: #e8e8e8;
}

@media (width <= 900px) {
  .pricing-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .pricing-card.featured {
    order: -1;
  }
}
