/*
 * KesseyWP Main Styles - Fully Integrated from Kessey_php
 */

/* Global Theme Settings */
:root {
    --color-primary: #2777B4;
    --color-accent: #0f172a;
    /* Darker accent for better contrast */
    --color-text: #1e293b;
    /* More solid dark text */
    --color-text-muted: #64748b;
    --color-bg-light: #FFFFFF;
    --color-link: #334155;
    --radius-custom: 12px;
    --transition-premium: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
}

/* Base Styles */
body {
    font-family: 'Outfit', sans-serif;
    background-color: #ffffff;
    color: var(--color-text);
    font-size: 18px;
    line-height: 1.7;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: var(--transition-premium);
}

a:hover {
    color: var(--color-primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-text);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
}

/* Color Utilities */
.text-white {
    color: #ffffff !important;
}

.text-primary {
    color: var(--color-primary) !important;
}

.text-text-primary {
    color: var(--color-text) !important;
}

.text-white-80 {
    color: rgba(255, 255, 255, 0.8) !important;
}

.text-white-60 {
    color: rgba(255, 255, 255, 0.6) !important;
}

.text-accent {
    color: var(--color-accent) !important;
}

.text-slate-900 {
    color: #0f172a !important;
}

.text-slate-700 {
    color: #334155 !important;
}

.text-gray-400 {
    color: #9ca3af !important;
}

.text-gray-500 {
    color: #6b7280 !important;
}

.text-gray-600 {
    color: #4b5563 !important;
}

.text-gray-700 {
    color: #374151 !important;
}


h1 {
    font-size: 66px;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

h2 {
    font-size: 64px;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
}

/* Premium Layout */
section {
    padding-top: 100px;
    padding-bottom: 100px;
}

/* Masked Text Reveal */
.mask-text {
    overflow: hidden;
    display: block;
}

.mask-text span {
    display: block;
    transform: translateY(110%);
    transition: var(--transition-premium);
}

.active .mask-text span {
    transform: translateY(0);
}

.active .stagger-1 {
    transition-delay: 0.1s;
}

.active .stagger-2 {
    transition-delay: 0.2s;
}

.active .stagger-3 {
    transition-delay: 0.3s;
}

.active .stagger-4 {
    transition-delay: 0.4s;
}

/* Link Hover Base */
a:hover {
    color: var(--color-primary);
    opacity: 0.8;
}

/* Components */
.btn {
    padding: 1.25rem 2.5rem;
    border-radius: 100px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--transition-premium);
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 2px solid transparent;
    line-height: normal;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff !important;
    box-shadow: 0 10px 30px -10px rgba(39, 119, 180, 0.4);
}

.btn-primary:hover {
    background-color: #1e5d8d;
    /* Darkened primary for better contrast */
    transform: translateY(-4px);
    box-shadow: 0 15px 35px -5px rgba(39, 119, 180, 0.5);
    color: #ffffff !important;
    letter-spacing: 0.12em;
    /* Subtle expansion on hover */
}

.btn-outline {
    border-color: #0f172a;
    color: #0f172a !important;
    background: transparent;
}

.btn-outline:hover {
    background: #0f172a;
    color: #ffffff !important;
    transform: translateY(-4px);
}

.btn-white {
    background: #ffffff;
    color: #0f172a !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.btn-white:hover {
    background: #f8fafc;
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.btn-white-outline {
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
}

.btn-white-outline:hover {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--color-primary) !important;
    transform: translateY(-4px);
}


.card {
    background-color: #ffffff;
    border: 1px solid #f1f5f9;
    padding: 3rem;
    border-radius: 24px;
    transition: var(--transition-premium);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 40px 60px -15px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

/* Section Title Tags */
.section-title-tag {
    background: rgba(39, 119, 180, 0.08);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 800;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    display: inline-block;
    margin-bottom: 2rem;
}

/* Animations Logic */
.reveal,
.reveal-left,
.reveal-right,
.reveal-zoom {
    opacity: 0;
    transform: translateY(40px);
    transition: var(--transition-premium);
}

.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-zoom.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-zoom {
    transform: scale(0.95);
}

/* Page Hero Title Animation */
.hero-title-reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    filter: blur(10px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-title-reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}


/* Main Header Styling (Matched to Kessey_php) */
#main-header {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links li a {
    color: var(--color-text);
}

#main-header:not(.header-scrolled) #menu-toggle {
    color: var(--color-text) !important;
}

.header-scrolled .nav-links li a {
    color: var(--color-text);
}

.header-scrolled #menu-toggle {
    color: var(--color-text) !important;
}

#main-header.header-scrolled {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    height: 85px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-logo {
    filter: none !important;
    transition: all 0.5s ease;
}

.header-scrolled .header-logo {
    filter: none !important;
}

/* Navigation & Dropdowns (Refined to match Kessey_php) */
.nav-links li {
    position: relative;
}

.nav-link-premium {
    position: relative;
    padding: 0;
    color: var(--color-text);
    transition: color 0.3s ease;
}

.nav-link-premium:hover {
    color: var(--color-primary);
}


/* Dropdown visibility logic */
.dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) translateX(-50%);
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100 !important;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) translateX(-50%);
    pointer-events: auto;
}

/* WordPress Default Sub-menu Styling (Desktop) */
.nav-links .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    visibility: hidden;
    background: #ffffff;
    min-width: 240px;
    border-radius: 18px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.15);
    padding: 15px 0;
    margin-top: 15px;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.nav-links li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-links .sub-menu li {
    display: block;
    margin: 0;
    width: 100%;
}

.nav-links .sub-menu li a {
    color: #1e293b !important;
    display: block;
    padding: 14px 25px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    border: none !important;
}

.nav-links .sub-menu li a:hover {
    background: #f8fafc;
    color: var(--color-primary) !important;
    padding-left: 30px;
}

/* Nav Link Underline Effect (Matched to Kessey_php) */
.nav-link-premium {
    position: relative;
}

.nav-link-premium::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition-premium);
    box-shadow: 0 0 10px var(--color-primary);
}

.nav-link-premium:hover::after,
.current-menu-item .nav-link-premium::after {
    width: 100%;
}

.nav-links>li.current-menu-item>a {
    color: var(--color-primary) !important;
}

/* Mobile Menu Enhancements (Push Down Style) */
#mobile-menu {
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
    z-index: 90 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.mobile-nav-container {
    width: 100%;
}

.mobile-menu-item-wrap {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu-item-wrap:last-child {
    border-bottom: none;
}

#mobile-menu a {
    color: #ffffff !important;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 10px 0;
    display: inline-block;
    text-decoration: none !important;
}

#mobile-menu a:hover {
    color: var(--color-primary) !important;
    transform: translateX(10px);
}

#mobile-menu a.text-primary,
#mobile-menu .current-menu-item>a {
    color: var(--color-primary) !important;
}

#mobile-menu .mobile-dropdown-toggle {
    color: rgba(255, 255, 255, 0.4) !important;
}

#mobile-menu .mobile-submenu {
    padding-bottom: 20px;
    padding-left: 15px;
}

#mobile-menu .mobile-submenu a {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6) !important;
    text-transform: none;
    letter-spacing: 0;
    padding: 6px 0;
}

/* Fix for header during mobile menu open */
body.menu-open #main-header {
    background: rgba(15, 23, 42, 1) !important;
    box-shadow: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.menu-open #menu-toggle .hamburger-line {
    background: #ffffff !important;
}

#primary {
    transition: transform 0.7s cubic-bezier(0.85, 0, 0.15, 1);
}

/* Hero Slideshow Styles */
.hero-slide {
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    z-index: 10;
}

.hero-slide:not(.active) {
    opacity: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-dot {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-dot.active {
    width: 32px !important;
    background-color: var(--color-primary) !important;
    opacity: 1 !important;
}

/* Cursor Follower */
.cursor-follower {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: width 0.3s ease, height 0.3s ease, background 0.3s ease;
    display: none;
    transform: translate(-50%, -50%);
}

@media (pointer: fine) {
    .cursor-follower {
        display: block;
    }
}

.magnetic-wrap {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Scroll Indicator Animation */
@keyframes scroll-down {
    0% {
        opacity: 0;
        transform: translate(-50%, 0);
    }

    30% {
        opacity: 1;
    }

    60% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
}

.scroller-dot {
    animation: scroll-down 2.2s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

/* Trending Background Effect */
.bg-trending {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a5a8a 100%);
    position: relative;
    overflow: hidden;
}

.bg-trending::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 0%, transparent 80%);
    animation: pulse-slow 12s ease-in-out infinite alternate;
    pointer-events: none;
}


@keyframes pulse-slow {
    0% {
        transform: scale(1) translate(-5%, -5%);
    }

    100% {
        transform: scale(1.1) translate(5%, 5%);
    }
}

/* Thank You Page Heading Contrast */
.hero-thank-you h1 {
    mix-blend-mode: difference;
    color: #ffffff !important;
}

.hero-thank-you h1 span {
    color: #ffffff !important;
    /* Force white so it flips to its complement via mix-blend-mode */
}

.hero-thank-you p {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Premium Pagination */
.nav-links.premium-pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.premium-pagination .page-numbers {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    color: #475569;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 14px;
    font-weight: 700;
}

.premium-pagination .page-numbers:hover {
    background: #ffffff;
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.premium-pagination .page-numbers.current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(39, 119, 180, 0.2);
}

.premium-pagination .page-numbers.prev,
.premium-pagination .page-numbers.next {
    background: #ffffff;
    border-color: #f1f5f9;
}

.premium-pagination .page-numbers.dots {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

/* Sidebar Widgets */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.widget ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget ul li a {
    color: var(--color-link);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.widget_categories ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}