/* Components - Reusable UI Components */

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
    line-height: 1;
}

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

.btn--primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 83, 17, 0.3);
}

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

.btn--secondary:hover {
    background-color: var(--text-dark);
    color: var(--bg-white);
    box-shadow: 0 10px 25px rgba(17, 17, 17, 0.3);
}

.btn--large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

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

/* Badge */
.badge {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.badge i {
    color: var(--primary-color);
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
}

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

/* Portfolio Cards */
.portfolio-preview__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
}

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

.portfolio-card__image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-card:hover .portfolio-card__image {
    transform: scale(1.05);
}

.portfolio-card__content {
    padding: 1.5rem;
}

.portfolio-card__title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.portfolio-card__description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* Service Cards */
.service-card {
    background: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-large);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

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

.service-card__icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.service-card__title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card__description {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Blog Cards */
.blog-preview__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

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

.blog-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card__content {
    padding: 2rem;
}

.blog-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.blog-card__category {
    background: var(--primary-color);
    color: var(--bg-white);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-card__title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--text-dark);
}

.blog-card__excerpt {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.blog-card__link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.blog-card__link:hover {
    color: var(--primary-dark);
    gap: 0.8rem;
}

/* Stat Items */
.stat-item {
    text-align: center;
    padding: 1rem;
    border-radius: var(--border-radius);
    background: rgba(255,255,255,0.1);
}

.stat-item__number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    line-height: 1;
}

.stat-item__label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__content {
    background-color: var(--bg-white);
    margin: 2% auto;
    padding: 0;
    border-radius: var(--border-radius-large);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    position: relative;
    animation: slideDown 0.3s ease;
    box-shadow: var(--shadow-heavy);
    display: flex;
    flex-direction: column;
}

.modal__header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal__title {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 600;
}

.modal__close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    line-height: 1;
    padding: 0.2rem;
}

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

.modal__body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

/* Payment Methods */
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-method {
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #fafafa;
}

.payment-method:hover,
.payment-method.selected {
    border-color: var(--primary-color);
    background: var(--bg-white);
}

.payment-method i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.payment-method h4 {
    margin: 0.3rem 0;
    color: var(--text-dark);
    font-size: 1rem;
}

.payment-method p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Payment Details */
.payment-details {
    background: var(--bg-gray);
    border-radius: var(--border-radius);
    padding: 1.2rem;
    margin-top: 1rem;
    display: none;
}

.payment-details.show {
    display: block;
}

.payment-details h4 {
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    text-align: center;
}

.payment-details ol {
    margin: 0.8rem 0;
    padding-left: 1.2rem;
    line-height: 1.5;
}

.payment-details li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.payment-details strong {
    color: var(--primary-color);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    background: var(--bg-gray);
    color: var(--text-dark);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(255, 83, 17, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Loading States */
.loading {
    opacity: 0.7;
    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(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #cc2d00;
        --text-light: #333333;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}