/* ===================================
   GLOBAL UNIVERSITY EXPLORER
   Premium Glassmorphism UI
   =================================== */

/* === CSS VARIABLES === */
:root {
    --primary-gradient: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
    --secondary-gradient: linear-gradient(135deg, #FFA500 0%, #FF6347 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(255, 215, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 20px;
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* === ANIMATED BACKGROUND === */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a0a00 0%, #0a0a1a 50%, #1a0a00 100%);
    z-index: -2;
    will-change: transform;
}

.bg-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 50%);
    animation: gradientMove 30s ease infinite;
    will-change: transform;
}

@keyframes gradientMove {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-5%, -5%); }
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.02)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    z-index: -1;
}

/* === GLASS EFFECT === */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    will-change: transform;
}

.glass:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-5px);
}

/* === TYPOGRAPHY === */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === HEADER === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
}

.logo-icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

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

.nav-link:hover {
    color: var(--text-primary);
}

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

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 20px;
    height: 2.4px;
    background: var(--text-primary);
    border-radius: 2.4px;
    transition: var(--transition);
}

/* === HERO SECTION === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6.4rem 1.6rem 3.2rem;
}

.hero-content {
    max-width: 720px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(0.88rem, 2vw, 1.12rem);
    color: var(--text-secondary);
    margin-bottom: 2.4rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === BUTTONS === */
.btn {
    padding: 0.8rem 2rem;
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 240px;
    height: 240px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #000;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.5);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 1);
}

.btn-search {
    width: 100%;
    background: var(--primary-gradient);
    color: #000;
    margin-top: 1.2rem;
    font-size: 0.96rem;
    padding: 0.96rem;
}

/* === CONTAINER === */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.6rem;
}

/* === SECTIONS === */
section {
    padding: 4.8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3.2rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 0.96rem;
    color: var(--text-secondary);
}

/* === SEARCH SECTION === */
.search-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.4rem;
    border-radius: var(--border-radius);
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.6rem;
    margin-bottom: 0.8rem;
}

.input-group {
    position: relative;
}

.input-label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.input-field {
    width: 100%;
    padding: 0.96rem 2.4rem 0.96rem 0.96rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.88rem;
    transition: var(--transition);
    font-family: inherit;
}

.input-field:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.6);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-icon {
    position: absolute;
    right: 0.96rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
    margin-top: 0.6rem;
}

/* === LOADING === */
.loading {
    text-align: center;
    padding: 2.4rem;
}

.spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.2rem;
    border: 3.2px solid rgba(255, 215, 0, 0.2);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* === RESULTS GRID === */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(256px, 1fr));
    gap: 1.6rem;
    margin-top: 2.4rem;
}

.university-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.6rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.university-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3.2px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.university-card:hover::before {
    transform: scaleX(1);
}

.university-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.university-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.info-icon {
    font-size: 0.96rem;
}

.university-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #FFD700;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.university-link:hover {
    color: #FF8C00;
    gap: 0.6rem;
}

/* === NO RESULTS === */
.no-results {
    text-align: center;
    padding: 3.2rem 1.6rem;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1.2rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}

.no-results p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* === CAROUSEL === */
.carousel-section {
    background: rgba(255, 215, 0, 0.02);
    position: relative;
}

.carousel-container {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 3.2rem;
}

.carousel-track {
    display: flex;
    gap: 1.6rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.8rem 0;
    scroll-snap-type: x mandatory;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-card {
    min-width: 256px;
    flex: 0 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
    will-change: transform;
    scroll-snap-align: start;
}

.carousel-card:hover {
    transform: scale(1.05);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.carousel-country {
    font-size: 2.4rem;
    margin-bottom: 0.8rem;
}

.carousel-title {
    font-size: 1.28rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.carousel-count {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1.6rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.6);
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.6rem;
}

.carousel-dot {
    width: 9.6px;
    height: 9.6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--primary-gradient);
    width: 24px;
    border-radius: 4.8px;
}

/* === STATS SECTION === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.6rem;
}

.stat-card {
    text-align: center;
    padding: 2.4rem 1.6rem;
    border-radius: var(--border-radius);
}

.stat-icon {
    font-size: 3.2rem;
    margin-bottom: 0.8rem;
    filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.3));
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
}

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

/* === ABOUT SECTION === */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.2rem;
    align-items: center;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.feature-item {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-text h3,
.feature-text h4 {
    font-size: 1.12rem;
    margin-bottom: 0.4rem;
}

.feature-text p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-visual {
    padding: 3.2rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-content {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    width: 100%;
}

.visual-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.visual-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.visual-label {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* === CONSULTATION SECTION === */
.consultation-section {
    background: rgba(255, 215, 0, 0.02);
}

.consultation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.4rem;
    align-items: start;
}

.consultation-info,
.consultation-form {
    padding: 2.4rem;
    border-radius: var(--border-radius);
}

.consultation-info h3,
.consultation-form h3 {
    font-size: 1.6rem;
    margin-bottom: 1.6rem;
}

.textarea-field {
    resize: vertical;
    min-height: 96px;
    font-family: inherit;
}

.form-status {
    margin-top: 0.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.form-status.success {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: #00ff00;
}

.form-status.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff6b6b;
}

/* === FOOTER === */
.footer {
    background: rgba(10, 10, 10, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3.2rem 0 1.6rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.4rem;
    margin-bottom: 2.4rem;
}

.footer-brand {
    max-width: 240px;
}

.footer-tagline {
    color: var(--text-secondary);
    margin-top: 0.8rem;
    line-height: 1.6;
}

.footer-links h4 {
    margin-bottom: 1.2rem;
    font-size: 0.88rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #FFD700;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.footer-credit {
    margin-top: 0.4rem;
}

.footer-credit a {
    color: #FFD700;
    text-decoration: none;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .about-grid,
    .consultation-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .hero {
        padding: 4.8rem 1.2rem 2.4rem;
    }
    
    .search-card {
        padding: 1.6rem 1.2rem;
    }
    
    .search-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .carousel-container {
        padding: 0 2.4rem;
    }
    
    .carousel-card {
        min-width: 224px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.6rem;
    }
    
    section {
        padding: 3.2rem 0;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === PRINT STYLES === */
@media print {
    .header,
    .hero,
    .carousel-section,
    .footer {
        display: none;
    }
}
