/* White Header Styles */
.white-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #8B0000;
    flex-wrap: wrap;
    box-shadow: 0 4px 20px rgba(139, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.header-logo {
    height: 60px;
    width: auto;
    margin-right: 20px;
}

.header-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-buttons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.nav-button {
    display: inline-block;
    padding: 12px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    border: 2px solid rgba(139, 0, 0, 0.1);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav-button:hover::before {
    left: 100%;
}

.nav-button:hover {
    background: linear-gradient(135deg, #8B0000 0%, #A00000 100%);
    color: white;
    border-color: #8B0000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.3);
}

/* Sadarbība default active state */
.sadarbiba-btn {
    background: linear-gradient(135deg, #8B0000 0%, #A00000 100%);
    color: white;
    border-color: #8B0000;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
    position: relative;
}

.sadarbiba-btn::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, #FF6B35, #F7931E);
    border-radius: 2px;
}

/* When hovering over other buttons, sadarbiba becomes inactive */
.nav-button:not(.sadarbiba-btn):hover ~ .sadarbiba-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333;
    border-color: rgba(139, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* When hovering over sadarbiba itself, keep it red but darker */
.sadarbiba-btn:hover {
    background: linear-gradient(135deg, #7A0000 0%, #8B0000 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.4);
}

/* Main container for content area */
.main-container {
    display: flex;
    min-height: calc(100vh - 140px);
}

.content-area {
    flex: 1;
    position: relative;
}

.content-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 249, 250, 0.9) 50%,
        rgba(255, 255, 255, 0.85) 100%);
    border-radius: 20px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 32px rgba(139, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
}

.welcome-text {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    flex-shrink: 0;
    position: relative;
    background: linear-gradient(135deg, #2c3e50 0%, #8B0000 50%, #A00000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-text::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #8B0000, #A00000, #FF6B35);
    border-radius: 2px;
}

/* Sadarbība Content Styles */
.sadarbiba-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Section Styles */
.collaboration-section,
.contact-section,
.benefits-section,
.showcase-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(139, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(139, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.collaboration-section::before,
.contact-section::before,
.benefits-section::before,
.showcase-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8B0000, #A00000, #FF6B35);
    border-radius: 20px 20px 0 0;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 700;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #8B0000, #A00000);
    border-radius: 2px;
}

.section-line {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #8B0000, #A00000, #FF6B35);
    border-radius: 2px;
    margin: 0 auto;
}

/* Collaboration Section */
.collaboration-content {
    max-width: 800px;
    margin: 0 auto;
}

.collaboration-text {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 20px;
    color: #34495e;
    font-weight: 400;
    text-align: center;
}

.collaboration-text:last-child {
    margin-bottom: 0;
}

/* Contact Section */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    border: 1px solid rgba(139, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.1);
}

.contact-icon {
    font-size: 2.5rem;
    min-width: 60px;
    text-align: center;
}

.contact-details h3 {
    color: #8B0000;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.contact-details p {
    margin: 0;
}

.contact-details a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: #8B0000;
}

/* Benefits Section */
.benefits-content {
    max-width: 900px;
    margin: 0 auto;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.benefit-item {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    border: 1px solid rgba(139, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.1);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.benefit-item h3 {
    color: #8B0000;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.benefit-item p {
    color: #34495e;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Showcase Section */
.showcase-content {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.showcase-item h3 {
    color: #8B0000;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.showcase-preview {
    position: relative;
    display: inline-block;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.showcase-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.showcase-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.showcase-preview:hover .showcase-image {
    transform: scale(1.05);
}

.showcase-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    text-align: center;
}

.showcase-preview:hover .showcase-overlay {
    opacity: 1;
}

.zoom-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.showcase-overlay span {
    font-size: 1rem;
    font-weight: 600;
}

/* Image Popup Styles */
.image-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.image-popup.show {
    display: flex;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(3px);
}

.popup-content {
    position: relative;
    max-width: 98vw;
    max-height: 98vh;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
    animation: popupSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(139, 0, 0, 0.9);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.popup-close:hover {
    background: #8B0000;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

.popup-image {
    width: auto;
    height: auto;
    display: block;
    max-width: none;
    max-height: none;
    object-fit: none;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: auto;
    /* Fallback for better image quality */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.popup-caption {
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-top: 1px solid rgba(139, 0, 0, 0.1);
    text-align: center;
}

.popup-caption h3 {
    color: #8B0000;
    font-size: 1.6rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.popup-caption p {
    color: #2c3e50;
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
}

/* Social Sharing Section */
.social-section {
    margin-top: 40px;
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-radius: 20px;
    border: 1px solid rgba(139, 0, 0, 0.1);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
}

.social-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.social-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #8B0000, #A00000);
    border-radius: 1px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 26px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-icon:hover::before {
    opacity: 1;
}

.social-icon.twitter {
    background: linear-gradient(135deg, #1DA1F2 0%, #0d8bd9 100%);
    color: white;
}

.social-icon.facebook {
    background: linear-gradient(135deg, #1877F2 0%, #166fe5 100%);
    color: white;
}

.social-icon.draugiem {
    background: linear-gradient(135deg, #FF6B35 0%, #e55a2b 100%);
    color: white;
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.social-icon:active {
    transform: translateY(-2px) scale(1.05);
}

/* Additional styling for better appearance */
body {
    margin: 0;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: 
        linear-gradient(135deg, 
            rgba(139, 0, 0, 0.03) 0%, 
            rgba(248, 249, 250, 0.05) 50%,
            rgba(139, 0, 0, 0.02) 100%),
        url('cdn/images/latvebg.png');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed, fixed;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 0, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(160, 0, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 107, 53, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sadarbiba-content {
        gap: 30px;
    }
    
    .collaboration-section,
    .contact-section,
    .benefits-section,
    .showcase-section {
        padding: 25px;
    }
    
    .welcome-text {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .nav-button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .social-icons {
        gap: 20px;
    }
    
    .social-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .popup-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .popup-image {
        max-height: 60vh;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .content-overlay {
        padding: 20px;
    }
    
    .collaboration-section,
    .contact-section,
    .benefits-section,
    .showcase-section {
        padding: 20px;
    }
    
    .welcome-text {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .nav-buttons {
        gap: 6px;
    }
    
    .nav-button {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .contact-details h3 {
        font-size: 1.2rem;
    }

    .contact-details a {
        font-size: 1rem;
    }
}