/* Основные стили - цвета из визитки NeuroDeny */

:root {
    /* Цветовая палитра из визитки клиники */
    --primary-color: #255282;        /* Темно-синий - основной */
    --secondary-color: #0694CB;      /* Ярко-голубой - акцент */
    --accent-color: #5AA3C7;         /* Светло-голубой */
    --neutral-color: #9DACBA;        /* Серо-голубой */
    --text-dark: #333333;
    --text-light: #666666;
    --bg-white: #FDFDFE;
    --bg-light: #f8f9fa;
}

/* Глобальные анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Навигация */
.navigation {
    background: rgba(253, 253, 254, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(37, 82, 130, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: inline-block;
    line-height: 0;
    cursor: pointer;
}

.logo img {
    height: 50px;
    transition: transform 0.3s ease;
}

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

.nav-menu {
    display: flex;
    gap: 2rem;
}

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

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

.nav-menu a:hover {
    color: var(--primary-color);
}

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

.nav-phone {
    display: none;
}

.nav-phone a {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(6, 148, 203, 0.3);
}

.nav-phone a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(6, 148, 203, 0.5);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    color: white;
    text-align: center;
    padding: 120px 20px 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    z-index: 1;
}

.hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out 0.1s backwards;
    position: relative;
    z-index: 1;
}

.hero .description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
    position: relative;
    z-index: 1;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    background: var(--bg-light);
    color: var(--secondary-color);
}

.cta-phone {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-phone:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.3);
}

/* Секции */
section {
    padding: 80px 20px;
}

/* Заголовки секций */
section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 2px;
}

/* О нас */
.about {
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

.about-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.clinic-photo {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(37, 82, 130, 0.15);
    transition: all 0.3s ease;
}

.clinic-photo:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(37, 82, 130, 0.25);
}

/* Врачи */
.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.doctor-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(37, 82, 130, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(37, 82, 130, 0.05);
    position: relative;
    overflow: visible;
}

.doctor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(37, 82, 130, 0.2);
    border-color: var(--accent-color);
}

.doctor-image {
    position: relative;
    margin-bottom: 1.5rem;
}

.doctor-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    border: 5px solid var(--accent-color);
    box-shadow: 0 8px 25px rgba(6, 148, 203, 0.3);
    transition: all 0.3s ease;
    display: block;
}

.doctor-badge {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a1a;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doctor-card:hover .doctor-image img {
    box-shadow: 0 12px 35px rgba(6, 148, 203, 0.4);
    transform: scale(1.05);
}

.doctor-name {
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    color: var(--primary-color);
    line-height: 1.3;
}

.doctor-details {
    background: var(--bg-light);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    text-align: left;
}

.doctor-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.doctor-detail-item:not(:last-child) {
    border-bottom: 1px solid rgba(37, 82, 130, 0.1);
}

.detail-label {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
}

.detail-value {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

.doctor-description {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Услуги */
.services {
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

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

.service-category {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(37, 82, 130, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(37, 82, 130, 0.05);
}

.service-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(37, 82, 130, 0.2);
    border-color: var(--accent-color);
}

.service-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: left;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.service-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(37, 82, 130, 0.1);
    transition: all 0.3s ease;
    gap: 1rem;
}

.service-list li:hover {
    padding-left: 10px;
    color: var(--primary-color);
}

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

.service-name {
    flex: 1;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
}

.service-price {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1.05rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

/* Отзывы */

/* Отзывы */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.review-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(37, 82, 130, 0.1);
    border-left: 5px solid var(--secondary-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.review-card::before {
    content: '\2605';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 4rem;
    color: var(--accent-color);
    opacity: 0.1;
}

.review-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(6, 148, 203, 0.25);
    border-left-color: var(--accent-color);
}

.review-text {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}

.review-author {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.review-rating {
    color: #FFB800;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.review-text::before {
    content: '"';
    font-size: 3rem;
    color: var(--accent-color);
    opacity: 0.3;
    line-height: 0;
}

/* Контакты */
.contact {
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(37, 82, 130, 0.08);
    transition: all 0.3s ease;
}

.contact-item:hover {
    box-shadow: 0 8px 25px rgba(37, 82, 130, 0.15);
    transform: translateY(-3px);
}

.contact-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.contact-item a {
    color: var(--text-dark);
    transition: all 0.3s ease;
    font-size: 1.05rem;
}

.contact-item a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.appointment-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(37, 82, 130, 0.2);
}

.appointment-info strong {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.contact-map iframe {
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(37, 82, 130, 0.15);
    transition: all 0.3s ease;
}

.contact-map iframe:hover {
    box-shadow: 0 15px 40px rgba(37, 82, 130, 0.25);
    transform: translateY(-3px);
}

/* Footer */
/* .footer migrated to TailwindCSS — see index.html */

/* .floating-call-btn migrated to TailwindCSS — see index.html */
/* pulse keyframes kept here for Tailwind animation reference */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(6, 148, 203, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(6, 148, 203, 0.7);
    }
}

/* Адаптивность для телефонов и планшетов */

/* Планшеты и маленькие ноутбуки */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 60px 15px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .subtitle {
        font-size: 1.3rem;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Планшеты портретной ориентации */
@media (max-width: 768px) {
    /* Навигация - компактная в одну строку */
    .navigation {
        padding: 0.5rem 0;
    }
    
    .nav-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo img {
        height: 35px;
    }
    
    /* Компактное меню справа */
    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.75rem;
    }
    
    .nav-menu a {
        padding: 0.3rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Скрываем кнопку телефона - есть плавающая кнопка */
    .nav-phone {
        display: none;
    }
    
    .nav-phone a {
        display: inline-block;
        width: auto;
    }
    
    /* Hero */
    .hero {
        padding: 60px 20px;
    }
    
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .hero .subtitle {
        font-size: 1.2rem;
    }
    
    .hero .description {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .cta-buttons {
        gap: 0.75rem;
    }
    
    /* Секции */
    section {
        padding: 50px 15px;
    }
    
    section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    /* Сетки */
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-images {
        grid-template-columns: 1fr;
    }
    
    .doctors-grid,
    .services-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Карточки врачей */
    .doctor-card {
        padding: 1.5rem;
    }
    
    /* Контакты */
    .contact-map iframe {
        height: 300px;
    }
    
    /* Плавающая кнопка звонка управляется Tailwind (flex md:hidden) */
}

/* Мобильные телефоны */
@media (max-width: 480px) {
    /* Навигация - минималистичная */
    .navigation {
        padding: 0.4rem 0;
    }
    
    .container {
        padding: 0 8px;
    }
    
    .logo img {
        height: 30px;
    }
    
    /* Очень компактное меню */
    .nav-menu {
        gap: 0.25rem;
        font-size: 0.68rem;
    }
    
    .nav-menu a {
        padding: 0.25rem 0.35rem;
    }
    
    /* Hero */
    .hero {
        padding: 40px 15px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero .subtitle {
        font-size: 1.1rem;
    }
    
    .hero .description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-button {
        padding: 0.75rem 1.75rem;
        font-size: 0.95rem;
        width: 100%;
        max-width: 300px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .cta-phone {
        order: -1; /* Кнопка звонка сверху на мобильных */
    }
    
    /* Секции */
    section {
        padding: 40px 10px;
    }
    
    section h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    /* О клинике */
    .about-text p {
        font-size: 0.95rem;
    }
    
    .clinic-photo {
        height: 200px;
    }
    
    /* Врачи */
    .doctor-card {
        padding: 1.25rem;
    }
    
    .doctor-image img {
        width: 150px;
        height: 150px;
    }
    
    .doctor-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.9rem;
    }
    
    .doctor-name {
        font-size: 1.25rem;
        margin-top: 0.75rem;
    }
    
    .doctor-details {
        padding: 1rem;
    }
    
    .detail-label,
    .detail-value {
        font-size: 0.85rem;
    }
    
    .doctor-description {
        font-size: 0.9rem;
    }
    
    /* Услуги */
    .service-category {
        padding: 1.5rem;
    }
    
    .service-category h3 {
        font-size: 1.2rem;
    }
    
    .service-list li {
        padding: 0.75rem 0;
        gap: 0.5rem;
    }
    
    .service-name {
        font-size: 0.85rem;
        flex: 1;
    }
    
    .service-price {
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    /* Отзывы */
    .review-card {
        padding: 1.5rem;
    }
    
    .review-text {
        font-size: 0.9rem;
    }
    
    /* Контакты */
    .contact-item {
        margin-bottom: 1.5rem;
    }
    
    .contact-item h3 {
        font-size: 1.1rem;
    }
    
    .contact-item p {
        font-size: 0.95rem;
    }
    
    .contact-map iframe {
        height: 250px;
    }
}

/* Улучшения для touch устройств */
@media (hover: none) and (pointer: coarse) {
    /* Увеличение области нажатия */
    .nav-menu a,
    .cta-button,
    .contact-item a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Убираем hover эффекты на touch устройствах */
    .doctor-card:hover,
    .clinic-photo:hover,
    .review-card:hover {
        transform: none;
    }
    
    /* Делаем активное состояние вместо hover */
    .nav-menu a:active {
        color: var(--primary-color);
        background: var(--bg-light);
    }
    
    .cta-button:active {
        transform: scale(0.98);
    }
}

/* Ориентация landscape на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 30px 20px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    section {
        padding: 40px 15px;
    }
}

/* ==================== MASCOT STYLES ==================== */

/* Mascot Container */
.mascot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 140px;
    height: 140px;
    z-index: 999;
    cursor: pointer;
    opacity: 0;
    animation: mascot-appear 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) both 2s;
    filter: drop-shadow(0 10px 25px rgba(37, 82, 130, 0.3));
}

.mascot-container:hover {
    filter: drop-shadow(0 12px 30px rgba(37, 82, 130, 0.35));
    transition: filter 0.5s ease;
}

.mascot-container:active {
    transform: translateY(2px) scale(0.98);
    transition: transform 0.1s ease;
}

/* Eyes wrapper */
.mascot-eyes {
    position: relative;
    width: 100%;
    height: 100%;
    animation: float 3s ease-in-out infinite;
    transition: transform 0.5s ease;
}

.mascot-container:hover .mascot-eyes {
    transform: scale(1.05);
    animation: float 2.5s ease-in-out infinite;
}

.mascot-blink,
.mascot-open {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Open eyes blink animation — starts after mascot appears (delay 4s total) */
.mascot-open {
    animation: mascot-blink-anim 4s infinite;
    animation-delay: 4s;
}

/* Tooltip with enhanced design */
.mascot-tooltip {
    position: absolute;
    bottom: 110%;
    right: -10px;
    background: linear-gradient(135deg, #255282, #0694CB, #5AA3C7);
    color: white;
    padding: 14px 20px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    transition: all 0.5s ease-out;
    pointer-events: none;
    box-shadow: 0 8px 25px rgba(37, 82, 130, 0.4), 0 0 25px rgba(6, 148, 203, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.mascot-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 30px;
    border: 10px solid transparent;
    border-top-color: #5AA3C7;
}

.mascot-tooltip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    border-radius: 15px;
    pointer-events: none;
}

.mascot-container:hover .mascot-tooltip {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Floating Animation with movement */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-3deg);
    }
    50% {
        transform: translateY(-6px) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(3deg);
    }
}

/* Mascot entrance animation */
@keyframes mascot-appear {
    from {
        opacity: 0;
        transform: translateY(100px) scale(0.5) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

/* Blink: briefly hides open-eyes image to reveal blink image underneath */
@keyframes mascot-blink-anim {
    0%, 93%  { opacity: 1; }
    95%      { opacity: 0; }
    97%      { opacity: 0; }
    99%, 100% { opacity: 1; }
}

/* Mobile adjustments for mascot */
@media (max-width: 768px) {
    .mascot-container {
        width: 100px;
        height: 100px;
        bottom: 15px;
        right: 15px;
    }
    
    .mascot-tooltip {
        font-size: 11px;
        padding: 10px 14px;
        white-space: normal;
        max-width: 180px;
        right: -5px;
        /* Auto-show on mobile: appear after mascot arrives, show 4s, then hide */
        animation: mobile-tooltip-show 7s ease both;
        animation-delay: 3s;
    }
    
    .mascot-tooltip::after {
        right: 25px;
        border-width: 8px;
    }
}

@keyframes mobile-tooltip-show {
    0%   { opacity: 0; transform: translateY(10px) scale(0.9); }
    12%  { opacity: 1; transform: translateY(0) scale(1); }
    75%  { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(10px) scale(0.9); }
}

/* Reduce animations on mobile for performance */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
    .mascot-brain {
        animation: float 4s ease-in-out infinite;
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .mascot-container {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .mascot-eyes {
        animation: none !important;
    }
    
    .mascot-open {
        animation: none !important;
        opacity: 1 !important;
    }
}

/* ==================== DIPLOMAS GALLERY ==================== */

.diplomas-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--bg-light);
}

.diplomas-section h3 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.diplomas-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

.diploma-thumbnail {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 82, 130, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 3/4;
}

.diploma-thumbnail:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(37, 82, 130, 0.25);
}

.diploma-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    display: block;
    transition: filter 0.3s ease;
}

.diploma-thumbnail:hover img {
    filter: brightness(1.1);
}

.diploma-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(37, 82, 130, 0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.diploma-thumbnail:hover .diploma-overlay {
    opacity: 1;
}

/* Diploma Modal */
.diploma-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.diploma-modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.diploma-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
    z-index: 10001;
}

.diploma-close:hover,
.diploma-close:focus {
    color: var(--secondary-color);
}

.diploma-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: center;
}

/* Mobile adjustments for diplomas */
@media (max-width: 768px) {
    .diplomas-section {
        margin-top: 30px;
        padding-top: 30px;
    }
    
    .diplomas-section h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .diplomas-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .diploma-close {
        top: 10px;
        right: 15px;
        font-size: 40px;
    }
    
    .diploma-modal-content {
        max-width: 95%;
        max-height: 85vh;
    }
    
    .diploma-caption {
        font-size: 0.8rem;
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    .diplomas-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

