/* --- Google Font --- */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700&display=swap');

/* --- CSS Variables --- */
:root {
    --primary-color: #BD4E27;
    --secondary-color: #06517F;
    --light-color: #f4f4f4;
    --dark-color: #333;
    --white-color: #fff;
    --glass-bg: rgba(6, 81, 127, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.15);
    --font-family: 'Vazirmatn', sans-serif;
    --header-height: 90px;
}

/* --- Base Styles --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-family); line-height: 1.7; background-color: var(--white-color); color: var(--dark-color); direction: rtl; text-align: right; overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
p, .about-text p, .service-detail-text p, .project-content p, .modal-body p { text-align: justify; }
.section-padding { padding: 80px 0; }
.bg-light { background-color: #f9f9f9; }
.text-center { text-align: center; }
.mt-4 { margin-top: 4rem; }

/* --- Utility Classes --- */
.btn { display: inline-block; padding: 12px 30px; border-radius: 50px; font-weight: 700; transition: all 0.3s ease; cursor: pointer; border: none; font-size: 16px; font-family: var(--font-family); }
.btn-primary { background-color: var(--primary-color); color: var(--white-color); }
.btn-primary:hover { background-color: #a54422; transform: translateY(-3px); }
.btn-neon { position: relative; box-shadow: 0 0 5px var(--primary-color), 0 0 15px var(--primary-color), 0 0 25px var(--primary-color); animation: neon-pulse 1.5s infinite alternate; }
@keyframes neon-pulse { from { box-shadow: 0 0 5px var(--primary-color), 0 0 15px var(--primary-color), 0 0 25px var(--primary-color); } to { box-shadow: 0 0 10px var(--primary-color), 0 0 30px var(--primary-color), 0 0 50px var(--primary-color); } }
.btn-secondary { background-color: var(--secondary-color); color: var(--white-color); }
.btn-secondary:hover { background-color: #05436a; transform: translateY(-3px); }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 2.5rem; color: var(--secondary-color); margin-bottom: 10px; position: relative; display: inline-block; }
.section-title h2::after { content: ''; position: absolute; bottom: -10px; right: 50%; transform: translateX(50%); width: 80px; height: 4px; background-color: var(--primary-color); border-radius: 2px; }
.section-title p { font-size: 1.1rem; color: #666; max-width: 600px; margin: 0 auto; text-align: center; }

/* --- Animation Utility --- */
.hidden-animation { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.show-animation { opacity: 1; transform: translateY(0); }

/* --- Header & Navbar --- */
.header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background: var(--glass-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: var(--glass-border); transition: background-color 0.3s; }
.navbar { display: flex; justify-content: space-between; align-items: center; height: var(--header-height); }
.logo img { height: 70px; width: 70px; border-radius: 50%; border: 2px solid var(--primary-color); padding: 3px; background-color: var(--white-color); }
.nav-menu { display: flex; gap: 30px; }
.nav-link { font-weight: 500; font-size: 17px; color: var(--white-color); position: relative; padding-bottom: 5px; }
.nav-link.active, .nav-link:hover { color: var(--primary-color); }
.nav-link::after { content: ''; position: absolute; bottom: 0; right: 0; width: 0; height: 2px; background-color: var(--primary-color); transition: width 0.3s ease; }
.nav-link.active::after, .nav-link:hover::after { width: 100%; }
.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: var(--white-color); transition: all 0.3s ease-in-out; }

/* --- Hero Section --- */
.hero { position: relative; height: 100vh; display: flex; justify-content: center; align-items: center; text-align: center; color: var(--white-color); }
.hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(6, 81, 127, 0.6); z-index: -1; }
.hero-content { z-index: 1; max-width: 800px; }
.hero-content h1 { font-size: 4.5rem; font-weight: 700; margin-bottom: 10px; }
.hero-content h2 { font-size: 2.2rem; font-weight: 500; color: var(--primary-color); text-shadow: 1px 1px 3px rgba(0,0,0,0.5); margin-bottom: 20px; }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; text-align: center; }

/* --- Twin Shaft Section --- */
.twin-shaft-content { display: flex; align-items: center; gap: 50px; }
.twin-shaft-image { flex: 1; text-align: center; }
.animated-truck { animation: float 4s ease-in-out infinite; filter: drop-shadow(0 0 15px var(--primary-color)); }
@keyframes float { 0% { transform: translateY(0); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0); } }
.twin-shaft-text { flex: 1.2; }
.twin-shaft-text h3 { font-size: 2rem; color: var(--secondary-color); margin-bottom: 20px; }

/* --- Services Section (Flip Cards) --- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.service-card { background-color: transparent; height: 250px; perspective: 1000px; cursor: pointer; }
.service-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.8s; transform-style: preserve-3d; }
.service-card:hover .service-card-inner { transform: rotateY(180deg); }
.service-card-front, .service-card-back { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; border-radius: 15px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.service-card-front { color: white; }
.service-card-front img { position: absolute; top:0; left:0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6); }
.service-card-front h3 { font-size: 1.8rem; position: relative; z-index: 1; }
.service-card-back { background-color: var(--secondary-color); color: white; transform: rotateY(180deg); }
.service-card-back h3 { margin-bottom: 15px; font-size: 1.5rem; color: var(--primary-color); }
.service-card-back p { color: var(--white-color); font-size: 0.95rem; text-align: center; }

/* --- Projects Slider Section --- */
.projects-section { background: linear-gradient(to bottom, #f0f4f8, #ffffff); }
.projects-slider { width: 100%; height: 500px; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.swiper-slide { background-size: cover; background-position: center; display: flex; align-items: flex-end; justify-content: center; text-align: center; }
.project-slide-caption { width: 100%; padding: 20px; background: linear-gradient(to top, rgba(6, 81, 127, 0.9), transparent); color: var(--white-color); font-size: 1.5rem; font-weight: 700; }
.swiper-button-next, .swiper-button-prev { color: var(--primary-color) !important; }
.swiper-pagination-bullet-active { background: var(--primary-color) !important; }

/* --- Exhibition Slider Section --- */
.exhibition-section { background: #f0f4f8; }
.exhibition-container { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; }
.exhibition-text { flex-basis: 400px; text-align: center; }
.exhibition-text h3 { font-size: 2.2rem; color: var(--secondary-color); }
.exhibition-text p { font-size: 1.1rem; color: var(--primary-color); font-weight: 500; text-align: center; }
.exhibition-slider { width: 500px; height: 350px; transform: skewX(-10deg); border: 8px solid var(--white-color); box-shadow: 0 10px 30px rgba(0,0,0,0.2); border-radius: 10px; position: relative; overflow: hidden; }
.exhibition-slider .slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease-in-out; animation: fade-slides 12s infinite; }
.exhibition-slider .slide img { width: 100%; height: 100%; object-fit: cover; transform: skewX(10deg) scale(1.2); }
.exhibition-slider .slide:nth-child(1) { animation-delay: 0s; }
.exhibition-slider .slide:nth-child(2) { animation-delay: 6s; }
@keyframes fade-slides { 0% { opacity: 0; } 8.33% { opacity: 1; } 50% { opacity: 1; } 58.33% { opacity: 0; } 100% { opacity: 0; } }

/* --- Blog Preview & Page Section --- */
.blog-grid, .blog-page-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.blog-card { background: var(--white-color); border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; }
.blog-card:hover { transform: translateY(-10px); box-shadow: 0 10px 25px rgba(0,0,0,0.12); }
.blog-card img { width: 100%; height: 200px; object-fit: cover; }
.blog-card-content { padding: 25px; }
.blog-card h3 { font-size: 1.25rem; margin-bottom: 10px; color: var(--secondary-color); }
.read-more { font-weight: 700; color: var(--primary-color); }
.read-more i { margin-right: 5px; transition: margin-right 0.3s; }
.read-more:hover i { margin-right: 10px; }

/* --- Blog Modal Styles --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 2000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-content { background: #fff; padding: 30px; border-radius: 10px; max-width: 800px; width: 90%; max-height: 90vh; overflow-y: auto; position: relative; animation: slideDown 0.5s ease-out; }
.close-modal { position: absolute; top: 15px; left: 20px; font-size: 2rem; cursor: pointer; color: #555; }
.modal-image { width: 100%; height: 300px; object-fit: cover; border-radius: 8px; margin-bottom: 20px; }
.modal-title { font-size: 2rem; color: var(--secondary-color); margin-bottom: 15px; }
@keyframes slideDown { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* --- About Page Specifics --- */
.about-content { display: flex; align-items: center; gap: 50px; margin-bottom: 80px; flex-wrap: wrap;}
.about-content img { border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); flex: 1; min-width: 300px;}
.about-text { flex: 1.2; min-width: 300px;}
.about-text h3 { font-size: 2rem; color: var(--secondary-color); margin-bottom: 20px; }
.about-content.reverse { flex-direction: row-reverse; }
.strengths-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.strength-card { background: #fff; padding: 30px; text-align: center; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.07); transition: all 0.3s ease; }
.strength-card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.strength-card .icon { font-size: 3rem; color: var(--primary-color); margin-bottom: 20px; }
.strength-card h4 { font-size: 1.2rem; color: var(--secondary-color); margin-bottom: 10px; }

/* --- Services Page Specifics --- */
.service-detail-section { padding: 80px 0; border-bottom: 1px solid #eee; }
.service-detail-section:last-child { border-bottom: none; }
.service-detail-content { display: grid; grid-template-columns: 1fr 2fr; gap: 50px; align-items: center; }
.service-detail-image img { border-radius: 15px; width: 100%; height: 100%; object-fit: cover; }
.service-detail-text h2 { font-size: 2.5rem; color: var(--secondary-color); margin-bottom: 20px; }
.service-detail-text h3 { font-size: 1.5rem; color: var(--primary-color); margin-top: 30px; margin-bottom: 15px; }
.service-detail-text ul { list-style: disc; padding-right: 20px; }
.service-detail-text ul li { margin-bottom: 10px; }
.service-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.service-table th, .service-table td { border: 1px solid #ddd; padding: 12px; text-align: center; }
.service-table th { background-color: var(--secondary-color); color: white; }

/* --- Projects Page Specifics --- */
.project-item { display: flex; align-items: center; gap: 50px; background: #fff; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.08); margin-bottom: 60px; }
.project-item:nth-child(even) { flex-direction: row-reverse; }
.project-image { flex: 1; }
.project-image img { width: 100%; height: 400px; object-fit: cover; display: block; }
.project-content { flex: 1.2; padding: 40px; }
.project-content h3 { font-size: 2rem; color: var(--secondary-color); margin-bottom: 20px; }

/* --- Contact Page Styles --- */
.contact-section { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: flex-start; }
.contact-info-buttons { display: flex; flex-direction: column; gap: 15px; }
.contact-btn { display: flex; align-items: center; padding: 15px 20px; border-radius: 8px; text-decoration: none; color: white; transition: all 0.3s ease; }
.contact-btn i { font-size: 1.5rem; margin-left: 15px; }
.contact-btn .text { display: flex; flex-direction: column; }
.contact-btn .text span:first-child { font-weight: 700; }
.contact-btn .text span:last-child { font-size: 0.9rem; opacity: 0.9; }
.btn-phone { background-color: #25D366; } .btn-phone:hover { background-color: #128C7E; }
.btn-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); } .btn-instagram:hover { opacity: 0.9; }
.btn-web { background-color: var(--secondary-color); } .btn-web:hover { background-color: #05436a; }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 8px; font-family: var(--font-family); font-size: 1rem; }
.map-wrapper { margin-top: 60px; position: relative; text-align: center; }
.map-container { border-radius: 15px; overflow: hidden; height: 450px; border: 3px solid var(--secondary-color); }
.map-container iframe { width: 100%; height: 100%; border: 0; }
.map-direction-btn { position: absolute; bottom: 20px; right: 50%; transform: translateX(50%); z-index: 10; }
.map-direction-btn i { margin-left: 10px; }

/* --- Footer --- */
.footer { background-color: #05436a; color: #ccc; padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 50px; margin-bottom: 40px; }
.footer-logo { width: 60px; height: 60px; margin-bottom: 20px; }
.social-icons a { color: #ccc; font-size: 1.5rem; margin-left: 15px; transition: color 0.3s; }
.social-icons a:hover { color: var(--primary-color); }
.footer-col h4 { color: var(--white-color); font-size: 1.2rem; margin-bottom: 25px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ''; position: absolute; bottom: 0; right: 0; width: 40px; height: 2px; background-color: var(--primary-color); }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a:hover { color: var(--primary-color); padding-right: 5px; }
.footer-col ul li i { margin-left: 10px; color: var(--primary-color); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #333; font-size: 0.9rem; color: #888; }

/* --- Page Header with Bubbles --- */
.page-header { height: 40vh; background-color: var(--secondary-color); color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: relative; overflow: hidden; }
.page-header h1 { font-size: 3rem; z-index: 2; }
.bubbles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.bubbles li { position: absolute; list-style: none; display: block; width: 20px; height: 20px; background: rgba(189, 78, 39, 0.4); animation: animate-bubbles 25s linear infinite; bottom: -150px; }
.bubbles li:nth-child(1){left: 25%; width: 80px; height: 80px; animation-delay: 0s;}
.bubbles li:nth-child(2){left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s;}
.bubbles li:nth-child(3){left: 70%; width: 20px; height: 20px; animation-delay: 4s;}
.bubbles li:nth-child(4){left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 18s;}
.bubbles li:nth-child(5){left: 65%; width: 20px; height: 20px; animation-delay: 0s;}
.bubbles li:nth-child(6){left: 75%; width: 110px; height: 110px; animation-delay: 3s;}
.bubbles li:nth-child(7){left: 35%; width: 150px; height: 150px; animation-delay: 7s;}
.bubbles li:nth-child(8){left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 45s;}
.bubbles li:nth-child(9){left: 20%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 35s;}
.bubbles li:nth-child(10){left: 85%; width: 150px; height: 150px; animation-delay: 0s; animation-duration: 11s;}
@keyframes animate-bubbles { 0%{transform: translateY(0) rotate(0deg); opacity: 1; border-radius: 0;} 100%{transform: translateY(-1000px) rotate(720deg); opacity: 0; border-radius: 50%;} }

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .nav-menu { position: fixed; right: -100%; top: var(--header-height); flex-direction: column; background-color: rgba(6, 81, 127, 0.95); backdrop-filter: blur(15px); width: 100%; height: calc(100vh - var(--header-height)); text-align: center; transition: 0.3s; gap: 0; }
    .nav-menu.active { right: 0; }
    .nav-item { margin: 16px 0; }
    .nav-link { font-size: 1.5rem; }
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .twin-shaft-content { flex-direction: column; }
    .services-grid, .blog-grid, .blog-page-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .contact-section { grid-template-columns: 1fr; }
    .service-detail-content { grid-template-columns: 1fr; }
    .project-item, .project-item:nth-child(even) { flex-direction: column; }
    .project-image img { height: 300px; }
}

@media (max-width: 768px) {
    .section-title h2 { font-size: 2rem; }
    .hero-content h1 { font-size: 3rem; }
    .hero-content h2 { font-size: 1.5rem; }
    .services-grid, .blog-grid, .blog-page-grid { grid-template-columns: 1fr; }
    .service-card { height: 220px; }
    .exhibition-container { flex-direction: column; }
    .exhibition-slider { width: 90%; }
}