/*
Theme Name: Gildex Capital
Theme URI: https://example.com/gildex-capital
Author: Your Name
Author URI: https://example.com
Description: Custom theme for Gildex Capital with Services CPT, menus, and blog sections editable via WordPress admin.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gildex-capital
*/

/* Basic Reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif; color: #1f2a2e; background: #ffffff; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: #0d6efd; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout Utilities */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.section--dark { background: #223035; color: #eef2f3; }
.section__title { text-align: center; font-size: 28px; margin: 0 0 30px; }
.text-center { text-align: center; }
.btn { display: inline-block; padding: 10px 20px; border-radius: 6px; border: 1px solid rgba(0,0,0,0.1); background: #f7f7f7; color: inherit; }
.btn:hover { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); text-decoration: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 999; background: transparent; }
.header-top { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 20px; padding: 10px 0; border-bottom: 1px solid #e5e7eb; background: #ffffff; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: 0.5px; }
.brand__logo { width: 120px; height: auto; display: inline-block; }
.header-divider { width: 1px; height: 80px; background: #e5e7eb; margin-left: 0; margin-right: 40px; }

/* Navigation */
.nav-primary { display: flex; gap: 22px; align-items: center; list-style: none; padding: 0; margin: 0; }
.nav-primary a { color: #1f2a2e; font-weight: 500; }
.nav-primary .current-menu-item > a, .nav-primary a:hover { color: #b58b20; }

/* Hero */
.hero { position: relative; min-height: 560px; display: flex; align-items: center; color: #fff; background: #111; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.6; }
.hero__content { position: relative; z-index: 2; padding: 80px 0; text-align: center; }
.hero__city { font-size: 15px; letter-spacing: 1px; opacity: 0.9; }
.hero__headline { font-size: 36px; margin: 10px 0 10px; font-weight: 700; }
.hero__tagline { font-size: 22px; color: #e6cc7a; }

/* About */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: stretch; }
.about__points { display: grid; gap: 16px; }
.about__point { display: grid; grid-template-columns: 16px 1fr; gap: 14px; }
.about__dash { width: 16px; height: 3px; background: #d3a950; border-radius: 3px; margin-top: 10px; }
.about > div:last-child { display: flex; }
.about > div:last-child img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

/* Contacts */
.contact-hero { padding-bottom: 30px; }
.contact-hero__subtitle { text-align: center; margin: 12px auto 0; max-width: 640px; color: #5f6c73; }
.contact-alert { margin: 24px auto 0; max-width: 640px; padding: 14px 18px; border-radius: 8px; font-weight: 500; }
.contact-alert--success { background: #e0f8ea; color: #12793c; border: 1px solid rgba(18, 121, 60, 0.25); }
.contact-alert--error { background: #fdecea; color: #b42318; border: 1px solid rgba(180, 35, 24, 0.25); }
.contact-section { padding-top: 20px; }
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: stretch; }
.contact-map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,0.2); }
.contact-form { background: linear-gradient(180deg, #283338 0%, #1f2a2e 100%); color: #eef2f3; padding: 32px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,0.2); display: flex; flex-direction: column; }
.contact-form__title { margin: 0 0 18px; font-size: 22px; font-weight: 600; color: #f5d887; }
.contact-form__fields { display: grid; gap: 14px; flex: 1; }
.contact-form__label { font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase; color: rgba(239, 239, 239, 0.7); }
.contact-form__input,
.contact-form__textarea { width: 100%; border: 1px solid rgba(255,255,255,0.12); background: rgba(8, 13, 15, 0.35); color: #f7fafb; padding: 10px 12px; border-radius: 8px; font-family: inherit; transition: border-color 0.2s ease, background 0.2s ease; }
.contact-form__input:focus,
.contact-form__textarea:focus { outline: none; border-color: #f5d887; background: rgba(8, 13, 15, 0.55); }
.contact-form__textarea { resize: vertical; min-height: 140px; }
.contact-form__submit { margin-top: 6px; background: #f5d887; border-color: #f5d887; color: #1f2a2e; font-weight: 600; }
.contact-form__submit:hover { background: #ffe8a6; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { position: relative; border-radius: 8px; overflow: hidden; min-height: 320px; background: #2f3d42; color: #eef2f3; display: flex; align-items: flex-end; }
.card__bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: grayscale(0.1); opacity: 0.45; }
.card__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.7) 100%); }
.card__content { position: relative; padding: 18px; z-index: 2; }
.card__title { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.card__excerpt { font-size: 13px; opacity: 0.9; }

/* Blog */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { background: #f7f9fa; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; display: grid; grid-template-rows: 180px 1fr; }
.post-card__thumb { background: #ddd; }
.post-card__body { padding: 16px; }
.post-card__title { margin: 0 0 8px; font-size: 18px; }
.post-card__meta { font-size: 12px; color: #6b7280; }

/* Footer */
.site-footer { background: #223035; color: #dfe7ea; padding: 50px 0 24px; }
.footer__columns { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 1fr; gap: 24px; margin-bottom: 32px; }
.footer__title { margin: 0 0 10px; font-size: 16px; font-weight: 700; color: #D9B54D; }
.footer__title a { color: inherit; text-decoration: none; display: inline-block; }
.footer__title a:visited { color: inherit; }
.footer__title a:hover,
.footer__title a:focus { color: #f1d383; }
.footer__menu { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer__menu a { color: #dfe7ea; }
.footer__menu a:hover { color: #e6cc7a; }
.site-footer small { display: block; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 16px; color: #b7c4c9; }

/* Header extensions */
.ticker { display: grid; grid-auto-flow: column; gap: 22px; align-items: center; }
.ticker__item { display: grid; gap: 4px; }
.ticker__label { font-size: 12px; color: #6b7280; letter-spacing: 0.08em; text-transform: uppercase; }
.ticker__price { font-weight: 700; color: #1f2a2e; }
.ticker__unit { font-weight: 500; color: #6b7280; margin-left: 2px; }
.ticker__change { font-size: 12px; }
.ticker__change.is-up { color: #22c55e; }
.ticker__change.is-down { color: #ef4444; }
.header-actions { display: flex; align-items: center; gap: 14px; }

/* Dark nav bar */
.header-nav { background: linear-gradient(180deg, #1b252a 0%, #283338 100%); box-shadow: inset 0 -1px 0 rgba(0,0,0,0); transition: background 0.3s ease, backdrop-filter 0.3s ease; }
.header-nav .container { display: flex; justify-content: space-between; align-items: center; }
.header-nav .nav-primary { gap: 30px; }
.header-nav .nav-primary a { color: #D9B54D; padding: 10px 10px; display: inline-block; }
.header-nav .nav-primary .current-menu-item > a, .header-nav .nav-primary a:hover { color: #D9B54D; }
.header-nav .header-phone { color: #e6cc7a; font-weight: 700; }

/* Search form basic style */
.search-form { display: flex; align-items: center; border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px 10px; }
.search-form .search-field { border: 0; outline: none; min-width: 180px; font-family: inherit; }
.search-form .search-submit { display: none; }

/* Contextual button override for dark sections */
.section--dark .btn { color: #000; background: #ffffff; border-color: #D9B54D; }

/* Responsive */
@media (max-width: 992px) {
  .about { grid-template-columns: 1fr; }
  .about > div:last-child { display: block; }
  .about > div:last-child img { height: auto; border-radius: 8px; }
  .cards, .posts { grid-template-columns: 1fr 1fr; }
  .footer__columns { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-map iframe { min-height: 320px; }
}
@media (max-width: 600px) {
  .cards, .posts { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
}

/* header layout tweaks */
.header-top { grid-template-columns: auto auto 1fr auto; }
.header-top .ticker { justify-self: start; }
.header-top .header-actions { justify-self: end; }
.header-nav__inner { display: flex; justify-content: space-between; align-items: center; }
.header-nav__inner nav { flex: 1; display: flex; justify-content: center; }
.header-email { color: #e6cc7a; font-weight: 700; }

/* header spacing tighten */
.header-top { gap: 14px; }
.header-divider { margin-right: 20px; }

/* Responsive header/tablet */
@media (max-width: 992px) {
  .brand__logo { width: 96px; }
  .header-divider { display: none; }
  .header-top { grid-template-columns: auto 1fr auto; gap: 12px; }
  .ticker { gap: 16px; }
  .search-form .search-field { min-width: 140px; }
}

/* Tablet portrait and large phones */
@media (max-width: 768px) {
  .hero { min-height: 420px; }
  .hero__headline { font-size: 30px; }
  .hero__tagline { font-size: 18px; }
  .header-nav .nav-primary { gap: 18px; }
}

/* Mobile */
@media (max-width: 600px) {
  .header-top { grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
  .brand { justify-self: start; }
  .brand__logo { width: 72px; }
  .ticker { justify-self: stretch; }
  .ticker__viewport { overflow: hidden; }
  .ticker__items { display: flex; gap: 28px; overflow-x: auto; scroll-behavior: smooth; }
  .ticker__nav { display: inline-flex; align-items: center; justify-content: center; }
  .header-actions { grid-column: 1 / -1; justify-self: stretch; }
  .search-form { width: 100%; }
  .header-nav__inner { flex-direction: column; gap: 6px; }
  .header-email { display: none; }
  .header-nav .nav-primary { gap: 14px; }
  .header-nav .nav-primary a { padding: 8px 8px; }
  .hero { min-height: 360px; }
  .hero__headline { font-size: 26px; }
  .hero__tagline { font-size: 16px; }
  .header-actions { display: none !important; }
}

/* Branded ticker styles */
.ticker--with-brand { display: grid; grid-template-columns: auto 1px 1fr; align-items: center; gap: 16px; }
.ticker__brand { width: 64px; height: 64px; border-radius: 10px; background: #b89a4a; display: grid; place-items: center; overflow: hidden; }
.ticker__brand img { width: 44px; height: auto; filter: brightness(0) saturate(100%) invert(12%) sepia(6%) saturate(1037%) hue-rotate(145deg) brightness(94%) contrast(92%); }
.ticker__divider { width: 1px; height: 60px; background: #e5e7eb; }
.ticker__items { display: grid; grid-auto-flow: column; gap: 36px; align-items: center; }

@media (max-width: 600px) {
  .ticker--with-brand { grid-template-columns: 1fr; gap: 8px; }
  .ticker__brand { width: 56px; height: 56px; }
  .ticker__divider { display: none; }
  .ticker__items { grid-auto-flow: row; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
}

/* Ticker viewport + nav */
.ticker__viewport { position: relative; }
.ticker__items { display: grid; grid-auto-flow: column; gap: 36px; align-items: center; }
.ticker__nav { display: none; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); border: 1px solid #d9d9d9; background: #fff; color: #333; width: 32px; height: 32px; border-radius: 8px; }
.ticker__nav--prev { left: -6px; right: auto; }

@media (max-width: 600px) {
  .ticker__viewport { overflow: hidden; }
  .ticker__items { display: flex; gap: 28px; overflow-x: auto; scroll-behavior: smooth; }
  .ticker__nav { display: inline-flex; align-items: center; justify-content: center; }
}

/* Sticky nav state */
.site-header.is-scrolled .header-nav { background: rgba(34, 48, 53, 0.55); border-top: 1px solid rgba(255,255,255,0.06); border-bottom: 1px solid rgba(0,0,0,0.15); -webkit-backdrop-filter: blur(10px) saturate(130%); backdrop-filter: blur(10px) saturate(130%); }
@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))) {
  .site-header.is-scrolled .header-nav { background: rgba(34, 48, 53, 0.45); }
}

/* Make header container transparent to allow nav glass blur over page */
.site-header { background: transparent; }
/* Keep the top row solid white */
.header-top { background: #ffffff; }

/* Full-width white bar behind the top header row */
.header-top-bar { background: #ffffff; }

/* Emphasize hero time */
.hero__headline { font-weight: 700; }

/* Adjust hero time weight */
.hero__headline { font-weight: 500; }
#hero-time { font-weight: 200; }

/* Align logo and ticker on mobile */
@media (max-width: 600px) {
  .header-top { align-items: center; }
  .brand__logo { vertical-align: middle; }
  .ticker__viewport { display: flex; align-items: center; }
}
