/* css/components.css */

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn-primary,
.btn-secondary {
    padding: 12px 32px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    box-shadow: var(--elevation-1);
}

.btn-primary:hover {
    box-shadow: var(--elevation-2);
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.btn-secondary:hover {
    background-color: rgba(229, 11, 160, 0.05);
    transform: translateY(-2px);
}

/* ==========================================================
   CARDS (Base Physics)
   ========================================================== */
.card {
    background-color: var(--surface);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--elevation-1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid transparent;

    /* Unified animation curve */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

.card:hover {
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.03);
    transform: translateY(-4px);
    border-color: rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--on-surface);
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-body {
    font-size: 0.95rem;
    color: #5f6368;
    line-height: 1.6;
}

a.card-link {
    text-decoration: none;
    color: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-action-text {
    margin-top: auto;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 16px;
}

/* ==========================================================
   SPECIFIC CARD TYPES
   ========================================================== */
/* Course Card Circular Images */
.instrument-circle {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    background-color: #e9ecef;
    border: 4px solid var(--surface);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateZ(0);
}

.instrument-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card:hover .instrument-circle {
    transform: scale(1.08) translateZ(0);
}

/* Team Card Special Layout */
.team-card {
    flex-direction: row;
    gap: 32px;
    padding: 40px;
    align-items: start;
    max-width: 1000px !important;
}

.team-card-image {
    flex: 1;
    min-width: 250px;
    height: 300px;
    border-radius: 8px;
    background-color: #eee;
    object-fit: cover;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateZ(0);
}

.team-card:hover .team-card-image {
    transform: scale(1.04) translateZ(0);
}

.team-card-content {
    flex: 2;
    min-width: 280px;
}

@media (max-width: 768px) {
    .team-card {
        flex-direction: column;
        padding: 24px;
    }

    .team-card-image {
        width: 100%;
        min-width: auto;
        height: 250px;
    }
}

/* ==========================================================
   FORMS
   ========================================================== */
.form-container {
    background: var(--surface);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--elevation-1);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--on-surface);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s ease;
    background-color: #fff;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==========================================================
   FEATURE LIST (The Harmonic Difference)
   ========================================================== */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0;
    font-family: var(--font-body);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.feature-item:hover {
    transform: translateX(8px);
    /* Slides slightly to the right on hover */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background-color: rgba(var(--brand-cyan-rgb), 0.1);
    color: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.feature-icon .material-icons-outlined {
    font-size: 28px;
}

.feature-text strong {
    display: block;
    font-size: 1.05rem;
    color: var(--on-surface);
    margin-bottom: 4px;
}

.feature-text p {
    margin: 0;
    font-size: 0.95rem;
    color: #5f6368;
    line-height: 1.4;
}

/* Make it look even better on mobile */
@media (max-width: 768px) {
    .feature-item {
        padding: 12px;
        gap: 16px;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
    }

    .feature-icon .material-icons-outlined {
        font-size: 24px;
    }
}

/* ==========================================================
   MOBILE FORM RESPONSIVENESS
   ========================================================== */
@media (max-width: 768px) {
    .form-container {
        padding: 24px 16px;
        /* Drastically reduce inner padding so inputs have room */
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 10px 12px;
        /* Slim down the text box padding */
        font-size: 0.95rem;
        /* Slightly scale down text for mobile fitting */
    }

    .form-label {
        font-size: 0.95rem;
    }
}

/* ==========================================================
   COURSE PAGE ACTION BUTTONS
   ========================================================== */
.course-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

/* Stack strictly on Mobile Portrait */
@media (max-width: 768px) and (orientation: portrait) {
    .course-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .course-actions .btn-primary,
    .course-actions .btn-secondary {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}