/* App Showcase Custom Styles */

/* App Cards Container */
.app-showcase {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
  width: 100%;
  box-sizing: border-box;
}

/* Individual App Card */
.app-card {
  background-color: rgba(var(--light-primary-color), 0.8);
  border: 1px solid var(--light-secondary-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* App Card Header */
.app-card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--light-text-color);
  font-size: 1.8rem;
  font-weight: 700;
}

.app-card h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--light-tertiary-color);
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 0.8;
}

/* App Description */
.app-card p {
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--light-text-color);
}

/* Key Features List */
.app-card ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.app-card ul li {
  color: var(--dark-secondary-color);
  padding: 0.5rem 0;
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.5;
}

.app-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
  font-size: 1.1rem;
}

.app-card ul li strong {
  color: var(--light-text-color);
}

/* Perfect for section */
.app-card ul li:not(:has(strong)) {
  opacity: 0.9;
  font-size: 0.95rem;
}

/* App Store Button */
.app-store-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: white !important;
  text-decoration: none;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
  max-width: 100%;
}

.app-store-button:hover {
  background-color: var(--accent-hover, #e63946);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3);
  color: white !important;
  text-decoration: none;
}

/* App Store Soon Button (disabled state) */
.app-store-soon {
  background-color: #888888 !important;
  color: white !important;
  cursor: default;
  opacity: 0.7;
}

.app-store-soon:hover {
  background-color: #888888 !important;
  transform: none;
  box-shadow: none;
  color: white !important;
}

/* TestFlight Button */
.testflight-button {
  display: inline-block;
  background-color: #007AFF;
  color: white !important;
  text-decoration: none;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
  max-width: 100%;
}

.testflight-button:hover {
  background-color: #0056CC;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
  color: white !important;
  text-decoration: none;
}

/* Contact Button (Secondary Style) */
.contact-button {
  display: inline-block;
  background-color: transparent;
  color: var(--accent-color) !important;
  text-decoration: none;
  padding: 0.875rem 1.5rem;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
  max-width: 100%;
}

.contact-button:hover {
  background-color: var(--accent-color);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 77, 77, 0.2);
  text-decoration: none;
}

/* Button Container */
.app-buttons {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* Responsive Design */
@media (min-width: 768px) {
  .app-showcase {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .app-card {
    padding: 2.5rem;
  }

  .app-buttons {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  .app-card h2 {
    font-size: 2rem;
  }

  .app-card h3 {
    font-size: 1.2rem;
  }
}

/* Dark Theme Support */
html[data-theme="dark"] .app-card {
  background-color: var(--dark-secondary-color);
  border-color: var(--dark-tertiary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .app-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
  background-color: rgba(45, 51, 59, 0.9);
}

html[data-theme="dark"] .app-card h2,
html[data-theme="dark"] .app-card p,
html[data-theme="dark"] .app-card ul li strong {
  color: var(--dark-text-color);
}


html[data-theme="dark"] .app-card h3 {
  color: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] .app-card ul li {
  color: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .app-card ul li::before {
  color: var(--accent-color);
}

/* Contact Form Enhancements */
.contact-section {
  text-align: center;
  margin: 2rem 0;
  padding: 2rem;
  background-color: rgba(var(--light-primary-color), 0.5);
  border-radius: 12px;
  border: 1px solid var(--light-secondary-color);
}

.contact-section .contact-button {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--accent-color);
  color: white !important;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  border: none;
}

.contact-section .contact-button:hover {
  background-color: var(--accent-hover, #e63946);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3);
  color: white !important;
  text-decoration: none;
}

.contact-info {
  color: var(--light-tertiary-color);
  font-size: 0.95rem;
  margin-top: 1rem;
  opacity: 0.8;
}

.contact-info strong {
  color: var(--light-text-color);
  opacity: 1;
}

/* Dark theme for contact section */
html[data-theme="dark"] .contact-section {
  background-color: var(--dark-secondary-color);
  border-color: var(--dark-tertiary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .contact-info {
  color: rgba(255, 255, 255, 0.8);
}

html[data-theme="dark"] .contact-info strong {
  color: rgba(255, 255, 255, 0.95);
}

/* Dark theme button improvements */
html[data-theme="dark"] .app-store-button,
html[data-theme="dark"] .testflight-button {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .app-store-button:hover,
html[data-theme="dark"] .testflight-button:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .app-store-soon {
  background-color: #555555 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .app-store-soon:hover {
  background-color: #555555 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .contact-button {
  border-color: var(--accent-color);
  color: var(--accent-color) !important;
  background-color: transparent;
}

html[data-theme="dark"] .contact-button:hover {
  background-color: var(--accent-color);
  color: white !important;
  box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3);
}

/* Dark theme for additional elements */
html[data-theme="dark"] hr {
  border-color: var(--dark-secondary-color);
  opacity: 0.5;
}

html[data-theme="dark"] em {
  color: rgba(255, 255, 255, 0.8);
}

/* Improve dark mode readability */
html[data-theme="dark"] .app-card p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

/* Ensure all list items have good contrast */
html[data-theme="dark"] .app-card ul li:not(:has(strong)) {
  color: rgba(255, 255, 255, 0.8);
}

/* Better dark mode contrast for "Currently in Beta" text */
html[data-theme="dark"] .app-card p strong {
  color: var(--accent-color);
  opacity: 1;
}

/* Mobile Optimizations */
@media (max-width: 767px) {
  .app-card {
    padding: 1.5rem;
    margin: 1rem 0;
    box-sizing: border-box;
  }

  .app-card h2 {
    font-size: 1.6rem;
  }

  .app-card h3 {
    font-size: 1rem;
  }

  .app-buttons {
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  .app-store-button,
  .app-store-soon,
  .testflight-button,
  .contact-button {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin-right: 0;
    margin-bottom: 0;
    display: block;
  }

  .contact-section {
    margin: 1rem 0;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
  }

  .contact-section .contact-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
  .app-card {
    padding: 1rem;
    margin: 0.5rem 0;
  }

  .app-store-button,
  .app-store-soon,
  .testflight-button,
  .contact-button {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .contact-section {
    padding: 1rem 0.75rem;
  }

  .contact-section .contact-button {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
}

/* Accessibility Improvements */
.app-store-button:focus,
.testflight-button:focus,
.contact-button:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.testflight-button:focus {
  outline-color: #007AFF;
}

/* No focus state for disabled soon button */
.app-store-soon:focus {
  outline: none;
}

/* Homepage CTA Button */
.homepage-cta {
  display: inline-block;
  background-color: var(--accent-color);
  color: white !important;
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 77, 77, 0.2);
}

.homepage-cta:hover {
  background-color: var(--accent-hover, #e63946);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 77, 77, 0.3);
  color: white !important;
  text-decoration: none;
}

.homepage-cta:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Dark mode for homepage CTA */
html[data-theme="dark"] .homepage-cta {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .homepage-cta:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Responsive homepage CTA */
@media (max-width: 767px) {
  .homepage-cta {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .homepage-cta {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }
}

/* Print Styles */
@media print {
  .app-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .app-store-button,
  .app-store-soon,
  .testflight-button,
  .contact-button {
    background-color: transparent !important;
    color: #000 !important;
    border: 1px solid #000;
  }
  
  .homepage-cta {
    background-color: transparent !important;
    color: #000 !important;
    border: 2px solid #000;
  }
}