/*
/opt/coqueteo/static/style.css
Coqueteo v1.0 — diseño cálido, glassmorphism
*/
:root {
    --bg: #0d0a0b;
    --surface: rgba(30, 20, 20, 0.55);
    --surface-hover: rgba(40, 25, 25, 0.7);
    --text: #f5e8e0;
    --text-dim: #b8a49a;
    --accent: #e8614c;
    --accent2: #f0a58f;
    --border: rgba(255, 240, 235, 0.06);
    --radius-sm: 14px;
    --radius: 24px 24px 16px 16px;
    --font-heading: 'Playfair Display', serif;
    --font: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --safe-bottom: env(safe-area-inset-bottom, 12px);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-weight: 400; line-height: 1.5; min-height: 100dvh; -webkit-font-smoothing: antialiased; overflow-x: hidden; }

.animated-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(ellipse at 20% 20%, rgba(232,97,76,0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(240,165,143,0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 50%, rgba(180,120,100,0.04) 0%, transparent 70%);
    animation: bg-drift 35s ease-in-out infinite;
}
@keyframes bg-drift { 0%,100% { transform: translate(0,0); } 25% { transform: translate(-25px,12px); } 50% { transform: translate(18px,-18px); } 75% { transform: translate(-12px,-8px); } }

.header { position: sticky; top: 0; z-index: 100; display: flex; flex-direction: column; padding: 8px 12px; background: rgba(13,10,11,0.9); border-bottom: 1px solid var(--border); gap: 8px; backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
.header-top { display: flex; align-items: center; justify-content: space-between; }
.header-logo { font-family: var(--font-heading); font-size: 22px; font-weight: 700; background: linear-gradient(135deg, var(--accent2), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-decoration: none; white-space: nowrap; }
.header-bottom { display: flex; align-items: center; gap: 8px; }
.search-form { flex: 1; }
.search-input { width: 100%; padding: 8px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; color: var(--text); font-size: 14px; font-family: var(--font); outline: none; }
.search-input::placeholder { color: var(--text-dim); }

.breadcrumbs { max-width: 680px; margin: 0 auto; padding: 12px 20px; font-size: 12px; color: var(--text-dim); position: relative; z-index: 1; }
.breadcrumbs a { color: var(--text-dim); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

.intro-text { max-width: 680px; margin: 0 auto 16px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; font-size: 14px; line-height: 1.7; color: var(--text-dim); position: relative; z-index: 1; }

.container { max-width: 680px; margin: 0 auto; padding: 20px 12px; position: relative; z-index: 1; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); }
.card:active { transform: scale(0.97); }
.card-photo { height: 170px; background: var(--surface); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.card-avatar { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,240,235,0.06); border: 1px solid rgba(255,240,235,0.08); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: var(--text-dim); z-index: 1; }
.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.card-body h3 { font-family: var(--font-heading); font-size: 14px; font-weight: 600; }
.card-location { font-size: 11px; color: var(--text-dim); }
.card-bio { font-size: 11px; color: var(--text-dim); line-height: 1.4; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@keyframes fadeUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
.card { animation: fadeUp 0.5s ease both; }
.card:nth-child(1){animation-delay:0.02s} .card:nth-child(2){animation-delay:0.06s}
.card:nth-child(3){animation-delay:0.10s} .card:nth-child(4){animation-delay:0.14s}
.card:nth-child(5){animation-delay:0.18s} .card:nth-child(6){animation-delay:0.22s}
.card:nth-child(7){animation-delay:0.26s} .card:nth-child(8){animation-delay:0.30s}
.card:nth-child(9){animation-delay:0.34s} .card:nth-child(10){animation-delay:0.38s}
.card:nth-child(11){animation-delay:0.42s} .card:nth-child(12){animation-delay:0.46s}

.load-more { text-align: center; margin-top: 24px; position: relative; z-index: 1; }
.btn-secondary { display: inline-block; padding: 12px 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: 14px; transition: background 0.2s; cursor: pointer; }
.btn-secondary:hover { background: var(--surface-hover); }

.profile-header { text-align: center; padding: 20px; position: relative; z-index: 1; }
.profile-photo-img { width: 100%; max-height: 400px; object-fit: cover; border-radius: 20px; margin-bottom: 20px; box-shadow: 0 8px 32px rgba(232,97,76,0.15); border: 3px solid rgba(255,240,235,0.1); }
.avatar-large { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, rgba(232,97,76,0.2), rgba(240,165,143,0.12)); border: 2px solid transparent; background-clip: padding-box; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 26px; font-weight: 700; color: var(--text-dim); position: relative; }
.avatar-large::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); z-index: -1; }
.profile-header h1 { font-family: var(--font-heading); font-size: 24px; font-weight: 700; margin-bottom: 2px; }
.profile-loc { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.profile-stats { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.profile-stats span { background: var(--surface); padding: 6px 12px; border-radius: 10px; font-size: 12px; color: var(--text-dim); border: 1px solid var(--border); }
.profile-stats a span { cursor: pointer; transition: color 0.2s; }
.profile-stats a:hover span { color: var(--accent); }
.profile-bio { max-width: 460px; margin: 20px auto; padding: 0 20px; font-size: 14px; line-height: 1.7; color: var(--text-dim); text-align: center; position: relative; z-index: 1; }

.similar-section { max-width: 680px; margin: 40px auto; padding: 0 20px; position: relative; z-index: 1; }
.similar-section h2 { font-family: var(--font-heading); font-size: 18px; margin-bottom: 16px; }

.posts-section { max-width: 460px; margin: 0 auto; padding: 0 20px 120px; position: relative; z-index: 1; }
.posts-section h2 { font-family: var(--font-heading); font-size: 16px; font-weight: 600; margin-bottom: 14px; }
a.post-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 8px; text-decoration: none; color: var(--text); transition: border-color 0.2s; }
a.post-card:hover { border-color: rgba(232,97,76,0.3); }
.post-body { font-size: 13px; line-height: 1.6; margin-bottom: 6px; }
.post-date { font-size: 10px; color: var(--text-dim); }
.post-likes { color: #ef4444; }
.post-card:hover .post-likes { opacity: 1; }
.posts-empty { text-align: center; color: var(--text-dim); padding: 40px 0; font-size: 14px; }

.feed-list { display: flex; flex-direction: column; gap: 16px; max-width: 600px; margin: 0 auto; }
.feed-post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; transition: border-color 0.2s; }
.feed-post:hover { border-color: rgba(232,97,76,0.3); }
.feed-post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.feed-post-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.feed-post-avatar-placeholder { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, rgba(232,97,76,0.2), rgba(240,165,143,0.12)); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--text-dim); }
.feed-post-meta { display: flex; flex-direction: column; }
.feed-post-author { font-weight: 600; font-size: 14px; color: var(--accent); text-decoration: none; font-family: var(--font-heading); }
.feed-post-author:hover { text-decoration: underline; }
.feed-post-date { font-size: 11px; color: var(--text-dim); }
.feed-post-body { font-size: 14px; line-height: 1.7; color: var(--text); white-space: pre-line; }

.post-author { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.post-author-ava { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, rgba(232,97,76,0.2), rgba(240,165,143,0.12)); border: 1px solid rgba(255,240,235,0.08); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--text-dim); flex-shrink: 0; }
.post-author-name { font-weight: 600; font-size: 14px; color: var(--text); }

.bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 14px calc(10px + var(--safe-bottom)); background: linear-gradient(transparent, var(--bg) 35%); z-index: 50; }
.btn { display: block; width: 100%; max-width: 460px; margin: 0 auto; padding: 15px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 16px; font-weight: 600; cursor: pointer; text-align: center; text-decoration: none; box-shadow: 0 6px 28px rgba(232,97,76,0.3); animation: btn-glow 2.5s ease-in-out infinite; font-family: var(--font-heading); }
.btn:active { transform: scale(0.97); }
@keyframes btn-glow { 0%,100%{box-shadow:0 6px 28px rgba(232,97,76,0.3)} 50%{box-shadow:0 8px 38px rgba(240,165,143,0.4)} }

.post-page { max-width: 460px; margin: 0 auto; padding: 20px 16px 120px; position: relative; z-index: 1; }
.post-content { font-size: 15px; line-height: 1.8; }
.post-page h1 { font-family: var(--font-heading); font-size: 24px; margin-bottom: 20px; }

.page-title { font-family: var(--font-heading); font-size: 24px; margin-bottom: 24px; }
.blog-list { display: flex; flex-direction: column; gap: 12px; }
.blog-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; text-decoration: none; color: var(--text); transition: border-color 0.2s; }
.blog-card:hover { border-color: rgba(232,97,76,0.3); }
.blog-card h3 { font-family: var(--font-heading); font-size: 18px; margin-bottom: 8px; }
.blog-card p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.blog-date { font-size: 11px; color: var(--text-dim); margin-top: 8px; display: block; }

.static-page { max-width: 460px; margin: 0 auto; padding: 32px 20px; position: relative; z-index: 1; }
.static-page h1 { font-family: var(--font-heading); font-size: 24px; margin-bottom: 20px; }
.static-page h2 { font-family: var(--font-heading); font-size: 18px; margin: 20px 0 10px; color: var(--accent); }
.static-content { font-size: 14px; line-height: 1.8; color: var(--text-dim); }

.empty-state { text-align: center; padding: 80px 20px; position: relative; z-index: 1; }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h2 { font-family: var(--font-heading); font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--text-dim); margin-bottom: 24px; }

.footer { text-align: center; padding: 20px 16px 40px; font-size: 11px; color: rgba(245,232,224,0.15); position: relative; z-index: 1; }
.footer-links { margin-bottom: 8px; }
.footer-links a { color: rgba(245,232,224,0.2); text-decoration: none; margin: 0 6px; }
.footer-links a:hover { color: var(--accent); }
.footer-tags { margin-bottom: 8px; }
.footer-tags a { color: rgba(245,232,224,0.1); text-decoration: none; margin: 0 4px; font-size: 10px; }
.footer-tags a:hover { color: var(--accent); }
.footer-count { font-size: 10px; color: rgba(245,232,224,0.1); margin-bottom: 4px; }

@media (min-width: 640px) {
    .header { flex-direction: row; align-items: center; padding: 8px 20px; gap: 12px; background: rgba(13,10,11,0.8); }
    .header-top { display: contents; }
    .header-bottom { display: contents; }
    .header-logo { font-size: 24px; }
    .search-input { width: 180px; flex: none; }
    .search-input:focus { width: 240px; }
    .card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(232,97,76,0.15); border-color: rgba(232,97,76,0.4); }
    .container { max-width: 720px; }
    .grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .card-photo { height: 200px; }
    .card-body h3 { font-size: 15px; }
    .profile-photo-img { max-height: 450px; }
    .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(232,97,76,0.45); }
    .feed-list { max-width: 600px; }
    .feed-post { display: flex; gap: 16px; align-items: flex-start; padding: 24px; }
    .feed-post-header { flex-shrink: 0; margin-bottom: 0; }
    .feed-post-body { flex: 1; font-size: 15px; line-height: 1.8; }
    .feed-post-avatar, .feed-post-avatar-placeholder { width: 48px; height: 48px; }
}

@media (min-width: 1024px) {
    .container { max-width: 960px; }
    .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
    .card-photo { height: 230px; }
    .card-body { padding: 16px; }
    .card-body h3 { font-size: 16px; }
    .profile-photo-img { max-height: 500px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
.blog-cover { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.blog-cover { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.blog-cover-large { width: 100%; max-height: 220px; object-fit: cover; border-radius: 16px; margin-bottom: 20px; border: 2px solid rgba(255,240,235,0.08); }
