/*
Theme Name: PinoyTips
Theme URI: https://example.com/pinoytips
Author: PinoyTips
Description: A clean Philippine travel and tips theme converted from the supplied PinoyTips Figma/Vite design. Includes a dynamic magazine-style homepage, responsive navigation, featured stories, destination categories, archives, search, and single post layouts.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: pinoytips
*/

:root {
  --pt-blue: #0057b8;
  --pt-blue-dark: #003d80;
  --pt-blue-light: #e8f1fc;
  --pt-black: #0a0a0a;
  --pt-white: #ffffff;
  --pt-gray-soft: #f4f6f9;
  --pt-gray-mid: #7d8795;
  --pt-gray-border: #dde3ec;
  --pt-max: 1240px;
  --pt-radius: 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--pt-white);
  color: var(--pt-black);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pt-blue); text-decoration: none; }
a:hover { color: var(--pt-blue-dark); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus { width: auto; height: auto; clip: auto; margin: 0; padding: .75rem 1rem; background: #fff; z-index: 99999; }
.pt-container { width: min(calc(100% - 48px), var(--pt-max)); margin-inline: auto; }
.pt-section { padding: 80px 0; }
.pt-kicker { color: var(--pt-blue); font-size: 12px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.pt-section-title { margin: 4px 0 0; font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.08; letter-spacing: -.035em; }
.pt-section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.pt-text-link { font-size: 14px; font-weight: 700; border-bottom: 1px solid currentColor; }

/* Header */
.pt-site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--pt-gray-border); backdrop-filter: blur(8px); }
.admin-bar .pt-site-header { top: 32px; }
.pt-header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.pt-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--pt-black); font-weight: 800; font-size: 21px; letter-spacing: -.04em; }
.pt-brand:hover { color: var(--pt-black); }
.pt-brand-mark { display: inline-flex; align-items: center; justify-content: center; background: var(--pt-blue); color: #fff; min-width: 31px; height: 24px; padding: 0 7px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.pt-brand-name span { color: var(--pt-blue); }
.custom-logo { max-height: 40px; width: auto; }
.pt-nav-wrap { display: flex; align-items: center; gap: 28px; }
.pt-primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 28px; }
.pt-primary-nav a { color: var(--pt-black); font-size: 14px; font-weight: 600; }
.pt-primary-nav a:hover, .pt-primary-nav .current-menu-item > a, .pt-primary-nav .current_page_item > a { color: var(--pt-blue); }
.pt-header-cta { display: inline-flex; background: var(--pt-blue); color: #fff; padding: 9px 15px; font-size: 13px; font-weight: 700; }
.pt-header-cta:hover { background: var(--pt-blue-dark); color: #fff; }
.pt-menu-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; align-items: center; justify-content: center; padding: 9px; }
.pt-menu-toggle span { display: block; width: 23px; height: 2px; background: var(--pt-black); margin: 5px auto; transition: .2s ease; }

/* Hero */
.pt-hero { min-height: 82vh; position: relative; overflow: hidden; display: flex; align-items: flex-end; background: var(--pt-black); color: #fff; }
.pt-hero-bg { position: absolute; inset: 0; background-position: center; background-size: cover; opacity: .57; transform: scale(1.01); }
.pt-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,.98), rgba(10,10,10,.25) 58%, rgba(10,10,10,.10)); }
.pt-hero-accent { position: absolute; z-index: 2; top: 0; left: 0; width: 4px; height: 100%; background: var(--pt-blue); }
.pt-hero-inner { position: relative; z-index: 3; padding-top: 120px; padding-bottom: 66px; }
.pt-hero-copy { max-width: 760px; }
.pt-hero-badge { display: inline-block; background: var(--pt-blue); color: #fff; padding: 7px 11px; margin-bottom: 22px; font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.pt-hero h1 { margin: 0 0 22px; font-size: clamp(3rem, 7vw, 5.4rem); line-height: .99; letter-spacing: -.055em; }
.pt-hero h1 .pt-blue { color: var(--pt-blue); }
.pt-hero-copy > p { max-width: 600px; color: rgba(255,255,255,.78); font-size: clamp(1rem, 2vw, 1.13rem); line-height: 1.65; margin-bottom: 32px; }
.pt-button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.pt-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 27px; border: 1px solid transparent; font-size: 14px; font-weight: 800; letter-spacing: .02em; transition: .2s ease; }
.pt-button-primary { background: var(--pt-blue); color: #fff; }
.pt-button-primary:hover { background: var(--pt-blue-dark); color: #fff; }
.pt-button-ghost { border-color: rgba(255,255,255,.45); color: #fff; }
.pt-button-ghost:hover { border-color: #fff; color: #fff; }
.pt-hero-stats { display: grid; grid-template-columns: repeat(4, max-content); gap: 42px; border-top: 1px solid rgba(255,255,255,.16); padding-top: 27px; margin-top: 48px; }
.pt-stat-value { font-size: 24px; font-weight: 800; line-height: 1.2; }
.pt-stat-label { color: rgba(255,255,255,.48); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; margin-top: 4px; }

/* Ticker */
.pt-ticker { background: var(--pt-blue); color: #fff; overflow: hidden; padding: 9px 0; }
.pt-ticker-track { display: flex; width: max-content; gap: 40px; white-space: nowrap; font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; animation: pt-marquee 34s linear infinite; }
@keyframes pt-marquee { to { transform: translateX(-33.333%); } }
@media (prefers-reduced-motion: reduce) { .pt-ticker-track { animation: none; } }

/* Featured stories */
.pt-feature-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
.pt-feature-main .pt-card-image { aspect-ratio: 16/9; }
.pt-card-image { position: relative; overflow: hidden; background: var(--pt-blue-light); }
.pt-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.pt-post-card:hover .pt-card-image img { transform: scale(1.045); }
.pt-category-badge { position: absolute; left: 14px; top: 14px; background: var(--pt-blue); color: #fff; padding: 5px 9px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pt-feature-main h3 { margin: 17px 0 8px; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.18; letter-spacing: -.025em; }
.pt-post-card h3 a { color: var(--pt-black); }
.pt-post-card:hover h3 a { color: var(--pt-blue); }
.pt-excerpt { margin: 0 0 12px; color: var(--pt-gray-mid); font-size: 14px; }
.pt-meta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; color: var(--pt-gray-mid); font-size: 12px; }
.pt-meta strong { color: var(--pt-black); font-weight: 700; }
.pt-feature-side { display: flex; flex-direction: column; gap: 22px; }
.pt-mini-card { display: grid; grid-template-columns: 128px 1fr; gap: 14px; }
.pt-mini-card .pt-card-image { width: 128px; height: 96px; }
.pt-mini-card h3 { margin: 3px 0 6px; font-size: 14px; line-height: 1.35; }
.pt-mini-category { color: var(--pt-blue); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pt-follow-card { margin-top: auto; padding: 20px; background: var(--pt-blue); color: #fff; }
.pt-follow-card h3 { margin: 0 0 4px; font-size: 15px; }
.pt-follow-card p { margin: 0 0 15px; color: rgba(255,255,255,.72); font-size: 12px; }
.pt-follow-card .pt-button { background: #fff; color: var(--pt-blue); min-height: 40px; padding-inline: 17px; font-size: 12px; }

/* Destinations */
.pt-destinations { background: var(--pt-gray-soft); }
.pt-destination-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pt-destination-card { position: relative; min-height: 390px; overflow: hidden; background: var(--pt-black); color: #fff; }
.pt-destination-card img, .pt-destination-fallback { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.pt-destination-card img { opacity: .76; transition: .6s ease; }
.pt-destination-card:hover img { transform: scale(1.045); opacity: .9; }
.pt-destination-fallback { background: linear-gradient(150deg, #1767bb, #092c53 70%); }
.pt-destination-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,.96), transparent 66%); }
.pt-destination-content { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 20px; }
.pt-destination-content h3 { color: #fff; font-size: 23px; margin: 2px 0 0; line-height: 1.15; }
.pt-destination-content p { color: rgba(255,255,255,.56); margin: 5px 0 0; font-size: 12px; }
.pt-destination-tagline { color: #62a8f3; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

/* Tips */
.pt-tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pt-tip { border: 1px solid var(--pt-gray-border); padding: 22px; transition: .2s ease; display: flex; gap: 14px; align-items: flex-start; }
.pt-tip:hover { border-color: var(--pt-blue); background: var(--pt-blue-light); }
.pt-tip-icon { width: 25px; height: 25px; flex: 0 0 25px; color: var(--pt-blue); }
.pt-tip-label { color: var(--pt-blue); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pt-tip p { margin: 2px 0 0; font-size: 14px; font-weight: 600; line-height: 1.42; }

/* CTA */
.pt-cta { position: relative; overflow: hidden; background: var(--pt-black); color: #fff; text-align: center; padding: 92px 0; }
.pt-cta::before { content: ""; position: absolute; inset: 0; opacity: .06; background-image: linear-gradient(var(--pt-blue) 1px, transparent 1px), linear-gradient(90deg, var(--pt-blue) 1px, transparent 1px); background-size: 40px 40px; }
.pt-cta-inner { position: relative; max-width: 760px; }
.pt-cta h2 { font-size: clamp(2.3rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -.04em; margin: 14px 0 18px; }
.pt-cta p { color: rgba(255,255,255,.62); max-width: 620px; margin: 0 auto 30px; }

/* Blog/archive cards */
.pt-page-header { background: var(--pt-gray-soft); padding: 54px 0; border-bottom: 1px solid var(--pt-gray-border); }
.pt-page-header h1 { margin: 2px 0 0; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; letter-spacing: -.04em; }
.pt-page-header p { max-width: 680px; color: var(--pt-gray-mid); margin: 12px 0 0; }
.pt-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 22px; }
.pt-grid-card { border-bottom: 1px solid var(--pt-gray-border); padding-bottom: 22px; }
.pt-grid-card .pt-card-image { aspect-ratio: 16/10; margin-bottom: 15px; }
.pt-grid-card h2, .pt-grid-card h3 { margin: 4px 0 8px; font-size: 20px; line-height: 1.25; letter-spacing: -.02em; }
.pt-grid-card h2 a, .pt-grid-card h3 a { color: var(--pt-black); }
.pt-grid-card:hover h2 a, .pt-grid-card:hover h3 a { color: var(--pt-blue); }
.pt-pagination { margin-top: 48px; }
.pt-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 7px; }
.pt-pagination .page-numbers { border: 1px solid var(--pt-gray-border); min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; color: var(--pt-black); font-size: 13px; font-weight: 700; }
.pt-pagination .current, .pt-pagination a:hover { border-color: var(--pt-blue); background: var(--pt-blue); color: #fff; }
.pt-empty { border: 1px solid var(--pt-gray-border); padding: 35px; }

/* Single posts/pages */
.pt-article-header { padding: 62px 0 34px; }
.pt-article-header-inner { max-width: 900px; margin: 0 auto; }
.pt-article-header h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -.055em; margin: 10px 0 18px; }
.pt-article-subtitle { color: var(--pt-gray-mid); font-size: 18px; }
.pt-article-hero { width: min(calc(100% - 48px), 1160px); margin: 0 auto 48px; }
.pt-article-hero img { width: 100%; max-height: 680px; object-fit: cover; }
.pt-content-wrap { width: min(calc(100% - 48px), 800px); margin: 0 auto; padding-bottom: 72px; }
.pt-entry-content { font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.82; }
.pt-entry-content > * { max-width: 100%; }
.pt-entry-content h2, .pt-entry-content h3, .pt-entry-content h4 { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; line-height: 1.2; letter-spacing: -.025em; margin-top: 2em; }
.pt-entry-content h2 { font-size: 31px; }
.pt-entry-content h3 { font-size: 24px; }
.pt-entry-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pt-entry-content blockquote { border-left: 4px solid var(--pt-blue); margin: 30px 0; padding: 8px 0 8px 24px; color: #3f4650; font-size: 20px; }
.pt-entry-content img { margin: 28px auto; }
.pt-entry-content table { width: 100%; border-collapse: collapse; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 15px; }
.pt-entry-content th, .pt-entry-content td { border: 1px solid var(--pt-gray-border); padding: 11px 13px; text-align: left; }
.pt-entry-content th { background: var(--pt-gray-soft); }
.pt-entry-content .wp-block-button__link { background: var(--pt-blue); color: #fff; border-radius: 0; text-decoration: none; }
.pt-entry-footer { border-top: 1px solid var(--pt-gray-border); margin-top: 42px; padding-top: 20px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; }
.pt-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.pt-tags a { border: 1px solid var(--pt-gray-border); color: var(--pt-gray-mid); padding: 5px 9px; font-size: 11px; text-decoration: none; }
.pt-related { background: var(--pt-gray-soft); }
.pt-related .pt-post-grid { grid-template-columns: repeat(3, 1fr); }

/* Search */
.pt-search-form { display: flex; max-width: 620px; margin-top: 20px; }
.pt-search-form input[type="search"] { flex: 1; min-width: 0; height: 48px; border: 1px solid var(--pt-gray-border); padding: 0 14px; outline: 0; }
.pt-search-form input[type="search"]:focus { border-color: var(--pt-blue); }
.pt-search-form button { border: 0; background: var(--pt-blue); color: #fff; padding: 0 21px; font-weight: 700; }

/* Footer */
.pt-site-footer { border-top: 1px solid var(--pt-gray-border); padding: 58px 0 28px; }
.pt-footer-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 44px; margin-bottom: 42px; }
.pt-footer-brand p { max-width: 260px; color: var(--pt-gray-mid); font-size: 14px; }
.pt-footer-title { margin: 0 0 14px; font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.pt-footer-menu { list-style: none; margin: 0; padding: 0; }
.pt-footer-menu li { margin-bottom: 8px; }
.pt-footer-menu a { color: var(--pt-gray-mid); font-size: 14px; }
.pt-footer-menu a:hover { color: var(--pt-blue); }
.pt-footer-bottom { border-top: 1px solid var(--pt-gray-border); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--pt-gray-mid); font-size: 12px; }
.pt-social { display: flex; flex-wrap: wrap; gap: 18px; }
.pt-social a { color: var(--pt-gray-mid); font-size: 12px; font-weight: 700; }

.alignwide { width: min(1100px, calc(100vw - 48px)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }

@media (max-width: 980px) {
  .pt-nav-wrap { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--pt-gray-border); padding: 18px 24px 24px; }
  .pt-nav-wrap.is-open { display: block; }
  .pt-primary-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .pt-primary-nav a { display: block; padding: 10px 0; }
  .pt-header-cta { margin-top: 12px; }
  .pt-menu-toggle { display: inline-block; }
  .pt-feature-grid { grid-template-columns: 1fr; }
  .pt-feature-side { display: grid; grid-template-columns: 1fr 1fr; }
  .pt-follow-card { grid-column: 1 / -1; }
  .pt-destination-grid { grid-template-columns: repeat(2, 1fr); }
  .pt-tips-grid, .pt-post-grid { grid-template-columns: repeat(2, 1fr); }
  .pt-footer-grid { grid-template-columns: repeat(2, 1fr); }
  .pt-hero-stats { grid-template-columns: repeat(2, max-content); }
}

@media (max-width: 782px) { .admin-bar .pt-site-header { top: 46px; } }

@media (max-width: 640px) {
  .pt-container, .pt-article-hero, .pt-content-wrap { width: min(calc(100% - 32px), var(--pt-max)); }
  .pt-section { padding: 58px 0; }
  .pt-header-inner { height: 60px; }
  .pt-nav-wrap { top: 60px; }
  .pt-hero { min-height: 760px; }
  .pt-hero-inner { padding-top: 95px; padding-bottom: 46px; }
  .pt-hero h1 { font-size: clamp(2.8rem, 14vw, 4.3rem); }
  .pt-hero-stats { gap: 22px 34px; margin-top: 38px; }
  .pt-button { width: 100%; }
  .pt-section-head { align-items: flex-start; flex-direction: column; margin-bottom: 28px; }
  .pt-feature-side { display: flex; }
  .pt-mini-card { grid-template-columns: 104px 1fr; }
  .pt-mini-card .pt-card-image { width: 104px; height: 84px; }
  .pt-destination-grid, .pt-tips-grid, .pt-post-grid, .pt-related .pt-post-grid { grid-template-columns: 1fr; }
  .pt-destination-card { min-height: 430px; }
  .pt-footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .pt-footer-bottom { align-items: flex-start; flex-direction: column; }
  .pt-article-header { padding-top: 48px; }
  .pt-article-header h1 { font-size: clamp(2.5rem, 13vw, 3.7rem); }
  .pt-entry-content { font-size: 17px; }
  .pt-entry-content h2 { font-size: 27px; }
}
