/* DevConsult Theme - Custom Styles */

/* ========================================
   Animations
   ======================================== */

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-fade-in-left {
    animation: fadeInLeft 0.5s ease-out forwards;
}

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

.animate-fade-in-scale {
    animation: fadeInScale 0.7s ease-out forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Typography - Prose (for blog content)
   ======================================== */

.prose {
    line-height: 1.75;
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul,
.prose ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose pre {
    background-color: #1f2937;
    color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose code {
    font-size: 0.875rem;
    font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
}

.prose blockquote {
    border-left: 4px solid #2563eb;
    padding-left: 1rem;
    font-style: italic;
    color: #6b7280;
    margin: 1.5rem 0;
}

.prose img {
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.prose > a,
.prose > p a,
.prose > ul a,
.prose > ol a,
.prose > blockquote a {
    color: #2563eb;
    text-decoration: none;
}

.prose > a:hover,
.prose > p a:hover,
.prose > ul a:hover,
.prose > ol a:hover,
.prose > blockquote a:hover {
    text-decoration: underline;
}

/* ========================================
   Line Clamp
   ======================================== */

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

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

/* ========================================
   WordPress-specific overrides
   ======================================== */

/* Remove default WordPress admin bar spacing */
html {
    margin-top: 0 !important;
}

/* Style the WP admin bar when logged in */
body.admin-bar .sticky {
    top: 32px;
}

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

/* Pagination styling */
.nav-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-links a {
    color: #4b5563;
    background: #f3f4f6;
}

.nav-links a:hover {
    color: #2563eb;
    background: #dbeafe;
    text-decoration: none;
}

.nav-links .current {
    color: #fff;
    background: #2563eb;
}

/* WordPress image alignments */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

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

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

/* ========================================
   Mobile Menu Transition
   ======================================== */

#mobile-menu {
    max-height: 0;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

#mobile-menu.is-open {
    max-height: 400px;
    opacity: 1;
}
