/* ================== RESET ================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Tahoma, sans-serif;
}

body {
    background: #f2f4f8;
    color: #333;
    overflow-x: hidden;
    transition: opacity 1s ease; /* انیمیشن محو شدن بدن */
}

/* ================== SPLASH SCREEN ================== */
#splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.8); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1.5s ease, transform 1.5s ease, background 1.5s ease;
}

#splash.splash-move {
    transform: scale(0.9); 
}

#splash.splash-hide {
    opacity: 0; 
    background: rgba(255, 255, 255, 0);
}

#splash-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #fff;
    padding: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    object-fit: cover;
}

/* ================== HEADER ================== */
header {
    background: #1a73e8;
    color: #fff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
}

/* برند */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #fff;
    padding: 5px;
}

.brand-text h1 {
    font-size: 1.4em;
    line-height: 1.2;
}

.brand-text span {
    font-size: .85em;
    opacity: .9;
}

/* ================== NAVIGATION ================== */
nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

nav a {
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, .15);
    padding: 10px 14px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    transition: .3s;
}

nav a i {
    font-size: 18px;
    margin-bottom: 4px;
}

nav a:hover {
    background: #1558b0;
}

/* ================== HERO SECTION ================== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, .4), rgba(0, 0, 0, .4)),
                url("uploads/hero.jpg") center/cover no-repeat;
    color: #fff;
    text-align: center;
    padding: 110px 20px;
    border-radius: 0 0 35px 35px;
}

.hero h2 {
    font-size: 2.4em;
    margin-bottom: 15px;
    min-height: 70px;
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.hero .btn {
    background: #ffb400;
    border: none;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: .3s;
}

.hero .btn:hover {
    background: #ffa000;
    transform: translateY(-5px);
}

/* ================== CONTAINER ================== */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 16px;
}

.container h2 {
    margin-bottom: 25px;
    color: #1a73e8;
    text-align: center;
    font-size: 2.2em;
}

.container p {
    text-align: center;
    font-size: 1.1em;
    margin-top: 20px;
    color: #666;
}

/* ================== SERVICES ================== */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.service-card {
    background: #fff;
    padding: 28px;
    border-radius: 22px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, .1);
    text-align: center;
    transition: .3s;
}

.service-card i {
    font-size: 32px;
    color: #1a73e8;
    margin-bottom: 12px;
}

.service-card:hover {
    transform: translateY(-8px);
}

/* ================== GALLERY ================== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, .1);
    opacity: 0;  /* شروع با شفافیت صفر */
    transform: translateY(50px); /* شروع از پایین صفحه */
    transition: opacity 1s ease, transform 1s ease; /* انیمیشن محو شدن و حرکت */
}

/* انیمیشن محو شدن و حرکت به بالا */
.gallery img.show {
    opacity: 1;
    transform: translateY(0); /* به موقعیت اصلی برمی‌گردد */
}

/* ================== PAGE SCROLL FADE OUT ================== */
body {
    opacity: 1;
}

body.scrolled {
    opacity: 0; 
    transition: opacity 1.5s ease;
}

/* ================== FIXED CONTACT ================== */
.fixed-contact {
    position: fixed;
    bottom: 18px;
    right: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fixed-contact a {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.fixed-contact .wa {
    background: #25d366;
}

.fixed-contact .call {
    background: #1a73e8;
}

/* ================== FOOTER ================== */
footer, .footer-extended {
    background: #1a73e8;
    color: #fff;
    text-align: center;
    padding: 22px;
}

.footer-extended {
    padding: 30px 16px;
    margin-top: 60px;
}

.footer-grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    align-items: start;
}

.footer-box h4 {
    margin-bottom: 12px;
    font-size: 1.1em;
}

.footer-box p,
.footer-box a {
    font-size: .95em;
    opacity: .95;
    color: #fff;
    text-decoration: none;
    line-height: 1.8;
}

.footer-box a:hover {
    text-decoration: underline;
}

/* ================== LANGUAGE SWITCHER ================== */
.footer-lang {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-lang button {
    background: #fff;
    color: #1a73e8;
    border: none;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-lang .dropdown-content {
    position: relative;
    top: 0;
    right: 0;
    display: none;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.footer-lang.show .dropdown-content {
    display: block;
}

.footer-lang .dropdown-content a {
    color: #1a73e8;
    padding: 10px 14px;
    display: block;
}

.footer-lang .dropdown-content a:hover,
.footer-lang .dropdown-content a.active {
    background: #1a73e8;
    color: #fff;
}

/* ================== MOBILE STYLES ================== */
@media(max-width: 768px) {
    nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        justify-content: space-around;
        padding: 10px 0;
        border-radius: 20px 20px 0 0;
        background: #1a73e8;
    }
    header {
        justify-content: center;
    }
    body {
        padding-bottom: 80px;
    }
    .container {
        margin: 30px 16px;
    }
}
