/* ============================================
   COMPONENTS
   Buttons, Cards, Badges
   ============================================ */

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--deep-accent);
    border-color: var(--deep-accent);
    color: var(--primary);
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--surface);
    text-decoration: none;
}

.btn-tertiary {
    background: var(--bg);
    color: var(--primary);
    border-color: var(--bg);
}

.btn-tertiary:hover {
    background: var(--surface);
    border-color: var(--surface);
    color: var(--primary);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--surface-dark);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--primary);
    text-decoration: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ---- Cards ---- */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--surface-dark);
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-clickable {
    cursor: pointer;
}

.card-clickable:hover {
    transform: translateY(-2px);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.card-text {
    color: var(--body-text);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* Value card (for values section) */
.value-card {
    text-align: center;
    padding: var(--space-xl);
}

.value-card .card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-md);
}

.value-card .card-icon svg {
    width: 100%;
    height: 100%;
}

.value-card h3 {
    margin-bottom: var(--space-sm);
}

/* Opportunity card - image background with text overlay */
.opportunity-card {
    position: relative;
    min-height: 320px;
    padding: 0;
    border: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.opportunity-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(28, 28, 26, 0.9) 0%,
        rgba(28, 28, 26, 0.7) 40%,
        rgba(28, 28, 26, 0.3) 70%,
        transparent 100%
    );
    z-index: 1;
}

.opportunity-card .card-content {
    position: relative;
    z-index: 2;
    padding: var(--space-lg);
}

.opportunity-card .card-title {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.opportunity-card .card-text {
    color: var(--surface);
    font-size: 0.9375rem;
    line-height: 1.6;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.opportunity-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Fallback backgrounds for cards without images */
.opportunity-card--hub { background-image: url('../assets/images/hub.jpg'); background-color: #2D5A3D; }
.opportunity-card--nature { background-image: url('../assets/images/nature.jpg'); background-color: #7D9B76; }
.opportunity-card--strategic { background-image: url('../assets/images/strategic.jpg'); background-color: #8B6F4E; }
.opportunity-card--scale { background-image: url('../assets/images/scale.jpg'); background-color: #C17F59; }
.opportunity-card--industrial { background-image: url('../assets/images/industrial.jpg'); background-color: #4A4A48; }
.opportunity-card--civic { background-image: url('../assets/images/civic.jpg'); background-color: #2D5A3D; }

@media (max-width: 768px) {
    .opportunity-card {
        min-height: 280px;
    }

    .opportunity-card .card-title {
        font-size: 1.25rem;
    }
}

/* Coming soon card */
.coming-soon-card {
    position: relative;
    opacity: 0.85;
}

.coming-soon-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 10px,
        rgba(249, 247, 240, 0.3) 10px,
        rgba(249, 247, 240, 0.3) 20px
    );
    pointer-events: none;
    border-radius: var(--radius-lg);
}

/* Mystery/blurred coming soon card - spoiler effect */
.coming-soon-card--mystery {
    opacity: 0.7;
    filter: blur(2px);
    transition: filter var(--transition-normal), opacity var(--transition-normal);
}

.coming-soon-card--mystery::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(249, 247, 240, 0.4) 0%,
        rgba(249, 247, 240, 0.6) 50%,
        rgba(249, 247, 240, 0.4) 100%
    );
    z-index: 1;
    border-radius: var(--radius-lg);
    pointer-events: none;
}

.coming-soon-card--mystery:hover {
    filter: blur(1px);
    opacity: 0.8;
}

.coming-soon-card--mystery .card-title {
    color: var(--muted);
}

.coming-soon-card--mystery .card-text {
    color: var(--muted);
    font-style: italic;
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-success {
    background: rgba(22, 163, 74, 0.15);
    color: var(--status-success);
}

.badge-warning {
    background: rgba(234, 179, 8, 0.15);
    color: var(--status-warning);
}

.badge-info {
    background: rgba(107, 114, 128, 0.15);
    color: var(--status-info);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ---- Resource list ---- */
.resource-list {
    list-style: none;
    padding: 0;
}

.resource-list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--surface-dark);
}

.resource-list li:last-child {
    border-bottom: none;
}

.resource-list a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.resource-list .link-icon {
    color: var(--accent);
}

/* ---- Iframe wrapper ---- */
.iframe-wrapper {
    position: relative;
    width: 100%;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.iframe-wrapper--16x9 {
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.iframe-wrapper--fixed {
    height: 700px;
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive iframe heights */
@media (max-width: 768px) {
    .iframe-wrapper--16x9 {
        padding-bottom: 0;
        min-height: 500px;
        height: 70vh;
    }

    .iframe-wrapper--fixed {
        height: 600px;
    }

    .iframe-wrapper iframe {
        position: relative;
        height: 100%;
    }
}

/* ---- Webapp Preview ---- */
.webapp-preview {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--surface-dark);
}

.webapp-description {
    font-size: 1.0625rem;
    color: var(--body-text);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
