/* Local Font Definitions */
@font-face {
    font-family: 'Red Hat Display';
    src: url('../fonts/RedHatDisplay-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Red Hat Display';
    src: url('../fonts/RedHatDisplay-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Red Hat Display';
    src: url('../fonts/RedHatDisplay-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Red Hat Display';
    src: url('../fonts/RedHatDisplay-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Red Hat Display';
    src: url('../fonts/RedHatDisplay-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Red Hat Display';
    src: url('../fonts/RedHatDisplay-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* Theme variables (shared across subpages) */
:root {
    --primary-color: #7B2429; /* red */
    --secondary-color: #7FAE6E; /* green */
    --accent-color: #A1BBAC;
    --bg-color: #DDE5DB;
    --surface-color: #7FAE6E1a;
    --border-color: #7FAE6E33;
    --text-color: #7B2429;
    --primary-rgb: 123, 36, 41; /* for rgba(var(--primary-rgb), a) */
}

/* Base page styling */
body {
    font-family: 'Red Hat Display', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Consistent scrollbar styling (same as index page) */
/* Firefox */
html { 
    scrollbar-width: auto; /* wider than thin */
    scrollbar-color: rgba(0, 0, 0, 0.35) rgba(0, 0, 0, 0.05);
}
/* WebKit */
html::-webkit-scrollbar { 
    width: 14px; 
    height: 14px; 
}
html::-webkit-scrollbar-track { 
    background: rgba(0, 0, 0, 0.05); 
    border-radius: 50%; 
}
html::-webkit-scrollbar-thumb { 
    background: rgba(0, 0, 0, 0.35); 
    border-radius: 50%; 
}
html::-webkit-scrollbar-thumb:hover { 
    background: rgba(0, 0, 0, 0.5); 
}

/* Override scrollbar-thin class to match index page fat scrollbar */
.scrollbar-thin {
    scrollbar-width: auto !important; /* Firefox - make it fat like index */
    scrollbar-color: rgba(0, 0, 0, 0.35) rgba(0, 0, 0, 0.05) !important;
}
.scrollbar-thin::-webkit-scrollbar { 
    width: 14px !important; /* WebKit - make it fat like index */
    height: 14px !important; 
}
.scrollbar-thin::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05) !important;
    border-radius: 50% !important;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.35) !important;
    border-radius: 50% !important;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5) !important;
}

/* Overwritten for contacts page - extracted from front-contacts */

/* Main Content */
.main-content {
    padding-top: 120px;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.main-content.contacts-page {
    padding-top: clamp(140px, 12vh, 200px);
    padding-left: clamp(1.75rem, 6vw, 4rem);
    padding-right: clamp(1.75rem, 6vw, 4rem);
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Content Cards */
.content-card {
    background: #ffffff;
    padding: clamp(1.75rem, 4vw, 3rem);
    border: 1px solid var(--border-color);
    border-radius: 0.6vw;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(var(--primary-rgb), 0.1);
    transition: all 0.3s ease;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(var(--primary-rgb), 0.15);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
}

.content-list {
    list-style: none;
    padding: 0;
}

.content-list li {
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
    position: relative;
}

.content-list li:last-child {
    border-bottom: none;
}

.content-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Contact specific styles */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.1);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--secondary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-info h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-info p {
    color: var(--text-color);
    opacity: 0.8;
}

/* Professional Contact Cards with Pictures */
.team-intro {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
}

/* Team Section - same width as content cards but no background */
.team-section {
    width: 100%;
    margin: 0 0 2rem 0;
    padding: 0;
}

.contacts-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
    width: 100%;
}

.contact-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.08);
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 200px;
}

/* Picture Left Layout (Anna, Līga) */
.contact-card.picture-left {
    flex-direction: row;
}

/* Picture Right Layout (Jānis) */
.contact-card.picture-right {
    flex-direction: row-reverse;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.12);
    background: rgba(255, 255, 255, 1);
}

.portrait-section {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03), rgba(127, 174, 110, 0.03));
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 280px;
    min-height: 100%;
}

.profile-picture {
    width: 240px;
    height: 240px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.15);
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.profile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.profile-picture:hover .profile-overlay {
    opacity: 1;
}

.profile-placeholder-text {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-section {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.person-details {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.person-name {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.person-title {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.person-description {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(var(--primary-rgb), 0.03);
    border-radius: 12px;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(var(--primary-rgb), 0.06);
    border-color: var(--secondary-color);
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.1);
}

/* Picture Right cards - reverse transform direction */
.contact-card.picture-right .contact-item:hover {
    transform: translateX(-8px);
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-icon svg {
    width: 20px;
    height: 20px;
}

.email-icon {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
}

.phone-icon {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.telegram-icon {
    background: linear-gradient(135deg, #0088cc, #229ed9);
    color: white;
}

.contact-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    overflow: hidden;
}

.contact-label {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.contact-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.contact-link:hover {
    color: var(--secondary-color);
}

.copy-button,
.copy-btn {
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    padding: 8px;
    cursor: pointer;
    color: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Text-based copy button styling */
.copy-btn {
    width: auto;
    height: auto;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 60px;
}

.copy-button:hover,
.copy-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.2);
}

.copy-button svg,
.copy-btn svg {
    width: 16px;
    height: 16px;
}

/* General contact section styling */
.general-contact .contact-item {
    background: rgba(255, 255, 255, 0.6);
}

.general-contact .contact-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.1);
}

.contact-info p {
    color: var(--text-color);
    opacity: 0.8;
}

/* Back to home button */
.back-home {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--secondary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(127, 174, 110, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-home:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(var(--primary-rgb), 0.3);
}

/* Site trademark credit (inline on subpages) */
.site-credit {
    position: static;
    display: block;
    width: auto;
    max-width: 100%;
    /* place it near the bottom of the content flow */
    margin: 2rem 0 1rem 0;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.55);
    background: transparent;
    border: none;
    padding: 6px 8px;
    border-radius: 8px;
    text-align: left;
    z-index: auto;
    pointer-events: auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .main-content {
        padding-top: 100px;
        padding-left: 1rem;
        padding-right: 1rem;
        margin: 0 auto;
    }

    .page-title {
        font-size: 2rem;
    }

    .content-card {
        padding: 1.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contacts-grid {
        gap: 1.5rem;
        width: 100%;
        margin-top: 1rem;
    }

    .contact-card {
        flex-direction: column !important;
        min-height: auto;
    }

    /* Override alternating layout on mobile */
    .contact-card.picture-left,
    .contact-card.picture-right {
        flex-direction: column !important;
    }

    /* Reset transform direction on mobile */
    .contact-card.picture-right .contact-item:hover {
        transform: translateX(8px);
    }

    .portrait-section {
        padding: 2rem;
        width: 100%;
    }

    .profile-picture {
        width: 200px;
        height: 200px;
    }

    .info-section {
        padding: 1.5rem 2rem 2rem 2rem;
        text-align: center;
    }

    .person-details {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .person-name {
        font-size: 1.5rem;
    }

    .person-title {
        font-size: 1rem;
    }

    .person-description {
        font-size: 0.9rem;
    }

    .contact-item {
        padding: 1rem;
        gap: 0.8rem;
    }

    .contact-icon {
        width: 36px;
        height: 36px;
    }

    .contact-icon svg {
        width: 18px;
        height: 18px;
    }

    .contact-label {
        font-size: 0.8rem;
    }

    .contact-link {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .copy-button {
        width: 32px;
        height: 32px;
        padding: 6px;
    }

    .copy-button svg {
        width: 14px;
        height: 14px;
    }
}

/* Cookie popup styles */
.cookie-popup {
    position: fixed;
    right: 0.5vw;
    bottom: 0.5vw;
    display: flex;
    align-items: center;
    gap: 0.3vw;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.3vw;
    box-shadow: 0 8px 32px rgba(107, 59, 41, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.cookie-popup.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-text {
    font-size: 0.8vw;
    color: var(--text-color);
}

.cookie-link {
    color: var(--secondary-color);
    text-decoration: underline;
    font-weight: 600;
}

.cookie-link:hover { 
    color: var(--primary-color); 
}

.cookie-accept {
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 0.6vw;
    padding: 0.3vw;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(127, 174, 110, 0.35);
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    font-family: 'Red Hat Display', sans-serif;
    font-size: 0.8vw;
    outline: none;
}

.cookie-accept:focus {
    background: var(--primary-color);
    box-shadow: 0 4px 16px rgba(127, 174, 110, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.8), 0 0 0 4px rgba(127, 174, 110, 0.4);
}

.cookie-accept:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(107, 59, 41, 0.25);
}

.cookie-accept:active { 
    transform: translateY(0); 
}

/* Mobile cookie popup styles */
@media (max-width: 480px) {
    .cookie-popup {
        left: 16px;
        right: 16px;
        bottom: 16px;
        gap: 10px;
        padding: 12px;
        flex-wrap: wrap;
        border-radius: 8px;
    }
    
    .cookie-text { 
        font-size: 13px; 
    }
    
    .cookie-accept { 
        width: 100%; 
        text-align: center;
        font-size: 13px;
        border-radius: 8px;
        padding: 12px;
    }
}