﻿*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%; 
    margin: 0; 
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial;
    color: #111827;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: calc(100% - 40px); 
    max-width: 1100px;
    margin: 0 auto; 
    padding: 0 20px; 
}

/* ---------- HEADER / NAV ---------- */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e6e6e6;
}

.site-header .container {
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 16px 0; 
}

.brand a {
    text-decoration: none;
    font-weight: 700;
    color: #0b5fff;
    font-size: 18px;
}

.main-nav a {
    margin-left: 18px; 
    text-decoration: none;
    color: #374151;
    font-size: 15px;
}

.linkAdmin {
    text-align: right;
    position: absolute;
    right: 0;
    bottom: 0;
    font-size: 8pt;

}
.add-proj {
    text-decoration: none;
    color: black;
}
/* ---------- MAIN / HERO (центральная зона) ---------- */
.site-main {
    padding: 32px 0; 
    min-height: calc(100vh - 160px); 
}

.hero {
    padding: 48px 0;
    background: linear-gradient(180deg, rgba(11,95,255,0.05), transparent 60%); 
}

.hero-inner {
    text-align: center;
    max-width: 900px; 
    margin: 0 auto; 
    padding: 20px; 
}

.hero h1 {
    margin: 0 0 12px 0;
    font-size: 34px;
    line-height: 1.1;
}

.lead {
    color: #6b7280;
    margin-bottom: 18px;
    font-size: 17px;
}

.three-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    align-items: start;
}

.col{
    background: #fff;
    border: 1px solid #e9e9ef;
    border-radius: 8px;
    padding: 18px;
}


.col-title{
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight:600;
}

/* ---------- GRID / КАРТОЧКИ ---------- */
.features{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px; 
    align-items: start;
}

.features a{
    text-decoration: none;
    color: inherit;
}

.card {
    padding: 18px;
    border: 1px solid #e9e9ef;
    border-radius: 8px;
    background: white;
}

/*------------- ПРОЕКТЫ --------------*/
.list-title{
    margin: 15px 0 20px 15px;
    font-size: 18px;
    font-weight:800;
}

.three-rows {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
    width: 50%;
    max-width: 100%;
}

.row {
    background: #b9b9b9;
    color: #fff;
    padding: 18px;
    border-radius: 15px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.row-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

/*Страница изменения проектов*/
.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    box-sizing: border-box;
}

.forms-grid {
    display: flex;
    flex-direction: column; 
    gap: 20px; 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 20px;
    box-sizing: border-box;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(20,20,40,0.05);
    border: 1px solid rgba(20,20,40,0.04);
    width: 100%;
    box-sizing: border-box;
}

.form-field {
    display: flex;
    flex-direction: column; 
    gap: 6px; 
    margin-bottom: 12px;
    font-size: 14px;
    color: #222;
}

.form-input, .form-select, .form-textarea {
    padding: 10px 12px; 
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid rgba(30,30,60,0.10);
    background: #fbfbff;
    outline: none;
    transition: box-shadow .12s ease, border-color .12s ease, transform .08s;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    box-shadow: 0 0 0 4px rgba(91,140,255,0.08); 
    border-color: #5b8cff;
}

/* КНОПКИ */
.btn {
    padding: 9px 12px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform .08s ease, box-shadow .12s ease;
}

.btn-primary {
    background: #2b6ef6;
    color: #fff;
    box-shadow: 0 6px 12px rgba(43,110,246,0.14);
}

.btn-neutral {
    background: transparent;
    border: 1px solid rgba(30,30,60,0.08);
    color: #222;
}

.btn-danger {
    background: #e24b4b;
    color: white;
}

.btn:active {
    transform: translateY(1px);
}

.btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
/*  SELECT  */
.select-row {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 760px; 
    width: 100%;
}

.select-prefix {
    flex: 0 0 10%; 
    min-width: 48px; 
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    color: #666;
    padding-left: 6px;
}

.form-select {
    flex: 1 1 0; 
    min-width: 140px; 
    max-width: calc(100% - 160px); 
}

.form-select {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.file-field {
display: flex;
flex-direction: column;
gap: 6px; 
max-width: 100%;
}

.file-input {
font-size: 14px;
color: #333;
background: transparent;
border: none; 
padding: 0;
margin: 0;
cursor: pointer;
max-width: 100%;
}

.file-input::file-selector-button {
appearance: none;
-webkit-appearance: none;
margin-right: 12px;
padding: 8px 14px;
border-radius: 6px;
border: 1px solid rgba(0,0,0,0.2);
background: #f6f8ff;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}

.file-input::-webkit-file-upload-button {
appearance: none;
-webkit-appearance: none;
margin-right: 12px;
padding: 8px 14px;
border-radius: 6px;
border: 1px solid rgba(0,0,0,0.2);
background: #f6f8ff;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}

.file-input::file-selector-button:hover,
.file-input::-webkit-file-upload-button:hover {
background: #e9ecff;
box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.file-input::file-selector-button:focus,
.file-input::-webkit-file-upload-button:focus {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}

.myimage {
    width: 300px;
    height: 300px;
}

#detailsContainer[hidden] {
    display: none;
}

#detailsContainer {
    transition: opacity .18s ease;
}

#detailsContainer .screenshots div {
    position: relative; 
    display: inline-block;
    width: 150px; 
    margin: 6px;
    vertical-align: top; 
    box-sizing: border-box;
    word-wrap: break-word; 
    overflow-wrap: anywhere; 
}

#detailsContainer .screenshots div img {
    display: block;
    width: 100%;
    height: 150px;          
    object-fit: cover;
}

#detailsContainer .screenshots div div {
    margin-top: 6px;
    font-size: 0.9rem;     
    line-height: 1.1;
    max-height: 2.2em;
    overflow: hidden;
    text-overflow: ellipsis;
}

#detailsContainer .remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 20;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    background: rgba(255,255,255,0.95);
    color: #c00;
    font-size: 16px;
    line-height: 26px;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    pointer-events: auto;
}

#pdf_container {
    clear: both;
    background: #ccc;
    text-align: center;
    display: none;
    padding: 5px;
    height: 820px;
    overflow: auto;
}

/*----------Contacts------------*/
.link-contacts {
    text-decoration: none;
    color: #367eff;
}
.link-text {
    font-size: 22px;
    margin: 5px 0 5px 5px;
    font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

/*----------Resume------------*/
.resume-save {
    float: right;
    text-align: right;
    text-decoration: none;
    color: #367eff;
    font-size: 22px;
    margin: 5px 0 5px 5px;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}
.resume-text {
    float: left;
    font-size: 22px;
    margin: 5px 0 5px 5px;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

/* ---------- FOOTER ---------- */
.site-footer {
    border-top: 1px solid #eee;
    padding: 18px 0;
    margin-top: 40px;
    color: #6b7280;
    text-align: center;
}

/* ---------- Адаптив (мобильная) ---------- */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 24px;
    }
    .main-nav {
        display: none;
    }
    .container {
        width: calc(100% - 30px); 
    }
}
@media (max-width: 880px) {
    .forms-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 520px) {
    .select-row {
        max-width: 100%;
        gap: 8px;
    }

    .select-prefix {
        display: none;
    }
    .form-actions {
        flex-direction: column;
        gap: 8px;
    }
    .btn {
        width: 100%;
    }
}

