/* ========================================
   DESIGN IMPROVEMENTS
   ======================================== */

/* 1. CSS VARIABLES - Color System */
:root {
    --primary: #C9B8A8;
    --primary-dark: #5E4631;
    --primary-medium: #8B7A6B;
    --accent: #DC3545;
    
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    
    --bg-light: #F8F6F4;
    --bg-white: #FFFFFF;
    --bg-dark: #2C2C2C;
    
    --spacing-xs: 10px;
    --spacing-sm: 20px;
    --spacing-md: 40px;
    --spacing-lg: 60px;
    --spacing-xl: 80px;
}

/* 2. UNIFIED SPACING SYSTEM */
.section-spacing-small {
    padding: 60px 0;
}

.section-spacing-medium {
    padding: 80px 0;
}

.section-spacing-large {
    padding: 120px 0;
}

.content-spacing-small {
    margin-bottom: 30px;
}

.content-spacing-medium {
    margin-bottom: 50px;
}

.content-spacing-large {
    margin-bottom: 80px;
}

/* 3. TYPOGRAPHY SCALE */
.display-xl {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.display-lg {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.display-md {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.text-xl {
    font-size: 1.5rem;
    line-height: 1.6;
}

.text-lg {
    font-size: 1.25rem;
    line-height: 1.6;
}

.text-md {
    font-size: 1.1rem;
    line-height: 1.6;
}

.text-sm {
    font-size: 0.9rem;
    line-height: 1.5;
}

.text-xs {
    font-size: 0.8rem;
    line-height: 1.4;
}

/* 4. FORMATION CARDS HOVER EFFECTS */
.nk-isotope .nk-isotope-item {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nk-isotope .nk-isotope-item:hover {
    transform: translateY(-8px);
}

.nk-blog-isotope .nk-blog-post,
.nk-portfolio-list .nk-portfolio-item {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nk-blog-isotope .nk-blog-post:hover,
.nk-portfolio-list .nk-portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.15);
}

.nk-blog-isotope .nk-blog-post .nk-post-thumb img,
.nk-portfolio-list .nk-portfolio-item a.nk-portfolio-item-image > div,
.nk-portfolio-list .nk-portfolio-item div.nk-portfolio-item-image > div {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nk-blog-isotope .nk-blog-post:hover .nk-post-thumb img,
.nk-portfolio-list .nk-portfolio-item:hover a.nk-portfolio-item-image > div,
.nk-portfolio-list .nk-portfolio-item:hover div.nk-portfolio-item-image > div {
    transform: scale(1.08);
}

/* 5. ACCESSIBILITY - FOCUS STATES */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
.nk-btn:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    transition: outline-offset 0.2s ease;
}

/* Enhanced keyboard navigation */
a:focus-visible,
button:focus-visible,
.nk-btn:focus-visible {
    outline: 3px solid var(--primary-dark);
    outline-offset: 3px;
}

/* Skip to content link for screen readers */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-dark);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

/* 6. TESTIMONIALS SEPARATOR ENHANCEMENT */
.nk-isotope .nk-isotope-item.testimonial-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary) 20%, 
        var(--primary) 80%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nk-isotope .nk-isotope-item.testimonial-item:hover::before {
    opacity: 0.6;
}

/* Testimonials section styling */
.nk-testimonials-section {
    position: relative;
}

.nk-testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary) 50%, 
        transparent 100%);
    opacity: 0.4;
}

/* 7. MODERN BUTTON EFFECTS */
.nk-btn,
.btn,
button[type="submit"],
input[type="submit"] {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nk-btn::before,
.btn::before,
button[type="submit"]::before,
input[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), 
                height 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nk-btn:hover::before,
.btn:hover::before,
button[type="submit"]:hover::before,
input[type="submit"]:hover::before {
    width: 300px;
    height: 300px;
}

.nk-btn:hover,
.btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.nk-btn:active,
.btn:active,
button[type="submit"]:active,
input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 8. RESPONSIVE GRID IMPROVEMENTS */
@media (min-width: 768px) and (max-width: 991px) {
    .nk-isotope.nk-isotope-3-cols .nk-isotope-item {
        width: 50%;
    }
    
    .nk-isotope.nk-isotope-3-cols .nk-isotope-item.nk-isotope-item-x2 {
        width: 100%;
    }
    
    .row.vertical-gap > [class*="col-"] {
        padding-top: 20px;
    }
    
    .row.vertical-gap {
        margin-top: -20px;
    }
}

@media (max-width: 767px) {
    /* Ensure proper spacing on mobile */
    .section-spacing-small {
        padding: 40px 0;
    }
    
    .section-spacing-medium {
        padding: 50px 0;
    }
    
    .section-spacing-large {
        padding: 70px 0;
    }
    
    /* Typography adjustments for mobile */
    .display-xl {
        font-size: 2.5rem;
    }
    
    .display-lg {
        font-size: 2rem;
    }
    
    .display-md {
        font-size: 1.75rem;
    }
}

/* ADDITIONAL ENHANCEMENTS */

/* Smooth scrolling for entire page */
html {
    scroll-behavior: smooth;
}

/* Better image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Loading state for images */
img:not([src]) {
    visibility: hidden;
}

/* Enhanced link underlines */
a.link-underline {
    position: relative;
    text-decoration: none;
}

a.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a.link-underline:hover::after {
    width: 100%;
}

/* Card shadow system */
.shadow-soft {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.shadow-medium {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.shadow-strong {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
}

/* Gradient overlays */
.gradient-overlay-dark {
    position: relative;
}

.gradient-overlay-dark::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(0, 0, 0, 0.3) 50%, 
        rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
}

/* Animation utilities */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Print styles improvements */
@media print {
    .nk-navbar,
    .nk-footer,
    .nk-btn,
    button {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
