/* ==============================================
   Modern Design Enhancements for Kovine Gorsek
   ============================================== */

/* Modern Color Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dark-gradient: linear-gradient(135deg, #4a00e0 0%, #8e2de2 100%);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-color: rgba(31, 38, 135, 0.37);
    --accent-purple: #764ba2;
    --accent-blue: #667eea;
}

/* Glassmorphism Base */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 var(--shadow-color);
}

/* Enhanced Header with Glass Effect */
#main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

#main-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* Modern Navigation */
#nav-menu a {
    position: relative;
    transition: color 0.3s ease;
    font-weight: 500;
}

#nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--primary-gradient);
    transition: transform 0.3s ease;
}

#nav-menu a:hover::after,
#nav-menu li.active a::after {
    transform: translateX(-50%) scaleX(1);
}

/* Modern Buttons */
.btn {
    background: var(--primary-gradient);
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Modern Cards with Float Effect */
.service-item,
.value-card,
.team-member,
.contact-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: all 0.3s ease;
}

.service-item:hover,
.value-card:hover,
.team-member:hover,
.contact-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px 0 rgba(31, 38, 135, 0.25);
}

/* Animated Gradient Text */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Modern Carousel Enhancements */
.carousel-overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
}

.carousel-content h1 {
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.carousel-dot {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.carousel-dot.active {
    background: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

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

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

/* Modern Section Backgrounds */
.services-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: visible;
}

.services-section .container {
    position: relative;
    z-index: 5;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Modern Gallery with Hover Effects */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 0;
}

.gallery-item img {
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Add Gallery Overlay Text */
.gallery-item::after {
    content: 'View Details';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 600;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gallery-item:hover::after {
    opacity: 0;
}

/* Fix for specific carousel image zoom issue */
.carousel-img-fix {
    object-fit: contain !important;
    object-position: center !important;
    background: rgba(0, 0, 0, 0.8) !important;
}

/* Alternative: If you prefer a different approach, you can use this instead */
.carousel-img-fix.use-cover {
    object-fit: cover !important;
    object-position: center 20% !important;
    transform: scale(0.9) !important;
}

/* Ensure the carousel slide maintains proper structure */
.carousel-slide img.carousel-img-fix {
    width: 100%;
    height: 100%;
    display: block;
}

/* Modern Gallery Pagination */
.gallery-container {
    width: 100%;
}

.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 50px;
    padding: 20px 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pagination-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.pagination-btn:disabled {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
    color: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pagination-btn:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pagination-dots {
    display: flex;
    gap: 15px;
    align-items: center;
}

.pagination-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.pagination-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary-gradient);
    transition: all 0.3s ease;
}

.pagination-dot:hover::before {
    width: 20px;
    height: 20px;
    opacity: 0.3;
}

.pagination-dot.active {
    background: var(--primary-gradient);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
    transform: scale(1.2);
}

.gallery-counter {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* Gallery Animation for Page Transitions */
.gallery-grid {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-grid.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

.gallery-grid.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .gallery-pagination {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
        margin-top: 30px;
        padding: 0 20px;
        position: relative;
    }
    
    .pagination-btn {
        padding: 14px 24px;
        font-size: 14px;
        min-width: 60px;
        min-height: 44px; /* Ensure minimum touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        background: rgba(0, 123, 255, 0.95);
    }
    
    .pagination-btn span {
        display: none; /* Hide text on mobile, keep only arrow */
    }
    
    .pagination-btn i {
        font-size: 20px;
    }
    
    .pagination-dots {
        gap: 10px;
        flex: 0 0 auto;
    }
    
    .pagination-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-pagination {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .pagination-btn {
        padding: 14px 18px;
        min-width: 50px;
        min-height: 48px; /* Larger touch target for mobile */
        background: rgba(0, 123, 255, 1);
        border-radius: 50%;
    }
    
    .pagination-dots {
        order: 0;
        margin: 0 auto;
    }
}

/* Modern Form Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    background: white;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Modern Footer */
#main-footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    position: relative;
    overflow: hidden;
}

#main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--primary-gradient);
}

/* Smooth Scroll Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.2s ease;
    z-index: 10000;
}

/* Modern Loading Spinner */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Parallax Effect Classes */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

/* Text Selection Color */
::selection {
    background: var(--accent-purple);
    color: white;
}

::-moz-selection {
    background: var(--accent-purple);
    color: white;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 6px;
}

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

/* Smooth Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Gradient Borders */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 10px;
    padding: 2px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    padding: 2px;
    background: var(--primary-gradient);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Neumorphism Elements */
.neumorphic {
    background: #e0e5ec;
    box-shadow: 
        9px 9px 16px #a3b1c6,
        -9px -9px 16px #ffffff;
    border-radius: 15px;
    padding: 20px;
}

.neumorphic-inset {
    background: #e0e5ec;
    box-shadow: 
        inset 9px 9px 16px #a3b1c6,
        inset -9px -9px 16px #ffffff;
    border-radius: 15px;
    padding: 20px;
}

/* Modern Badge */
.badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Statistics Section */
.statistics-section {
    padding: 100px 0;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.statistics-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.statistics-section .container {
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 10px;
}

.stat-item:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item i {
    font-size: 48px;
    color: var(--accent-blue);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    display: inline-block;
}

.stat-item:hover i {
    transform: scale(1.2) rotate(10deg);
    color: #ffffff;
}

.stat-item h3 {
    font-size: 42px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.stat-item:hover h3 {
    color: #ffffff;
    transform: scale(1.1);
}

.stat-item p {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    transition: all 0.3s ease;
}

.stat-item:hover p {
    color: #ffffff;
    letter-spacing: 2px;
}

/* Responsive adjustments for modern elements */
@media (max-width: 768px) {
    .glass-effect {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    .gradient-text {
        font-size: 90%;
    }
}
