/* =============================================
   AWS CLOUD SERVICES PAGE — APPTOLOGY THEME
   Uses parent styles.css design tokens
   ============================================= */

/* play-circle, play-logo-animated, logoBreathePulse inherited from styles.css */

/* ===== NAV AWS BADGE ===== */
.nav-link--aws-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-cyan) !important;
  font-weight: 500;
  position: relative;
}

.aws-badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.aws-badge-pulse::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--accent-cyan);
  opacity: 0.4;
  animation: aws-pulse 2s ease-in-out infinite;
}

@keyframes aws-pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.8); opacity: 0; }
}

/* ===== ROTATING HERO HEADLINES ===== */
.hero-rotating-wrapper {
  position: relative;
  display: inline;
}

.hero-rotating-text {
  display: inline-block;
  opacity: 0;
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: translateY(10px);
}

.hero-rotating-text--active {
  opacity: 1;
  position: relative;
  transform: translateY(0);
}

/* ===== AWS SERVICES GRID ===== */
.aws-services-section {
  position: relative;
  background: var(--bg-secondary);
  padding: 60px 40px;
  overflow: hidden;
}

.aws-services-bg-shape {
  position: absolute;
  top: -30px;
  right: -264px;
  width: min(1145px, 60vw);
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.aws-services-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  text-align: center;
}

.aws-services-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(28px, 2.5vw, 48px);
  line-height: 1.2;
  color: var(--text-white);
}

.aws-services-desc {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 620px;
}

.aws-services-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.aws-service-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-card);
  backdrop-filter: var(--blur-card);
  -webkit-backdrop-filter: var(--blur-card);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.aws-service-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(6, 221, 235, 0.08);
}

.aws-service-card--highlight {
  background: linear-gradient(135deg, rgba(0, 122, 130, 0.15), rgba(6, 221, 235, 0.05));
  border-color: rgba(6, 221, 235, 0.3);
}

.aws-service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-teal);
  color: var(--text-white);
  flex-shrink: 0;
}

.aws-service-icon--accent {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
}

.aws-service-name {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.4;
  color: var(--text-white);
}

.aws-service-text {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ===== STATS ===== */
.aws-stats-section {
  background: var(--bg-primary);
  padding: 50px 40px;
}

.aws-stats-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(28px, 2.5vw, 48px);
  line-height: 1.2;
  color: var(--text-white);
  text-align: center;
  max-width: var(--container-max);
  margin: 0 auto 14px;
}

.aws-stats-subtitle {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
  max-width: 620px;
  margin: 0 auto 40px;
}

.aws-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.aws-stat-card {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-stat);
  transition: border-color 0.3s;
}

.aws-stat-card:hover {
  border-color: var(--accent-cyan);
}

.aws-stat-number {
  font-family: var(--font-inter);
  font-weight: 700;
  font-size: clamp(36px, 3vw, 56px);
  line-height: 1;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.aws-stat-unit {
  font-size: 0.6em;
  color: var(--accent-teal);
}

.aws-stat-label {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ===== AWS TECHNOLOGIES ===== */
.aws-tech-section {
  position: relative;
  background: var(--bg-secondary);
  padding: 60px 40px;
  overflow: hidden;
}

.aws-tech-decoration {
  position: absolute;
  top: -67px;
  left: -166px;
  width: min(999px, 52vw);
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
}

.aws-tech-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  text-align: center;
}

.aws-tech-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(28px, 2.5vw, 48px);
  line-height: 1.2;
  color: var(--text-white);
}

.aws-tech-cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  max-width: 1000px;
  margin: 0 auto;
}

.aws-tech-card {
  padding: 32px 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s;
}

.aws-tech-card:hover {
  background: rgba(255, 255, 255, 0.03);
}

.aws-tech-card:nth-child(odd) {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.aws-tech-card:nth-last-child(-n+2) {
  border-bottom: none;
}

.aws-tech-number {
  font-family: var(--font-inter);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.aws-tech-name {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  color: var(--text-white);
  margin-bottom: 10px;
}

.aws-tech-text {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ===== WHY CHOOSE APPTOLOGY ===== */
.aws-why-section {
  position: relative;
  background: var(--bg-primary);
  padding: 60px 40px;
  overflow: hidden;
}

.aws-why-bg-shape {
  position: absolute;
  top: -30px;
  right: -264px;
  width: min(1145px, 60vw);
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
}

.aws-why-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  text-align: center;
}

.aws-why-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(28px, 2.5vw, 48px);
  line-height: 1.2;
  color: var(--text-white);
  max-width: 700px;
}

.aws-why-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.aws-why-card {
  padding: 36px 28px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  transition: border-color 0.3s, transform 0.3s;
}

.aws-why-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
}

.aws-why-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(6, 221, 235, 0.08);
  margin-bottom: 20px;
}

.aws-why-name {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.4;
  color: var(--text-white);
  margin-bottom: 10px;
}

.aws-why-text {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ===== CTA BANNER ===== */
.aws-cta-section {
  padding: 50px 40px;
  background: var(--bg-primary);
}

.aws-cta-card {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  background: var(--bg-deep);
  border-radius: var(--radius-overlay);
  padding: 60px 64px;
  overflow: hidden;
}

.aws-cta-glow {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 221, 235, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.aws-cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.aws-cta-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(24px, 2vw, 36px);
  line-height: 1.2;
  color: var(--text-white);
  margin-bottom: 12px;
}

.aws-cta-text {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 560px;
}

/* ===== FAQ ===== */
.aws-faq-section {
  background: var(--bg-secondary);
  padding: 60px 40px;
}

.aws-faq-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 50px;
  text-align: center;
}

.aws-faq-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(28px, 2.5vw, 48px);
  line-height: 1.2;
  color: var(--text-white);
}

.aws-faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aws-faq-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color 0.3s;
}

.aws-faq-item[open] {
  border-color: var(--accent-teal);
}

.aws-faq-question {
  padding: 20px 28px;
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-white);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.aws-faq-question::-webkit-details-marker {
  display: none;
}

.aws-faq-question::after {
  content: '+';
  font-size: 24px;
  color: var(--accent-cyan);
  flex-shrink: 0;
  transition: transform 0.3s;
}

.aws-faq-item[open] .aws-faq-question::after {
  content: '\2212';
}

.aws-faq-answer {
  padding: 0 28px 20px;
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ===== CONTACT ===== */
.aws-contact-section {
  background: var(--bg-primary);
  padding: 60px 40px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.aws-contact-header {
  text-align: center;
  margin-bottom: 50px;
}

.aws-contact-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(28px, 2.5vw, 44px);
  line-height: 1.2;
  color: var(--text-white);
  margin-bottom: 12px;
}

.aws-contact-subtitle {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-muted);
}

.aws-contact-form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .aws-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .aws-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .aws-why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .aws-services-section,
  .aws-stats-section,
  .aws-tech-section,
  .aws-why-section,
  .aws-faq-section,
  .aws-cta-section {
    padding: 60px 20px;
  }

  .aws-services-grid,
  .aws-why-grid {
    grid-template-columns: 1fr;
  }

  .aws-stats-grid {
    grid-template-columns: 1fr;
  }

  .aws-tech-cards {
    grid-template-columns: 1fr;
  }

  .aws-tech-card {
    border-right: none !important;
  }

  .aws-cta-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .form-row {
    flex-direction: column;
  }

  .aws-cta-card {
    padding: 32px 20px;
  }
}

/* ===== PERFORMANCE: OFF-SCREEN RENDERING ===== */
.aws-services-section,
.aws-stats-section,
.aws-tech-section,
.aws-why-section,
.aws-cta-section,
.aws-faq-section,
.contact-section,
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* ===== PERFORMANCE: CSS CONTAINMENT ===== */
.aws-service-card,
.aws-stat-card,
.aws-tech-card,
.aws-why-card,
.aws-faq-item {
  contain: layout style paint;
}
