/* ============================================
   BASE.CSS - Core styles & shared components
   ============================================ */

/* ---------- Font-face ---------- */
@font-face {
    font-family: 'MyCustomFont';
    src: url('./../../fonts/YekanBakh-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ---------- Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'MyCustomFont', 'Tahoma', sans-serif;
    background: #f4f6f9;
    color: #1e1e2f;
    line-height: 1.8;
    padding-top: 80px;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- Container ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ---------- Utility ---------- */
.text-accent {
    color: #ff6b6b;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 40px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    border-color: #ff6b6b;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}
.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
    border-color: #ee5a24;
}

.btn-outline {
    background: transparent;
    color: #1e1e2f;
    border-color: #c5c9d9;
}
.btn-outline:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
    transform: translateY(-2px);
}

.btn-outline.small {
    padding: 6px 18px;
    font-size: 0.85rem;
}

/* ---------- Consultation button (header) ---------- */
.btn-consult {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    border-color: #ff6b6b;
    padding: 8px 20px;
    font-size: 0.95rem;
    border-radius: 40px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.2);
    border: none;
    cursor: pointer;
}
.btn-consult:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.35);
    color: #fff;
}

/* ---------- Header ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff6b6b) 1;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
    border-radius: 0 0 24px 24px;
    margin: 0 10px;
    width: calc(100% - 20px);
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.header-left {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    justify-self: center;
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}
.logo a {
    display: flex;
    align-items: center;
}

.logo-icon {
    height: 48px;
    width: auto;
    max-width: 100%;
    max-height: 48px;
    border: none;
    box-shadow: none;
    transition: transform 0.3s;
    display: block;
}
.logo-icon:hover {
    transform: scale(1.05);
}

.header-consult {
    justify-self: end;
    display: flex;
    align-items: center;
}

/* ---------- Navigation ---------- */
.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 28px;
}

.nav-list a {
    font-size: 0.95rem;
    color: #1e1e2f !important;
    transition: color 0.3s;
    position: relative;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff6b6b;
    transition: width 0.3s;
}
.nav-list a:hover {
    color: #ff6b6b !important;
}
.nav-list a:hover::after {
    width: 100%;
}

/* ---------- Active nav link ---------- */
.nav-list a.active {
    color: #ff6b6b !important;
}
.nav-list a.active::after {
    width: 100%;
}

/* Nav icons */
.nav-list a[href="#hero"]::before {
    content: "\2302";
    font-size: 0.9rem;
}
.nav-list a[href="#portfolio"]::before {
    content: "\25C8";
    font-size: 0.9rem;
}
.nav-list a[href="#videos"]::before {
    content: "\25BA";
    font-size: 0.9rem;
}
.nav-list a[href="#blog"]::before {
    content: "\270E";
    font-size: 0.9rem;
}
.nav-list a[href="/resume/"]::before {
    content: "\261B";
    font-size: 0.9rem;
}
.nav-list a[href="#trust"]::before {
    content: "\263A";
    font-size: 0.9rem;
}
.nav-list a[href="#testimonial"]::before {
    content: "\2605";
    font-size: 0.9rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: #1e1e2f;
    border-radius: 4px;
    transition: 0.3s;
}

/* ---------- Footer (Redesigned) ---------- */
.footer {
    background: #0b0c1a;
    border-top: 1px solid #1a1b2e;
    padding: 60px 0 0;
    color: #c5c9d9;
    position: relative;
    overflow: hidden;
}

/* Subtle decorative gradient line at top */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff6b6b);
    opacity: 0.4;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 50px;
    padding-bottom: 50px;
}

/* ---------- Footer Column 1: Brand ---------- */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.footer-logo {
    display: inline-block;
}
.footer-logo img {
    height: 48px;
    width: auto;
    max-width: 100%;
    filter: brightness(0) invert(1) opacity(0.9);
    transition: filter 0.3s;
}
.footer-logo img:hover {
    filter: brightness(0) invert(1) opacity(1);
}

.footer-brand-desc {
    font-size: 0.95rem;
    color: #b0b8d0;
    line-height: 1.8;
    max-width: 380px;
    margin: 0;
}

/* Social icons inline with brand */
.footer-social-inline {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}
.footer-social-inline a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1b2e;
    color: #c5c9d9;
    border: 1px solid #2d2e42;
    transition: all 0.3s ease;
}
.footer-social-inline a:hover {
    background: #ff6b6b;
    color: #fff;
    border-color: #ff6b6b;
    transform: translateY(-3px);
}
.footer-social-inline a svg {
    width: 18px;
    height: 18px;
}

/* ---------- Footer Column 2: Links ---------- */
.footer-links-col h4,
.footer-contact-col h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 18px;
    position: relative;
}
.footer-links-col h4::after,
.footer-contact-col h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #feca57);
    margin-top: 8px;
    border-radius: 4px;
}

.footer-links li {
    margin-bottom: 10px;
}
.footer-links a {
    color: #b0b8d0;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
}
.footer-links a:hover {
    color: #ff6b6b;
    transform: translateX(-4px);
}

/* ---------- Footer Column 3: Contact ---------- */
.footer-contact li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.contact-icon {
    color: #feca57;
    font-size: 1.1rem;
    width: 24px;
    display: inline-block;
    flex-shrink: 0;
}
.footer-contact a {
    color: #b0b8d0;
    transition: color 0.3s;
    font-size: 0.95rem;
    word-break: break-all;
}
.footer-contact a:hover {
    color: #ff6b6b;
}
.footer-resume-link {
    color: #feca57 !important;
    font-weight: 500;
}
.footer-resume-link:hover {
    color: #ff6b6b !important;
}

.footer-cta {
    margin-top: 20px;
}
.footer-consult-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.2);
    cursor: pointer;
}
.footer-consult-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.35);
}

/* ---------- Footer Bottom ---------- */
.footer-bottom {
    border-top: 1px solid #1a1b2e;
    padding: 20px 0;
    text-align: center;
    color: #6a6a82;
    font-size: 0.9rem;
}
.footer-bottom .footer-author {
    color: #feca57;
    font-weight: 500;
    transition: color 0.3s;
}
.footer-bottom .footer-author:hover {
    color: #ff6b6b;
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #ffffff;
    max-width: 560px;
    width: 100%;
    border-radius: 32px;
    padding: 40px 45px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.3s ease;
    border: 1px solid #e2e6ed;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 16px;
    left: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: #8a8a9a;
    transition: color 0.3s, transform 0.3s;
    padding: 4px 10px;
}
.modal-close:hover {
    color: #ff6b6b;
    transform: rotate(90deg);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e1e2f;
    margin-bottom: 8px;
    text-align: center;
}
.modal-sub {
    color: #6a6a82;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1rem;
}

.modal-box .form-group {
    text-align: right;
    margin-bottom: 18px;
}
.modal-box .form-group label {
    display: block;
    font-weight: 500;
    color: #1e1e2f;
    margin-bottom: 6px;
}
.modal-box .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d5d9e6;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: #fff;
}
.modal-box .form-group input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.modal-box .consult-submit {
    width: 100%;
    margin-top: 6px;
}
.modal-box .consult-response {
    margin-top: 18px;
    font-size: 0.95rem;
    text-align: center;
}

/* ---------- Global Responsive ---------- */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    .footer-brand {
        grid-column: 1 / -1;
        align-items: center;
        text-align: center;
    }
    .footer-brand-desc {
        max-width: 100%;
    }
    .footer-social-inline {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
        overflow-x: hidden;
    }
    .header {
        height: 70px;
        border-radius: 0 0 16px 16px;
        margin: 0 5px;
        width: calc(100% - 10px);
    }
    .header-inner {
        grid-template-columns: 1fr auto 1fr;
        gap: 10px;
    }
    .header-left {
        justify-self: start;
        gap: 10px;
    }
    .logo {
        max-width: 120px;
    }
    .logo-icon {
        height: 40px;
        max-height: 40px;
    }
    .header-consult .btn-consult {
        font-size: 0.85rem;
        padding: 6px 14px;
    }

    /* ===== منوی کشویی از راست با ارتفاع خودکار و عرض متناسب ===== */
    .nav {
        position: fixed;
        top: 70px;
        right: 0;
        left: auto;
        width: auto;
        min-width: 200px;
        max-width: 80%;
        height: auto;
        max-height: 80vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 20px 24px;
        gap: 10px;
        border-left: 1px solid #e2e6ed;
        border-radius: 0 0 0 16px;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
        overflow-y: auto;
        opacity: 1;
    }
    .nav.open {
        transform: translateX(0);
        pointer-events: auto;
    }

    .nav-list {
        flex-direction: column;
        gap: 4px;
        width: 100%;
        text-align: right;
        align-items: stretch;
        padding: 0;
    }
    .nav-list a {
        font-size: 1.05rem;
        padding: 10px 14px;
        display: block;
        color: #1e1e2f !important;
        text-align: right;
        justify-content: flex-end;
        width: 100%;
        border-radius: 8px;
        transition: background-color 0.2s, color 0.2s;
        background: transparent;
        border-bottom: none;
    }
    .nav-list a::after {
        display: none; /* خط زیرلینک در موبایل حذف شود */
    }
    .nav-list a:hover {
        background: rgba(255, 107, 107, 0.08);
        color: #ff6b6b !important;
    }
    /* Active state در موبایل: کل پس‌زمینه رنگی شود */
    .nav-list a.active {
        background: #ff6b6b !important;
        color: #fff !important;
        border-radius: 8px;
    }
    .nav-list a.active:hover {
        background: #e55a5a !important;
        color: #fff !important;
    }

    .hamburger {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    .footer-brand {
        align-items: center;
        text-align: center;
    }
    .footer-links-col h4::after,
    .footer-contact-col h4::after {
        margin: 8px auto 0;
    }
    .footer-contact li {
        justify-content: center;
    }
    .footer-cta {
        text-align: center;
    }
    .modal-box {
        padding: 30px 20px;
        margin: 10px;
    }
}

@media (max-width: 420px) {
    .header-inner {
        grid-template-columns: auto 1fr auto;
        gap: 6px;
    }
    .header-left {
        gap: 6px;
    }
    .logo {
        max-width: 100px;
    }
    .logo-icon {
        height: 36px;
        max-height: 36px;
    }
    .header-consult .btn-consult {
        font-size: 0.8rem;
        padding: 5px 12px;
        border-width: 1px;
    }
    .nav-list a::before {
        font-size: 0.8rem !important;
    }
    .nav-list {
        padding-right: 0;
    }
    .modal-box {
        padding: 24px 16px;
    }
    .modal-title {
        font-size: 1.4rem;
    }
    .nav {
        min-width: 160px;
        max-width: 85%;
        padding: 16px 18px;
    }
    .nav-list a {
        font-size: 0.95rem;
        padding: 8px 12px;
    }
}

@media (max-width: 320px) {
    .header {
        height: 60px;
        margin: 0 2px;
        width: calc(100% - 4px);
    }
    .header-inner {
        gap: 4px;
    }
    .logo {
        max-width: 80px;
    }
    .logo-icon {
        height: 32px;
        max-height: 32px;
    }
    .header-consult .btn-consult {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    .hamburger span {
        width: 22px;
        height: 2px;
    }
    .nav {
        top: 60px;
        max-height: 75vh;
        min-width: 140px;
        padding: 14px 16px;
    }
    body {
        padding-top: 60px;
    }
    .nav-list a {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
}