/**
 * CARD COMPONENTS
 * Standard Cards & School Cards mit Horizontal Scroller
 *
 * Varianten:
 * - .card (Standard Card)
 * - .school-card (Bildbasierte Karte)
 * - .horizontal-scroller (Mobile Scrolling, Desktop Grid)
 *
 * Letzte Änderung: 2025-10-07 - Konsolidiert aus components.css
 */

/* ===== STANDARD CARD ===== */
.card {
    background: white;
    padding: var(--space-xl);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 6px;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--penn-blue);
    margin-bottom: var(--space-sm);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--seasalt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--old-gold);
    margin-bottom: var(--space-md);
    border-radius: 6px;
}

/* ===== SCHOOL CARDS ===== */
.school-card {
    background: white;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    flex: 0 0 auto;
    width: 320px;
    border-radius: 6px;
}

.school-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.school-card-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    background-size: cover;
    background-position: center;
    background-color: var(--timberwolf);
    overflow: hidden;
}

.school-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.school-card:hover .school-card-image img {
    transform: scale(1.05);
}

.school-card-content {
    padding: var(--space-lg);
}

.school-card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--penn-blue);
    margin-bottom: var(--space-sm);
}

.school-card-description {
    font-family: var(--font-content);
    font-size: 1rem;
    line-height: 1.6;
    color: #5A5D61;
}

/* ===== HORIZONTAL SCROLLER (Responsive) ===== */

/* Mobile & Tablet: Touch Scrolling */
.horizontal-scroller {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.horizontal-scroller::-webkit-scrollbar {
    display: none;
}

.scroller-container {
    display: flex;
    gap: var(--space-lg);
    padding: 0 var(--container-padding-mobile);
    min-width: min-content;
}

@media (min-width: 768px) {
    .scroller-container {
        padding: 0 var(--container-padding-tablet);
    }

    .school-card {
        width: 380px;
    }
}

/* Desktop: Grid Layout */
@media (min-width: 1024px) {
    .horizontal-scroller {
        overflow-x: visible;
    }

    .scroller-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: var(--space-xl);
        padding: 0 var(--container-padding-desktop);
        max-width: var(--max-width);
        margin: 0 auto;
        min-width: auto;
    }

    .school-card {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
    }
}

@media (min-width: 1920px) {
    .scroller-container {
        padding: 0 var(--container-padding-wide);
    }
}

/* ===== IMAGE CONTAINERS ===== */
.img-container {
    position: relative;
    overflow: hidden;
    background: var(--seasalt);
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.img-container:hover img {
    transform: scale(1.05);
}

/* Aspect Ratios */
.aspect-ratio-3-2 {
    aspect-ratio: 3 / 2;
    border-radius: 6px;
    overflow: hidden;
}

/* Responsive: Aspect Ratio auf Mobile deaktivieren für flexible Höhe */
@media (max-width: 1023px) {
    .grid-2-equal .aspect-ratio-3-2 {
        aspect-ratio: auto;
        min-height: auto;
    }

    /* Ausnahme: Karte behält Aspect Ratio für bessere Nutzung */
    #standort .grid-2-equal .aspect-ratio-3-2:last-child {
        aspect-ratio: 4 / 3; /* Quadratischer für mehr Höhe */
        min-height: 400px;
        max-width: 100%;
        width: 100%;
    }
}

/* Bei sehr schmalen Viewports: Aspect Ratio anpassen */
@media (max-width: 699px) {
    #standort .grid-2-equal .aspect-ratio-3-2:last-child {
        aspect-ratio: 1 / 1; /* Quadratisch bei kleinen Screens */
        min-height: 350px;
    }
}

.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1 / 1;
}
