/* ------------------------------------------
   CG4WP COMPONENT STYLES
   Shared styling for cards, grids, and text templates
   ------------------------------------------ */

:root {
    --cg4wp-surface: #ffffff;
    --cg4wp-surface-muted: #f9fafb;
    --cg4wp-surface-strong: #111827;
    --cg4wp-surface-alt: #0f172a;
    --cg4wp-border: #e5e7eb;
    --cg4wp-border-strong: #d1d5db;
    --cg4wp-text-primary: #111827;
    --cg4wp-text-secondary: #4b5563;
    --cg4wp-text-muted: #6b7280;
    --cg4wp-link: #2563eb;
    --cg4wp-radius: 14px;
    --cg4wp-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
}

/* Grid wrapper for cards */
.cg4wp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
    padding: 20px 0;
}

/* Card container */
.cg4wp-card {
    background: var(--cg4wp-surface);
    border-radius: var(--cg4wp-radius);
    overflow: hidden;
    box-shadow: var(--cg4wp-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid transparent;
}

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

/* Clickable wrapper */
.cg4wp-card-inner {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Thumbnail */
.cg4wp-card-thumb {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Content area */
.cg4wp-card-content {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cg4wp-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Title */
.cg4wp-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--cg4wp-text-primary);
    margin: 0;
}

/* Excerpt */
.cg4wp-card-excerpt {
    font-size: 14px;
    color: var(--cg4wp-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.cg4wp-card-destination {
    font-size: 13px;
    margin: 0;
    color: var(--cg4wp-text-muted);
}

.cg4wp-card-link {
    font-size: 14px;
    margin-top: 2px;
    text-decoration: none;
    color: var(--cg4wp-text-primary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cg4wp-card-link:hover,
.cg4wp-card-link:focus {
    color: var(--cg4wp-link);
}

/* Text template styling */
.cg4wp-text-template-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
}

.cg4wp-text-template-item {
    background: var(--cg4wp-surface-muted);
    border: 1px solid var(--cg4wp-border);
    border-radius: 10px;
    padding: 12px 14px;
}

.cg4wp-text-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--cg4wp-border);
}

.cg4wp-text-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.cg4wp-text-heading {
    font-weight: 700;
    color: var(--cg4wp-surface-alt);
    font-size: 15px;
}

.cg4wp-text-excerpt {
    color: #374151;
    margin: 0 0 10px;
    line-height: 1.5;
}

.cg4wp-text-link,
.cg4wp-text-link:link,
.cg4wp-text-link:visited,
.cg4wp-text-link a {
    color: var(--cg4wp-link);
    text-decoration: none;
    font-weight: 600;
}

.cg4wp-text-link:hover,
.cg4wp-text-link:focus,
.cg4wp-text-link a:hover,
.cg4wp-text-link a:focus {
    text-decoration: underline;
}

.cg4wp-tax-list {
    margin: 0 0 10px 0;
    padding: 0;
}

.cg4wp-tax-item {
    font-size: 14px;
    color: #444;
    margin-bottom: 3px;
}

.cg4wp-action-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
}

.cg4wp-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    color: #fff;
    background: var(--cg4wp-surface-alt);
    border: 1px solid var(--cg4wp-surface-alt);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cg4wp-button:hover,
.cg4wp-button:focus {
    background: #1d3a6e;
    border-color: #1d3a6e;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.cg4wp-button--secondary {
    background: #fff;
    color: var(--cg4wp-text-primary);
    border-color: var(--cg4wp-border-strong);
}

.cg4wp-button--secondary:hover,
.cg4wp-button--secondary:focus {
    background: var(--cg4wp-surface-muted);
    color: var(--cg4wp-text-primary);
}
