/**
 * Component-specific styles for Medical Aesthetics Website
 * Dr. Hamza Gemici
 */

/* About Section Styles */
.about-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
}

.stat-item h4 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.service-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition-medium);
    position: relative;
}

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

.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-content {
    padding: 1.5rem;
}

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

.service-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.service-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition-medium);
}

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

.before-after {
    display: flex;
    height: 250px;
}

.before,
.after {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.before img,
.after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-medium);
}

.before img:hover,
.after img:hover {
    transform: scale(1.05);
}

.before .label,
.after .label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.gallery-item h4 {
    padding: 1rem 1rem 0.5rem;
    margin: 0;
    font-size: 1.125rem;
}

.gallery-item p {
    padding: 0 1rem 1rem;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.gallery-placeholder {
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    border: 2px dashed var(--border-color);
}

.placeholder-content h4 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.placeholder-content p {
    color: var(--text-secondary);
    font-style: italic;
}

/* Contact Form */
.contact-info {
    padding-right: 2rem;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.contact-item p {
    margin: 0;
    color: var(--text-primary);
}

.contact-item a {
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.contact-item a:hover {
    color: var(--primary-color);
}

.contact-form-container {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.appointment-fields {
    background: rgba(44, 90, 160, 0.05);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

/* Footer Styles */
.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
}

.footer ul li a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-links h6 {
    margin-bottom: 0.5rem;
    color: white;
}

.social-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
}

.social-links a:hover {
    color: white;
    transform: translateX(5px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .about-stats {
        justify-content: space-around;
    }

    .stat-item h4 {
        font-size: 1.5rem;
    }

    .services-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .before-after {
        flex-direction: column;
        height: auto;
    }

    .before,
    .after {
        height: 200px;
    }

    .contact-info {
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .contact-form-container {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .about-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .service-content,
    .gallery-item h4,
    .gallery-item p {
        padding: 1rem;
    }

    .contact-form-container {
        padding: 1rem;
    }
}

/* 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(--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); }
}

/* 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 states */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus,
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.25);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card,
    .service-card,
    .gallery-item {
        border: 2px solid var(--text-primary);
    }

    .btn {
        border: 2px solid currentColor;
    }
}

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

    .hero {
        scroll-behavior: auto;
    }
}