/* ========== MOBILE MENU ========== */

.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    body {
        font-size: 14px !important;
    }

    h1 {
        font-size: 24px !important;
    }
    h2 {
        font-size: 20px !important;
    }
    h3 {
        font-size: 16px !important;
    }
    p {
        font-size: 12px !important;
    }

    .nav-links a {
        font-size: 13px !important;
    }
    .back-home {
        font-size: 14px !important;
    }
    .project-desc {
        font-size: 13px !important;
    }
    .project-logline {
        font-size: 14px !important;
    }

    body,
    p,
    .project-desc,
    .project-logline,
    .about-text p,
    .cv-item p,
    .contact-info p,
    .text-desc,
    .info-desc,
    .gallery-caption p {
        line-height: 1.4 !important;
    }

    p,
    .project-desc,
    .about-text p,
    .cv-item p {
        margin-bottom: 8px !important;
    }

    h1 {
        margin-bottom: 8px !important;
    }
    h2 {
        margin-bottom: 8px !important;
    }
    h3 {
        margin-bottom: 6px !important;
    }

    .project-info {
        padding: 16px !important;
    }
    .contact-info {
        padding: 14px !important;
    }
    .contact-info p {
        margin: 6px 0 !important;
    }
    .form-group {
        gap: 4px !important;
    }
    .cv-item {
        margin-bottom: 12px !important;
    }
}


/* ========== MOBILE HEADER ========== */

@media (max-width: 768px) {
    body.menu-open {
        overflow: hidden;
    }

    body.menu-open main,
    body.menu-open footer {
        filter: blur(3px);
        transition: filter 0.35s ease;
    }

    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        margin: 0;
        padding: 8px 20px;
        border-radius: 0;
        box-sizing: border-box;
        z-index: 1000;
    }

    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }

    .back-home {
        order: 2;
        font-size: 13px !important;
        padding: 6px 12px !important;
    }

    .menu-toggle{
        display:flex;
        flex-direction:column;
        justify-content:center;
        gap:6px;
        width:42px;
        height:42px;
        background:none;
        border:none;
        cursor:pointer;
        z-index:3000;
        
    }

    .menu-toggle span{
        width:30px;
        height:3px;
        background:var(--color-bg);
        border-radius:10px;
        transition:.35s;
        
    }
    
    .menu-toggle.active span:nth-child(1){
        transform:translateY(9px) rotate(45deg);
        
    }
    
    .menu-toggle.active span:nth-child(2){
        opacity:0;
        
    }
    
    
    .menu-toggle.active span:nth-child(3){
        transform:translateY(-9px) rotate(-45deg);
        
    }

    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 180px;
        height: 100vh;
        background: var(--color-primary);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 6px;
        padding: 80px 20px;
        transform: translateX(-105%);
        transition: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
        box-sizing: border-box;
        z-index: 2000;
        pointer-events: none;
    }

    .nav-links.open {
        transform: translateX(0);
        pointer-events: auto;
    }

    .nav-links a {
        display: block;
        width: 100%;
        font-size: 15px;
        color: var(--color-bg);
        text-decoration: none;
        padding: 6px 0;
        transition: 0.25s;
    }

    .nav-links a:hover {
        transform: translateX(8px);
    }

    .overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: 0.35s;
        z-index: 998;
        pointer-events: none;
    }

    .overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    main {
        margin: 80px 20px 20px !important;
    }

    section {
        margin-left: 0;
    }

    .arch-left {
        display: none;
    }

    .home-header h1,
    .home-header h2,
    .home-header p {
        margin-right: 0;
    }

    body.home-page .nav-links {
        width: 180px !important;
        min-width: 180px !important;
        max-width: 180px !important;
        justify-content: flex-start !important;
        flex-direction: column !important;
    }
}


/* ============================================
   HOME - RESPONSIVE
============================================ */

@media (max-width: 768px) {
    .home-page main {
        flex: 1;
        margin-bottom: 0; 
    }
    
    #landing-hero {
        min-height: 60vh;
        padding: 20px;
    }

    #landing-hero h1 {
        font-size: 32px;
    }

    #landing-hero h2 {
        font-size: 20px;
    }

    #landing-hero p {
        font-size: 15px;
        padding: 0 16px;
    }

    .typewriter {
        font-size: 32px;
        white-space: normal;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    
    .home-page main {
        flex: 1;
        margin-bottom: 0; 
    }
    
    #landing-hero h1 {
        font-size: 26px;
    }

    #landing-hero h2 {
        font-size: 17px;
    }

    #landing-hero p {
        font-size: 14px;
    }
}


/* ============================================
   ABOUT - RESPONSIVE
============================================ */
@media (max-width: 768px) {
    .about-body main {
        flex-direction: column !important;
        align-items: center !important;
        padding: 20px 16px !important;
        gap: 30px !important;
    }

    .about-text {
        padding-left: 0 !important;
        text-align: center !important;
        width: 100% !important;
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .about-text h2 {
        font-size: 24px !important;
        text-align: center !important;
        border-bottom: 2px solid var(--color-accent);
        padding-bottom: 8px;
        display: inline-block;
        margin: 0 auto 16px !important;
    }

    .about-text p {
        font-size: 14px !important;
        line-height: 1.6 !important;
        text-align: justify !important;
    }

    /* ====== عکس ====== */
    .arch-left-about {
        position: relative !important;
        left: auto !important;
        bottom: auto !important;
        width: 100% !important;
        max-width: 280px !important;
        height: 280px !important;
        margin: 0 auto !important;
        border-radius: 140px 140px 20px 20px !important;
        order: -1 !important;
        flex-shrink: 0 !important;
    }

    .arch-left-about img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }

    /* ====== دکمه‌های اجتماعی ====== */
    .about-social {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        margin: 20px auto 10px !important;
        justify-content: center !important;
        gap: 16px !important;
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .social-icon {
        padding: 0 !important;
        font-size: 0 !important;
        background: var(--color-bg) !important;
        border-radius: 50% !important;
        width: 48px !important;
        height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
        border: 1px solid rgba(0,0,0,0.05) !important;
    }

    .social-icon img {
        width: 24px !important;
        height: 24px !important;
        margin: 0 !important;
        display: block !important;
    }

    .social-icon:hover {
        background: var(--color-accent) !important;
    }

    .social-icon:hover img {
        filter: brightness(0) invert(1) !important;
    }
}

/* ========== CONTACT ========== */

@media (max-width: 768px) {
   
   section {
        padding: 20px 20px !important;
    }
    
    .contact-container {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .contact-info,
    .contact-form {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        background: var(--color-bg); !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); !important;
        padding: 14px !important;
        border-radius: 12px !important;
    }

    .contact-info p {
        font-size: 13px !important;
        margin: 10px 0 !important;
    }

    .contact-info .label {
        width: 120px !important;
        font-size: 13px !important;
    }

    .contact-info .value {
        font-size: 13px !important;
    }

    .form-group label {
        font-size: 13px !important;
    }

    .form-group input,
    .form-group textarea {
        font-size: 13px !important;
        padding: 8px 12px !important;
    }

    .submit-btn {
        font-size: 14px !important;
        padding: 10px !important;
    }
}


/* ========== CV ========== */

@media (max-width: 768px) {
    .cv-body main {
        margin: 70px 10px 10px 10px !important;
        padding: 20px !important; 
    }
}


/* ========== ANIMATION ========== */

@media (max-width: 992px) {
    .animation-project {
        flex-direction: column;
        margin: 30px 20px;
    }

    .project-poster {
        width: 100%;
    }

    .project-poster img {
        width: 100%;
        height: 350px;
        object-fit: cover;
    }

    .project-info {
        padding: 25px;
    }

    .project-info h3 {
        font-size: 22px;
    }

    .project-logline {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 26px;
        margin: 25px 15px;
        text-align: center;
    }

    .animation-project {
        flex-direction: column;
        margin: 20px 15px;
        border-radius: 12px;
    }

    .project-poster {
        width: 100%;
    }

    .project-poster img {
        width: 100%;
        height: 220px;
        object-fit: cover;
    }

    .project-info {
        padding: 20px;
    }

    .project-info h3 {
        font-size: 20px;
    }

    .project-status {
        font-size: 12px;
    }

    .project-logline {
        font-size: 16px;
        border-right: none;
        border-left: 3px solid var(--color-accent);
        padding-right: 0;
        padding-left: 15px;
    }

    .project-desc {
        font-size: 15px;
        line-height: 1.8;
    }
}


/* ========== ILLUSTRATION ========== */

@media (min-width: 769px) and (max-width: 1024px) {
    .page-title {
        margin: 35px 30px 20px;
        font-size: 30px;
        width: calc(100% - 60px);
    }

    .project-container {
        margin: 40px 30px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 30px 30px;
    }

    .gallery-item img {
        height: 220px;
    }

    .text-slider-container {
        padding: 24px 40px;
    }

    .text-slider-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .page-title {
        margin: 30px 20px 15px 20px;
        font-size: 26px;
        width: calc(100% - 40px);
    }

    .project-container {
        margin: 40px 16px;
    }

    .project-header {
        height: 150px;
    }

    .project-title-overlay h3 {
        font-size: 22px;
    }

    .project-description {
        padding: 16px 20px 4px 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 0 20px 20px 20px;
    }

    .gallery-item img {
        height: 160px;
    }

    .text-slider-container {
        padding: 20px 30px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .project-header {
        height: 120px;
    }

    .project-title-overlay {
        left: 20px;
        right: 20px;
        padding: 20px 16px 12px;
    }

    .project-title-overlay h3 {
        font-size: 18px;
    }

    .text-slider-container {
        padding: 16px 20px;
    }

    .text-slider-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}


/* ========== DRAWING ========== */

@media (max-width: 768px) {
    .drawing-body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .drawing-body main {
        flex: 1;
        height: auto;
        min-height: calc(100vh - 140px);
        padding: 0;
        margin-bottom: 0;
        position: relative;
    }

    .drawing-body footer {
        margin-top: 0;
        position: relative;
        bottom: 0;
    }

    .fullscreen-slider {
        height: 100%;
    }
}

/* ========== ORIGAMI & MODELING ========== */

/* ---------- Tablet ---------- */
@media (max-width: 992px) {
    .origami-body .slide {
        flex: 0 0 78%;
        height: 420px;
        border-radius: 12px !important;
        overflow: hidden;
    }

    .origami-body .image-wrapper,
    .origami-body .image-wrapper img,
    .origami-body .video-wrapper,
    .origami-body .video-wrapper video {
        border-radius: 12px !important;
    }

    .modeling-body .slide {
        width: 78%;
        border-radius: 12px !important;
    }

    .modeling-body .slide img,
    .modeling-body .slide video {
        border-radius: 12px !important;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .origami-body .slide {
        flex: 0 0 92%;
        height: 320px;
        border-radius: 8px !important;
        overflow: hidden;
    }

    .origami-body .image-wrapper,
    .origami-body .image-wrapper img,
    .origami-body .video-wrapper,
    .origami-body .video-wrapper video {
        border-radius: 8px !important;
    }

    .modeling-body .slide {
        width: 92%;
        border-radius: 8px !important;
    }

    .modeling-body .slide img,
    .modeling-body .slide video {
        border-radius: 8px !important;
    }
}

/* ========== PHOTOGRAPHY ========== */
@media (max-width: 992px) {
    .photography-container {
        flex-direction: column;
        gap: 30px;
    }

    .photography-arch {
        width: 100%;
        height: 320px;
        margin: 0;
        border-radius: 18px 18px 8px 8px;
    }

    .photography-categories {
        width: 100%;
        margin: 0;
    }

    .thumbnail-bar {
        gap: 10px;
        margin-top: 18px;
    }

    .thumbnail-item {
        width: 75px;
        height: 48px;
    }

    .photography-prev,
    .photography-next {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .photography-prev {
        right: 16px;
    }
    .photography-next {
        left: 16px;
    }
}

@media (max-width: 768px) {
    .photography-container {
        flex-direction: column;
        gap: 20px;
    }

    .photography-arch {
        width: 100%;
        height: 180px;
        margin: 0;
        border-radius: 12px 12px 8px 8px;
    }

    .photography-slideshow,
    .photography-slide {
        width: 100%;
        height: 100%;
    }

    .photography-slide {
        object-fit: cover;
    }

    .photography-categories {
        width: 100%;
        margin: 0;
    }

    .thumbnail-bar {
        gap: 8px;
        margin-top: 15px;
    }

    .thumbnail-item {
        width: 55px;
        height: 35px;
        border-radius: 4px;
    }

    .photography-prev,
    .photography-next {
        width: 32px;
        height: 32px;
        font-size: 16px;
        bottom: 10px;
    }

    .photography-prev {
        right: 10px;
    }
    .photography-next {
        left: 10px;
    }
}