/* ============================================================
   Destination DNA — Frontend Styles
   ============================================================ */

/* ── Container ────────────────────────────────────────────── */
.ddna-destination {
    font-family: inherit;
    color: inherit;
    max-width: 860px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* ── Cover image ──────────────────────────────────────────── */
.ddna-cover {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
}

.ddna-cover img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

/* ── Header row ───────────────────────────────────────────── */
.ddna-header-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.ddna-destination-name {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.ddna-country {
    font-size: 0.95rem;
    color: #666;
    font-weight: 400;
}

/* ── AI badge ─────────────────────────────────────────────── */
.ddna-ai-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 4px solid #ffc107;
    border-radius: 6px;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: #5d4037;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.ddna-badge-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.ddna-badge-link {
    margin-left: auto;
    font-weight: 600;
    color: #e65100;
    text-decoration: none;
    white-space: nowrap;
}

.ddna-badge-link:hover {
    text-decoration: underline;
}

/* ── Sections ─────────────────────────────────────────────── */
.ddna-section {
    margin-bottom: 2rem;
}

.ddna-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #f0f0f0;
}

/* ── Article ──────────────────────────────────────────────── */
.ddna-article p {
    margin: 0 0 1em;
}

/* ── Seasons grid ─────────────────────────────────────────── */
.ddna-seasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.ddna-season-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.ddna-season-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.4rem;
}

.ddna-season-score {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    border-radius: 20px;
    padding: 0.1rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0.25rem 0;
}

.ddna-season-card p {
    font-size: 0.85rem;
    color: #555;
    margin: 0.5rem 0 0;
}

/* ── Visitor profiles grid ────────────────────────────────── */
.ddna-visitors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.ddna-visitor-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
}

.ddna-visitor-icon {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 0.4rem;
}

.ddna-visitor-card strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.ddna-visitor-card p {
    font-size: 0.82rem;
    color: #555;
    margin: 0;
}

/* Score bar */
.ddna-visitor-score {
    height: 4px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.ddna-visitor-score span {
    display: block;
    height: 100%;
    background: #2196f3;
    border-radius: 4px;
}

/* ── Footer ───────────────────────────────────────────────── */
.ddna-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
    font-size: 0.82rem;
    color: #888;
}

.ddna-powered-by {
    color: #888;
    text-decoration: none;
    font-size: 0.8rem;
}

.ddna-powered-by:hover {
    color: #555;
    text-decoration: underline;
}

/* ── Error state ──────────────────────────────────────────── */
.ddna-error {
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: #c62828;
    font-size: 0.9rem;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
    .ddna-cover img     { height: 200px; }
    .ddna-seasons-grid,
    .ddna-visitors-grid { grid-template-columns: 1fr 1fr; }
    .ddna-destination-name { font-size: 1.4rem; }
}

@media (max-width: 400px) {
    .ddna-seasons-grid,
    .ddna-visitors-grid { grid-template-columns: 1fr; }
}

/* ── Upgrade CTA ──────────────────────────────────────────── */
.ddna-upgrade-cta {
    margin: 1.5rem 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border: 1px solid #bdd9f5;
    overflow: hidden;
}

.ddna-upgrade-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    flex-wrap: wrap;
}

.ddna-upgrade-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    color: #1976d2;
}

.ddna-upgrade-inner > div {
    flex: 1;
    min-width: 180px;
}

.ddna-upgrade-inner strong {
    display: block;
    font-size: 1rem;
    color: #0d47a1;
    margin-bottom: .2rem;
}

.ddna-upgrade-inner p {
    margin: 0;
    font-size: .87rem;
    color: #555;
}

.ddna-upgrade-btn {
    display: inline-block;
    background: #1976d2;
    color: #fff !important;
    text-decoration: none !important;
    padding: .55rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: .9rem;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.ddna-upgrade-btn:hover { background: #1565c0; }

/* ── Gallery grid ─────────────────────────────────────────── */
.ddna-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .75rem;
}

.ddna-gallery-item {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
}

.ddna-gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.ddna-gallery-item figcaption {
    font-size: .75rem;
    color: #888;
    padding: .25rem .4rem;
    background: #f8f8f8;
}

/* ── AI Card ──────────────────────────────────────────────── */
.ddna-ai-card {
    background: #fafafa;
    border-left: 3px solid #2196f3;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
}

/* ── AI Card inner elements ───────────────────────────────── */
.ddna-summary {
    font-size: 1.05rem;
    font-style: italic;
    color: #333;
    border-left: 3px solid #2196f3;
    padding-left: .85rem;
    margin: 0 0 1.25rem;
}

.ddna-why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.ddna-why {
    border-radius: 8px;
    padding: .85rem 1rem;
}

.ddna-why-go    { background: #f1f8f1; border: 1px solid #c8e6c9; }
.ddna-why-avoid { background: #fff8e1; border: 1px solid #ffe082; }

.ddna-why strong { display: block; margin-bottom: .35rem; font-size: .9rem; }
.ddna-why p      { margin: 0; font-size: .85rem; color: #444; line-height: 1.55; }

/* Scores */
.ddna-scores { margin-bottom: 1.25rem; }
.ddna-scores-title { display: block; font-size: .9rem; margin-bottom: .6rem; color: #555; }

.ddna-scores-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem .75rem;
}

.ddna-score-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
}

.ddna-score-label { min-width: 80px; color: #555; }

.ddna-score-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.ddna-score-fill {
    height: 100%;
    border-radius: 6px;
    transition: width .4s ease;
}

.ddna-score-num { font-weight: 700; min-width: 14px; text-align: right; }

/* Hidden gem period */
.ddna-gem-period {
    background: #f3e5f5;
    border: 1px solid #ce93d8;
    border-radius: 8px;
    padding: .6rem 1rem;
    font-size: .87rem;
    color: #4a148c;
}

/* ── Responsive fixes ─────────────────────────────────────── */
@media (max-width: 600px) {
    .ddna-why-grid    { grid-template-columns: 1fr; }
    .ddna-scores-grid { grid-template-columns: 1fr; }
}

/* ── Cover thumb (ID card style) ─────────────────────────── */
.ddna-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
}

.ddna-header-text {
    flex: 1;
}

.ddna-cover-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
    border: 2px solid #fff;
    outline: 1px solid #e0e0e0;
    position: relative;
    top: 2px;
}

.ddna-cover-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ddna-cover-placeholder {
    background: linear-gradient(135deg, #e8e3d8, #d0c9bb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #888;
}
