/* RedSketch Academy - Main Styles */

:root {
  /* Color System */
  --primary: rgb(220 38 38);
  --primary-dark: rgb(185 28 28);
  --primary-light: rgb(248 113 113);
  --secondary: rgb(147 51 234);
  --secondary-dark: rgb(126 34 206);
  --secondary-light: rgb(196 181 253);
  --accent: rgb(251 146 60);
  --success: rgb(34 197 94);
  --warning: rgb(250 204 21);
  --error: rgb(239 68 68);

  /* Background Colors */
  --background: rgb(255 255 255);
  --foreground: rgb(17 24 39);
  --card: rgb(255 255 255);
  --card-hover: rgb(249 250 251);
  --border: rgb(229 231 235);
  --input: rgb(243 244 246);
  --ring: rgb(220 38 38);

  /* Text Colors */
  --text-primary: rgb(17 24 39);
  --text-secondary: rgb(107 114 128);
  --text-muted: rgb(156 163 175);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

/* Counter Animation */
@keyframes counterAnimation {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.counter-visible {
    animation: counterAnimation 0.8s ease-out;
}

/* Course Cards Styles */
#courses-grid {
    margin-top: 3rem;
    /* Ensure proper grid behavior */
    display: grid !important;
}

@media (max-width: 768px) {
    #courses-grid {
        gap: 1.5rem;
        margin-top: 2rem;
    }
}

.course-card {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(2rem);
}

.course-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure all course cards follow grid behavior */
#courses-grid .course-card {
    display: block;
    width: 100%;
    height: auto;
}

.course-card:hover {
    transform: scale(1.02) !important;
}

@media (max-width: 768px) {
    .course-card:hover {
        transform: none !important;
    }
    
    #courses-grid {
        grid-template-columns: 1fr;
    }
}

/* Course Card Hover Effects */
.course-card .group:hover .absolute.inset-0.bg-gradient-to-r {
    opacity: 1;
}

.course-card .group:hover .w-20.h-20 {
    transform: scale(1.1) rotate(3deg);
}

.course-card .group:hover h3 {
    color: #dc2626;
}

/* Course Button Hover Effects */
.course-explore-btn {
    position: relative;
    overflow: hidden;
}

.course-explore-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.course-explore-btn:hover::before {
    left: 100%;
}

/* Skills Tags Hover */
.course-card .skills-tag:hover {
    border-color: #dc2626;
    color: #dc2626;
    background-color: #fef2f2;
}

/* Responsive Design */

@media (max-width: 768px) {
    .course-card:hover {
        transform: none !important;
    }
}

/* Course Card Hover Effects */
.course-card .group:hover .absolute.inset-0.bg-gradient-to-r {
    opacity: 1;
}

.course-card .group:hover .w-20.h-20 {
    transform: scale(1.1) rotate(3deg);
}

.course-card .group:hover h3 {
    color: #dc2626;
}

/* Course Button Hover Effects */
.course-explore-btn {
    position: relative;
    overflow: hidden;
}

.course-explore-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.course-explore-btn:hover::before {
    left: 100%;
}

/* Skills Tags Hover */
.course-card .skills-tag:hover {
    border-color: #dc2626;
    color: #dc2626;
    background-color: #fef2f2;
}

:root {
  /* Status Colors */
  --success: rgb(34 197 94);
  --warning: rgb(250 204 21);
  --error: rgb(239 68 68);
  
  /* Neutral Colors */
  --background: rgb(255 255 255);
  --foreground: rgb(17 24 39);
  --card: rgb(255 255 255);
  --card-hover: rgb(249 250 251);
  --border: rgb(229 231 235);
  --input: rgb(243 244 246);
  --ring: rgb(220 38 38);
  
  /* Text Colors */
  --text-primary: rgb(17 24 39);
  --text-secondary: rgb(107 114 128);
  --text-muted: rgb(156 163 175);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-glow: 0 0 50px rgb(220 38 38 / 0.35);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, rgb(220 38 38), rgb(147 51 234));
  --gradient-warm: linear-gradient(135deg, #ff6b6b, #feca57, #ff9ff3);
  --gradient-cool: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
  --gradient-dark: linear-gradient(135deg, #1a1a1a, #2d2d2d, #0a0a0a);
  
  /* Spacing */
  --radius: 0.75rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  outline: none;
  border: none;
  text-decoration: none;
}

.btn:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  padding: 0.75rem 1.5rem;
  color: white;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(220, 38, 38, 0.4);
}

/* === HERO SECTION === */
/* Gradient animations */
@keyframes gradient-x {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animate-gradient-x {
  background-size: 200% 200%;
  animation: gradient-x 3s ease infinite;
}

/* Blob animation */
@keyframes blob {
  0%, 100% {
    transform: translate(0px, 0px) scale(1);
  }
  25% {
    transform: translate(20px, -10px) scale(1.1);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  75% {
    transform: translate(10px, 5px) scale(1.05);
  }
}

.animate-blob {
  animation: blob 7s infinite;
}

/* Text gradient effects */
.text-gradient-red {
  background: linear-gradient(135deg, #dc2626, #ec4899, #dc2626);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-purple {
  background: linear-gradient(135deg, #9333ea, #3b82f6, #9333ea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-orange {
  background: linear-gradient(135deg, #ea580c, #eab308);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Button hover effects for hero */
.btn-primary-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #dc2626, #ec4899, #9333ea);
  background-size: 200% 200%;
  animation: gradient-x 3s ease infinite;
}

.btn-primary-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #dc2626, #ec4899, #9333ea);
  opacity: 0;
  filter: blur(20px);
  transition: opacity 0.3s ease;
}

.btn-primary-hero:hover::before {
  opacity: 0.7;
}

.btn-secondary-hero {
  position: relative;
  overflow: hidden;
  border: 2px solid #111827;
  background: white;
  color: #111827;
}

.btn-secondary-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #111827;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.btn-secondary-hero:hover::before {
  transform: translateX(0);
}

.btn-secondary-hero:hover {
  color: white;
}

/* Video container styles */
.video-container {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(229, 231, 235, 1);
}

.video-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1rem;
}

.video-stat {
  text-align: center;
}

.video-stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.video-stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

/* Hero responsive design */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 3rem !important;
    line-height: 1.1;
  }
  
  .hero-section .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .hero-section .hero-description {
    font-size: 1rem;
  }
  
  .video-container {
    padding: 1rem;
  }
  
  .hero-section .space-y-8 > * + * {
    margin-top: 1.5rem;
  }
  
  .hero-section .gap-12 {
    gap: 2rem;
  }
}

/* === REDSKETCH NUMBERS SECTION === */
.numbers-section {
  background: linear-gradient(135deg, #dc2626, #9333ea);
  color: white;
  padding: 4rem 0;
}

.counter-item {
  text-align: center;
  transition: transform 0.3s ease;
}

.counter-item:hover {
  transform: translateY(-5px);
}

.counter-value {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.counter-label {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.counter-icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

/* Counter animations */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.counter-animate {
  animation: countUp 0.6s ease forwards;
}

/* Responsive design for numbers section */
@media (max-width: 768px) {
  .numbers-section {
    padding: 3rem 0;
  }
  
  .counter-value {
    font-size: 2.5rem;
  }
  
  .counter-label {
    font-size: 1rem;
  }
  
  .numbers-section .grid {
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .counter-value {
    font-size: 2rem;
  }
  
  .counter-label {
    font-size: 0.875rem;
  }
  
  .numbers-section .grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--primary);
  background: transparent;
  border-radius: var(--radius-full);
  color: var(--primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-ghost {
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  background: transparent;
  border-radius: var(--radius);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--card-hover);
}

/* Card Components */
.card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}

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

.card-gradient {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
}

.card-dark {
  background: rgba(24, 24, 24, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Navigation Styles */
.nav-link {
  position: relative;
  font-weight: 500;
  transition: color 0.3s ease;
  cursor: pointer;
  padding: 0.5rem 0;
  color: var(--text-secondary);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link.active {
  color: var(--primary);
}

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

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

/* Form Elements */
.input {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--input);
  transition: all 0.3s ease;
  font-family: inherit;
  outline: none;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.input-error {
  border-color: var(--error);
}

.input-success {
  border-color: var(--success);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-2xl);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}



/* Gradient animations */
@keyframes gradient-x {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animate-gradient-x {
  background-size: 200% 200%;
  animation: gradient-x 3s ease infinite;
}

/* Slide animations for mobile menu */
@keyframes slide-in-left {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-in-up {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-slide-in-left {
  animation: slide-in-left 0.5s ease-out forwards;
}

.animate-slide-in-up {
  animation: slide-in-up 0.5s ease-out forwards;
}

/* Mobile Menu States */
#mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Focus visible enhancement */
.focus-visible-enhanced:focus-visible {
  outline: 2px solid rgba(220, 38, 38, 0.5);
  outline-offset: 2px;
}

/* Navigation active states */
.nav-link.active {
  color: rgb(220, 38, 38);
}

.nav-link.active span {
  transform: scaleX(1);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background: white;
  z-index: 60;
  transition: right 0.3s ease;
  padding: 1rem;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 55;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Animation Delays */
.animation-delay-1000 {
  animation-delay: 1s;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

/* Utility Classes */
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}

.backdrop-blur {
  backdrop-filter: blur(8px);
}

.backdrop-blur-lg {
  backdrop-filter: blur(16px);
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
  
  .card {
    margin: 0 1rem;
  }
  
  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }
}

/* Print Styles */
@media print {
  .header,
  .mobile-menu,
  .modal-overlay,
  .whatsapp-button {
    display: none !important;
  }
}

/* Line Clamp Utilities */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.line-clamp-4 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}