/* Font display optimization */
@font-face {
    font-family: 'Assistant';
    font-display: swap;
    font-weight: 300 700;
    src: url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;600;700&display=swap');
}

/* Font Awesome font display optimization */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/webfonts/fa-solid-900.woff2') format('woff2');
    font-weight: 900;
    unicode-range: U+F000-F2E0;
}

@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/webfonts/fa-brands-400.woff2') format('woff2');
    font-weight: 400;
    unicode-range: U+F000-F2E0;
}

/* Additional font display optimization */
@font-face {
    font-family: 'Assistant';
    font-display: swap;
    font-weight: 300 700;
    src: url('https://fonts.gstatic.com/s/assistant/v18/2sDcZGJYnIiXHfkls6wDvwJ2xzS2_3O9.woff2') format('woff2');
}

/* Font Awesome font display optimization with preload */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/webfonts/fa-solid-900.woff2') format('woff2');
    font-weight: 900;
    unicode-range: U+F000-F2E0;
}

@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/webfonts/fa-brands-400.woff2') format('woff2');
    font-weight: 400;
    unicode-range: U+F000-F2E0;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    contain: layout;
}

body {
    font-family: 'Assistant', Arial, sans-serif;
    line-height: 1.7;
    color: #2c3e50;
    direction: rtl;
    text-align: right;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    contain: layout;
    will-change: auto;
    overflow-x: hidden;
}

/* body.loaded removed to prevent Layout Shift */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    contain: layout;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(44, 62, 80, 0.1);
    contain: layout;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo h1 {
    color: #2c5aa0;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #2c5aa0;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 120px 0 80px;
    display: flex;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    contain: layout;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    flex: 1;
    padding: 0 20px;
    contain: layout;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    height: 7.2rem; /* Fixed height instead of min-height */
    contain: layout;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transform: translateZ(0);
    backface-visibility: hidden;
    overflow: hidden;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    contain: layout;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.hero-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    contain: layout;
    min-height: 3rem;
}

.hero-locations span {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.cta-button {
    display: inline-block;
    background: #ff6b6b;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

.cta-button:hover {
    background: #ff5252;
}

.hero-image {
    flex: 1;
    text-align: center;
    contain: layout;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    cursor: default;
    pointer-events: none;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    contain: layout;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c5aa0;
    contain: layout;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    contain: layout;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    contain: layout;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.service-icon {
    font-size: 3rem;
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.service-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.service-features li {
    color: #2c5aa0;
    font-weight: 500;
    margin-bottom: 0.5rem;
    position: relative;
    padding-right: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    right: 0;
    top: 0;
    color: #28a745;
    font-weight: bold;
}

/* About Section */
.about {
    padding: 80px 0;
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #2c5aa0;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #666;
}

.about-features {
    margin-top: 2rem;
    contain: layout;
}

.feature {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.feature i {
    color: #4CAF50;
    margin-left: 1rem;
    font-size: 1.2rem;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* FAQ Section */
.faq {
    padding: 80px 0;
    background: white;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.faq-item {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-right: 4px solid #2c5aa0;
    contain: layout;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.faq-item h3 {
    color: #2c5aa0;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.faq-item p {
    color: #495057;
    line-height: 1.7;
    font-size: 1rem;
}

/* Gallery Section */
.gallery {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
    contain: layout;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: default;
    pointer-events: none;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #2c5aa0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.contact-item i {
    color: #2c5aa0;
    margin-left: 1rem;
    font-size: 1.3rem;
    width: 20px;
}

.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: 'Assistant', Arial, sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

.submit-btn {
    background: #2c5aa0;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background: #1e3d72;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
    color: #bdc3c7;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 100px 0 60px;
        contain: layout;
    }
    
    .hero-title {
        font-size: 2.2rem;
        height: 5.3rem; /* Fixed height for mobile */
        contain: layout;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        contain: layout;
    }
    
    .hero-locations {
        justify-content: center;
        contain: layout;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        contain: layout;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        contain: layout;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        contain: layout;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        contain: layout;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        contain: layout;
    }
    
    .service-features {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* Animations disabled to prevent Layout Shift and Forced Reflow */

/* Loading States */
img {
    transition: opacity 0.3s ease;
    cursor: default;
    pointer-events: none;
    max-width: 100%;
    height: auto;
}

/* Prevent Layout Shift */
img[width][height] {
    aspect-ratio: attr(width) / attr(height);
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* 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 for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

/* Floating Action Buttons */
.floating-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-size: 24px;
    color: white;
    z-index: 1000;
    contain: layout;
}

/* WhatsApp button on the right */
.whatsapp-btn {
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #25D366, #128C7E);
}

/* Call button on the left */
.call-btn {
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, #2c5aa0, #1e3d72);
}



.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-tooltip {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Tooltip for left button (call) */
.call-btn .btn-tooltip {
    right: 70px;
}

.call-btn .btn-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #333;
}

/* Tooltip for right button (whatsapp) */
.whatsapp-btn .btn-tooltip {
    left: 70px;
}

.whatsapp-btn .btn-tooltip::after {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #333;
}

.floating-btn:hover .btn-tooltip {
    opacity: 1;
    visibility: visible;
}

/* WhatsApp Floating Window */
.whatsapp-modal {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 2000;
    display: none;
    animation: slideUpIn 0.3s ease;
    border: 1px solid #e0e0e0;
}

.whatsapp-modal.active {
    display: block;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-height: 500px;
    overflow-y: auto;
}

@keyframes slideUpIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 20px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.modal-body select,
.modal-body input,
.modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: 'Assistant', Arial, sans-serif;
}

.modal-body select:focus,
.modal-body input:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: #25D366;
}

.whatsapp-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.whatsapp-submit-btn:hover {
    background: linear-gradient(135deg, #128C7E, #25D366);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

/* Responsive Design for Floating Buttons */
@media (max-width: 768px) {
    .whatsapp-btn {
        bottom: 15px;
        right: 15px;
    }
    
    .call-btn {
        bottom: 15px;
        left: 15px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .call-btn .btn-tooltip {
        right: 60px;
    }
    
    .whatsapp-btn .btn-tooltip {
        left: 60px;
    }
    
    .btn-tooltip {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .whatsapp-modal {
        width: 90%;
        right: 5%;
        left: 5%;
        bottom: 80px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
}
