/*
 * components.css — Cards, Badges, Tags, Tables, Forms, and UI Components
 * HuaHinExpats.info
 */

/* ── Category Cards ── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.cat-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.cat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue-lt);
}

.cat-card-img {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: relative;
    overflow: hidden;
}

.cat-card-body {
    padding: 20px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cat-card h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.cat-card p {
    font-size: 0.93rem;
    color: var(--muted);
    flex: 1;
}

.cat-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 14px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
}

/* Category card colour themes */
.cat-c1 .cat-card-img { background: linear-gradient(135deg, #1565C0, #42A5F5); }
.cat-c2 .cat-card-img { background: linear-gradient(135deg, #E65100, #FFA726); }
.cat-c3 .cat-card-img { background: linear-gradient(135deg, #2E7D32, #81C784); }
.cat-c4 .cat-card-img { background: linear-gradient(135deg, #6A1B9A, #CE93D8); }
.cat-c5 .cat-card-img { background: linear-gradient(135deg, #00695C, #4DB6AC); }
.cat-c6 .cat-card-img { background: linear-gradient(135deg, #C62828, #EF9A9A); }
.cat-c7 .cat-card-img { background: linear-gradient(135deg, #F57F17, #FFF176); }
.cat-c8 .cat-card-img { background: linear-gradient(135deg, #0277BD, #81D4FA); }

/* ── Featured Articles ── */
.articles-bg { background: var(--sky); }

.articles-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
}

.article-main {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s;
}

.article-main:hover {
    box-shadow: var(--shadow-lg);
}

.article-main-img {
    height: 300px;
    background: linear-gradient(135deg, #1565C0 0%, #E65100 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
}

.article-main-img .img-bg {
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1528360983277-13d401cdc186?w=800&q=80') center / cover;
    opacity: 0.75;
}

.article-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--orange);
    color: white;
    font-family: 'Oswald', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 4px;
    z-index: 1;
}

.article-main-body {
    padding: 28px;
    flex: 1;
}

.article-main-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.article-meta {
    font-size: 0.83rem;
    color: var(--muted);
    margin-bottom: 12px;
}

.article-excerpt {
    font-size: 0.97rem;
    color: var(--muted);
}

.articles-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.article-mini {
    background: white;
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: box-shadow 0.3s;
    border-left: 4px solid var(--blue);
}

.article-mini:nth-child(2) { border-color: var(--orange); }
.article-mini:nth-child(3) { border-color: var(--green); }

.article-mini:hover {
    box-shadow: var(--shadow-lg);
}

.article-mini-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.article-mini h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.article-mini p {
    font-size: 0.85rem;
    color: var(--muted);
}

/* ── Service / Advertising Cards ── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.service-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow);
    border-top: 5px solid var(--blue);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: var(--sky);
    border-radius: 0 0 0 80px;
}

.service-card:nth-child(2) { border-color: var(--orange); }
.service-card:nth-child(2)::before { background: #FFF3E0; }
.service-card:nth-child(3) { border-color: var(--green); }
.service-card:nth-child(3)::before { background: #F1F8E9; }

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 2.8rem;
    margin-bottom: 16px;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 20px;
}

.price-tag {
    display: inline-block;
    background: var(--sky);
    color: var(--blue);
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 30px;
    margin-bottom: 16px;
}

.service-card:nth-child(2) .price-tag { background: #FFF3E0; color: var(--orange); }
.service-card:nth-child(3) .price-tag { background: #F1F8E9; color: var(--green); }

/* ── Pricing Cards (Advertise Page) ── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

/* 4-card layout (Free + Basic + Premium + Platinum) */
.pricing-grid--4col {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
    .pricing-grid--4col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .pricing-grid--4col {
        grid-template-columns: 1fr;
    }
}

.price-card {
    background: white;
    border-radius: var(--radius);
    padding: 36px 28px;
    box-shadow: var(--shadow);
    border-top: 5px solid var(--blue-lt);
    position: relative;
    transition: all 0.3s;
}

.price-card.featured {
    border-color: var(--orange);
    transform: scale(1.04);
    box-shadow: var(--shadow-lg);
}

.price-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.price-card.featured:hover {
    transform: scale(1.04) translateY(-5px);
}

.featured-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--orange);
    color: white;
    font-family: 'Oswald', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.price-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.price-amount {
    font-family: 'Oswald', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
    margin: 8px 0 4px;
}

.price-amount .currency {
    font-size: 1.6rem;
    vertical-align: super;
}

.price-period {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 20px;
}

.price-features {
    list-style: none;
    margin-bottom: 24px;
}

.price-features li {
    font-size: 0.93rem;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.price-features li::before {
    content: '✓';
    color: var(--green);
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Directory Tiles ── */
.dir-bg { background: var(--dark); }
.dir-bg h2 { color: white; }
.dir-bg .lead { color: rgba(255, 255, 255, 0.65); }
.dir-bg .section-tag { color: var(--yellow); }

.dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.dir-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 22px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: white;
    display: block;
}

.dir-card:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--yellow);
    transform: scale(1.03);
}

.dir-card-icon {
    font-size: 2.4rem;
    margin-bottom: 10px;
    display: block;
}

.dir-card h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.dir-card p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

.dir-card span.count {
    display: inline-block;
    margin-top: 10px;
    background: var(--orange);
    color: white;
    font-size: 0.75rem;
    font-family: 'Oswald', sans-serif;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.05em;
}

/* ── Testimonials ── */
.testi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.testi-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px 26px;
    box-shadow: var(--shadow);
    position: relative;
}

.testi-card::before {
    content: '\201C';
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 5rem;
    line-height: 1;
    color: var(--sky);
    font-family: 'Merriweather', serif;
    font-weight: 700;
}

.testi-text {
    font-style: italic;
    color: var(--muted);
    margin-bottom: 20px;
    padding-top: 30px;
    font-size: 0.97rem;
}

.testi-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testi-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.testi-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.testi-loc {
    font-size: 0.8rem;
    color: var(--muted);
}

.stars {
    color: var(--yellow);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

/* ── Inline Ad Banner ── */
.ad-banner {
    background: linear-gradient(90deg, #FFF8E1, #FFF3E0);
    border: 2px dashed var(--orange-lt);
    border-radius: var(--radius);
    padding: 28px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.ad-banner-text h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    color: var(--orange);
    margin-bottom: 6px;
}

.ad-banner-text p {
    font-size: 0.93rem;
    color: var(--muted);
}

.ad-label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--muted);
    text-transform: uppercase;
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 3px;
    display: block;
    margin-bottom: 8px;
}

/* ── Visa Reference Table ── */
.visa-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
}

.visa-table th {
    background: var(--blue);
    color: white;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
    padding: 14px 16px;
    text-align: left;
}

.visa-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.93rem;
}

.visa-table tr:hover td {
    background: var(--sky);
}

.visa-table a {
    text-decoration: none;
    color: inherit;
    display: table-row;
}

.visa-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
}

.badge-green { background: #E8F5E9; color: var(--green); }
.badge-blue  { background: var(--sky); color: var(--blue); }
.badge-orange { background: #FFF3E0; color: var(--orange); }

/* ── Contact Form ── */
.contact-form-wrap {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    max-width: 860px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.97rem;
    color: var(--text);
    background: var(--off-white);
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--blue);
    background: white;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ── Audience Stat Cards (Advertise Page) ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--blue);
}

.stat-big {
    font-family: 'Oswald', sans-serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--blue);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-desc {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.5;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
    background: linear-gradient(135deg, var(--blue) 0%, #0D47A1 100%);
    padding: 120px 24px 70px;
    text-align: center;
    color: white;
}

.page-hero h1 {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.page-hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 580px;
    margin: 0 auto 32px;
}
