/*
Theme Name: Premium Radio News
Theme URI: http://example.com/
Author: AI Assistant
Description: A premium, elegant, and luxury WordPress theme designed for Radio News Portals. Features glassmorphism, fluid animations, and high-end responsive design.
Version: 2.1
Text Domain: premium-radio
*/

/* 1. Imports (ต้องอยู่บนสุดเสมอ) */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600&display=swap');

/* 2. Variables & Core Setup */
:root {
    --primary-blue: #091326;     /* Midnight Obsidian */
    --accent-blue: #004BE2;      /* Royal Sapphire */
    --luxury-gold: #C5A059;      /* Champagne Gold */
    --light-blue: #F0F4F8;
    --bg-light: #F6F8FA;        /* ขาวเทาคลีน */
    --text-dark: #1E293B;        /* สีตัวอักษรเข้มแบบซอฟต์ */
    --text-muted: #64748B;
    --white: #FFFFFF;
    --border-color: #E2E8F0;
    --shadow-premium: 0 10px 30px -10px rgba(9, 19, 38, 0.04), 0 1px 3px rgba(9, 19, 38, 0.02);
    --shadow-luxury: 0 20px 40px -15px rgba(9, 19, 38, 0.08);
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

* { 
    box-sizing: border-box; 
    transition: var(--transition-smooth);
}

body {
    font-family: 'Prompt', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* 3. Luxury Background Effect (Aurora Glow) ทะลุพื้นหลัง */
.site-header, .container, .site-footer {
    position: relative;
    z-index: 10; /* ให้เนื้อหาอยู่เหนือแสง */
}

body::before {
    content: ''; position: fixed; top: -10%; left: -10%; width: 50vw; height: 50vw;
    min-width: 400px; min-height: 400px; border-radius: 50%;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 60%);
    z-index: 1; filter: blur(100px); opacity: 0.35;
    animation: floatGlow1 20s infinite alternate ease-in-out; pointer-events: none;
}

body::after {
    content: ''; position: fixed; bottom: -10%; right: -10%; width: 45vw; height: 45vw;
    min-width: 350px; min-height: 350px; border-radius: 50%;
    background: radial-gradient(circle, var(--luxury-gold) 0%, transparent 60%);
    z-index: 1; filter: blur(100px); opacity: 0.25;
    animation: floatGlow2 25s infinite alternate ease-in-out; pointer-events: none;
}

@keyframes floatGlow1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(8%, 12%) scale(1.1); }
    100% { transform: translate(-5%, 8%) scale(0.9); }
}

@keyframes floatGlow2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-10%, -8%) scale(1.15); }
    100% { transform: translate(6%, -12%) scale(0.85); }
}

/* 4. Header Section */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 5%; height: 90px; position: sticky; top: 0; z-index: 1000;
}

.logo-area { display: flex; align-items: center; gap: 18px; }
.logo-area img { height: 65px; width: auto; object-fit: contain; }
.logo-text { font-weight: 600; font-size: 1.15rem; color: var(--primary-blue); line-height: 1.3; letter-spacing: 0.3px; }

.header-actions { display: flex; height: 100%; align-items: center; }
.btn-header {
    border: none; padding: 0 35px; height: 50px; border-radius: 25px;
    font-family: 'Prompt', sans-serif; font-weight: 500; font-size: 0.95rem;
    letter-spacing: 0.5px; cursor: pointer; display: flex; align-items: center;
    gap: 10px; box-shadow: 0 4px 15px rgba(9, 19, 38, 0.05);
}
.btn-menu { background: var(--primary-blue); color: var(--white); }
.btn-menu:hover { background: var(--accent-blue); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 75, 226, 0.2); }

/* 5. Breaking News Ticker */
.breaking-news-wrapper {
    background: var(--primary-blue); color: var(--white);
    display: flex; align-items: center; height: 45px; overflow: hidden;
    position: relative; z-index: 10; border-bottom: 2px solid var(--luxury-gold);
}

.breaking-news-title {
    background: var(--luxury-gold); color: var(--primary-blue); font-weight: 600;
    padding: 0 20px; height: 100%; display: flex; align-items: center; gap: 8px;
    z-index: 2; position: relative; flex-shrink: 0; text-transform: uppercase;
    font-size: 0.9rem; letter-spacing: 1px;
}
.breaking-news-title::after {
    content: ''; position: absolute; right: -15px; top: 0;
    border-top: 22.5px solid transparent; border-bottom: 22.5px solid transparent;
    border-left: 15px solid var(--luxury-gold);
}

.breaking-news-ticker { flex-grow: 1; overflow: hidden; white-space: nowrap; position: relative; padding: 0 15px; }
.ticker-content { display: inline-block; padding-left: 100%; animation: tickerMove 30s linear infinite; }
.ticker-content:hover { animation-play-state: paused; }
.ticker-item { display: inline-block; margin-right: 50px; }
.ticker-item a { color: var(--white); text-decoration: none; font-size: 0.95rem; font-weight: 400; transition: color 0.3s ease; }
.ticker-item a:hover { color: var(--luxury-gold); }
.ticker-item span.bullet { color: var(--luxury-gold); margin-right: 10px; font-size: 0.8rem; }
@keyframes tickerMove { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-100%, 0, 0); } }

/* 6. Layout & Cards */
.container { max-width: 1400px; margin: 30px auto 50px auto; padding: 0 30px; }
.section-title { font-size: 1.35rem; color: var(--primary-blue); margin-top: 0; margin-bottom: 25px; display: flex; align-items: center; gap: 15px; border-left: 4px solid var(--luxury-gold); padding-left: 15px; font-weight: 600; letter-spacing: 0.3px; }
.section-title span { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; text-transform: uppercase; letter-spacing: 1px; }

.top-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 35px; margin-bottom: 50px; }
.hero-card { position: relative; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-premium); }
.hero-card:hover { box-shadow: var(--shadow-luxury); }
.hero-card img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; transform: scale(1); }
.hero-card:hover img { transform: scale(1.04); }
.hero-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(9, 19, 38, 0.98) 0%, rgba(9, 19, 38, 0.5) 60%, transparent 100%); color: var(--white); padding: 60px 40px 40px; }
.hero-overlay h2 { margin: 0 0 12px 0; font-size: 1.9rem; font-weight: 600; line-height: 1.4; }
.hero-overlay h2 a { color: var(--white); text-decoration: none; }
.hero-overlay h2 a:hover { color: var(--luxury-gold); }
.hero-overlay p { margin: 0; font-weight: 300; font-size: 1.05rem; opacity: 0.85; }

.list-widget { background: var(--white); border-radius: 16px; padding: 35px; border: 1px solid rgba(226, 232, 240, 0.6); box-shadow: var(--shadow-premium); }
.list-item { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--border-color); }
.list-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.item-icon { width: 48px; height: 48px; background: var(--light-blue); color: var(--accent-blue); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.list-item:hover .item-icon { background: var(--primary-blue); color: var(--luxury-gold); }
.item-content h4 { margin: 0 0 6px 0; font-size: 1.05rem; color: var(--text-dark); font-weight: 500; line-height: 1.5; }
.item-content h4 a:hover { color: var(--accent-blue); }
.item-content span { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.middle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; margin-bottom: 50px; }
.card-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 25px; }
.media-card { background: var(--white); border-radius: 14px; overflow: hidden; border: 1px solid rgba(226, 232, 240, 0.5); box-shadow: var(--shadow-premium); }
.media-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-luxury); }
.media-card-img-wrap { overflow: hidden; position: relative; }
.media-card img { width: 100%; height: 135px; object-fit: cover; display: block; }
.media-card:hover img { transform: scale(1.06); }
.media-content { padding: 18px; }
.media-content h4 { margin: 0 0 8px 0; font-size: 0.98rem; font-weight: 500; line-height: 1.5; }
.media-content span { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

.operator-card { background: var(--white); border-radius: 14px; padding: 30px 20px; text-align: center; box-shadow: var(--shadow-premium); border: 1px solid rgba(226, 232, 240, 0.5); }
.operator-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-luxury); border-color: var(--luxury-gold); }
.operator-icon { width: 65px; height: 65px; margin: 0 auto 18px; background: var(--primary-blue); color: var(--luxury-gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 6px 20px rgba(9, 19, 38, 0.1); }
.operator-card h4 { margin: 0 0 10px 0; font-size: 1.05rem; color: var(--primary-blue); }
.operator-card p { margin: 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* ==========================================================================
   7. Luxury Single Post Page (หน้าอ่านข่าวระดับ Ultra Premium)
   ========================================================================== */
.luxury-single-wrapper {
    padding-bottom: 80px;
}

/* ส่วนรูปปกแบบกว้างเต็มจอ */
.luxury-single-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 450px;
    max-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -100px; /* ดึงกล่องเนื้อหาข้างล่างให้ลอยซ้อนทับรูป */
    z-index: 1;
}

.hero-bg-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-bg-fallback {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    z-index: -2;
}

/* ไล่สีดำโปร่งแสงทับรูปปก เพื่อให้ตัวหนังสืออ่านง่ายขึ้น */
.luxury-single-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(9, 19, 38, 0.2) 0%, rgba(9, 19, 38, 0.9) 100%);
    z-index: -1;
}

/* จัดกึ่งกลางข้อความบนหน้าปก */
.hero-title-box {
    text-align: center;
    padding: 0 20px;
    max-width: 1000px;
    margin-top: 50px;
}

/* ป้ายหมวดหมู่สีทอง */
.post-categories a {
    background: var(--luxury-gold);
    color: var(--primary-blue);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}
.post-categories a:hover { background: var(--white); color: var(--luxury-gold); }

/* หัวข้อข่าว */
.hero-title-box .post-title {
    color: var(--white);
    font-size: 3.2rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 25px 0;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.post-meta {
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    display: flex;
    justify-content: center;
    gap: 25px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ==================================
   กล่องเนื้อหาขาวลอย (Content Area)
   ================================== */
.luxury-post-content {
    background: var(--white);
    max-width: 950px;
    margin: 0 auto;
    padding: 70px 90px;
    border-radius: 24px;
    box-shadow: var(--shadow-luxury);
    border: 1px solid rgba(226, 232, 240, 0.6);
    position: relative;
    z-index: 10;
    font-size: 1.15rem;
    line-height: 2.1;
    color: #334155;
    overflow-wrap: break-word;
}

/* เทคนิค Drop Cap (ตัวอักษรตัวแรกของข่าวให้เป็นตัวใหญ่สีทอง) */
.luxury-post-content > p:first-of-type::first-letter {
    float: left;
    font-size: 5rem;
    line-height: 0.8;
    font-weight: 600;
    color: var(--luxury-gold);
    margin-right: 18px;
    margin-top: 8px;
    text-shadow: 2px 2px 5px rgba(197, 160, 89, 0.2);
}

.luxury-post-content img, 
.luxury-post-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 40px 0;
    box-shadow: var(--shadow-premium);
}

.luxury-post-content h2, 
.luxury-post-content h3 {
    color: var(--primary-blue);
    margin-top: 45px;
    margin-bottom: 25px;
    font-weight: 600;
    border-left: 4px solid var(--luxury-gold);
    padding-left: 15px;
}

/* ส่วนแท็กท้ายข่าว */
.post-footer-meta {
    max-width: 950px;
    margin: 40px auto 0;
    padding: 0 20px;
}
.post-tags a {
    display: inline-block;
    background: var(--bg-light);
    color: var(--text-muted);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    text-decoration: none;
    margin-right: 8px;
    border: 1px solid var(--border-color);
}
.post-tags a:hover { background: var(--luxury-gold); color: var(--white); border-color: var(--luxury-gold); }
.tag-title { font-weight: 500; color: var(--primary-blue); margin-right: 10px; }

/* Responsive สำหรับหน้าอ่านข่าว */
@media (max-width: 1024px) {
    .hero-title-box .post-title { font-size: 2.5rem; }
    .luxury-post-content { padding: 50px 60px; }
}
@media (max-width: 768px) {
    .luxury-single-hero { min-height: 380px; margin-bottom: -60px; }
    .hero-title-box .post-title { font-size: 1.8rem; }
    .luxury-post-content { padding: 40px 25px; border-radius: 16px; font-size: 1.05rem; }
    .luxury-post-content > p:first-of-type::first-letter { font-size: 3.5rem; margin-top: 5px; }
    .post-meta { flex-direction: column; gap: 10px; }
}

/* 8. Contact Page */
.luxury-contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 20px; margin-bottom: 20px; }
.contact-info-box { background: var(--bg-light); padding: 45px 40px; border-radius: 16px; border-left: 5px solid var(--luxury-gold); box-shadow: var(--shadow-premium); }
.contact-info-box h3 { color: var(--primary-blue); font-size: 1.6rem; margin-top: 0; margin-bottom: 30px; font-weight: 600; }
.contact-address { display: flex; gap: 18px; color: var(--text-dark); font-size: 1.1rem; line-height: 1.8; margin-bottom: 35px; }
.contact-address .icon { font-size: 1.5rem; }
.contact-details p { display: flex; align-items: center; gap: 18px; font-size: 1.05rem; color: var(--text-dark); margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid rgba(226, 232, 240, 0.8); }
.contact-details p:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.contact-map-box { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-premium); min-height: 400px; border: 1px solid rgba(226, 232, 240, 0.5); }

/* 9. Navigation Overlay */
.main-navigation-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(9, 19, 38, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 1001; display: none; opacity: 0; }
.main-navigation-overlay.active { display: block; opacity: 1; }
.main-navigation-container { position: fixed; top: 0; right: -380px; width: 380px; height: 100%; background: var(--white); z-index: 1002; box-shadow: -10px 0 40px rgba(9, 19, 38, 0.1); display: flex; flex-direction: column; }
.main-navigation-container.active { right: 0; }
.menu-header { padding: 30px 40px; background: var(--primary-blue); color: var(--white); display: flex; justify-content: space-between; align-items: center; }
.menu-header h3 { margin: 0; font-size: 1.25rem; font-weight: 500; letter-spacing: 0.5px; }
.close-menu-btn { background: none; border: none; color: var(--white); font-size: 2rem; cursor: pointer; padding: 0; line-height: 1; }
.close-menu-btn:hover { color: var(--luxury-gold); }
.nav-menu { list-style: none; padding: 20px 0; margin: 0; overflow-y: auto; }
.nav-menu li { border-bottom: 1px solid rgba(226, 232, 240, 0.4); }
.nav-menu li a { display: block; padding: 20px 40px; color: var(--text-dark); text-decoration: none; font-size: 1.15rem; font-weight: 500; }
.nav-menu li a:hover { background: var(--light-blue); color: var(--accent-blue); padding-left: 48px; }

/* 10. Footer Section */
.site-footer { margin-top: 80px; }
.footer-nav { display: flex; }
.footer-nav a { flex: 1; padding: 30px; text-align: center; text-decoration: none; font-weight: 500; font-size: 1.1rem; letter-spacing: 0.5px; }
.nav-contact { background: #1E293B; color: var(--white); }
.nav-contact:hover { background: #0F172A; }
.nav-privacy { background: #73C6D9; color: #0F172A; }
.nav-privacy:hover { background: #56B4CB; }
.footer-copyright { background: #0F172A; color: #94A3B8; text-align: center; padding: 25px; font-size: 0.9rem; letter-spacing: 0.5px; }
.back-to-top { position: fixed; bottom: 35px; right: 35px; width: 55px; height: 55px; background: var(--primary-blue); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: 0 8px 25px rgba(9, 19, 38, 0.15); cursor: pointer; text-decoration: none; }
.back-to-top:hover { background: var(--accent-blue); transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0, 75, 226, 0.25); }

/* 11. Responsive Design */
@media (max-width: 1024px) {
    .top-grid, .middle-grid { grid-template-columns: 1fr; gap: 25px; }
    .hero-card { min-height: 350px; }
}

@media (max-width: 768px) {
    .site-header { flex-direction: column; height: auto; padding: 20px; gap: 20px; }
    .logo-area { flex-direction: column; text-align: center; gap: 8px; }
    .logo-text { font-size: 1.05rem; }
    .header-actions { width: 100%; justify-content: center; }
    .btn-header { padding: 10px 20px; flex: 1; justify-content: center; font-size: 0.9rem; height: 45px; }
    .container { margin: 25px auto; padding: 0 20px; }
    .hero-card { min-height: 260px; }
    .hero-overlay { padding: 30px 20px 20px; }
    .hero-overlay h2 { font-size: 1.45rem; }
    .section-title { font-size: 1.15rem; }
    .single-post-container { padding: 25px 20px; }
    .single-post-title { font-size: 1.85rem; }
    .main-navigation-container { width: 300px; right: -300px; }
    .footer-nav { flex-direction: column; }
    .footer-nav a { padding: 20px; }
    .luxury-contact-wrapper { grid-template-columns: 1fr; }
    .contact-info-box { padding: 30px 20px; }
    .contact-map-box { min-height: 300px; }
    .breaking-news-title { padding: 0 10px; font-size: 0.8rem; }
    .breaking-news-title::after { right: -10px; border-top: 22.5px solid transparent; border-bottom: 22.5px solid transparent; border-left: 10px solid var(--luxury-gold); }
    .ticker-item { font-size: 0.85rem; margin-right: 30px; }
    body::before { width: 300px; height: 300px; filter: blur(80px); opacity: 0.25; }
    body::after { width: 300px; height: 300px; filter: blur(80px); opacity: 0.15; }
}

@media (max-width: 480px) {
    .card-row { grid-template-columns: 1fr; gap: 20px; }
    .list-item { flex-direction: column; align-items: flex-start; gap: 12px; }
    .media-card img { height: 180px; }
}

/* ==========================================================================
   จำกัดบรรทัดหัวข้อข่าวให้กล่องสูงเท่ากัน
   ========================================================================== */
.media-content h4 a, 
.item-content h4 a,
.operator-card h4 {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* กำหนดให้อ่านได้แค่ 2 บรรทัด */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}