/**
 * Preschool to Prom - Main Stylesheet
 * Apple-inspired design with warm, bubble-like elements
 */

/* ==================== CSS VARIABLES ==================== */
:root {
  /* Color Palette from Logo */
  --primary-orange: #FF6B35;
  --primary-teal: #00A896;
  --accent-yellow: #FFB627;
  --cream: #FFF8F0;
  --dark: #2C2416;
  --gray: #6B6B6B;
  --light-gray: #E8E8E8;
  --white: #FFFFFF;
  
  /* Semantic Colors */
  --bg-primary: var(--white);
  --bg-secondary: var(--cream);
  --text-primary: var(--dark);
  --text-secondary: var(--gray);
  --border: rgba(0, 0, 0, 0.08);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  
  /* Border Radius (Bubble Effect) */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --radius-xl: 40px;
  
  /* Shadows (Soft, Apple-inspired) */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Poppins', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

a {
  color: var(--primary-teal);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-orange);
}

/* ==================== LAYOUT CONTAINERS ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

/* ==================== HEADER & NAVIGATION ==================== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.95);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) 0;
  gap: var(--spacing-lg);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-orange);
  transition: var(--transition-fast);
}

.logo-link:hover {
  transform: translateY(-2px);
}

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

.main-nav ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
  align-items: center;
}

.main-nav a {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-orange);
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: var(--transition-fast);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .main-nav {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - 70px);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    padding: var(--spacing-lg);
  }
  
  .main-nav.active {
    right: 0;
  }
  
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-orange), var(--accent-yellow));
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: var(--white);
}

.btn-secondary {
  background: var(--primary-teal);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background: #008F7F;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--primary-teal);
  border: 2px solid var(--primary-teal);
}

.btn-outline:hover {
  background: var(--primary-teal);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  background: var(--cream);
}

/* ==================== CARDS (Bubble Style) ==================== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

.card-category {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: linear-gradient(135deg, var(--primary-orange), var(--accent-yellow));
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.card-excerpt {
  flex-grow: 1;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ==================== ARTICLE GRID ==================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== HERO SECTION ==================== */
.hero {
  background: linear-gradient(135deg, var(--cream) 0%, var(--white) 100%);
  padding: var(--spacing-xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 168, 150, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  margin-bottom: var(--spacing-md);
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
}

.hero-cta {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==================== NEWSLETTER SIGNUP ==================== */
.newsletter-box {
  background: linear-gradient(135deg, var(--primary-teal), var(--primary-orange));
  padding: var(--spacing-xl);
  border-radius: var(--radius-xl);
  text-align: center;
  color: var(--white);
  margin: var(--spacing-xl) 0;
  box-shadow: var(--shadow-lg);
}

.newsletter-box h3 {
  color: var(--white);
  margin-bottom: var(--spacing-sm);
}

.newsletter-box p {
  color: var(--white);
  opacity: 0.95;
}

.newsletter-form {
  display: flex;
  gap: var(--spacing-sm);
  max-width: 500px;
  margin: var(--spacing-md) auto 0;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  min-width: 250px;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
}

.newsletter-form input:focus {
  outline: 3px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.newsletter-form button {
  background: var(--white);
  color: var(--primary-teal);
  font-weight: 700;
}

.newsletter-form button:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* ==================== FOOTER ==================== */
.site-footer {
  background: var(--dark);
  color: var(--white);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: var(--spacing-md);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--spacing-xs);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* ==================== FORMS ==================== */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition-fast);
  background: var(--white);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.1);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

/* ==================== UTILITY CLASSES ==================== */
.text-center {
  text-align: center;
}

.text-orange {
  color: var(--primary-orange);
}

.text-teal {
  color: var(--primary-teal);
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-member {
  background: linear-gradient(135deg, var(--primary-orange), var(--accent-yellow));
  color: var(--white);
}

.badge-free {
  background: var(--light-gray);
  color: var(--text-secondary);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  :root {
    --spacing-xl: 2.5rem;
    --spacing-lg: 2rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .newsletter-form input {
    width: 100%;
  }
}

/* ==================== PRINT STYLES ==================== */
@media print {
  .site-header,
  .site-footer,
  .newsletter-box,
  .btn {
    display: none;
  }
}
