/* ==========================================================================
   PCeasy.pl - Custom CSS
   These styles complement the Tailwind CSS build and preserve the original
   React project's look & feel.
   ========================================================================== */

/* ---------- CSS Custom Properties (Design Tokens) ---------- */
:root {
    --font-body: 'Space Grotesk', sans-serif;

    --background: 228 18% 8%;
    --foreground: 0 0% 100%;

    --card: 228 14% 13%;
    --card-foreground: 0 0% 100%;

    --popover: 228 14% 13%;
    --popover-foreground: 0 0% 100%;

    --primary: 193 100% 50%;
    --primary-foreground: 228 18% 8%;

    --secondary: 271 76% 53%;
    --secondary-foreground: 0 0% 100%;

    --muted: 228 12% 18%;
    --muted-foreground: 0 0% 65%;

    --accent: 193 100% 50%;
    --accent-foreground: 228 18% 8%;

    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;

    --border: 228 10% 22%;
    --input: 228 10% 22%;
    --ring: 193 100% 50%;

    --radius: 0.75rem;

    --surface: 228 14% 15%;
    --surface-hover: 228 14% 18%;
    --text-secondary: 0 0% 88%;
    --text-muted: 0 0% 55%;
    --glow-cyan: 0 0 20px hsl(193 100% 50% / 0.3);
    --glow-cyan-strong: 0 0 40px hsl(193 100% 50% / 0.4), 0 0 80px hsl(193 100% 50% / 0.1);
}

/* ---------- Base Resets ---------- */
* {
    border-color: hsl(var(--border));
}

body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body);
}

/* ---------- Utility Classes ---------- */
.text-gradient-cyan {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    background-image: linear-gradient(135deg, hsl(193 100% 50%), hsl(193 80% 70%));
}

.glow-border {
    box-shadow: 0 0 15px hsl(193 100% 50% / 0.15),
                0 0 30px hsl(193 100% 50% / 0.05),
                inset 0 0 15px hsl(193 100% 50% / 0.05);
    border-color: hsl(193 100% 50% / 0.3);
}

.hover-lift {
    transition: all 0.3s ease-out;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px hsl(230 20% 4% / 0.5);
}

.link-underline {
    position: relative;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: hsl(193 100% 50%);
    transform-origin: bottom right;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.link-underline:hover::after {
    transform-origin: bottom left;
    transform: scaleX(1);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Animations ---------- */
@keyframes hero-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes fade-in {
    0% { opacity: 0; transform: translateY(16px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-up {
    0% { opacity: 0; transform: translateY(24px); }
    100% { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out forwards;
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
}

/* ---------- Scrollbar ---------- */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ---------- WordPress Content Styles ---------- */
.pceasy-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    padding-top: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.pceasy-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.pceasy-content p {
    font-size: 1rem;
    line-height: 1.75;
    color: hsl(var(--text-secondary));
    margin-bottom: 1rem;
}

.pceasy-content a {
    color: hsl(var(--primary));
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s;
}

.pceasy-content a:hover {
    opacity: 0.8;
}

.pceasy-content img {
    border-radius: 0.75rem;
    border: 1px solid hsl(var(--border) / 0.5);
    margin: 1rem 0;
    max-width: 100%;
    height: auto;
}

.pceasy-content figure {
    margin: 1.5rem 0;
}

.pceasy-content figcaption {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    text-align: center;
    margin-top: 0.75rem;
}

.pceasy-content ul,
.pceasy-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: hsl(var(--text-secondary));
}

.pceasy-content ul {
    list-style-type: disc;
}

.pceasy-content ol {
    list-style-type: decimal;
}

.pceasy-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.pceasy-content blockquote {
    border-left: 3px solid hsl(var(--primary));
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: hsl(var(--muted-foreground));
}

.pceasy-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid hsl(var(--border) / 0.5);
    margin: 1rem 0;
}

.pceasy-content thead tr {
    background: hsl(var(--muted) / 0.5);
    border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.pceasy-content th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.pceasy-content td {
    padding: 0.75rem 1rem;
    color: hsl(var(--text-secondary));
    border-bottom: 1px solid hsl(var(--border) / 0.3);
}

.pceasy-content tbody tr:hover {
    background: hsl(var(--muted) / 0.3);
}

.pceasy-content pre,
.pceasy-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: hsl(var(--muted));
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.pceasy-content code {
    padding: 0.125rem 0.375rem;
}

.pceasy-content pre {
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.pceasy-content pre code {
    padding: 0;
    background: transparent;
}

/* ---------- WordPress Comment Form Adjustments ---------- */
.pceasy-comment-form .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

.pceasy-comment-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

/* ---------- WordPress Admin Bar Fix ---------- */
body.admin-bar header.fixed {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar header.fixed {
        top: 46px;
    }
}

/* ---------- WordPress Alignment Classes ---------- */
.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

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

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

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

/* ---------- Gallery ---------- */
.wp-block-gallery {
    display: grid;
    gap: 0.5rem;
}

/* ---------- Dropdown menu animation ---------- */
.pceasy-dropdown {
    animation: fade-in 0.15s ease-out forwards;
}
