/* ===== СОВРЕМЕННЫЙ МИНИМАЛИСТИЧНЫЙ ДИЗАЙН ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme palette */
    --bg: #f7f8fa;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --border: #e5e7eb;

    /* Text colors */
    --text-light: #1f2937; /* repurposed as dark text for consistency */
    --text-gray: #6b7280;

    /* Accents (softer, professional) */
    --accent-blue: #2563eb;   /* primary */
    --accent-purple: #7c3aed; /* indigo */
    --accent-pink: #ec4899;
    --accent-green: #10b981;

    --white: #ffffff;
    --success: #10b981;
    --neon-glow: none;

    /* Legacy mappings used in university-detail.php */
    --primary-color: #f9fafb;
    --secondary-color: #ffffff;
    --accent-color: #2563eb;
    --text-color: #1f2937;
    --light-text: #6b7280;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

html {
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== КОНТЕЙНЕР ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HERO СЕКЦИЯ ===== */
.hero {
    padding: 8rem 2rem;
    text-align: center;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--surface) 0%, #f0f4f8 100%);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text-color);
    line-height: 1.1;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.cta-button {
    display: inline-block;
    padding: 0.9rem 1.6rem;
    background: var(--accent-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    border: 1px solid var(--accent-blue);
    cursor: pointer;
    font-size: 1rem;
    box-shadow: var(--shadow);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    background: #1d4ed8;
    border-color: #1d4ed8;
}

/* ===== ОТЗЫВЫ СТУДЕНТОВ ===== */
.testimonials-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #fafbfc 0%, #f3f7fb 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.testimonials-section h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    font-weight: 800;
    color: var(--text-color);
}

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

.testimonial-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.testimonial-card:hover {
    border-color: var(--accent-blue);
    background: var(--surface);
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.15);
}

.stars {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
    font-weight: 500;
}

.testimonial-author {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.author-name {
    color: var(--accent-blue);
    font-weight: 700;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.author-info {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ===== СТАТИСТИКА ===== */
.stats-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.03) 0%, rgba(99, 102, 241, 0.03) 100%);
}

.stat-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--border);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

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

/* ===== УСЛУГИ СЕКЦИЯ ===== */
.services-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #fafbfc 0%, #f3f7fb 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.services-section h2 {
    font-size: 2.8rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 800;
    color: var(--text-color);
}

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

.service-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-blue);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.12);
}

.service-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-icon {
    transform: scale(1.15) translateY(-5px);
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.service-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 500;
}

/* ===== REASONS СЕКЦИЯ ===== */
.reasons-section {
    padding: 5rem 2rem;
    background: var(--surface);
}

.reasons-section h2 {
    font-size: 2.8rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 800;
    color: var(--text-color);
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.reason-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.reason-card:hover {
    background: var(--surface);
    border-color: var(--accent-blue);
    transform: translateY(-10px);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.12);
}

.reason-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

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

.reason-card:hover .reason-icon {
    animation: floatHover 0.5s ease-in-out;
}

@keyframes floatHover {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.reason-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-color);

 color: var(--text-light);
}
   

.reason-text {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.5;
}

/* ===== УНИВЕРСИТЕТЫ СЕКЦИЯ ===== */
.universities-section {
    padding: 4rem 2rem;
}

.section-title-gradient {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.search-input {
    width: 100%;
    max-width: 600px;
    padding: 1rem 1.5rem;
    background: var(--dark-card);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 50px;
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: var(--text-gray);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--dark-hover);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.city-filter {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--dark-card);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 50px;
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.city-filter:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.city-filter:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--dark-hover);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.city-filter option {
    background: var(--dark-card);
    color: var(--text-light);
}

.universities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    margin-bottom: 2rem;
    justify-content: start;
}

.university-card-wrapper {
    opacity: 1;
    transition: opacity 0.3s ease;
    width: 100%;
    max-width: 400px;
}

.university-card-wrapper.hidden {
    display: none;
}

.university-card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.university-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12);
    border-color: var(--accent-blue);
}

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

.university-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.university-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.3;
}

.university-city {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 0.75rem;
}

.university-desc {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    flex: 1;
    line-height: 1.5;
}

/* ===== ТАБЛИЦЫ ===== */
.programs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.programs-table thead {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.programs-table th,
.programs-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

.programs-table th {
    font-weight: 600;
    color: var(--accent-blue);
}

.programs-table td {
    color: var(--text-gray);
}

.programs-table tbody tr:hover {
    background: rgba(0, 217, 255, 0.05);
}

/* ===== ВКЛАДКИ ===== */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
    flex-wrap: wrap;
}

.tablinks {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-gray);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tablinks.active,
.tablinks:hover {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.tabcontent {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tabcontent.active {
    display: block;
}

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

/* ===== СЛАЙДЕР ===== */
.slider {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.slide {
    display: none;
    text-align: center;
    animation: slideAnimation 0.5s ease;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: auto;
    border-radius: 15px;
}

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

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 217, 255, 0.2);
    border: none;
    color: var(--accent-blue);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.slider-arrow:hover {
    background: rgba(0, 217, 255, 0.4);
}

.slider-arrow.prev {
    left: 10px;
}

.slider-arrow.next {
    right: 10px;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 8px;
    background-color: rgba(0, 217, 255, 0.2);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: var(--accent-blue);
}

.dot:hover {
    background-color: rgba(0, 217, 255, 0.5);
}

/* ===== FOOTER ===== */
footer {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(0, 217, 255, 0.1);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-gray);
    font-size: 0.9rem;
}

footer p {
    margin: 0.5rem 0;
}

@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 5.5rem 1.5rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 1.15rem;
    }

    .services-section h2,
    .reasons-section h2,
    .testimonials-section h2,
    .section-title-gradient {
        font-size: 2.3rem;
    }

    .service-card,
    .reason-card,
    .testimonial-card,
    .stat-card {
        padding: 1.75rem;
    }
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2.1rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.25rem;
    }

    .reasons-grid,
    .services-grid,
    .offices-grid,
    .universities-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 3rem 0.75rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 2rem;
    }

    .stat-card,
    .service-card,
    .reason-card,
    .testimonial-card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .services-section h2,
    .reasons-section h2,
    .testimonials-section h2,
    .section-title-gradient {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .section-title-gradient {
        line-height: 1.25;
    }

    .service-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .service-card h3,
    .reason-title,
    .university-name {
        font-size: 1.1rem;
    }

    .service-card p,
    .reason-text,
    .testimonial-text,
    .university-desc,
    .author-info,
    .stat-label {
        font-size: 0.92rem;
    }

    .universities-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .university-card-wrapper {
        max-width: none;
    }

    .university-image {
        height: 180px;
    }

    .university-info {
        padding: 1rem;
    }

    .cta-button {
        width: 100%;
        max-width: 360px;
        text-align: center;
        padding: 0.85rem 1rem;
        font-size: 0.98rem;
    }

    footer {
        padding: 2rem 1rem;
    }

    footer p {
        font-size: 0.86rem;
        line-height: 1.5;
    }

    .stat-number {
        font-size: 2rem;
    }

    .slider-arrow {
        padding: 0.3rem 0.8rem;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.65rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .search-input {
        font-size: 0.9rem;
    }

    .services-section,
    .reasons-section,
    .testimonials-section,
    .universities-section {
        padding: 3rem 1rem;
    }

    .services-section h2,
    .reasons-section h2,
    .testimonials-section h2,
    .section-title-gradient {
        font-size: 1.55rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .service-card,
    .reason-card,
    .testimonial-card,
    .stat-card {
        padding: 1rem;
    }

    .university-image {
        height: 160px;
    }
}
