/**
 * Components Styles - Reusable UI Components
 * Using Education Trust Color Palette
 * Works with site.css and blog-post.css
 */

/* ====================================
   CALL TO ACTION COMPONENTS
   ==================================== */

/* CTA Section Container */
.cta-section {
    background-color: var(--bg-light);
    position: relative;
    padding: 4rem 0;
}

/* CTA Card - Enhanced with new color palette */
.cta-card {
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
 var(--primary-hover) 50%,
        var(--premium-color) 100%
    );
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    color: var(--text-white);
    box-shadow: var(--box-shadow-xl);
    position: relative;
}

.cta-card::before {
    content: "";
    position: absolute;
    top: 0;
right: 0;
    bottom: 0;
    left: 0;
    background-image: url('/images/cta-pattern.svg');
    background-size: cover;
    opacity: 0.1;
    pointer-events: none;
}

/* CTA Content */
.cta-content {
 position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.cta-content p {
    opacity: 0.9;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* CTA Form Elements */
.cta-form .form-control {
    border: 2px solid transparent;
    background-color: var(--bg-white);
    box-shadow: var(--box-shadow-sm);
    transition: all var(--transition-fast);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
}

.cta-form .form-control:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3), var(--box-shadow-md);
 border-color: var(--accent-light);
  outline: none;
}

.cta-form .form-control::placeholder {
    color: var(--text-muted);
}

.cta-form .form-check-input:checked {
    background-color: var(--bg-white);
    border-color: var(--bg-white);
}

.cta-form .form-check-label {
    color: var(--text-white);
    opacity: 0.9;
}

.cta-form .form-check-label a {
 color: var(--text-white);
    text-decoration: underline;
    font-weight: 500;
    transition: opacity var(--transition-fast);
}

.cta-form .form-check-label a:hover {
    opacity: 0.8;
}

.cta-form .btn {
padding: 0.75rem 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all var(--transition-speed);
}

.cta-form .btn:hover {
    transform: translateY(-2px);
 box-shadow: var(--box-shadow-lg);
}

/* CTA Image */
.cta-image {
  height: 100%;
    display: flex;
    align-items: center;
  justify-content: center;
    padding: 2rem;
  position: relative;
}

.cta-image img {
    max-height: 300px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    transition: transform var(--transition-speed);
}

.cta-image:hover img {
    transform: scale(1.05) rotate(2deg);
}

/* ====================================
   STATS & FEATURES COMPONENTS
   ==================================== */

/* Stats Section */
.stats-section {
    padding: 4rem 0;
    background-color: var(--bg-white);
}

/* Stats Card */
.stats-card {
    padding: 2rem 1.5rem;
    text-align: center;
    background-color: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-sm);
    border: 1px solid var(--border-light);
    height: 100%;
    transition: all var(--transition-speed);
    position: relative;
  overflow: hidden;
}

.stats-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
   var(--primary-color), 
        var(--premium-color)
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-speed);
}

.stats-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--primary-light);
}

.stats-card:hover::before {
    transform: scaleX(1);
}

/* Stats Icon */
.stats-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.1) 0%, 
    rgba(139, 92, 246, 0.1) 100%
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    transition: all var(--transition-speed);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.stats-card:hover .stats-icon {
  background: linear-gradient(135deg, 
        var(--primary-color), 
        var(--premium-color)
    );
    color: var(--text-white);
    transform: scale(1.1) rotate(5deg);
}

/* Stats Number */
.stats-number {
font-size: 2.5rem;
    font-weight: 700;
  background: linear-gradient(135deg, 
        var(--primary-color), 
 var(--premium-color)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
}

/* Stats Label */
.stats-label {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ====================================
   CATEGORY CARDS
   ==================================== */

/* Category Section */
.category-section {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

/* Category Card */
.category-card {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    margin-bottom: 1.5rem;
    height: 220px;
    text-decoration: none;
    box-shadow: var(--box-shadow-sm);
    transition: all var(--transition-speed);
    border: 1px solid var(--border-light);
}

.category-card:hover {
    box-shadow: var(--box-shadow-xl);
    transform: translateY(-5px);
}

/* Category Image */
.category-card img {
width: 100%;
    height: 100%;
    object-fit: cover;
  transition: transform var(--transition-slow);
}

.category-card:hover img {
    transform: scale(1.1);
}

/* Category Overlay */
.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
 right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
     rgba(31, 41, 55, 0.3) 0%, 
        rgba(31, 41, 55, 0.8) 100%
    );
  display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    transition: background var(--transition-speed);
}

.category-card:hover .category-overlay {
    background: linear-gradient(to bottom, 
        rgba(37, 99, 235, 0.5) 0%, 
        rgba(37, 99, 235, 0.9) 100%
    );
}

/* Category Name */
.category-name {
    color: var(--text-white);
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Category Count */
.category-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.category-count::before {
    content: "??";
    margin-right: 0.5rem;
}

/* ====================================
   FEATURE CARDS
 ==================================== */

/* Feature Card */
.feature-card {
    padding: 2rem;
    background-color: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition-speed);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
      var(--primary-color), 
   var(--secondary-color)
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-speed);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--primary-light);
}

.feature-card:hover::after {
    transform: scaleX(1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, 
        var(--primary-color), 
        var(--primary-light)
    );
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--text-white);
    margin-bottom: 1.5rem;
    transition: transform var(--transition-speed);
}

.feature-card:hover .feature-icon {
 transform: scale(1.1) rotate(5deg);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
 color: var(--text-dark);
margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}

.feature-description {
    color: var(--text-medium);
    line-height: 1.6;
}

/* ====================================
   PRICE COMPARISON COMPONENTS
   ==================================== */

/* Price Best */
.price-best {
    color: var(--success-color);
    font-weight: 700;
}

.price-good {
    color: var(--secondary-color);
    font-weight: 600;
}

.price-average {
    color: var(--text-medium);
    font-weight: 500;
}

.price-high {
    color: var(--warning-color);
    font-weight: 600;
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

@media (max-width: 991px) {
    .stats-section {
   padding: 3rem 0;
    }
    
    .category-section {
        padding: 3rem 0;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    .stats-number {
   font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .stats-card {
        padding: 1.5rem 1rem;
 margin-bottom: 1.5rem;
    }
    
    .category-card {
        height: 180px;
    }
 
    .stats-icon {
        width: 60px;
        height: 60px;
    font-size: 1.5rem;
    }
    
    .stats-number {
        font-size: 1.75rem;
    }
    
    .cta-image {
        padding: 1rem;
    }
    
    .cta-image img {
        max-height: 200px;
    }
    
    .feature-card {
        padding: 1.5rem;
  margin-bottom: 1.5rem;
    }
}

/* ====================================
   UTILITY CLASSES
   ==================================== */

/* Gradient Text */
.text-gradient-primary {
    background: linear-gradient(90deg, 
   var(--primary-color), 
        var(--primary-light)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-secondary {
    background: linear-gradient(90deg, 
    var(--secondary-color), 
        var(--secondary-light)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-premium {
    background: linear-gradient(90deg, 
  var(--premium-color), 
 var(--premium-light)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, 
  var(--primary-color), 
        var(--primary-light)
    );
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, 
  var(--secondary-color), 
        var(--secondary-light)
    );
}

.bg-gradient-premium {
    background: linear-gradient(135deg, 
        var(--premium-color), 
        var(--premium-light)
    );
}
