/* Modern Home Page Styles */
/* Organized into clear sections for maintainability */

/* ================================
   CSS CUSTOM PROPERTIES
   ================================ */
:root {
  --hero-primary-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  --hero-secondary-gradient: linear-gradient(90deg, var(--white-color), var(--light-color));
  --cta-gradient: linear-gradient(90deg, var(--success-color), #20c997);
  --gpt-gradient: linear-gradient(135deg, #ff006e, #8338ec, #3a86ff);
  --hero-shadow: var(--shadow-lg);
  --hover-transform: translateY(-3px);
  --border-radius-large: var(--radius-xxl);
  --border-radius-pill: var(--radius-full);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 15vh;
  display: flex;
  align-items: center;
  overflow: visible;
  background: transparent;
  border-radius: var(--border-radius-large);
}

/* Enhanced text container for better spacing */
.hero-text-container {
  padding-left: 1rem;
}

@media (max-width: 992px) {
  .hero-text-container {
    padding-left: 0.75rem;
  }
}

@media (max-width: 768px) {
  .hero-text-container {
    padding-left: 0.5rem;
  }
}

/* Accessibility improvements */
.hero-section:focus-within {
  outline: 2px solid #ffffff;
  outline-offset: -2px;
}

/* High contrast support */
@media (prefers-contrast: high) {
  .gradient-text {
    background: linear-gradient(90deg, #ffffff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }

  }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .animated-gradient,
  .floating-icon,
  .hero-image,
  .featurette-image-tilt {
    animation: none !important;
  }

  .featurette-image-tilt-inner {
    transition: none !important;
  }

  .featurette-odd:hover .featurette-image-tilt-inner,
  .featurette-even:hover .featurette-image-tilt-inner {
    transform: none !important;
  }
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 90%;
  background: var(--hero-primary-gradient);
  border-radius: var(--border-radius-large);
  z-index: 1;
}

.animated-gradient {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #007bff, #0056b3, #17a2b8, #138496);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  opacity: 0.1;
  border-radius: inherit;
  overflow: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-left: 1.5rem;
  padding-right: 1rem;
}

/* Override Bootstrap padding to reduce hero section height */
.hero-content .row {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

@media (max-width: 992px) {
  .hero-content {
    padding-left: 1rem;
    padding-right: 0.75rem;
  }
}

@media (max-width: 768px) {
  .hero-content {
    padding-left: 0.75rem;
    padding-right: 0.5rem;
  }
}

/* Enhanced Typography Hierarchy */
.hero-title {
  font-size: 3rem; /* Reduced from 3.5rem for better readability */
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  padding-left: 0.5rem;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem; /* Better mobile experience */
  }
}

.gradient-text {
  background: var(--hero-secondary-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
  display: block;
  font-size: 1.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.5rem;
}

.hero-subtitle {
  display: block;
  font-size: 1.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.5rem;
  padding-left: 0.5rem;
}

.hero-description {
  font-size: 1.15rem; /* Slightly reduced for better readability */
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  line-height: 1.6;
  padding-left: 0.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  padding-left: 0.5rem;
}

.hero-cta {
  background: var(--cta-gradient);
  border: none;
  padding: 1rem 2.5rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: var(--border-radius-pill);
}

.hero-cta:hover {
  transform: var(--hover-transform);
  box-shadow: 0 15px 40px rgba(40, 167, 69, 0.4);
  text-decoration: none;
}


/* Optimized Cyberpunk GPT Badge */
.gpt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gpt-gradient);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-pill);
  backdrop-filter: blur(10px);
  border: 2px solid #ff006e;
  transition: all 0.3s ease;
  animation: cyberpunkGlow 3s ease-in-out infinite alternate;
  text-align: center;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px; /* Reduced for better readability */
  box-shadow: 0 0 20px rgba(255, 0, 110, 0.4);
  will-change: box-shadow, transform; /* Performance optimization */
}

.gpt-badge i {
  font-size: 1.3rem;
  animation: cyberpunkBolt 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px #ff006e);
  color: #ffbe0b;
  will-change: transform, filter; /* Performance optimization */
}

.gpt-badge:hover {
  transform: translateY(-3px);
  border-color: #ffbe0b;
  box-shadow:
    0 0 15px #ff006e,
    0 0 25px #8338ec,
    0 0 35px #3a86ff,
    0 0 45px #ffbe0b,
    inset 0 0 25px rgba(255, 190, 11, 0.3);
  background: linear-gradient(135deg, #ff006e, #8338ec, #3a86ff, #ffbe0b);
}

/* Optimized Cyberpunk Animations */
@keyframes cyberpunkGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(131, 56, 236, 0.6);
  }
}

@keyframes cyberpunkBolt {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px #ff006e);
  }
  50% {
    transform: scale(1.05); /* Reduced scale for subtlety */
    filter: drop-shadow(0 0 12px #8338ec); /* Reduced shadow intensity */
  }
}

/* Reduced motion support for cyberpunk badge */
@media (prefers-reduced-motion: reduce) {
  .gpt-badge,
  .gpt-badge i {
    animation: none !important;
  }

  .gpt-badge:hover {
    transform: none;
  }
}

/* Hero Image Container with Tilt Effect */
.hero-image-container {
  perspective: 1000px;
  transition: transform 0.3s ease;
}

.hero-image {
  position: relative;
  overflow: hidden;
  margin: -60px 0;
  transform: scale(1.08) translateX(100px);
  opacity: 0;
  border-radius: 20px;
  transition: transform 0.3s ease, opacity 0.8s ease, transform 0.8s ease;
}

.hero-image.fade-in {
  transform: scale(1.08) translateX(0);
  opacity: 1;
}

.hero-image:hover {
  transform: scale(1.08) translateX(0) rotateZ(-2deg) rotateY(5deg);
}

/* Middle mode specific adjustments */
@media (max-width: 992px) {
  .hero-content {
    padding-left: 1rem;
    padding-right: 0.75rem;
  }

  .hero-image {
    margin-top: 20px;
    margin-bottom: 20px;
    max-height: 580px;
    object-fit: contain;
  }

  .hero-section {
    min-height: 20vh;
  }

  }

/* Hero Responsive */
@media (max-width: 768px) {
  .hero-section { min-height: 18vh; border-radius: 20px; }
  .subtitle { font-size: 1.3rem; }
  .hero-description { font-size: 1rem; margin-bottom: 1.5rem; padding-left: 0; }
  .hero-buttons { flex-direction: column; gap: 0.8rem; padding-left: 0; }
  .hero-subtitle { padding-left: 0; }
  
  /* Reduce marketing section padding on mobile */
  .marketing {
    padding: 2rem 0 !important;
  }
}


/* Section Spacing System */
.section-hero {
    padding: 4rem 0;
}

.section-features {
    padding: 3rem 0;
}

.section-tight {
    padding: 2rem 0;
}

.section-compact {
    padding: 1rem 0;
}

/* Featurettes - Improved Spacing */
.marketing {
    padding: 3rem 0;
}

.featurette {
    margin-bottom: 4rem;
}

.featurette:last-child {
    margin-bottom: 2rem;
}

.featurette-divider {
    margin: 3rem 0;
}

/* Buttons & CTAs - Consolidated Button Styles */
.btn-primary,
.btn-outline-light,
.btn-warning {
    padding: 0.9rem 2.2rem;
    font-weight: 600;
    border-radius: 50px;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-primary {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
    background-color: #0069d9;
}

.btn-outline-light {
    border-width: 2px;
}

.btn-outline-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-warning {
    border: none;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
}

/* Responsive Improvements */
@media (max-width: 992px) {
    .hero-background {
        height: 100%;
    }
}

@media (max-width: 768px) {
    .marketing {
        padding: 2rem 0;
    }

    .featurette-divider {
        margin: 2rem 0;
    }
}


/* Hero Section Entrance Animations */
.hero-title {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInDown 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInDown 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-description {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-buttons {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.8s;
}


/* Entrance Animation Keyframes */
@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero elements will be visible on page load */
.hero-title,
.hero-subtitle,
.hero-description,
.hero-buttons,
.hero-image {
    animation-fill-mode: forwards;
}

/* Gradient Backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Section Spacing */
.section-padding {
    padding: 5rem 0;
}

/* Modern Card Styles */
.modern-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: none;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* float animation moved to top level - removing duplicate */

.float-animation {
    animation: float 4s ease-in-out infinite;
}

/* Text Styles */
.text-gradient {
    background: linear-gradient(90deg, #007bff, #00bfff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* Image Hover Effects */
.image-container {
    position: relative;
    overflow: hidden;
}

.image-container img {
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.image-container:hover img {
    transform: scale(1.05);
}

.image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container:hover::before {
    opacity: 1;
}


/* Icon Styles */
.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #00bfff);
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}



/* Enhanced FAQ Section */
.faq-section {
    padding: 4rem 0; /* Reduced from 5rem */
    background-color: #fff;
}

.faq-section .featurette-heading {
    position: relative;
    margin-bottom: 2.5rem; /* Reduced from 3rem */
    font-size: 2.2rem; /* Better hierarchy */
    font-weight: 700;
}

.faq-section .featurette-heading:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #00bfff);
    margin: 1.2rem auto;
    border-radius: 2px;
}

.accordion-item {
    border: 1px solid #e9ecef;
    border-radius: 15px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-bottom: 1rem; /* Better spacing between items */
}

.accordion-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px); /* Reduced movement for subtlety */
}

.accordion-button {
    padding: 1.25rem 1.5rem; /* Slightly reduced padding */
    font-size: 1.05rem; /* Slightly reduced for readability */
    border-radius: 15px;
    background-color: #f8f9fa;
    color: #212529;
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    color: #007bff;
    background-color: #f8f9fa;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.accordion-button:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

.accordion-button::after {
    width: 1.25rem; /* Slightly reduced */
    height: 1.25rem;
    background-size: 1.25rem;
}

.accordion-body {
    padding: 1.25rem 1.5rem; /* Reduced for better spacing */
    line-height: 1.7;
    color: #555;
    font-size: 1rem; /* Better readability */
}

/* Enhanced CTA Section */
.cta-section {
    background: linear-gradient(135deg, #007bff, #00bfff);
    color: white;
    padding: 4rem 0; /* Reduced from 5rem */
    border-radius: 20px;
    text-align: center;
    margin: 4rem 0; /* Reduced from 5rem */
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.2); /* Added depth */
}

.cta-heading {
    font-size: 2.2rem; /* Reduced for better readability */
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cta-subheading {
    font-size: 1.15rem; /* Slightly reduced */
    max-width: 700px;
    margin: 0 auto 2.5rem;
    opacity: 0.95; /* Slightly increased contrast */
    line-height: 1.6;
}

/* AI Guided Writing Chat Mockup */
.chat-mockup-container {
    width: 100%;
    margin: 0 auto;
}

.chat-window-mockup {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: white;
    height: 450px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: #f8f9fa;
    color: #212529;
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.chat-messages-mockup {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message-mockup {
    display: flex;
    gap: 8px;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.chat-message-mockup.ai {
    flex-direction: row;
}

.chat-message-mockup.user {
    flex-direction: row-reverse;
}

.message-avatar-mockup {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.message-avatar-mockup.ai {
    background: #6c757d;
    color: white;
}

.message-avatar-mockup.user {
    background: #007bff;
    color: white;
}

.message-content-mockup {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-content-mockup.ai {
    background: white;
    border-bottom-left-radius: 4px;
}

.message-content-mockup.user {
    background: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing indicator animation */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #6c757d;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Pending message styling */
.chat-message-mockup.pending {
    opacity: 0;
}

.chat-message-mockup.typing {
    opacity: 1;
}

.typing-indicator-mockup {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: white;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 70%;
}

/* Footer Improvements */
footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 2rem 0 !important;
    margin-top: 3rem !important;
}

/* Chat Header Center Alignment */
.chat-header {
    justify-content: center !important;
}

/* Exercise Featurette Styles */
.exercise-dashboard-mockup {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    min-height: 450px;
    transition: all 0.3s ease;
}

.exercise-dashboard-mockup:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.exercise-interface {
    position: relative;
}

.exercise-section.active {
    opacity: 1;
    transform: translateY(0);
}

.exercise-header {
    text-align: center;
    animation: slideInDown 0.6s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-card {
    opacity: 1;
    transform: translateX(0);
}

.question-card .card {
    background: white;
}

.question-tutor-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}


.exercise-benefits {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #007bff;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    transform: translateX(5px);
    color: #007bff;
}

.benefit-item i {
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Custom spinner for exercise loading */
.custom-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Fade in animation for exercise sections */
.exercise-dashboard-mockup.fade-in .exercise-section.active {
    animation: fadeInUp 0.6s ease forwards;
}

/* Featurette Fade-in Animations */
.featurette {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.featurette.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations for featurette content */
.featurette .col-md-7:first-child,
.featurette .col-md-5:first-child {
    transition-delay: 0.1s;
}

.featurette .col-md-7:last-child,
.featurette .col-md-5:last-child {
    transition-delay: 0.3s;
}

/* FAQ Section fade-in */
.faq-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.faq-section.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* CTA Section fade-in */
.cta-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cta-section.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced keyframes with better easing */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .exercise-dashboard-mockup {
        padding: 1.5rem;
        min-height: 400px;
    }

    
    .question-card {
        margin-bottom: 1rem;
    }

    .benefit-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .benefit-item i {
        margin-bottom: 4px;
    }
}