@font-face {
    font-family: 'Izhitsa Regular';
    src: url("../font/izhitsa/Izhitsa.eot");
    src: url("../font/izhitsa/Izhitsa.eot?#iefix") format("embedded-opentype"), url("../font/izhitsa/Izhitsa.woff") format("woff"), url("../font/izhitsa/Izhitsa.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'MonotypeCorsiva';
    src: url(../font/MonotypeCorsiva.ttf);
}


:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --danger-gradient: linear-gradient(135deg, #e41818 0%, #e16565 100%);
    --dark-color: #2d3748;
    --light-color: #f8fafc;
}

/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}





body {
    font-family: 'Nunito', sans-serif;
    background: white;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    align-items: center;

}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;

    padding: 0;
    gap: 2rem;
    /*margin-right: 20px;*/
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #667eea;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
    min-height: calc(100vh - 120px);
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}



.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav > li > form > button.logout:focus {
    outline: none;
}


.footer {
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid rgba(0,0,0,0.1);
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

.footer p {
    margin: 0;
    color: var(--dark-color);
    font-weight: 500;
}











.edit{
    padding: 3px;
    transition: all .5s;
    /*border: 1px solid rgba(82, 168, 236, .5);*/
}
.edit:focus{
    border: 1px solid rgba(82, 168, 236, 1);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(82, 168, 236, 0.9);
    outline: 0 none;
}
.editable {
    border: 1px solid #ccc;
    /*padding: 10px;*/
    min-height: 50px;
    position: relative;
}
.editable:empty::before {
    content: attr(data-placeholder);
    color: #aaa;
    pointer-events: none; /* Чтобы текст placeholder не мешал редактированию */
}





.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}





.Section1 {
    position: relative;
    width: 100%;
}

.responsive-image {
    width: 100%; /* Изображение адаптивное */
    height: auto; /* Автоматическая высота */
}







.tab-pane > .overlay-wrapper > .overlay {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    flex-direction: column;
    margin-top: -1.25rem;
    margin-left: -1.25rem;
    /*height: calc(100% + 2 * 1.25rem);*/
    /*width: calc(100% + 2 * 1.25rem);*/
    height: 100vh;
    width: calc(100% + 2 * 1.25rem);
}

#text-obr-setting-style {
    white-space: pre-line; /* Сохраняет переносы и оборачивает текст */
}









/* Основной контент */
.card-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-control-file {
    width: 100%;
    padding: 10px 0;
}


/* Шаги генерации */
.steps {
    display: flex;
    margin-bottom: 30px;
    justify-content: center;
}

.step {
    text-align: center;
    padding: 0 20px;
    position: relative;
}

.step:not(:last-child):after {
    content: '';
    position: absolute;
    top: 25px;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: #ddd;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: #bdc3c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: bold;
    color: white;
}

.step.active .step-number {
    background-color: #3498db;
}

.step.completed .step-number {
    background-color: #27ae60;
}



.step-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-title {
    font-weight: 600;
    color: #2c3e50;
}

.step-text {
    line-height: 1.5;
}

.step-item {
    transition: transform 0.2s ease;
}

.step-item:hover {
    transform: translateX(8px);
}

.guide-steps {
    margin-left: 10px;
    padding-left: 15px;
}


/* Результаты */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.result-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    text-align: center;
}

.result-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.result-name {
    padding: 10px;
    background-color: #f8f9fa;
    font-weight: bold;
}

/* Таблица истории */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.table-actions a {
    margin-right: 10px;
    text-decoration: none;
}

/*Стили для уведомлений */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.alert-success {
    background: var(--success-gradient);
    color: white;
}

.alert-error {
    background: var(--danger-gradient);
    color: white;
}

.alert-info {
    background: var(--secondary-gradient);
    color: white;
}

.alert-danger {
    background: var(--danger-gradient);
    color: white;
}





/* Стили для формы регистрации */
.signup-form .form-group {
    margin-bottom: 20px;
}

.signup-form .help-block {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

.signup-form .has-error .form-control {
    border-color: #e74c3c;
}

.signup-form .has-error .help-block {
    display: block;
}





/* Стили для поля ввода при фокусе */
.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}


/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}



/***********************************************************************************/
/* Адаптивность */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 0;
    }

    .card {
        margin: 0;
        padding: 10px;
    }

    .card-body {
        margin: 0;
        padding: 0;
    }

    .card-title {
        font-size: 20px;
    }
}


/* Адаптивность */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .main-content {
        padding: 1rem 0;
    }

    .nav li > form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}


/*576px*/
@media (max-width: 576px) {
    .nav-container {
        gap: 0.5rem;
    }

    .logo {
        margin-left: 2px;
        text-wrap: wrap;
    }

    .nav-menu {
        gap: 0.5rem;
        margin-right: 2px;
        align-items: flex-start;
    }

    .guide-steps {
        margin-left: 5px;
        padding-left: 5px;
    }
}


/*@media (max-width: 576px) {*/
/*    .container {*/
/*        width: 100%;*/
/*        padding: 0 0;*/
/*    }*/

/*    .card {*/
/*        margin: 10px;*/
/*        padding: 10px;*/

/*    }*/

/*    .card-title {*/
/*        font-size: 20px;*/
/*    }*/
/*}*/