/**
 * Aventine Studio - Custom CSS
 *
 * Additional custom styles beyond TailwindCSS
 *
 * @package Aventine_Studio
 */

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Staggered Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ==========================================================================
   Homepage Block Enhancements
   ========================================================================== */

.homepage-block {
    position: relative;
    overflow: hidden;
}

.homepage-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
}

.homepage-block-content {
    position: relative;
    z-index: 2;
}

.homepage-block-external {
    display: inline-flex;
    margin-top: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.25s ease;
}

.homepage-block:hover .homepage-block-external {
    opacity: 1;
}

/* ==========================================================================
   Glass Morphism Effects
   ========================================================================== */

.glass {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(13, 36, 77, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.glass-subtle {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ==========================================================================
   Project Card Enhancements
   ========================================================================== */

.project-card {
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--color-burnt-nectar) 0%,
        var(--color-ruby-leaf) 50%,
        var(--color-deep-plum) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover::before {
    opacity: 1;
}

/* ==========================================================================
   Form Enhancements
   ========================================================================== */

.form-group {
    position: relative;
}

.form-input:focus + .form-label,
.form-textarea:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label,
.form-textarea:not(:placeholder-shown) + .form-label {
    transform: translateY(-1.5rem) scale(0.85);
    color: var(--color-burnt-nectar);
}

/* Form Loading State */
.form-loading {
    position: relative;
    pointer-events: none;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Navigation Enhancements
   ========================================================================== */

.nav-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.nav-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    background: white;
    border: 1px solid #e5e7eb;
    transition: all 0.25s ease;
}

.nav-pagination .page-numbers:hover {
    border-color: var(--color-burnt-nectar);
    color: var(--color-burnt-nectar);
}

.nav-pagination .page-numbers.current {
    background: var(--color-burnt-nectar);
    border-color: var(--color-burnt-nectar);
    color: white;
}

.nav-pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

/* ==========================================================================
   WooCommerce Enhancements
   ========================================================================== */

.woocommerce .quantity .qty {
    width: 4rem;
    padding: 0.5rem;
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-weight: 500;
}

.woocommerce .quantity .qty:focus {
    border-color: var(--color-burnt-nectar);
    outline: none;
    box-shadow: 0 0 0 4px rgba(194, 68, 28, 0.1);
}

.woocommerce .star-rating {
    color: var(--color-burnt-nectar);
}

.woocommerce .onsale {
    background: var(--color-ruby-leaf);
    border-radius: 9999px;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
}

.woocommerce-checkout .form-row label {
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--color-indigo-rain);
}

.woocommerce-checkout .form-row input,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: border-color 0.25s ease;
}

.woocommerce-checkout .form-row input:focus,
.woocommerce-checkout .form-row select:focus,
.woocommerce-checkout .form-row textarea:focus {
    border-color: var(--color-burnt-nectar);
    outline: none;
    box-shadow: 0 0 0 4px rgba(194, 68, 28, 0.1);
}

/* ==========================================================================
   Gutenberg Block Styles
   ========================================================================== */

/* Cover Block */
.wp-block-cover {
    border-radius: 1rem;
    overflow: hidden;
}

.wp-block-cover__inner-container {
    padding: 2rem;
}

/* Group Block */
.wp-block-group.has-background {
    border-radius: 1rem;
    padding: 2rem;
}

/* Columns Block */
.wp-block-columns {
    gap: 2rem;
}

/* Button Block */
.wp-block-button__link {
    font-family: var(--font-primary);
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    transition: all 0.25s ease;
}

.wp-block-button.is-style-outline .wp-block-button__link {
    border: 2px solid currentColor;
    background: transparent;
}

/* Quote Block */
.wp-block-quote {
    border-left: 4px solid var(--color-burnt-nectar);
    padding-left: 1.5rem;
    margin-left: 0;
}

.wp-block-quote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Pullquote Block */
.wp-block-pullquote {
    border-top: 4px solid var(--color-burnt-nectar);
    border-bottom: 4px solid var(--color-burnt-nectar);
    padding: 2rem 0;
}

.wp-block-pullquote blockquote {
    margin: 0;
    border: none;
    padding: 0;
}

/* Separator Block */
.wp-block-separator {
    border-color: var(--color-gray);
}

.wp-block-separator.is-style-dots::before {
    color: var(--color-burnt-nectar);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

/* Line Clamp */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.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;
}

/* Gradient Text */
.text-gradient {
    background: linear-gradient(
        135deg,
        var(--color-indigo-rain) 0%,
        var(--color-burnt-nectar) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Scrollbar Styling
   ========================================================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--color-medium-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-dark-gray);
}

/* Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--color-medium-gray) var(--color-light-gray);
}

/* ==========================================================================
   Selection Styling
   ========================================================================== */

::selection {
    background: rgba(194, 68, 28, 0.2);
    color: var(--color-indigo-rain);
}

::-moz-selection {
    background: rgba(194, 68, 28, 0.2);
    color: var(--color-indigo-rain);
}

/* ==========================================================================
   Focus Visible Styling
   ========================================================================== */

:focus-visible {
    outline: 2px solid var(--color-burnt-nectar);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-burnt-nectar);
    outline-offset: 2px;
}

/* ==========================================================================
   Page Load Animation
   ========================================================================== */

body.loaded .page-content {
    animation: fadeInUp 0.5s ease forwards;
}

body:not(.loaded) .page-content {
    opacity: 0;
}
