/* =========================================
   🌿 BRANCHES PAGE STYLING
========================================= */
.branches-main {
    padding-top: 140px;
    /* Header ke liye jagah */
    padding-bottom: 120px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-title-section {
    text-align: center;
    margin-bottom: 60px;
}

.page-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 0 24px;
}

.project-glass-card {
    background: rgba(9, 13, 22, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.project-glass-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Project Banner Image Area */
.project-banner {
    height: 200px;
    background-color: #1a1f2e;
    /* Fallback */
    position: relative;
    padding: 20px;
    /* Yahan hum CSS background image ya gradient de rahe hain as placeholder */
}

.store-banner {
    background: linear-gradient(45deg, #090d16, #1e3a8a);
}

.safepath-banner {
    background: linear-gradient(45deg, #090d16, #064e3b);
}

.status-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.live-tag {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.dev-tag {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Project Info Area */
.project-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tech-stack {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.project-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
}

.project-info p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Buttons */
.project-links {
    display: flex;
    gap: 12px;
}

.primary-btn {
    background: #00f2fe;
    color: #000;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.primary-btn:hover {
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
    background: #ffffff;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* =========================================
   🌿 BRANCHES PAGE: PROJECT CARDS
========================================= */

/* Grid Setup */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    padding: 0 24px;
}

.project-glass-card {
    background: rgba(9, 13, 22, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.project-glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* =========================================
   📸 MULTI-PHOTO GALLERY (CSS Scroll Snap)
========================================= */
.project-gallery {
    position: relative;
    height: 220px;
    width: 100%;
}

.gallery-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Firefox me scrollbar hide karne ke liye */
    height: 100%;
}

.gallery-scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari me scrollbar hide karne ke liye */
}

/* Jab hum drive links lenge tab .gallery-slide ki jagah <img> use karenge. 
   Dono par ye class kaam karegi. */
.gallery-slide,
.gallery-scroll-container img {
    flex: 0 0 100%;
    /* Har image 100% width legi */
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
    /* Scroll karne par perfect lock hoga */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status Tag on Top of Image */
.status-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.live-tag {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Gallery Dots (Visual Hint) */
.gallery-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
}

.dot.active {
    background: #00f2fe;
    width: 16px;
    border-radius: 10px;
}

/* =========================================
   📝 PROJECT INFO & BUTTONS
========================================= */
.project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tech-stack {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.project-info h3 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.project-info p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.primary-btn {
    background: transparent;
    color: #00f2fe;
    border: 1px solid #00f2fe;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    width: 100%;
    /* Button poori width lega */
}

.primary-btn:hover {
    background: #00f2fe;
    color: #050505;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

/* =========================================
   🌿 BRANCHES PAGE: TREE LAYOUT
========================================= */
.branches-main {
    padding-top: 140px;
    padding-bottom: 120px;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: hidden;
}

.page-title-section {
    text-align: center;
    margin-bottom: 80px;
}

.page-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
}

/* 🌳 THE TREE ENGINE */
.branch-tree {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Central Trunk */
.tree-trunk {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(-50%);
    z-index: 1;
}

/* Growing Neon Line Effect */
.tree-trunk::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    /* Starts at 0 */
    background: #00f2fe;
    box-shadow: 0 0 15px #00f2fe;
    animation: growTrunk 2s ease-out forwards;
}

@keyframes growTrunk {
    to {
        height: 100%;
    }
}

/* Branch Nodes */
.tree-branch {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 80px;
    z-index: 2;
    opacity: 0;
    animation: fadeUp 0.8s ease-out forwards;
}

/* Staggered load animation */
.tree-branch:nth-child(2) {
    animation-delay: 0.3s;
}

.tree-branch:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Zig-Zag Magic (Even items go right) */
.tree-branch:nth-child(even) {
    flex-direction: row-reverse;
}

.branch-content {
    width: 45%;
    /* Keeps cards away from the center trunk */
}

/* Glowing Node Dot */
.branch-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #050505;
    border: 2px solid #00f2fe;
    border-radius: 50%;
    transition: 0.4s ease;
}

/* Hovering on a branch lights up the dot */
.tree-branch:hover .branch-dot {
    background: #00f2fe;
    box-shadow: 0 0 20px #00f2fe;
    transform: translateX(-50%) scale(1.4);
}

/* =========================================
   📱 MOBILE VIEW FIX
========================================= */
@media (max-width: 768px) {
    .tree-trunk {
        left: 24px;
    }

    .tree-branch,
    .tree-branch:nth-child(even) {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 60px;
        margin-bottom: 60px;
    }

    .branch-content {
        width: 100%;
    }

    .branch-dot {
        left: 24px;
    }
}

/* =========================================
   📝 CARD & GALLERY STYLES (From Previous)
========================================= */
.project-glass-card {
    background: rgba(9, 13, 22, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.project-glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* Gallery Base */
.project-gallery {
    position: relative;
    height: 220px;
    width: 100%;
}

.gallery-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    height: 100%;
}

.gallery-scroll-container::-webkit-scrollbar {
    display: none;
}

.gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tags & Dots */
.status-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.live-tag {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.dev-tag {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.gallery-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
}

.dot.active {
    background: #00f2fe;
    width: 16px;
    border-radius: 10px;
}

/* Content */
.project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tech-stack {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #60a5fa;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.project-info h3 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.project-info p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.primary-btn {
    background: transparent;
    color: #00f2fe;
    border: 1px solid #00f2fe;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.3s;
    width: 100%;
}

.primary-btn:hover {
    background: #00f2fe;
    color: #050505;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    width: 100%;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* Tree Container */
.dynamic-projects-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
    padding-left: 40px;
    /* Branch ke liye jagah */
}

/* Branch Line */
.dynamic-projects-grid::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #4285F4;
    /* Google Blue branch line */
}

.project-glass-card {
    position: relative;
    padding: 20px;
    border: 1px solid #333;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

/* Branch Node (Bullet point) */
.project-glass-card::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 25px;
    width: 12px;
    height: 12px;
    background: #00f2fe;
    border-radius: 50%;
    border: 2px solid #050505;
}

/* Tumhare timeline item ka wrapper */
.timeline-item {
    display: flex;
    align-items: center;
    /* Ye line aur dot ko card ke center mein layega */
    gap: 20px;
    /* Line aur card ke beech ka gap */
    position: relative;
    margin-bottom: 40px;
}

/* Dot ko line ke center mein fix karne ke liye */
.timeline-dot {
    position: absolute;
    left: -XXpx;
    /* Tumhari line ki position ke hisaab se adjust karo */
    top: 50%;
    transform: translateY(-50%);
    /* Ye exact center karega */
}

@media (max-width: 600px) {
    .gallery-slide {
        height: 200px;
        /* Mobile par thoda chhota card acha lagta hai */
    }
}