/* styles.css - оптимизированная версия */

:root {
    --primary-blue: #3498db;
    --secondary-blue: #2980b9;
    --dark-blue: #2c3e50;
    --light-blue: #ecf0f1;
    --green: #27ae60;
    --red: #e74c3c;
    --orange: #f39c12;
    --purple: #9b59b6;
    --teal: #1abc9c;
    --gray: #95a5a6;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Базовые сбросы и общие стили */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Общие компоненты */
.card, .header, .intro, .access-info, .footer {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.header {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    color: var(--white);
    text-align: center;
    padding: 40px 30px;
}

/* Шапка */
.university-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-container {
    align-items: center;
    display: flex;
    gap: 20px;
}

.irit-logo img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    height: 80px;
    width: auto;
}

.server-logo {
    align-items: center;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: var(--primary-blue);
    display: flex;
    font-size: 2rem;
    height: 60px;
    justify-content: center;
    width: 60px;
}

.university-info h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.university-info h2 {
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0 auto;
    max-width: 800px;
    opacity: 0.9;
}

.department-info {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: 25px;
    padding-top: 25px;
}

.dept-item {
    text-align: center;
}

.dept-item .label {
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 5px;
    opacity: 0.8;
    text-transform: uppercase;
}

.dept-item .value {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Введение */
.intro h2 {
    align-items: center;
    border-left: 5px solid var(--primary-blue);
    color: var(--dark-blue);
    display: flex;
    font-size: 1.6rem;
    gap: 10px;
    margin-bottom: 25px;
    padding-left: 20px;
}

.intro-content {
    align-items: center;
    display: grid;
    gap: 30px;
    grid-template-columns: 2fr 1fr;
}

.intro-text {
    color: #444;
    font-size: 1rem;
    line-height: 1.7;
}

.intro-text p {
    margin-bottom: 15px;
}

.access-note {
    align-items: flex-start;
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--primary-blue);
    border-radius: 8px;
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding: 12px;
}

.access-note i {
    color: var(--primary-blue);
    font-size: 1.2rem;
    margin-top: 2px;
}

.intro-image {
    text-align: center;
}

.server-icon {
    animation: float 6s ease-in-out infinite;
    color: var(--primary-blue);
    font-size: 5rem;
    margin-bottom: 20px;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.server-specs {
    background: var(--light-gray);
    border-radius: 10px;
    padding: 20px;
    text-align: left;
}

.server-specs h4 {
    color: var(--dark-blue);
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-align: center;
}

.server-specs p {
    align-items: center;
    color: #555;
    display: flex;
    gap: 10px;
    margin: 8px 0;
}

.server-specs i {
    color: var(--primary-blue);
    width: 20px;
}

/* Сервисы */
.services h2 {
    align-items: center;
    color: var(--dark-blue);
    display: flex;
    font-size: 1.6rem;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    position: relative;
    text-align: center;
}

.services h2::after {
    background: var(--primary-blue);
    border-radius: 2px;
    bottom: 0;
    content: '';
    height: 4px;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    width: 100px;
}

.services-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.service-card {
    background: var(--white);
    border-radius: 15px;
    border-top: 5px solid var(--primary-blue);
    box-shadow: var(--shadow);
    opacity: 0;
    overflow: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.service-card.animated {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.service-header {
    align-items: center;
    background: linear-gradient(to right, var(--light-gray), #e9ecef);
    border-bottom: 1px solid #dee2e6;
    display: flex;
    padding: 15px;
}

.service-icon {
    align-items: center;
    border-radius: 12px;
    color: var(--white);
    display: flex;
    flex-shrink: 0;
    font-size: 1.3rem;
    height: 45px;
    justify-content: center;
    margin-right: 15px;
    width: 45px;
}

.service-title {
    color: var(--dark-blue);
    flex: 1;
    font-size: 1.3rem;
    font-weight: 600;
}

.service-body {
    padding: 20px;
}

.service-description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.service-features ul {
    list-style: none;
    padding-left: 0;
}

.service-features li {
    align-items: center;
    border-bottom: 1px dashed #eee;
    display: flex;
    font-size: 0.9rem;
    gap: 12px;
    padding: 6px 0;
}

.service-features li i {
    color: var(--green);
    font-size: 0.9rem;
}

.service-access {
    align-items: center;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
}

.access-type {
    border-radius: 20px;
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 6px 15px;
    text-transform: uppercase;
}

.access-public {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.3);
    color: var(--green);
}

.access-private {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: var(--red);
}

.btn-access {
    align-items: center;
    background: var(--primary-blue);
    border: none;
    border-radius: 8px;
    color: var(--white);
    cursor: pointer;
    display: flex;
    font-size: 0.95rem;
    font-weight: 600;
    gap: 8px;
    padding: 8px 22px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-access:hover {
    background: var(--secondary-blue);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

/* Специальные стили для красных карточек (Calendar и MedDB) */
.service-card:nth-child(1) .service-header,
.service-card:nth-child(6) .service-header {
    background: linear-gradient(to right, rgba(231, 76, 60, 0.1), rgba(231, 76, 60, 0.05));
}

.service-card:nth-child(1),
.service-card:nth-child(6) {
    border-top-color: #e74c3c !important;
}

/* Информация о доступе */
.access-info h2 {
    align-items: center;
    border-left: 5px solid var(--primary-blue);
    color: var(--dark-blue);
    display: flex;
    font-size: 1.6rem;
    gap: 10px;
    margin-bottom: 25px;
    padding-left: 20px;
}

.access-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.access-card {
    background: var(--light-gray);
    border-radius: 10px;
    border-top: 4px solid var(--primary-blue);
    opacity: 0;
    padding: 20px;
    text-align: center;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.access-card.animated {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.access-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.access-icon {
    align-items: center;
    background: var(--primary-blue);
    border-radius: 50%;
    color: var(--white);
    display: flex;
    font-size: 1.5rem;
    height: 60px;
    justify-content: center;
    margin: 0 auto 20px;
    width: 60px;
}

.access-card h4 {
    color: var(--dark-blue);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.access-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Футер */
.footer {
    background: var(--dark-blue);
    border-radius: 20px;
    box-shadow: var(--shadow);
    color: var(--white);
    margin-top: 50px;
    padding: 50px 40px 30px;
}

.footer-main {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 40px;
    padding-bottom: 30px;
}

.footer-left {
    padding-right: 20px;
}

.footer-logo {
    align-items: center;
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.footer-logo i {
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--primary-blue);
    display: flex;
    font-size: 2.5rem;
    height: 70px;
    justify-content: center;
    width: 70px;
}

.logo-text h3 {
    color: var(--white);
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.logo-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-description p {
    margin-bottom: 10px;
}

.footer-right {
    padding-left: 20px;
}

.footer-contact h4 {
    align-items: center;
    border-bottom: 2px solid rgba(52, 152, 219, 0.3);
    color: var(--primary-blue);
    display: flex;
    font-size: 1.3rem;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 10px;
}

.contact-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, 1fr);
}

.contact-item {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    gap: 15px;
    padding: 15px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(52, 152, 219, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.contact-icon {
    align-items: center;
    background: rgba(52, 152, 219, 0.2);
    border-radius: 10px;
    color: var(--primary-blue);
    display: flex;
    flex-shrink: 0;
    font-size: 1.2rem;
    height: 45px;
    justify-content: center;
    width: 45px;
}

.contact-details {
    flex: 1;
}

.contact-label {
    color: rgba(255, 255, 255, 0.7);
    display: block;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

/* БЕЛЫЕ ССЫЛКИ В ФУТЕРЕ */
.footer a,
.footer a:any-link,
.footer a:hover,
.footer a:active,
.footer a:focus {
    color: #ffffff !important;
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    text-decoration: underline !important;
    text-decoration-color: var(--primary-blue) !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 4px !important;
}

.contact-text {
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 600;
}

/* Копирайт */
.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
}

.copyright-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin: 5px 0;
}

.small-text {
    font-size: 0.85rem !important;
    opacity: 0.6;
}

#currentYear {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Адаптивность для 6 карточек */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .intro-content,
    .footer-main {
        grid-template-columns: 1fr;
    }
    
    .footer-left,
    .footer-right {
        padding: 0;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .university-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .university-info h1 {
        font-size: 2rem;
    }
    
    .university-info h2 {
        font-size: 1.1rem;
    }
    
    .service-card,
    .service-access {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .service-icon {
        margin: 0 auto 10px;
    }
    
    .btn-access {
        justify-content: center;
        width: 100%;
    }
    
    .footer {
        padding: 40px 25px 25px;
    }
    
    .footer-logo {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-logo i {
        height: 70px;
        width: 70px;
    }
    
    .footer-note {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .contact-item {
        padding: 15px;
    }
    
    .footer-notes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .services-grid,
    .access-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .contact-icon {
        margin: 0 auto;
    }
}

/* Анимации с задержкой для 6 карточек */
.service-card:nth-child(1) { transition-delay: 0.1s; }
.service-card:nth-child(2) { transition-delay: 0.15s; }
.service-card:nth-child(3) { transition-delay: 0.2s; }
.service-card:nth-child(4) { transition-delay: 0.25s; }
.service-card:nth-child(5) { transition-delay: 0.3s; }
.service-card:nth-child(6) { transition-delay: 0.35s; }

.access-card:nth-child(1) { transition-delay: 0.1s; }
.access-card:nth-child(2) { transition-delay: 0.2s; }
.access-card:nth-child(3) { transition-delay: 0.3s; }
.access-card:nth-child(4) { transition-delay: 0.4s; }