/*
Theme Name:  Hoài Nhơn Đông
Theme URI:   https://hoainhondong.vn
Author:      Hoài Nhơn Đông Community
Author URI:  https://hoainhondong.vn
Description: Nền tảng cộng đồng Hoài Nhơn Đông – tin tức địa phương, khám phá du lịch, ẩm thực đặc sản Bình Định và kết nối người dân.
Version:     1.0.0
Requires at least: 6.0
Requires PHP:      8.1
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hoai-nhon-dong
Tags:        community, local, news, events, food, tourism, charity
*/

/* Base overrides — Tailwind handles most styles via CDN */
:root {
    --color-primary:       #1565C0;
    --color-primary-light: #42A5F5;
    --color-primary-dark:  #0D47A1;
    --color-primary-surface: #E3F2FD;
    --color-accent:        #22C55E;
    --color-accent-dark:   #16A34A;
    --color-warm:          #FF6633;
    --color-warm-dark:     #E85522;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-primary-surface); }
::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 4px; }

/* Scrollbar hide utility */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Lazy image fade-in */
img { transition: opacity 0.3s ease; }
img[loading="lazy"] { opacity: 0; }
img.loaded { opacity: 1; }

/* Progress bar animation (charity) */
@keyframes fillBar { from { width: 0 } to { width: var(--target-width, 65%) } }
.progress-fill { animation: fillBar 1.2s ease-out 0.5s both; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* WordPress default alignment classes */

/* ── Tournament Hero: logo ─────────────────────────────── */
.hnd-tm-logo-wrap {
    width:  7.5rem;
    height: 7.5rem;
    border-radius: 10px;
    overflow: hidden;
    background: rgb(255, 255, 255);
    border: 1px solid rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    margin-bottom: 1.5rem;
    transition: box-shadow .15s, background .15s;
}
.hnd-tm-logo-wrap:hover {
    background: #fff;
    /* box-shadow: 0 4px 16px rgba(0,0,0,.18); */
}
.hnd-tm-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ── Tournament Hero: sponsors ─────────────────────────── */
.hnd-tm-sponsors { margin-top: 1.5rem; }
.hnd-tm-sponsors-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgba(255,255,255,.6);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: .75rem;
}
.hnd-tm-sponsors-label svg { fill: rgba(255,255,255,.6); flex-shrink: 0; }
.hnd-tm-sponsors-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: .75rem;
}
.hnd-tm-sponsor-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 10px;
    padding: 12px 16px;
    min-width: 90px;
    transition: box-shadow .15s, background .15s;
}
.hnd-tm-sponsor-item:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.hnd-tm-sponsor-item img {
    height: 40px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
    display: block;
}
.hnd-tm-sponsor-item span {
    font-size: 11.5px;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    line-height: 1.3;
}
.alignleft  { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85em; color: #6b7280; text-align: center; }

/* Line-clamp for news cards */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Footer: asymmetric grid ─────────────────────────── */
.hnd-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}
@media (min-width: 640px) {
    .hnd-footer-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}
@media (min-width: 1024px) {
    .hnd-footer-grid {
        grid-template-columns: 1.8fr 1fr 1fr 1fr;
    }
}
