/* Button Components */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.5;
    user-select: none;
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #3bc016;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(75, 224, 29, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #c7c419;
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(221, 224, 29, 0.3);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

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

.btn-outline-secondary:hover {
    background: var(--secondary-color);
    color: var(--text-dark);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Form Components */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(75, 224, 29, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    margin: 0;
    flex-shrink: 0;
}

.form-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-success {
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.input-error {
    border-color: #dc3545;
}

.input-error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Multi-step Form */
.multi-step-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: slideInUp 0.3s ease;
}

.form-step h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.step-number {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
}

/* Steps Components */
.steps-container {
    max-width: 800px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.step-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.step-content p {
    color: var(--text-light);
    margin: 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step-icon {
    position: relative;
    margin-bottom: 1rem;
}

.step-icon img {
    width: 60px;
    height: 60px;
}

/* Filter Components */
.recipe-filters {
    background: var(--background-gray);
    padding: 2rem 0;
}

.filters-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Recipe Card Detailed */
.recipe-card-detailed {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
}

.recipe-card-detailed:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.recipe-card-detailed img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.recipe-content > p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.recipe-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.recipe-ingredients,
.recipe-instructions {
    margin-bottom: 1.5rem;
}

.recipe-ingredients h4,
.recipe-instructions h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.recipe-ingredients ul,
.recipe-instructions ol {
    margin: 0;
    padding-left: 1.5rem;
}

.recipe-ingredients li,
.recipe-instructions li {
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.recipe-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.stars {
    color: #ffc107;
}

.rating-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Review Components */
.review-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
}

.review-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
}

.review-content h4 {
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.review-rating {
    color: #ffc107;
    margin-bottom: 0.5rem;
}

.review-content p {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.review-recipe {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Pricing Components */
.pricing-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.pricing-card.popular {
    transform: scale(1.05);
    border: 2px solid var(--primary-color);
}

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

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-5px);
}

.popular-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem;
    font-size: 0.875rem;
    font-weight: bold;
}

.pricing-header {
    margin-bottom: 2rem;
}

.pricing-header h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.amount {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.currency {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.period {
    color: var(--text-muted);
    font-size: 1rem;
}

.features-list {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
}

.features-list li {
    padding: 0.5rem 0;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
}

.features-list li:last-child {
    border-bottom: none;
}

.selected-plan {
    background: var(--background-gray);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.selected-plan h4 {
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.plan-price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.125rem;
    margin: 0;
}

/* Benefits Detailed */
.benefits-detailed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.benefit-detailed {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.benefit-detailed:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.benefit-detailed img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.benefit-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.benefit-content ul {
    margin: 0;
    padding-left: 1.5rem;
}

.benefit-content li {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* Newsletter Component */
.newsletter-section {
    background: var(--primary-color);
    color: white;
    text-align: center;
}

.newsletter-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.newsletter-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    border: none;
    border-radius: var(--border-radius);
}

.newsletter-form .btn {
    flex-shrink: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* How it Works */
.how-it-works {
    background: var(--background-gray);
}

/* Subscription Benefits */
.subscription-benefits {
    background: var(--background-light);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Alert Components */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Progress Indicators */
.progress {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-dark);
    color: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}
