/* ============================================================
   mod_alpgeotech_section — Gemeinsame und Layout-spezifische Styles
   ============================================================ */

/* Akzentfarben-Map */
.agt-card[data-accent="teal"]  { --acc: #2a947a; }
.agt-card[data-accent="blue"]  { --acc: #3b82f6; }
.agt-card[data-accent="green"] { --acc: #10b981; }
.agt-card[data-accent="amber"] { --acc: #f59e0b; }
.agt-card[data-accent="red"]   { --acc: #ef4444; }

/* ── Abschnitt-Wrapper ── */
.agt-section {
    padding: 24px 0 36px;
}

.agt-section-label {
    display: block;
    font-size: 1.05rem;
    text-transform: uppercase;
    color: #2a947a;
    letter-spacing: 0.12em;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.agt-section-heading {
    font-size: 2rem;
    font-weight: 700;
    color: #1a2b3c;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.agt-section-desc {
    font-size: 1rem;
    color: #555;
    max-width: 100%;
    line-height: 1.65;
    margin-bottom: 2.5rem;
}

/* ── Karten-Grid (default-Layout) ── */
.agt-cards-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3, 1fr);
}

/* ── Carousel-Wrapper ── */
.agt-carousel-outer {
    position: relative;
}

/* ── Basis-Karte ── */
.agt-card {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.agt-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: #c8d8d4;
}

.agt-card:hover .agt-card-img {
    transform: scale(1.06);
}

.agt-card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 260px;
}

.agt-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.agt-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.agt-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a2b3c;
    margin-bottom: 0.5rem;
}

.agt-card-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* ── Scroll-Animation (via JS Intersection Observer) ── */
.agt-fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.agt-fade-up.agt-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Showcase-Layout spezifisch ── */

/* System-Header */
.agt-system-header {
    margin-bottom: 1.5rem;
}

.agt-system-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(42, 148, 122, 0.1);
    border: 1px solid rgba(42, 148, 122, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #2a947a;
}

.agt-system-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.agt-system-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a2b3c;
    margin: 0;
}

.agt-system-badge {
    padding: 2px 8px;
    border-radius: 5px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #888;
    font-size: 11px;
    font-weight: 600;
}

.agt-system-desc {
    font-size: 0.875rem;
    color: #555;
    max-width: 100%;
    line-height: 1.6;
    margin: 0;
}

/* Divider */
.agt-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.agt-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #e9ecef, transparent);
}

.agt-divider-label {
    font-size: 10px;
    color: #aaa;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Showcase Karten-Grid */
.agt-cards-grid--showcase {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3, 1fr);
}

/* Showcase Karte */
.agt-card--showcase {
    cursor: default;
    min-height: 380px;
    transition: opacity 0.2s ease, transform 0.2s ease,
                box-shadow 0.2s ease, filter 0.2s ease;
}

.agt-card--showcase .agt-card-img-wrap {
    height: 280px;
}

.agt-card--showcase:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: #c8d8d4;
}

.agt-card--showcase:hover .agt-card-img {
    transform: scale(1.06);
}

.agt-card:hover .agt-card-bottom-bar {
    transform: scaleX(1);
    opacity: 1;
}

.agt-card--showcase:hover .agt-card-features {
    opacity: 1;
}

.agt-card--showcase:hover .agt-card-cta {
    opacity: 1;
}

/* Tag auf dem Bild */
.agt-card-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--acc, #2a947a);
    background: color-mix(in srgb, var(--acc, #2a947a) 12%, rgba(255,255,255,0.82));
    border: 1px solid color-mix(in srgb, var(--acc, #2a947a) 35%, transparent);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.agt-card-tag svg {
    flex-shrink: 0;
}

/* Features + CTA gemeinsamer Footer-Block */
.agt-card-footer {
    margin-top: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Features */
.agt-card-features {
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0.6;
    transition: opacity 0.25s ease;
}

.agt-card-feature {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.825rem;
    color: #555;
}

.agt-card-feature-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.55em;
    background: var(--acc, #2a947a);
}

/* CTA */
.agt-card-cta {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
    color: var(--acc, #2a947a);
    text-decoration: none;
    padding: 0.4em 0.85em;
    border-radius: 20px;
    border: 1.5px solid color-mix(in srgb, var(--acc, #2a947a) 35%, transparent);
    background: color-mix(in srgb, var(--acc, #2a947a) 6%, transparent);
    align-self: flex-start;
}

.agt-card-cta:hover {
    color: var(--acc, #2a947a);
    background: color-mix(in srgb, var(--acc, #2a947a) 12%, transparent);
    transform: translateX(2px);
    text-decoration: none;
}

/* Unterer Akzent-Balken */
.agt-card-bottom-bar {
    height: 2px;
    width: 100%;
    transform: scaleX(0);
    opacity: 0;
    transform-origin: left;
    transition: transform 0.4s ease, opacity 0.4s ease;
    background: linear-gradient(
        to right,
        transparent,
        var(--acc, #2a947a),
        transparent
    );
}

/* Tagline-Flow-Leiste */
.agt-tagline-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid #e9ecef;
}

/* Flow-Hover: bidirektionales Highlighting */
.agt-section.agt-flow-hovering .agt-tagline-flow-badge {
    opacity: 0.55;
    transform: scale(0.97);
}
.agt-section.agt-flow-hovering .agt-tagline-flow-badge.is-flow-active {
    opacity: 1;
    transform: scale(1.07);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}
.agt-section.agt-flow-hovering .agt-card--showcase {
    opacity: 0.65;
    filter: grayscale(8%);
}
.agt-section.agt-flow-hovering .agt-card--showcase.is-flow-active {
    opacity: 1;
    filter: none;
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.13);
}

.agt-tagline-flow-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.4em 0.85em;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: default;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    color: var(--acc, #2a947a);
    background: color-mix(in srgb, var(--acc, #2a947a) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--acc, #2a947a) 28%, transparent);
}

[data-accent="teal"]  { --acc: #2a947a; }
[data-accent="blue"]  { --acc: #3b82f6; }
[data-accent="green"] { --acc: #10b981; }
[data-accent="amber"] { --acc: #f59e0b; }
[data-accent="red"]   { --acc: #ef4444; }

.agt-tagline-flow-arrow {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin: 0 0.25rem;
}

/* Fork-Layout: Sensoren gestapelt links */
.agt-tagline-flow--fork {
    align-items: center;
}

.agt-tagline-flow-stack {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-shrink: 0;
}

.agt-tagline-fork-connector {
    align-self: stretch;
    width: 52px;
    flex-shrink: 0;
    position: relative;
}

.agt-tagline-fork-connector svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Architektur-Leiste (Legacy, falls noch genutzt) */
.agt-arch-bar {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.agt-arch-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.agt-arch-text-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a2b3c;
    margin: 0;
}

.agt-arch-text-sub {
    font-size: 0.75rem;
    color: #999;
    margin: 0;
}

.agt-arch-flow {
    flex: 1;
    font-size: 0.8rem;
    color: #555;
    padding: 0 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .agt-cards-grid,
    .agt-cards-grid--showcase {
        grid-template-columns: 1fr;
    }

    .agt-arch-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .agt-cards-grid,
    .agt-cards-grid--showcase {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Flow-Layout ── */
.agt-flow-grid {
    display: grid;
    grid-template-columns: 1fr 56px 1fr 56px 1fr;
    align-items: stretch;
    margin-top: 2rem;
}

/* Kartenspalten */
.agt-flow-col {
    display: flex;
    flex-direction: column;
}

/* Gestapelte Spalte: zwei Karten übereinander */
.agt-flow-col--stack {
    gap: 1.25rem;
}

.agt-flow-stack-item {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.agt-flow-stack-item .agt-card {
    flex: 1;
}

/* Einfacher Pfeil-Connector */
.agt-flow-connector {
    display: flex;
    align-items: center;
    justify-content: center;
}

.agt-flow-arrow-svg {
    width: 48px;
    height: 24px;
}

/* Gabel-Connector: füllt die volle Höhe der gestapelten Spalte */
.agt-flow-connector--fork {
    position: relative;
}

.agt-flow-fork-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive: unterhalb 900 px einspaltig, Pfeile ausblenden */
@media (max-width: 900px) {
    .agt-flow-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .agt-flow-connector {
        display: none;
    }

    .agt-flow-col--stack {
        gap: 1rem;
    }
}
