/* ============================================================
   pahang.co — Main Stylesheet
   ============================================================ */

:root {
    --navy:    #0d2b5e;
    --blue:    #1a56db;
    --sky:     #3b82f6;
    --pale:    #f0f6ff;
    --accent:  #f59e0b;
    --white:   #ffffff;
    --charcoal:#1e293b;
    --muted:   #64748b;
    --border:  #e2e8f0;
    --success: #16a34a;
    --error:   #dc2626;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: #f8faff;
    color: var(--charcoal);
    overflow-x: hidden;
}

/* Prevent any element from causing horizontal scroll */
img, iframe, video, embed { max-width:100%; }
iframe { width:100%; }

/* --- TOP AD BAR --- */
.top-ad-bar {
    background: var(--navy);
    color: rgba(255,255,255,0.55);
    text-align: center;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 8px;
    text-transform: uppercase;
}
.top-ad-bar span { color: var(--accent); }
.top-ad-bar a { color: var(--accent); text-decoration: none; }

/* --- NAV --- */
nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 10px rgba(13,43,94,0.07);
}
.logo {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 900;
    color: var(--navy);
    text-decoration: none;
    padding: 16px 0;
}
.logo span { color: var(--blue); }
.nav-links { display: flex; gap: 4px; list-style: none; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; padding: 8px 11px; border-radius: 6px; transition: all 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); background: var(--pale); }
.nav-links .btn-login { border: 1.5px solid var(--border); border-radius: 20px; }
.nav-links .btn-submit { background: var(--blue); color: white !important; border-radius: 20px; font-weight: 600; }
.nav-links .btn-submit:hover { background: var(--navy); }
.nav-links .btn-logout { color: var(--error) !important; }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; }

/* Mobile Nav */
.mobile-nav { display: none; flex-direction: column; gap: 4px; padding: 12px 20px; background: white; border-bottom: 1px solid var(--border); }
.mobile-nav a { padding: 10px 14px; border-radius: 8px; text-decoration: none; color: var(--charcoal); font-size: 14px; font-weight: 500; }
.mobile-nav a:hover { background: var(--pale); }
.mobile-nav.open { display: flex; }

/* --- LAYOUT --- */
.container { max-width: 1200px; margin: 0 auto; }
.section { padding: 64px 40px; }
.section-white { background: var(--white); }
.section-pale { background: var(--pale); }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
.section-tag { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--blue); margin-bottom: 5px; }
.section-title { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; color: var(--navy); }
.see-all { color: var(--blue); text-decoration: none; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--blue); padding-bottom: 2px; white-space: nowrap; }

/* --- AD SLOTS --- */
.ad-wrap { padding: 12px 40px; background: white; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ad-slot { max-width: 1200px; margin: 0 auto; background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 1.5px dashed #93c5fd; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--sky); font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.ad-slot.leaderboard { height: 90px; }
.ad-slot.banner { height: 200px; }
.ad-slot.medium { height: 150px; }
.ad-slot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ad-label { background: #bfdbfe; color: var(--blue); padding: 3px 10px; border-radius: 4px; font-size: 10px; }

/* --- LISTING CARD --- */
.listings-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.listing-card { background: white; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.listing-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(13,43,94,0.1); }
.listing-img { height: 150px; background: linear-gradient(135deg, var(--navy), var(--sky)); position: relative; display: flex; align-items: center; justify-content: center; font-size: 42px; overflow: hidden; }
.listing-img img { width: 100%; height: 100%; object-fit: cover; }
.listing-img.food { background: linear-gradient(135deg, #7c2d12, #ea580c); }
.listing-img.stay { background: linear-gradient(135deg, #1e3a5f, #2563eb); }
.listing-img.biz  { background: linear-gradient(135deg, #1e1b4b, #4f46e5); }
.listing-badge { position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; }
.badge-featured { background: var(--accent); color: #333; }
.badge-free { background: rgba(0,0,0,0.42); color: #eee; }
.listing-body { padding: 14px; }
.listing-cat { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; }
.listing-name { font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 3px; line-height: 1.3; }
.listing-daerah { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.listing-desc { font-size: 12px; color: #888; line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing-actions { display: flex; gap: 7px; }
.btn-wa { background: #25d366; color: white; border: none; padding: 7px 10px; border-radius: 7px; font-size: 11px; font-weight: 600; cursor: pointer; flex: 1; font-family: 'DM Sans', sans-serif; text-decoration: none; text-align: center; }
.btn-view { background: var(--pale); color: var(--blue); border: 1px solid var(--border); padding: 7px 10px; border-radius: 7px; font-size: 11px; font-weight: 600; cursor: pointer; flex: 1; font-family: 'DM Sans', sans-serif; text-decoration: none; text-align: center; display: block; }

/* --- FORMS --- */
.form-card { background: white; border-radius: 16px; border: 1px solid var(--border); padding: 32px; max-width: 500px; margin: 60px auto; }
.form-title { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.form-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--charcoal); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: var(--charcoal);
    background: white;
    transition: border-color 0.2s;
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--blue); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-error { font-size: 12px; color: var(--error); margin-top: 4px; }
.btn-primary { width: 100%; background: var(--blue); color: white; border: none; padding: 13px; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: background 0.2s; }
.btn-primary:hover { background: var(--navy); }
.form-link { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.form-link a { color: var(--blue); text-decoration: none; font-weight: 600; }

/* --- DAERAH TABS --- */
.daerah-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.daerah-tab { padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1.5px solid var(--border); background: white; color: var(--muted); text-decoration: none; transition: all 0.2s; display: inline-block; }
.daerah-tab.active, .daerah-tab:hover { background: var(--blue); color: white; border-color: var(--blue); }

/* --- FOOTER --- */
footer { background: var(--navy); padding: 52px 40px 26px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 38px; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 900; color: white; margin-bottom: 10px; }
.footer-logo span { color: #60a5fa; }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.42); line-height: 1.7; margin-bottom: 14px; }
.footer-contact { font-size: 12px; color: rgba(255,255,255,0.35); }
.footer-h { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 14px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.38); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: #60a5fa; }
.footer-bottom { padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,0.28); }
.footer-bottom a { color: #60a5fa; text-decoration: none; }

/* --- 404 --- */
.page-404 { text-align: center; padding: 100px 40px; }
.page-404 h1 { font-family: 'Playfair Display', serif; font-size: 80px; color: var(--navy); }
.page-404 p { color: var(--muted); font-size: 18px; margin: 16px 0 32px; }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    nav { padding: 0 20px; }
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .section { padding: 46px 20px; }
    .listings-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .ad-wrap { padding: 12px 20px; }
}
@media (max-width: 580px) {
    .listings-grid { grid-template-columns: 1fr; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ══ NEW NAV STYLES ══ */
.nav-logo { font-family:'Playfair Display',serif; font-size:26px; font-weight:900; color:var(--navy); text-decoration:none; padding:14px 0; flex-shrink:0; }
.nav-logo span { color:var(--blue); }

@media(max-width:860px) {
    .nav-logo { font-size:22px; }
}
.nav-center { display:flex; align-items:center; gap:2px; list-style:none; }
.nav-center a { color:var(--muted); text-decoration:none; font-size:13.5px; font-weight:500; padding:8px 13px; border-radius:8px; transition:all .18s; white-space:nowrap; }
.nav-center a:hover, .nav-center a.active { color:var(--navy); background:var(--pale); }
.nav-center a.active { color:var(--blue); font-weight:600; }
.nav-right { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.nav-right a { font-size:13px; font-weight:500; text-decoration:none; padding:8px 14px; border-radius:8px; color:var(--muted); transition:all .18s; }
.nav-right a:hover { color:var(--navy); background:var(--pale); }
.btn-nav-submit { background:var(--blue) !important; color:white !important; border-radius:24px !important; font-weight:600 !important; padding:8px 18px !important; }
.btn-nav-submit:hover { background:var(--navy) !important; }
.btn-nav-login { border:1.5px solid var(--border) !important; border-radius:24px !important; }
.btn-nav-login:hover { border-color:var(--blue) !important; color:var(--blue) !important; }
.nav-hamburger { display:none; background:none; border:none; font-size:22px; cursor:pointer; color:var(--navy); }

/* Mobile drawer */
.mobile-drawer { display:none; position:fixed; inset:0; z-index:300; }
.mobile-drawer-overlay { position:absolute; inset:0; background:rgba(13,43,94,.4); backdrop-filter:blur(4px); }
.mobile-drawer-panel { position:absolute; top:0; right:0; width:280px; height:100%; background:white; padding:20px; display:flex; flex-direction:column; gap:4px; overflow-y:auto; box-shadow:-8px 0 40px rgba(0,0,0,.15); }
.mobile-drawer-panel a { display:flex; align-items:center; gap:10px; padding:11px 13px; border-radius:10px; font-size:15px; font-weight:500; color:var(--charcoal); text-decoration:none; transition:all .15s; }
.mobile-drawer-panel a:hover { background:var(--pale); color:var(--blue); }
.mobile-drawer-panel .divider { height:1px; background:var(--border); margin:8px 0; }
.mobile-drawer-panel .mobile-submit { background:var(--blue); color:white !important; justify-content:center; font-weight:600; border-radius:12px; margin-top:8px; }
.mobile-drawer.open { display:block; }
.mobile-close-btn { background:none; border:none; font-size:20px; cursor:pointer; color:var(--muted); align-self:flex-end; margin-bottom:8px; }

/* ══ FEATURE TABS (homepage) ══ */
/* ══ ROUND ICON FEATURE TABS ══ */
.feature-tabs-wrap { background:var(--navy); padding:16px 48px; }
.feature-tabs      { max-width:1200px; margin:0 auto; display:flex; gap:12px; justify-content:center; }

.feature-tab {
    display:flex; align-items:center; gap:14px;
    flex:1; max-width:380px;
    background:rgba(255,255,255,.07);
    border:1px solid rgba(255,255,255,.1);
    border-radius:16px; padding:14px 20px;
    text-decoration:none !important;
    color:white !important;
    transition:all .25s;
}
.feature-tab:hover { background:rgba(255,255,255,.13); transform:translateY(-2px); border-color:rgba(255,255,255,.2); color:white !important; }

.ftab-icon-wrap {
    width:52px; height:52px; border-radius:50%; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
    font-size:26px; animation:ftab-float 3s ease infinite;
}
.food-icon { background:linear-gradient(135deg,#f97316,#ea580c); box-shadow:0 4px 14px rgba(249,115,22,.35); }
.stay-icon { background:linear-gradient(135deg,#3b82f6,#1d4ed8); box-shadow:0 4px 14px rgba(59,130,246,.35); animation-delay:.6s; }

.ftab-text { flex:1; min-width:0; }
.ftab-title { font-family:'Playfair Display',serif; font-size:15px; font-weight:700; color:white !important; line-height:1.3; }
.ftab-count { font-size:11px; color:rgba(255,255,255,.5) !important; margin-top:3px; }

@keyframes ftab-float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }

@media(max-width:768px) {
    .feature-tabs-wrap { padding:12px 16px; }
    .feature-tabs      { flex-direction:column; }
    .feature-tab       { max-width:100%; }
    .ftab-icon-wrap    { width:44px; height:44px; font-size:22px; }
    .ftab-title        { font-size:14px; }
}

/* ══ LATEST LISTINGS CAROUSEL ══ */
.latest-carousel-wrap { position:relative; }
.latest-carousel {
    display:flex;
    gap:14px;
    overflow-x:auto;          /* scrollable horizontally */
    overflow-y:visible;
    scroll-behavior:smooth;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;     /* hide scrollbar Firefox */
    padding-bottom:4px;
}
.latest-carousel::-webkit-scrollbar { display:none; } /* hide scrollbar Chrome */

.carousel-card {
    flex:0 0 180px; background:white; border-radius:14px;
    overflow:hidden; border:1px solid var(--border);
    cursor:pointer; transition:all .25s;
    box-shadow:0 2px 8px rgba(0,0,0,.06);
}
.carousel-card:hover { transform:translateY(-4px); box-shadow:0 10px 28px rgba(13,43,94,.1); }

.carousel-img {
    height:120px; background:linear-gradient(135deg,var(--navy),var(--sky));
    position:relative; overflow:hidden;
    display:flex; align-items:center; justify-content:center;
}
.carousel-img img { width:100%; height:100%; object-fit:cover; display:block; }
.carousel-badge { position:absolute; top:7px; left:7px; font-size:9px; font-weight:700; padding:2px 7px; border-radius:10px; }
.premium-badge  { background:linear-gradient(135deg,#1a56db,#7c3aed); color:white; }
.featured-badge { background:var(--accent); color:#333; }

.carousel-body { padding:10px 11px; }
.carousel-cat  { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.8px; margin-bottom:3px; }
.carousel-name { font-weight:700; font-size:12px; color:var(--navy); line-height:1.35; margin-bottom:4px; }
.carousel-loc  { font-size:10px; color:var(--muted); margin-bottom:7px; }
.carousel-wa   { display:block; text-align:center; background:#25d366; color:white !important; padding:6px; border-radius:7px; font-size:10px; font-weight:700; text-decoration:none !important; }

/* Dots */
.carousel-dots { display:flex; justify-content:center; gap:6px; margin-top:12px; }
.carousel-dot  { width:7px; height:7px; border-radius:50%; background:#cbd5e1; cursor:pointer; transition:all .2s; border:none; padding:0; }
.carousel-dot.active { background:var(--blue); transform:scale(1.25); width:18px; border-radius:4px; }

@media(max-width:768px) {
    .carousel-card { flex:0 0 150px; }
    .carousel-img  { height:100px; }
    .carousel-name { font-size:11px; }
}

/* ══ ARTICLE DETAIL LAYOUT ══ */
.article-detail-grid {
    display:grid !important;
    grid-template-columns:1fr 260px !important;
    gap:32px;
    align-items:start;
}
.article-sidebar-col {
    position:sticky;
    top:80px;
    display:flex !important;
    flex-direction:column;
    gap:16px;
    min-width:0;
    overflow:hidden;
}
@media(max-width:900px) {
    .article-detail-grid { display:block !important; }
    .article-sidebar-col { display:none !important; }
}

/* ══ MOBILE NAV ══ */
@media(max-width:860px) {
    .nav-center  { display:none !important; }
    .nav-right   { display:none !important; }
    .nav-hamburger { display:flex !important; align-items:center; padding:8px; }
    nav { padding:0 16px; }
}

/* ══ LISTING CARD IMAGE — aspect ratio, no crop ══ */
.listing-img {
    width:100%;
    aspect-ratio:16/9;
    background:linear-gradient(135deg,var(--navy),var(--sky));
    display:flex; align-items:center; justify-content:center;
    font-size:48px; overflow:hidden; position:relative;
}
.listing-img img {
    width:100%; height:100%; object-fit:cover; display:block;
}

/* ══ ALL IMAGES — no crop, maintain ratio ══ */
.article-body img {
    width:100% !important;
    height:auto !important;
    object-fit:contain !important;
    border-radius:10px;
    display:block;
    margin:12px 0;
}
.listing-img img,
.carousel-img img {
    object-fit:cover !important; /* listing/carousel keep cover for consistent card height */
}
