/* ================= HERO ================= */

.platform-hero {
    position: relative;
    padding: 140px 0 120px 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* layout */
.platform-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
}

/* text */
.platform-hero-content {
    flex: 1;
}

.platform-hero h1 {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.2;
    color: #000000;
}

.platform-hero p {
    font-size: 20px;
    line-height: 1.6;
    max-width: 540px;
}

.platform-hero .hero-lead {
    font-size: 20px;
    font-weight: 500;
}

.platform-hero .hero-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

/* image */
.platform-hero-image {
    flex: 1.2;
    text-align: right;
}

.platform-hero-image img {
    width: 110%;
    max-width: 780px;
    height: auto;
}


/* ======================================================
   PLATFORM ARCHITECTURE
====================================================== */

.platform-architecture {
    background: #eef6f3;
    padding: 140px 0;
}

/* Titles */

.architecture-section-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #128c6a;
}

.architecture-section-subtitle {
    color: #666;
    margin-bottom: 80px;
    font-size: 18px;
}

/* Layout */

.architecture-layout {
    display: grid;
    grid-template-columns: 600px 1fr;
    gap: 100px;
    align-items: center;
}

.architecture-section-footer {
    margin-top: 90px;
    font-size: 20px;
    font-weight: 600;
    color: #e57a2e;
}

/* ================= DIAGRAM ================= */

.diagram-wrapper {
    position: relative;
    width: 600px;
    height: 600px;
}

.diagram-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 60px;
    text-decoration: none;
    color: #000;
    font-weight: 700;
    font-size: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    z-index: 2;
    transition: all 0.3s ease;
}

.diagram-center a {
    display: block;
    padding: 26px 70px;
    font-size: 20px;
    font-weight: 700;
    background: #ffffff;
    border-radius: 60px;
    text-decoration: none;
    color: #000;
}

/* Hover a aktivní stav */
.diagram-center:hover,
.diagram-center.active-module {
    transform: translate(-50%, -50%) scale(1.08);
}

.diagram-center:hover a,
.diagram-center.active-module a {
    background: #128c6a;
    color: #fff;
}

.diagram-circle {
    width: 100%;
    height: 100%;
    border: 8px solid #b7ded3;
    border-radius: 50%;
    position: relative;
    animation: rotateCircle 90s linear infinite;
}

/* Rotate whole circle */
@keyframes rotateCircle {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Items */

.diagram-item {
    position: absolute;
    background: #ffffff;
    padding: 18px 34px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    color: #000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    animation: counterRotate 90s linear infinite;
    transition: all 0.3s ease;
}

.diagram-item:hover {
    background: #128c6a;
    color: #fff;
    transform: scale(1.15);
}

/* Counter rotation so text stays straight */
@keyframes counterRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

/* Positions */
.item-1 { top: -35px; left: 50%; transform: translateX(-50%); }
.item-2 { top: 22%; right: -70px; }
.item-3 { bottom: 22%; right: -70px; }
.item-4 { bottom: -35px; left: 50%; transform: translateX(-50%); }
.item-5 { bottom: 22%; left: -70px; }
.item-6 { top: 22%; left: -70px; }

.diagram-wrapper:hover .diagram-circle {
    animation-play-state: paused;
}

.diagram-wrapper:hover .diagram-item {
    animation-play-state: paused;
}

.diagram-wrapper:hover .diagram-circle {
    border-color: #128c6a;
}

/* ================= MODULE CARDS ================= */

.architecture-modules {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.module-card {
    position: relative;
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    text-decoration: none;
    color: #000;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.module-bug {
    position: absolute;
    width: 80px;
    height: 80px;
    background: #bfe6db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
}

.module-bug img {
    width: 55px;
    transition: all 0.4s ease;
}

.bug-top-left    { top: -30px; left: 30px; }
.bug-top-right   { top: -30px; right: 30px; }
.bug-bottom-left { bottom: -30px; left: 30px; }
.bug-bottom-right{ bottom: -30px; right: 30px; }

.module-card:hover .bug-top-left {
    transform: translate(-10px, -10px) scale(1.15);
}

.module-card:hover .bug-top-right {
    transform: translate(10px, -10px) scale(1.15);
}

.module-card:hover .bug-bottom-left {
    transform: translate(-10px, 10px) scale(1.15);
}

.module-card:hover .bug-bottom-right {
    transform: translate(10px, 10px) scale(1.15);
}

.module-card:hover .module-bug {
    box-shadow: 0 20px 40px rgba(18,140,106,0.25);
}

.module-card:hover .module-bug img {
    transform: rotate(10deg) scale(1.1);
}

.module-card h4 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
}

.module-card p {
    font-size: 20px;
    color: #555;
}

/* Hover */

.module-card:hover {
    transform: translateY(-8px);
}

/* Highlight state */

.active-module {
    background: #128c6a !important;
    color: #fff !important;
    transform: scale(1.05);
}

.active-module h4,
.active-module p {
    color: #fff !important;
}

/* ================= EVOLUTION ================= */

.platform-evolution {
    padding: 80px 0;
    font-size: 22px;
    font-weight: 500;
}

/* ================= RESPONSIVE ================= */

@media screen and (min-width: 1800px) {

    .container {
        max-width: 1800px;
    }

    .platform-hero h1  {
        font-size: 68px;
        line-height: 1.05;
    }

    .platform-hero p {
        font-size: 25px;
    }

    .platform-hero .hero-lead {
        font-size: 25px;
    }

    .platform-hero-image {
        flex: 1.5;
        text-align: right;
    }

    .platform-hero-image img {
        width: 150%;
        max-width: 1000px;
        height: auto;
    }

    .platform-architecture {
        padding: 180px 0;
    }

    .architecture-layout {
        grid-template-columns: 700px 1fr;
        gap: 140px;
        align-items: center;
    }

    .architecture-section-title {
        font-size: 52px;
    }

    .architecture-section-subtitle {
        font-size: 25px;
        margin-bottom: 100px;
    }

    .architecture-section-footer {
        font-size: 25px;
    }

    /* ================= DIAGRAM ================= */

    .diagram-wrapper {
        width: 700px;
        height: 700px;
    }

    .diagram-circle {
        border-width: 10px;
    }

    .diagram-item {
        font-size: 20px;
        padding: 22px 40px;
    }

    .diagram-center a {
        font-size: 28px;
        padding: 30px 90px;
    }

    /* Upravené pozice – větší radius */

    .item-1 { top: -45px; left: 50%; transform: translateX(-50%); }
    .item-2 { top: 24%; right: -95px; }
    .item-3 { bottom: 24%; right: -95px; }
    .item-4 { bottom: -45px; left: 50%; transform: translateX(-50%); }
    .item-5 { bottom: 24%; left: -95px; }
    .item-6 { top: 24%; left: -95px; }

    /* ================= MODULE CARDS ================= */

    .architecture-modules {
        gap: 60px;
    }

    .module-card {
        padding: 55px;
        border-radius: 26px;
    }

    .module-card h4 {
        font-size: 28px;
    }

    .module-card p {
        font-size: 25px;
    }

    .module-bug {
        width: 95px;
        height: 95px;
    }

    .module-bug img {
        width: 65px;
    }

}

@media screen and (max-width: 1220px) {

    /* ================= HERO ================= */

    .platform-hero-inner {
        gap: 60px;
    }

    .platform-hero h1 {
        font-size: 44px;
        line-height: 1.15;
    }

    .platform-hero-image {
        max-width: 520px;
    }

    /* ================= ARCHITECTURE ================= */

    .platform-architecture {
        padding: 110px 0;
    }

    .architecture-layout {
        grid-template-columns: 460px 1fr; /* zmenšeno z 500px */
        gap: 70px; /* trochu víc vzduchu */
        align-items: center;
    }

    .architecture-section-title {
        font-size: 34px;
    }

    .architecture-section-subtitle {
        margin-bottom: 50px;
        font-size: 16px;
    }

    /* ================= DIAGRAM ================= */

    .diagram-wrapper {
        width: 460px;
        height: 460px;
    }

    .diagram-circle {
        border-width: 6px;
    }

    .diagram-item {
        font-size: 13px;
        padding: 12px 20px;
    }

    .diagram-center a {
        font-size: 15px;
        padding: 18px 45px;
    }

    /* radius lehce utažený */

    .item-1 { top: -22px; left: 50%; transform: translateX(-50%); }
    .item-2 { top: 23%; right: -45px; }
    .item-3 { bottom: 23%; right: -45px; }
    .item-4 { bottom: -22px; left: 50%; transform: translateX(-50%); }
    .item-5 { bottom: 23%; left: -45px; }
    .item-6 { top: 23%; left: -45px; }

    /* ================= MODULE CARDS ================= */

    .architecture-modules {
        gap: 35px;
    }

    .module-card {
        padding: 28px;
    }

    .module-card h4 {
        font-size: 19px;
    }

    .module-card p {
        font-size: 15px;
        line-height: 1.6;
    }

    .module-bug {
        width: 65px;
        height: 65px;
    }

    .module-bug img {
        width: 45px;
    }

}


@media screen and (max-width: 1030px) {

    .platform-hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .platform-hero-content p {
        max-width: 100%;
    }

    .platform-hero-image {
        text-align: center;
        margin-top: 40px;
    }

    .platform-hero-image img {
        width: 100%;
        max-width: 600px;
    }

    .platform-hero .hero-buttons {
        justify-content: center;
    }

    /* ================= ARCHITECTURE ================= */

    .architecture-layout {
        grid-template-columns: 1fr;
        gap: 80px;
    }

    .architecture-section-title {
        font-size: 32px;
    }

    .architecture-section-subtitle {
        font-size: 16px;
        margin-bottom: 60px;
    }

    /* ================= DIAGRAM ================= */

    .diagram-wrapper {
        margin: 0 auto;
        width: 440px;
        height: 440px;
    }

    .diagram-item {
        font-size: 13px;
        padding: 12px 20px;
    }

    .diagram-center a {
        font-size: 15px;
        padding: 18px 45px;
    }

    /* Radius zmenšený */

    .item-1 { top: -22px; left: 50%; transform: translateX(-50%); }
    .item-2 { top: 22%; right: -45px; }
    .item-3 { bottom: 22%; right: -45px; }
    .item-4 { bottom: -22px; left: 50%; transform: translateX(-50%); }
    .item-5 { bottom: 22%; left: -45px; }
    .item-6 { top: 22%; left: -45px; }

    /* ================= MODULE CARDS ================= */

    .architecture-modules {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .module-card {
        padding: 35px;
    }

    .module-card h4 {
        font-size: 20px;
    }

    .module-card p {
        font-size: 16px;
    }

    .module-bug {
        width: 70px;
        height: 70px;
    }

    .module-bug img {
        width: 48px;
    }

}

@media screen and (max-width: 768px) {

    .platform-hero {
        padding: 90px 0 70px 0;
        text-align: center;
    }

    .platform-hero h1 {
        font-size: 30px;
        line-height: 1.2;
        margin-bottom: 20px;
    }

    .platform-hero p {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 18px;
        padding: 0 10px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 260px;
    }

    .platform-hero-image {
        margin-top: 45px;
        max-width: 85%;
    }

    .platform-architecture {
        padding: 80px 0;
    }

    .architecture-section-title {
        font-size: 26px;
    }

    .architecture-section-subtitle {
        font-size: 15px;
        margin-bottom: 40px;
    }

    .architecture-layout {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    /* ================= DIAGRAM TRANSFORM ================= */

    .diagram-wrapper {
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 40px;
    }

    .diagram-circle {
        display: none;
    }

    .diagram-item {
        display: none;
    }

    .diagram-center {
        position: static !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;

        display: flex;
        justify-content: center;
        width: 100%;
        margin-bottom: 30px;
    }

    .diagram-center a {
        display: inline-block;
        padding: 18px 50px;
        font-size: 16px;
        border-radius: 40px;
    }

    /* ================= MODULE CARDS ================= */

    .architecture-modules {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .module-card {
        padding: 30px;
        border-radius: 18px;
    }

    .module-card h4 {
        font-size: 18px;
    }

    .module-card p {
        font-size: 15px;
    }

    /* Brouček menší */
    .module-bug {
        width: 60px;
        height: 60px;
    }

    .module-bug img {
        width: 40px;
    }

}
