/* ===== COMPONENT STYLES ===== */

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Form States */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--bg-gray);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 122, 44, 0.1);
}

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

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

.form-error {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.form-input.error + .form-error {
    display: block;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-white);
    color: var(--text-primary);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    border-left: 4px solid var(--primary-color);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 10000;
    max-width: 300px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

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

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast.info {
    border-left-color: var(--info-color);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    font-size: 18px;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    width: 90%;
    max-width: 500px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-gray);
}

.modal-close i {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Card Hover Effects */
.card-hover {
    transition: var(--transition);
}

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

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    aspect-ratio: 1;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Testimonials */
.testimonial-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    text-align: center;
    position: relative;
}

.testimonial-quote {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.testimonial-author {
    font-weight: 600;
    color: var(--text-primary);
}

.testimonial-role {
    font-size: 0.9rem;
    color: var(--text-light);
}

.testimonial-rating {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 20px;
}

.star {
    color: #ffc107;
    font-size: 18px;
}

/* Progress Bars */
.progress-bar {
    background: var(--bg-gray);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
}

/* Accordion */
.accordion {
    border: 1px solid var(--bg-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--bg-gray);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    background: var(--bg-light);
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.accordion-header:hover {
    background: var(--bg-gray);
}

.accordion-title {
    font-weight: 600;
    margin: 0;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content-inner {
    padding: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.accordion-item.active .accordion-content {
    max-height: 200px;
}

/* Tabs */
.tabs {
    border-bottom: 1px solid var(--bg-gray);
}

.tab-nav {
    display: flex;
    gap: 0;
    list-style: none;
}

.tab-button {
    padding: 15px 25px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

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

.tab-content {
    padding: 30px 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 15px;
    letter-spacing: 0.5px;
}

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

.badge-success {
    background: var(--success-color);
    color: var(--text-white);
}

.badge-warning {
    background: var(--warning-color);
    color: var(--text-primary);
}

.badge-danger {
    background: var(--danger-color);
    color: var(--text-white);
}

.badge-info {
    background: var(--info-color);
    color: var(--text-white);
}

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

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--bg-dark);
    color: var(--text-white);
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--bg-dark) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0, 0, 0); }
    40%, 43% { transform: translate3d(0, -30px, 0); }
    70% { transform: translate3d(0, -15px, 0); }
    90% { transform: translate3d(0, -4px, 0); }
}

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

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

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

/* Animation Classes */
.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-slide-up {
    animation: slideInUp 0.6s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease-out;
}

/* Print Styles */
@media print {
    .header, .footer, .scroll-to-top, .modal {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .hero, .about, .services, .contacts {
        padding: 20pt 0;
    }
    
    .section-title {
        font-size: 18pt;
        margin-bottom: 10pt;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline;
    }
}