:root {
    --primary: #2e7d32;
    --dark: #121212;
    --white: #ffffff;
    --gray-bg: #f7f9f7;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Poppins', sans-serif;
    padding-top: 128px !important;
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 25px; }

.top-announcement-bar {
    background: linear-gradient(90deg, #1b5e20 0%, #2e7d32 50%, #1b5e20 100%);
    color: #ffffff;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10001;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-announcement-bar p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.us-flag {
    display: inline-block;
    width: 24px;
    height: 16px;
    background: url('../assets/images/usa-flag.webp') no-repeat center center;
    background-size: cover;
}

.site-header {
    background: var(--white);
    position: fixed;
    top: 38px !important;
    width: 100%;
    z-index: 10000;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.site-header.scrolled {
    top: 0 !important;
    padding: 2px 0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.header-content { display: flex; align-items: center; justify-content: space-between; }

#siteLogo {
    max-height: 80px;
    width: auto;
    display: block;
    transition: var(--transition);
}

.site-header.scrolled #siteLogo {
    max-height: 60px;
}

.nav-links { display: flex; list-style: none; gap: 40px; }
.nav-item {
    text-decoration: none; color: var(--dark); font-weight: 500;
    font-size: 15px; position: relative; transition: 0.3s;
}
.nav-item:hover, .nav-item.active { color: var(--primary); }
.nav-item::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.35s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

.has-dropdown {
    position: relative;
}

.arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-4px);
    margin-left: 5px;
    transition: 0.3s;
}

.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #ffffff;
    min-width: 280px;
    padding: 15px 0;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-top: 3px solid var(--primary);
    z-index: 1000;
}

.has-dropdown:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(10px);
}

.has-dropdown:hover .arrow {
    transform: rotate(-135deg) translateY(2px);
}

.dropdown-content {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.dropdown-content li a {
    text-decoration: none;
    color: var(--dark);
    font-size: 14px;
    font-weight: 500;
    padding: 12px 25px;
    display: block;
    transition: 0.3s ease;
    border-left: 3px solid transparent;
}

.dropdown-content li a:hover {
    background: var(--gray-bg);
    color: var(--primary);
    border-left: 3px solid var(--primary);
    padding-left: 30px;
}

.header-actions { display: flex; align-items: center; gap: 15px; }

.login-btn-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 50px;
    transition: var(--transition);
    background: var(--gray-bg);
}

.login-btn-link:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.login-btn-link svg {
    transition: transform 0.3s ease;
}

.login-btn-link:hover svg {
    transform: scale(1.1);
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--gray-bg);
    border-radius: 50px;
    height: 44px;
    width: 44px;
    overflow: hidden;
    transition: var(--transition);
    border: 1.5px solid transparent;
}

.search-wrapper.active {
    width: 240px;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(46,125,50,.12);
}

.search-wrapper input {
    border: none;
    background: transparent;
    outline: none;
    width: 0;
    opacity: 0;
    font-size: 14px;
    padding-left: 16px;
    padding-right: 52px;
    transition: 0.35s ease;
    color: var(--dark);
}

.search-wrapper.active input {
    width: 100%;
    opacity: 1;
}

.search-wrapper button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    display: grid;
    place-items: center;
    cursor: pointer;
}

.search-wrapper svg {
    stroke: #fff;
}

.hamburger {
    display: none; background: none; border: none; cursor: pointer;
    width: 30px; height: 22px; position: relative; z-index: 10001;
}
.bar {
    display: block; position: absolute; width: 100%; height: 2.5px;
    background: var(--primary); border-radius: 5px; transition: var(--transition);
}
.bar-1 { top: 0; }
.bar-2 { top: 9px; right: 0; width: 80%; }
.bar-3 { top: 18px; }

.hamburger.active .bar-1 { transform: translateY(9px) rotate(45deg); }
.hamburger.active .bar-2 { opacity: 0; transform: translateX(-15px); }
.hamburger.active .bar-3 { transform: translateY(-9px) rotate(-45deg); width: 100%; }

.mobile-overlay {
    position: fixed; inset: 0; background: var(--white);
    display: grid; place-items: center; z-index: 9999;
    transform: translateY(-100%); transition: var(--transition);
}
.mobile-overlay.open { transform: translateY(0); }
.mobile-nav { list-style: none; text-align: center; }
.mobile-nav a { 
    text-decoration: none; font-size: 32px; font-weight: 700; 
    color: var(--dark); display: block; padding: 15px 0;
}

@media (max-width: 1024px) {
    .top-announcement-bar { height: 32px; font-size: 11px; }
    .site-header { top: 32px !important; padding: 8px 0; }
    body { padding-top: 100px !important; }
    #siteLogo { max-height: 50px; }
    .nav-links, .desktop-nav { display: none; }
    .hamburger { display: block; }
    .login-text { display: none; }
    .login-btn-link { padding: 8px; }
    .search-wrapper.active { width: 180px; }
}

@media (max-width: 480px) {
    .container { padding: 0 15px; }
    #siteLogo { max-height: 40px; }
    .search-wrapper.active { width: 130px; }
    .login-btn-link { gap: 0; }
}

/* footer*/

.site-footer {
    background: #fdfdfd;
    padding: 80px 0 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1.5fr; 
    gap: 50px;
    padding-bottom: 60px;
}

/* Typography */
.footer-logo img { height: 130px; margin-bottom: 20px; }
.footer-text { color: #666; line-height: 1.7; font-size: 15px; }
.footer-text strong { color: var(--primary); font-weight: 700; }
.footer-title { color: var(--dark); font-size: 19px; font-weight: 700; margin-bottom: 25px; }

/* Links */
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { text-decoration: none; color: #555; transition: 0.3s; font-size: 15px; }
.footer-links a:hover { color: var(--primary); padding-left: 5px; }

/* Contact & Info */
.contact-info-box { margin-bottom: 20px; }
.contact-item { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.contact-item .icon { color: var(--primary); display: flex; }
.contact-item a { text-decoration: none; color: #444; font-weight: 600; transition: 0.3s; }

/* Map Style */
.footer-map-wrapper {
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}

/* USA Badge - Large & Professional */
.usa-premium-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.flag-box {
    width: 60px;
    height: 38px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.flag-box img { width: 100%; height: 100%; object-fit: cover; }
.badge-content { display: flex; flex-direction: column; }
.badge-label { font-size: 10px; text-transform: uppercase; color: var(--primary); font-weight: 800; letter-spacing: 1px; }
.badge-location { font-size: 15px; font-weight: 800; color: var(--dark); }

/* Bottom Bar */
.footer-bottom { border-top: 1px solid rgba(0,0,0,0.05); padding: 25px 0; text-align: center; background: #fff; }
.footer-bottom p { color: #999; font-size: 14px; margin: 0; }

/* --- Footer Responsive Optimization --- */

@media (max-width: 1024px) {
    .footer-wrapper { 
        grid-template-columns: 1fr 1fr; 
        gap: 40px;
    }
    .contact-col { 
        grid-column: span 2; 
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        align-items: start;
    }
}

@media (max-width: 768px) {
    .site-footer { padding-top: 50px; }
    
    .footer-wrapper { 
        grid-template-columns: 1fr; 
        text-align: center; 
        gap: 45px; 
    }
    
    .footer-logo img { height: 100px; }
    
    .contact-col { 
        grid-column: span 1; 
        grid-template-columns: 1fr;
    }
    
    .contact-item { 
        justify-content: center; 
        flex-direction: column;
        gap: 5px;
    }
    
    .footer-links a:hover { padding-left: 0; }
    
    .footer-map-wrapper { 
        max-width: 100%; 
        height: 200px; /* تنظیم ارتفاع ثابت برای نقشه در موبایل */
        margin: 0 auto 20px; 
    }

    .usa-premium-badge { 
        margin: 10px auto 0; 
        transform: scale(0.95); /* کمی کوچک‌تر برای جاگیری بهتر در موبایل */
    }

    .footer-bottom { padding: 20px 15px; }
}

@media (max-width: 480px) {
    .footer-title { font-size: 17px; margin-bottom: 20px; }
    .footer-text { font-size: 14px; padding: 0 10px; }
    .badge-location { font-size: 13px; }
    .flag-box { width: 50px; height: 32px; }
}