/* Base styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
  color: #333;
}

header {
  background: #4a90e2;
  color: white;
  padding: 2rem;
  text-align: center;
  position: relative;
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
}

header p {
  margin-top: 0.5rem;
}

nav {
  background: #333;
  display: flex;
  justify-content: center;
  padding: 0.5rem;
}

nav a {
  color: white;
  margin: 0 1rem;
  text-decoration: none;
  font-weight: bold;
}

main {
  padding: 2rem;
  max-width: 1000px;
  margin: auto;
}

section {
  margin-bottom: 3rem;
}

footer {
  background: #eee;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* App grid */
.app-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem 2rem;
  justify-content: center;
  padding: 1rem 0;
}

/* Flip card container */
.app-card {
  perspective: 1000px;
  width: 200px;
  height: 220px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Inner card flip */
.app-inner {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  position: relative;
}

/* Flip on hover */
.app-card:hover .app-inner {
  transform: rotateY(180deg);
}

/* Front & back of card */
.app-front,
.app-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #fff;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Link wrapper for icon + title */
.app-front a {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

/* App icons */
.app-front img {
  width: 80px;
  height: 80px;
  margin-bottom: 0.5rem;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-front h3 {
  font-size: 1rem;
  margin: 0;
}

/* Back of card (description) */
.app-back {
  transform: rotateY(180deg);
  font-size: 0.9rem;
  text-align: center;
}

.app-back a {
  margin-top: 0.5rem;
  text-decoration: underline;
  color: #4a90e2;
}

/* Scroll animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* News card */
.news-card {
  display: flex;
  flex-direction: row;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  max-width: 800px;
  margin: 1rem auto;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.news-image {
  width: 40%;
  object-fit: cover;
  height: auto;
}

.news-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-content h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #4a90e2;
}

.news-content p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  color: #333;
}

.news-content span {
  font-size: 0.85rem;
  color: #888;
  margin-top: auto;
}

/* Theme toggle button */
#theme-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  background: transparent;
  border: none;
  color: white;
}