/* Enhanced Contact Section */
.contact {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 1024px) {
    .contact-content {
        grid-template-columns: 2fr 3fr;
    }
}

/* Contact Cards */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .contact-info {
        grid-template-columns: 1fr;
    }
}

.contact-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: var(--transition);
    border: 1px solid transparent;
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.contact-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--background-light);
}

.contact-card-header i {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.contact-card-body {
    padding: 0.5rem 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--background-light);
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.125rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.contact-value {
    color: var(--text-color);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.contact-value:hover {
    color: var(--primary-color);
}

.working-hours .day {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.working-hours .day:last-child {
    border-bottom: none;
}

.working-hours .time {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9375rem;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    margin-top: 1rem;
    width: 100%;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Contact Form */
.contact-form-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    grid-column: span 2;
}

@media (min-width: 1024px) {
    .contact-form-container {
        grid-column: span 1;
    }
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--background-light);
}

.form-header h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-light);
    font-size: 0.9375rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9375rem;
}

.input-with-icon,
.textarea-with-icon {
    position: relative;
}

.input-with-icon i,
.textarea-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.125rem;
    z-index: 1;
}

.textarea-with-icon i {
    top: 1.5rem;
    transform: none;
}

.input-with-icon input,
.input-with-icon select,
.textarea-with-icon textarea {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-color);
    font-family: inherit;
}

.textarea-with-icon textarea {
    padding: 1rem 1rem 1rem 3rem;
    min-height: 150px;
    resize: vertical;
}

.input-with-icon input:focus,
.input-with-icon select:focus,
.textarea-with-icon textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(51, 132, 167, 0.1);
    background: white;
}

.input-with-icon input:focus + i,
.textarea-with-icon textarea:focus + i {
    color: var(--primary-color);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 3rem;
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error-color);
    background: rgba(220, 53, 69, 0.05);
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-submit {
    position: relative;
    min-height: 48px;
    font-size: 1.125rem;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.btn-submit .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-submit.loading .spinner {
    display: block;
}

.btn-submit.loading .btn-text {
    opacity: 0.7;
}

.form-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.form-note i {
    color: var(--primary-color);
}

/* Form Success State */
.form-success {
    display: none;
    text-align: center;
    padding: 3rem 1rem;
}

.form-success.active {
    display: block;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon i {
    color: white;
    font-size: 2.5rem;
}

.form-success h4 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.form-success p {
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Map Section */
.contact-map {
    grid-column: span 2;
}

@media (min-width: 1024px) {
    .contact-map {
        grid-column: span 3;
    }
}

.map-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.map-header h3 {
    color: var(--text-color);
    font-size: 1.25rem;
}

.map-controls {
    display: flex;
    gap: 0.5rem;
}

.map-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
}

.map-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.map-wrapper {
    position: relative;
    height: 400px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.map-overlay {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 1rem;
    max-width: 250px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.overlay-content h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.overlay-content p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Social Media Section */
.contact-social {
    grid-column: span 2;
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

@media (min-width: 1024px) {
    .contact-social {
        grid-column: span 3;
    }
}

.social-header {
    margin-bottom: 2rem;
}

.social-header h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.social-header p {
    color: var(--text-light);
    max-width: 400px;
    margin: 0 auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    min-width: 140px;
    justify-content: center;
}

.social-link.facebook {
    background: #1877f2;
    color: white;
}

.social-link.whatsapp {
    background: #25d366;
    color: white;
}

.social-link.instagram {
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
    color: white;
}

.social-link.email {
    background: var(--primary-color);
    color: white;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Footer Enhancements */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-brand .logo {
    width: 50px;
    height: 50px;
}

.footer-newsletter {
    margin-top: 1.5rem;
}

.footer-newsletter h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.newsletter-form .input-group {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--secondary-color);
}

.footer-services {
    list-style: none;
}

.footer-services li {
    margin-bottom: 0.5rem;
}

.footer-services a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-services a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-info li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-info i {
    color: var(--primary-color);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: white;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Enhanced Hero Section */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-features .feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-down {
    color: white;
    font-size: 2rem;
    animation: bounce 2s infinite;
    display: block;
    text-decoration: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Products Filter */
.products-filter {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-color);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Testimonials */
.testimonials {
    background: var(--background-light);
}

.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.testimonial-content {
    position: relative;
    padding: 1rem 0 1rem 2rem;
}

.testimonial-content i {
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    opacity: 0.3;
    font-size: 2rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.author-info h4 {
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.author-info span {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .contact-map,
    .contact-social,
    .contact-form-container {
        grid-column: span 1;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-link {
        min-width: calc(50% - 1rem);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
    }
    
    .whatsapp-float {
        bottom: 5rem;
        left: 1rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .social-link {
        min-width: 100%;
    }
    
    .map-overlay {
        position: relative;
        bottom: 0;
        right: 0;
        max-width: 100%;
        margin-top: 1rem;
    }
}

/* RTL Support Enhancements */
[dir="rtl"] .input-with-icon i,
[dir="rtl"] .textarea-with-icon i {
    left: auto;
    right: 1rem;
}

[dir="rtl"] .input-with-icon input,
[dir="rtl"] .input-with-icon select,
[dir="rtl"] .textarea-with-icon textarea {
    padding: 0.875rem 3rem 0.875rem 1rem;
}

[dir="rtl"] select {
    background-position: left 1rem center;
    padding-right: 1rem;
    padding-left: 3rem;
}

[dir="rtl"] .whatsapp-float {
    left: auto;
    right: 1rem;
}

[dir="rtl"] .back-to-top {
    left: 1rem;
    right: auto;
}

[dir="rtl"] .footer-services a:hover {
    transform: translateX(-5px);
}