/* ============================================
   BILIM AINASY - PREMIUM EDUCATIONAL PLATFORM
   Modern, Professional Design for Teachers
   Mobile-First Optimized (95% mobile users)
   ============================================ */

:root {
  /* Professional Blue Theme (Default) - Based on Logo */
  --primary-color: #005691;
  --primary-light: #0070b8;
  --primary-dark: #003d66;
  --accent-color: #ffb900;
  --accent-light: #ffc933;
  --accent-dark: #e6a700;
  --success-color: #10b981;
  --success-light: #34d399;

  /* Neutral Colors */
  --background-color: #f8fafc;
  --background-secondary: #f1f5f9;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-primary: 0 10px 30px -5px rgba(0, 86, 145, 0.3);
  --shadow-accent: 0 10px 30px -5px rgba(255, 185, 0, 0.3);

  /* Spacing - Mobile First */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.25rem;
  --spacing-xl: 1.5rem;
  --spacing-2xl: 2rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme 2: Warm Gold */
[data-theme="warm"] {
  --primary-color: #d97706;
  --primary-light: #f59e0b;
  --primary-dark: #b45309;
  --accent-color: #fbbf24;
  --accent-light: #fcd34d;
  --accent-dark: #f59e0b;
  --success-color: #10b981;
  --success-light: #34d399;
  --background-color: #fffbeb;
  --background-secondary: #fef3c7;
  --text-primary: #78350f;
  --text-secondary: #92400e;
  --shadow-primary: 0 10px 30px -5px rgba(217, 119, 6, 0.3);
  --shadow-accent: 0 10px 30px -5px rgba(251, 191, 36, 0.3);
}

/* Theme 3: Fresh Green */
[data-theme="green"] {
  --primary-color: #059669;
  --primary-light: #10b981;
  --primary-dark: #047857;
  --accent-color: #34d399;
  --accent-light: #6ee7b7;
  --accent-dark: #10b981;
  --success-color: #22c55e;
  --success-light: #4ade80;
  --background-color: #f0fdf4;
  --background-secondary: #dcfce7;
  --text-primary: #064e3b;
  --text-secondary: #065f46;
  --shadow-primary: 0 10px 30px -5px rgba(5, 150, 105, 0.3);
  --shadow-accent: 0 10px 30px -5px rgba(52, 211, 153, 0.3);
}

/* Theme 4: Royal Purple */
[data-theme="purple"] {
  --primary-color: #7c3aed;
  --primary-light: #8b5cf6;
  --primary-dark: #6d28d9;
  --accent-color: #a78bfa;
  --accent-light: #c4b5fd;
  --accent-dark: #8b5cf6;
  --success-color: #10b981;
  --success-light: #34d399;
  --background-color: #faf5ff;
  --background-secondary: #f3e8ff;
  --text-primary: #5b21b6;
  --text-secondary: #6d28d9;
  --shadow-primary: 0 10px 30px -5px rgba(124, 58, 237, 0.3);
  --shadow-accent: 0 10px 30px -5px rgba(167, 139, 250, 0.3);
}

/* ============================================
   BASE STYLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle background pattern */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(0, 86, 145, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 185, 0, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-sm);
  position: relative;
  z-index: 1;
}

/* ============================================
   THEME SWITCHER
   ============================================ */

.theme-switcher {
  position: fixed;
  top: 60px;
  right: 10px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}

.theme-btn {
  width: 32px;
  height: 32px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.theme-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity var(--transition-base);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
}

.theme-btn:hover {
  transform: scale(1.1);
}

.theme-btn:active {
  transform: scale(0.95);
}

.theme-btn.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 4px var(--primary-color);
}

.theme-btn[data-theme="professional"] {
  background: linear-gradient(135deg, #005691 0%, #ffb900 100%);
}

.theme-btn[data-theme="warm"] {
  background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
}

.theme-btn[data-theme="green"] {
  background: linear-gradient(135deg, #059669 0%, #34d399 100%);
}

.theme-btn[data-theme="purple"] {
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */

.language-switcher {
  position: fixed;
  top: 10px;
  right: 10px;
  display: flex;
  background: var(--card-bg);
  border-radius: var(--radius-full);
  padding: 4px;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  border: 1px solid var(--border-color);
  gap: 4px;
  backdrop-filter: blur(10px);
}

.lang-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.lang-btn:hover {
  background: var(--background-secondary);
  color: var(--primary-color);
}

.lang-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* ============================================
   HEADER - COMPACT FOR MOBILE
   ============================================ */

.header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  /* Reduced padding for mobile to save vertical space */
  padding: var(--spacing-lg) var(--spacing-sm);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-primary);
  overflow: hidden;
}

/* Animated background pattern */
.header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: movePattern 20s linear infinite;
  opacity: 0.2;
}

@keyframes movePattern {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(30px, 30px);
  }
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  /* Reduced margin for compact header */
  margin-bottom: var(--spacing-xs);
  position: relative;
  z-index: 2;
}

.logo-text {
  /* Smaller font size for mobile */
  font-size: 1.5rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-avatar {
  /* Smaller logo for mobile */
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.logo-avatar:hover {
  transform: scale(1.05) rotate(5deg);
}

.logo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo p {
  /* Smaller subtitle for mobile */
  font-size: 0.75rem;
  color: white;
  font-weight: 400;
  opacity: 0.95;
  position: relative;
  z-index: 2;
  line-height: 1.3;
}

.back-btn {
  position: absolute;
  left: var(--spacing-sm);
  top: var(--spacing-sm);
  background: white;
  color: var(--primary-color);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8125rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  z-index: 3;
}

.back-btn:hover {
  background: var(--accent-color);
  color: var(--text-primary);
  transform: translateX(-2px);
}

/* ============================================
   CONTESTS SECTION - OPTIMIZED FOR MOBILE
   ============================================ */

.contests-section {
  /* Reduced margin for compact layout */
  margin-bottom: var(--spacing-lg);
}

.contests-section h2 {
  text-align: center;
  /* Smaller heading for mobile */
  font-size: 1.5rem;
  color: var(--primary-color);
  /* Reduced margin */
  margin-bottom: var(--spacing-md);
  font-weight: 700;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.contests-section h2::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: var(--radius-full);
}

.contest-buttons {
  display: flex;
  flex-direction: column;
  /* Reduced gap for compact layout */
  gap: var(--spacing-md);
  max-width: 900px;
  margin: 0 auto;
}

/* ============================================
   CONTEST CARDS - MOBILE OPTIMIZED
   ============================================ */

.contest-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  width: 100%;
}

.contest-card.modern {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 2px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.contest-card.modern::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.contest-card.modern:active {
  transform: scale(0.98);
}

.contest-card.modern:active::before {
  opacity: 1;
}

.contest-image-left {
  /* Compact image height for mobile */
  width: 100%;
  height: 140px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.contest-image-left::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}

.contest-image-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.contest-card.modern:active .contest-image-left img {
  transform: scale(1.05);
}

.contest-content-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* Reduced padding for compact layout */
  padding: var(--spacing-md);
}

.contest-header {
  margin-bottom: var(--spacing-sm);
}

.contest-title {
  /* Smaller title for mobile */
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 var(--spacing-xs) 0;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.contest-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  line-height: 1.3;
}

.contest-order {
  position: absolute;
  /* Positioned over image for space efficiency */
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: white;
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  border: 2px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.contest-info-boxes {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.info-box {
  background: var(--background-color);
  border-radius: var(--radius-md);
  /* Compact padding */
  padding: var(--spacing-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.info-box:active {
  transform: scale(0.98);
  border-color: var(--primary-color);
}

.info-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.info-content {
  flex: 1;
}

.info-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.3;
}

.info-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
  line-height: 1.2;
}

.info-desc {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.2;
}

/* ============================================
   PARTICIPATION BUTTON - PROMINENT ON MOBILE
   ============================================ */

.participation-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  /* Optimized padding for mobile */
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--success-color), var(--success-light));
  color: white;
  text-decoration: none;
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 8px 20px -5px rgba(16, 185, 129, 0.4);
  transition: all var(--transition-base);
  border: none;
  cursor: pointer;
  width: 100%;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.participation-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.participation-btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px -3px rgba(16, 185, 129, 0.5);
}

.participation-btn:active::before {
  opacity: 1;
}

.participation-btn i {
  font-size: 1.125rem;
}

/* ============================================
   AWARDS CARD - COMPACT
   ============================================ */

.detail-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-md);
  border: 2px solid var(--border-color);
  transition: all var(--transition-base);
}

.detail-card h2 {
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
  line-height: 1.3;
}

.prize-card {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  color: var(--text-primary);
  border: none;
}

.prize-card h2 {
  color: var(--text-primary);
}

.prize-info p {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: var(--spacing-xs);
}

/* ============================================
   PRODUCTS SECTION - COMPACT
   ============================================ */

.products-section {
  margin-bottom: var(--spacing-lg);
}

.products-section h2 {
  text-align: center;
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.product-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  max-width: 1000px;
  margin: 0 auto;
}

.product-btn {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 2px solid var(--border-color);
  overflow: hidden;
}

.product-btn:active {
  transform: scale(0.98);
  border-color: var(--primary-color);
}

.product-cover {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.product-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}

.product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-btn:active .product-cover img {
  transform: scale(1.05);
}

.product-info {
  display: flex;
  align-items: center;
  padding: var(--spacing-md);
  gap: var(--spacing-sm);
}

.product-icon {
  font-size: 1.5rem;
  min-width: 40px;
  text-align: center;
}

.product-content {
  flex: 1;
}

.product-content h3 {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.3;
}

.product-content p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.arrow {
  font-size: 1.25rem;
  color: var(--primary-color);
  transition: transform var(--transition-base);
}

.product-btn:active .arrow {
  transform: translateX(4px);
}

/* ============================================
   INFO SECTION - COMPACT
   ============================================ */

.info-section {
  margin-bottom: var(--spacing-lg);
}

.info-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  max-width: 900px;
  margin: 0 auto;
}

.info-card {
  background: var(--card-bg);
  padding: var(--spacing-md);
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 2px solid var(--border-color);
}

.info-card:active {
  transform: scale(0.98);
  border-color: var(--primary-color);
}

.info-card .info-icon {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
}

.info-card h3 {
  font-size: 1.125rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  line-height: 1.3;
}

.info-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.8125rem;
}

/* ============================================
   FOOTER - COMPACT
   ============================================ */

.footer {
  text-align: center;
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-xl);
  margin-top: var(--spacing-lg);
  box-shadow: var(--shadow-lg);
}

.footer-logo h3 {
  font-size: 1.5rem;
  color: white;
  margin-bottom: var(--spacing-xs);
  font-weight: 700;
}

.footer-logo p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
}

/* ============================================
   CONTACT CARD - COMPACT
   ============================================ */

.contact-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-md);
  border: 2px solid var(--primary-color);
  margin: var(--spacing-md) 0;
}

.contact-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.contact-phone-icon {
  font-size: 1.25rem;
  color: var(--primary-color);
  background: rgba(0, 86, 145, 0.1);
  padding: 10px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-title {
  color: var(--primary-color);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.contact-content {
  background: var(--background-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  border: 1px solid var(--border-color);
}

.whatsapp-contact {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
}

.whatsapp-icon {
  font-size: 1.5rem;
  color: var(--success-color);
  background: rgba(16, 185, 129, 0.1);
  padding: 10px;
  border-radius: 50%;
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-text p {
  margin: 0 0 var(--spacing-xs) 0;
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.whatsapp-link {
  color: var(--success-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-base);
  display: inline-block;
}

.whatsapp-link:active {
  color: var(--success-light);
  border-bottom-color: var(--success-color);
}

/* ============================================
   PAYMENT BUTTON - COMPACT
   ============================================ */

.payment-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: var(--radius-xl);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  margin: var(--spacing-sm) 0;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-accent);
  width: 100%;
  max-width: 400px;
}

.payment-button:active {
  transform: scale(0.97);
  box-shadow: 0 8px 20px -5px rgba(255, 185, 0, 0.5);
}

.payment-button i {
  font-size: 1.25rem;
}

.payment-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: var(--spacing-md) 0;
}

/* ============================================
   TABLET & DESKTOP RESPONSIVE
   ============================================ */

@media (min-width: 640px) {
  :root {
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 2.5rem;
    --spacing-2xl: 3rem;
  }

  .container {
    padding: var(--spacing-md);
  }

  .theme-switcher {
    top: 70px;
    right: 15px;
    padding: 8px;
    gap: 8px;
  }

  .theme-btn {
    width: 36px;
    height: 36px;
  }

  .language-switcher {
    top: 15px;
    right: 15px;
    padding: 5px;
  }

  .lang-btn {
    padding: 8px 16px;
    font-size: 0.8125rem;
  }

  .header {
    padding: var(--spacing-xl) var(--spacing-md);
  }

  .logo-text {
    font-size: 2rem;
  }

  .logo-avatar {
    width: 70px;
    height: 70px;
  }

  .logo p {
    font-size: 0.9375rem;
  }

  .contests-section h2,
  .products-section h2 {
    font-size: 2rem;
  }

  .contest-image-left {
    height: 180px;
  }

  .contest-title {
    font-size: 1.5rem;
  }

  .contest-subtitle {
    font-size: 1rem;
  }

  .contest-info-boxes {
    flex-direction: row;
    gap: var(--spacing-sm);
  }

  .product-buttons {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .info-cards {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (min-width: 768px) {
  .theme-switcher {
    top: 80px;
    right: 20px;
    padding: 10px;
    gap: 10px;
  }

  .theme-btn {
    width: 40px;
    height: 40px;
  }

  .language-switcher {
    top: 20px;
    right: 20px;
    padding: 6px;
  }

  .lang-btn {
    padding: 10px 20px;
    font-size: 0.875rem;
  }

  .header {
    padding: var(--spacing-2xl) var(--spacing-lg);
    border-radius: var(--radius-2xl);
  }

  .logo-text {
    font-size: 2.5rem;
  }

  .logo-avatar {
    width: 80px;
    height: 80px;
  }

  .logo p {
    font-size: 1rem;
  }

  .contests-section h2,
  .products-section h2 {
    font-size: 2.25rem;
  }

  .contest-card.modern {
    flex-direction: row;
  }

  .contest-image-left {
    flex: 0 0 40%;
    height: auto;
    min-height: 280px;
  }

  .contest-content-right {
    padding: var(--spacing-lg);
  }

  .contest-title {
    font-size: 1.75rem;
  }

  .contest-order {
    top: var(--spacing-md);
    right: var(--spacing-md);
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .product-cover {
    height: 240px;
  }

  .detail-card {
    padding: var(--spacing-lg);
  }

  .detail-card h2 {
    font-size: 1.5rem;
  }

  .prize-info p {
    font-size: 0.9375rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: var(--spacing-lg);
  }

  .header {
    padding: var(--spacing-2xl) var(--spacing-xl);
  }

  .logo-text {
    font-size: 3rem;
  }

  .logo-avatar {
    width: 90px;
    height: 90px;
  }

  .logo p {
    font-size: 1.125rem;
  }

  .contests-section h2,
  .products-section h2 {
    font-size: 2.5rem;
  }

  .contest-image-left {
    flex: 0 0 45%;
    min-height: 300px;
  }

  .contest-content-right {
    padding: var(--spacing-xl);
  }

  .contest-title {
    font-size: 2rem;
  }

  .contest-subtitle {
    font-size: 1.125rem;
  }

  .contest-order {
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    font-size: 0.875rem;
    padding: 8px 16px;
  }

  .info-box {
    padding: var(--spacing-md);
  }

  .info-title {
    font-size: 1rem;
  }

  .info-subtitle {
    font-size: 0.875rem;
  }

  .info-desc {
    font-size: 0.8125rem;
  }

  .participation-btn {
    padding: 16px 32px;
    font-size: 1.125rem;
  }

  .product-cover {
    height: 280px;
  }

  .detail-card {
    padding: var(--spacing-xl);
  }

  .detail-card h2 {
    font-size: 1.875rem;
  }

  .prize-info p {
    font-size: 1.0625rem;
  }

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

  .product-btn:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
  }

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

  .participation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px -5px rgba(16, 185, 129, 0.5);
  }

  .payment-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px -5px rgba(255, 185, 0, 0.5);
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Added work examples gallery styles for uniform image sizing */
.works-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.work-item {
  background: var(--background-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-color);
  transition: all var(--transition-base);
}

.work-item:active {
  transform: scale(0.98);
  border-color: var(--primary-color);
}

.work-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.work-item:active .work-img {
  transform: scale(1.05);
}

.work-item p {
  padding: var(--spacing-sm);
  text-align: center;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  background: var(--card-bg);
  margin: 0;
}

@media (min-width: 640px) {
  .works-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-img {
    height: 220px;
  }
}

@media (min-width: 768px) {
  .works-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .work-img {
    height: 240px;
  }
}

@media (min-width: 1024px) {
  .work-img {
    height: 280px;
  }

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

.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Prevent text selection on interactive elements */
button,
.lang-btn,
.theme-btn,
.participation-btn,
.payment-button {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Added video gallery styles for oqular.html - responsive video sizing */
.video-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.video-item {
  background: var(--background-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-color);
  transition: all var(--transition-base);
}

.video-item:active {
  transform: scale(0.98);
  border-color: var(--primary-color);
}

.video-wrapper {
  width: 100%;
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-element {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  max-height: 300px;
}

.video-item p {
  padding: var(--spacing-sm);
  text-align: center;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  background: var(--card-bg);
  margin: 0;
  line-height: 1.4;
}

/* Added journal examples styles for journal.html - responsive image sizing */
.journal-examples {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.journal-example {
  background: var(--background-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-color);
  transition: all var(--transition-base);
}

.journal-example:active {
  transform: scale(0.98);
  border-color: var(--primary-color);
}

.journal-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.journal-example:active .journal-img {
  transform: scale(1.05);
}

.journal-example p {
  padding: var(--spacing-sm);
  text-align: center;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  background: var(--card-bg);
  margin: 0;
  line-height: 1.4;
}

/* Added presentation styles for kazakh-language-5.html - responsive image sizing */
.presentation-container {
  margin-top: var(--spacing-md);
}

.presentation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

.presentation-item {
  background: var(--background-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-color);
  padding: var(--spacing-md);
  transition: all var(--transition-base);
  text-align: center;
}

.presentation-item:active {
  transform: scale(0.98);
  border-color: var(--primary-color);
}

.presentation-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
  transition: transform var(--transition-slow);
}

.presentation-item:active .presentation-img {
  transform: scale(1.05);
}

.presentation-item h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: var(--spacing-xs);
  line-height: 1.3;
}

.presentation-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
  line-height: 1.4;
}

.presentation-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
  margin-top: var(--spacing-xs);
}

.presentation-btn:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-sm);
}

/* Tablet responsive styles for media elements */
@media (min-width: 640px) {
  .video-gallery {
    grid-template-columns: 1fr;
  }

  .video-element {
    max-height: 400px;
  }

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

  .journal-img {
    height: 280px;
  }

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

  .presentation-img {
    height: 220px;
  }
}

/* Desktop responsive styles for media elements */
@media (min-width: 768px) {
  .video-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .video-element {
    max-height: 350px;
  }

  .journal-examples {
    grid-template-columns: repeat(3, 1fr);
  }

  .journal-img {
    height: 300px;
  }

  .presentation-img {
    height: 240px;
  }
}

@media (min-width: 1024px) {
  .video-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .video-element {
    max-height: 400px;
  }

  .journal-img {
    height: 320px;
  }

  .presentation-img {
    height: 260px;
  }

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

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

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

  .presentation-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }
}
