/* =========================
   DEMO GRID
========================= */

.demos {
    background: #111111;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-top: 50px;
    padding-bottom: 100px;
    padding-left: 150px;
    padding-right: 150px;
    max-width: 1600px;
    margin: auto;
    position: relative;
    background: #111111;
}

.demo-grid a {
    position: relative;
    display: block;
}

.demo-grid a img {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    transition: transform 0.3s;
}

.demo-grid a img:hover {
    transform: scale(1.05);
}

/* =========================
   PLAY BUTTON (SVG)
========================= */
.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 60px;
    height: 60px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 5s ease, transform 5s ease; /* yavaş küçülme */
    pointer-events: none; /* clickler JS ile yakalanıyor */
}

/* Hover & Touch */
.demo-grid a.hovered .play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
    transition: transform 0.2s ease, opacity 0.2s ease; /* hızlı büyüme */
}

/* Playing (click sonrası yavaş küçülme) */
.demo-grid a.playing .play-btn {
    transform: translate(-50%, -50%) scale(1);
    transition: transform 5s ease, opacity 5s ease;
}

/* =========================
   DEMO BAŞLIĞI
========================= */
.demos h2.center {
    font-size: clamp(3.7rem, 5vw, 5rem);
    line-height: 1.2;
    margin: 0 0 0 0;
    font-weight: 200;
    letter-spacing: -1px;
    background: #111111;
    padding-bottom: 0px;
}

.demos h2.center strong {
    font-weight: 500;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width:1024px){
    @media (orientation: portrait) {
        .demo-grid {
            display: grid;
            grid-auto-flow: column;
            grid-auto-columns: calc((100% - 30px)/4);
            gap: 20px;
            padding-top: 50px;
            padding-bottom: 100px;
            padding-left: 50px;
            padding-right: 50px;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }
    }
    @media (orientation: landscape) {
        .demo-grid {
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            padding-top: 50px;
            padding-bottom: 100px;
            padding-left: 50px;
            padding-right: 50px;
        }
    }
    .demos h2.center { font-size: clamp(3.5rem, 4vw, 4.5rem); }
}

@media (max-width:740px){
    @media (orientation: portrait) {
        .demo-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            grid-template-rows: repeat(2, auto);
            gap: 15px;
            padding-top: 50px;
            padding-bottom: 100px;
            padding-left: 50px;
            padding-right: 50px;
        }
    }
    @media (orientation: landscape) {
        .demo-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
            padding-top: 50px;
            padding-bottom: 100px;
            padding-left: 10px;
            padding-right: 10px;
        }
    }
    .demos h2.center { font-size: clamp(2.3rem, 3vw, 3.5rem); }
}

/* Telefon ≤500px */
@media (max-width:500px) {

    /* mevcut <br> korunacak */
    .center br {
        display: block; /* her zaman alt satıra düşsün */
    }

    /* Mobilde kural: Check out / Professional Demos */
    .center .mobile-break {
        display: block; /* satırı burada kır */
        content: ''; /* pseudo-element değil, span kullanıyoruz */
        height: 0; /* görsel boşluk yaratmaz */
    }
}

.section-subtitle {
    margin-top: 0px;
    margin-bottom: 0px;
    margin-left: 100px;
    margin-right: 100px;
    font-size: 1.6rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.section-subtitle strong {
    font-weight: 500;
}

@media (max-width:1024px){
    .section-subtitle {
        font-size: 1.4rem;
        margin-left: 50px;
        margin-right: 50px;
    }
}

@media (max-width:740px){
    .section-subtitle {
        font-size: 1.2rem;
        margin-left: 10px;
        margin-right: 10px;
    }
}