/*
Theme Name: Kalaay Digital
Theme URI: https://kalaay.co.uk/
Author: Kalaay Digital
Author URI: https://kalaay.co.uk/
Description: A digital marketing agency theme converted from a static Tailwind CSS build. Includes a modular front page (hero, challenges, services, benefits, results, testimonials, blog, FAQ, contact), GSAP scroll animations and Lenis smooth scrolling.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kalaay-digital
Tags: business, portfolio, one-column, custom-menu, custom-logo, featured-images, blog, translation-ready
*/

/*
 * -----------------------------------------------------------------------------
 * NOTE
 * -----------------------------------------------------------------------------
 * The compiled Tailwind build lives in assets/css/main.css and is loaded via
 * wp_enqueue_style() in functions.php. This file exists because WordPress
 * requires a style.css containing the header block above in order to recognise
 * the theme.
 *
 * Put your own overrides below — this file loads AFTER main.css, so anything
 * here wins.
 * -----------------------------------------------------------------------------
 */

/* WordPress core alignment classes (required for the block editor) */
.alignleft {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 1em;
}

.alignright {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignwide {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  max-width: 100%;
}

/* Accessibility: skip link */
.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip-path: none;
  color: #111;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Caption + gallery defaults */
.wp-caption {
  margin-bottom: 1.5em;
  max-width: 100%;
}

.wp-caption img[class*='wp-image-'] {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
  padding: 0.5rem 0;
}

/* Sticky post + editor body classes */
.sticky {
  display: block;
}

.bypostauthor {
  display: block;
}

/* Long-form post content — the Tailwind build has preflight enabled, which
   resets headings and lists. These rules restore sensible typography inside
   post/page content coming from the editor. */
.entry-content > * + * {
  margin-top: 1.25em;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
  margin-top: 2em;
}

.entry-content h1 {
  font-size: 2.25rem;
}
.entry-content h2 {
  font-size: 1.875rem;
}
.entry-content h3 {
  font-size: 1.5rem;
}
.entry-content h4 {
  font-size: 1.25rem;
}

.entry-content p {
  line-height: 1.75;
  color: #4b5563;
}

.entry-content a {
  color: #111827;
  text-decoration: underline;
  text-decoration-color: #ffc001;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.entry-content a:hover {
  color: #d4af37;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.5rem;
  color: #4b5563;
  line-height: 1.75;
}

.entry-content ul {
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content li + li {
  margin-top: 0.5rem;
}

.entry-content blockquote {
  border-left: 4px solid #ffc001;
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-style: italic;
  color: #374151;
}

.entry-content img,
.entry-content iframe,
.entry-content video {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.entry-content pre {
  background: #111827;
  color: #f9fafb;
  padding: 1.25rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  font-size: 0.875rem;
}

.entry-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em;
}

.entry-content :not(pre) > code {
  background: #f3f4f6;
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.entry-content th,
.entry-content td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
  text-align: left;
}

.entry-content th {
  background: #f9fafb;
  font-weight: 700;
}

/* Comment list reset */
.comment-list,
.comment-list .children {
  list-style: none;
  padding-left: 0;
}

.comment-list .children {
  padding-left: 1.5rem;
}

/* -----------------------------------------------------------------------------
 * Navigation: keyboard + touch parity for the hover dropdowns
 * The Tailwind markup only opens sub-menus on group-hover, which keyboard and
 * touch users can't trigger. assets/js/navigation.js adds .kalaay-open and
 * these rules mirror the hover state.
 * -------------------------------------------------------------------------- */
nav li.group.kalaay-open > .kalaay-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.kalaay-submenu-toggle svg {
  transition: transform 0.2s ease;
}

/* Visible focus ring for keyboard users across the header and footer */
nav a:focus-visible,
footer a:focus-visible,
.entry-content a:focus-visible {
  outline: 2px solid #ffc001;
  outline-offset: 3px;
  border-radius: 2px;
}

/* -----------------------------------------------------------------------------
 * Pagination + tag list (WordPress core markup, themed to match the buttons)
 * -------------------------------------------------------------------------- */
.kalaay-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.kalaay-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fff;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.kalaay-pagination .page-numbers:hover {
  border-color: #111827;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.kalaay-pagination .page-numbers.current {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.kalaay-tags a {
  display: inline-block;
  background: #fff8e7;
  color: #d4af37;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.kalaay-tags a:hover {
  background: #111827;
  color: #fff;
}

/* -----------------------------------------------------------------------------
 * Comments
 * -------------------------------------------------------------------------- */
.comment-body {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.comment-author img {
  border-radius: 9999px;
}

.comment-author .fn {
  font-weight: 700;
  color: #111827;
  font-style: normal;
}

.comment-metadata a {
  color: #9ca3af;
  font-size: 0.75rem;
  text-decoration: none;
}

.comment-content p {
  color: #4b5563;
  line-height: 1.7;
}

.reply a {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #111827;
  text-decoration: none;
}

.reply a:hover {
  color: #d4af37;
}

.comment-notes,
.comment-form-cookies-consent {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 1.25rem;
}

.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

/* -----------------------------------------------------------------------------
 * Widgets
 * -------------------------------------------------------------------------- */
.widget ul {
  list-style: none;
  padding: 0;
}

.widget li + li {
  margin-top: 0.625rem;
}

.widget a {
  color: #4b5563;
  text-decoration: none;
  transition: color 0.2s ease;
}

.widget a:hover {
  color: #111827;
}

/* Reduced-motion: honour the OS setting even though GSAP drives the reveals */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -----------------------------------------------------------------------------
 * FAILSAFE — content visibility without JavaScript / GSAP
 *
 * assets/css/main.css sets `opacity: 0` on every .reveal-* element and relies
 * on GSAP (loaded from a CDN) to fade them in. If the CDN is blocked by an ad
 * blocker, a corporate proxy, a strict CSP or a regional firewall, the page
 * renders completely blank.
 *
 * These rules restore visibility when JS is off (.no-js) or when GSAP failed
 * to load (.kalaay-reveal-fallback, added by assets/js/navigation.js).
 * -------------------------------------------------------------------------- */
.no-js .reveal,
.no-js .scroll-reveal,
.no-js .reveal-up,
.no-js .reveal-down,
.no-js .reveal-left,
.no-js .reveal-right,
.no-js .reveal-pop,
.no-js .reveal-overlap,
.no-js .scale-in,
.no-js .spread-card,
.no-js .gsap-up,
.no-js .gsap-left,
.no-js .gsap-right,
.no-js .gsap-section,
.no-js [class*='reveal-spread-'],
.kalaay-reveal-fallback .reveal,
.kalaay-reveal-fallback .scroll-reveal,
.kalaay-reveal-fallback .reveal-up,
.kalaay-reveal-fallback .reveal-down,
.kalaay-reveal-fallback .reveal-left,
.kalaay-reveal-fallback .reveal-right,
.kalaay-reveal-fallback .reveal-pop,
.kalaay-reveal-fallback .reveal-overlap,
.kalaay-reveal-fallback .scale-in,
.kalaay-reveal-fallback .spread-card,
.kalaay-reveal-fallback .gsap-up,
.kalaay-reveal-fallback .gsap-left,
.kalaay-reveal-fallback .gsap-right,
.kalaay-reveal-fallback .gsap-section,
.kalaay-reveal-fallback [class*='reveal-spread-'] {
  opacity: 1 !important;
  transform: none !important;
}

/* Same guarantee for users who asked for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .scroll-reveal,
  .reveal-up,
  .reveal-down,
  .reveal-left,
  .reveal-right,
  .reveal-pop,
  .reveal-overlap,
  .scale-in,
  .spread-card,
  [class*='reveal-spread-'] {
    opacity: 1 !important;
    transform: none !important;
  }
}
