/* Grammar Page Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: #2d3748;
  background: #f8fafc;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid #e2e8f0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #d81159;
  text-decoration: none;
}

.nav-brand i {
  font-size: 1.8rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: #4a5568;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

.nav-link:hover {
  color: #d81159;
  background: #fef5f7;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 3px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: #4a5568;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #d81159 0%, #8f2d56 100%);
  color: white;
  padding: 8rem 0 4rem;
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Grammar Topics Section */
.grammar-topics {
  padding: 4rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  margin-bottom: 3rem;
}

.topic-section {
  margin-bottom: 4rem;
}

.topic-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #d81159;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topic-title i {
  font-size: 1.5rem;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.topic-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.topic-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #d81159, #218380);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.topic-card:hover::before {
  transform: scaleX(1);
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(216, 17, 89, 0.15);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d81159, #8f2d56);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-icon i {
  font-size: 1.5rem;
  color: white;
}

/* Special tense card colors */
.tense-card .card-icon.present {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.tense-card .card-icon.past {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.tense-card .card-icon.future {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.topic-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.topic-card p {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.card-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.2rem;
  color: #d81159;
  opacity: 0;
  transition: all 0.3s ease;
}

.topic-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* Quick Tips Section */
.quick-tips {
  background: white;
  padding: 4rem 0;
  margin-top: 2rem;
}

.quick-tips h3 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
  margin-bottom: 2rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.tip-card {
  background: #f8fafc;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  border-left: 4px solid #fbb13c;
}

.tip-card i {
  font-size: 2rem;
  color: #fbb13c;
  margin-bottom: 1rem;
}

.tip-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #1e293b;
}

.tip-card p {
  color: #64748b;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    gap: 0;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    width: 100%;
  }

  .hero {
    padding: 6rem 0 3rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .topic-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .topic-card {
    padding: 1.5rem;
  }

  .container {
    padding: 0 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .topic-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .topic-card {
    padding: 1.25rem;
  }

  .card-icon {
    width: 50px;
    height: 50px;
  }

  .card-icon i {
    font-size: 1.25rem;
  }
}

/* Animation for page load */
.topic-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.topic-card:nth-child(1) {
  animation-delay: 0.1s;
}
.topic-card:nth-child(2) {
  animation-delay: 0.2s;
}
.topic-card:nth-child(3) {
  animation-delay: 0.3s;
}
.topic-card:nth-child(4) {
  animation-delay: 0.4s;
}
.topic-card:nth-child(5) {
  animation-delay: 0.5s;
}
.topic-card:nth-child(6) {
  animation-delay: 0.6s;
}
.topic-card:nth-child(7) {
  animation-delay: 0.7s;
}
.topic-card:nth-child(8) {
  animation-delay: 0.8s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.topic-card:focus {
  outline: 2px solid #d81159;
  outline-offset: 2px;
}

.nav-link:focus {
  outline: 2px solid #d81159;
  outline-offset: 2px;
}
