/* Custom CSS for 마산대학교 치위생과 Landing Page */

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;800&display=swap');

/* Global Styles */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
}

/* Custom Colors */
:root {
    --primary-color: #0066B3;
    --secondary-color: #8ED1FC;
    --accent-color: #F5F5F5;
    --text-dark: #2D3748;
    --text-light: #718096;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 179, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 179, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Hero Section Styles */
#hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Hero Background Image Styles */
#hero .bg-cover {
    transition: all 0.3s ease;
}

/* Hero Video Styles */
#hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity 1.5s ease-in-out;
    opacity: 0;
    z-index: 1;
}

/* Video loading states */
#hero-video.loading {
    opacity: 0;
}

#hero-video.loaded {
    opacity: 1;
}

/* Video and image overlay for better readability */
#hero .bg-gradient-to-br {
    backdrop-filter: blur(1px);
}

/* Video controls */
#video-toggle {
    transition: all 0.3s ease;
}

#video-toggle:hover {
    transform: scale(1.1);
}

/* Pulse animation for video control */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 102, 179, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 102, 179, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 179, 0);
    }
}

/* Enhanced text shadows for better readability */
#hero h1 {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    font-weight: 900;
}

#hero p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

/* Scroll indicator styles */
.animate-bounce {
    animation: gentleBounce 2s ease-in-out infinite;
}

@keyframes gentleBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-8px) translateX(-50%);
    }
    60% {
        transform: translateY(-4px) translateX(-50%);
    }
}

/* Background image loading animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#hero .bg-cover {
    animation: fadeIn 1s ease;
}

/* Subtle background animation */
@keyframes backgroundShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Enhanced button styles for better visibility */
#hero .bg-white\/95 {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#hero .border-white {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Button hover effects */
#hero a:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Dental-themed animations */
@keyframes gentlePulse {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.1; 
        transform: scale(1.05);
    }
}

/* Apply gentle pulse to floating elements */
#hero .animate-pulse {
    animation: gentlePulse 4s ease-in-out infinite;
}

/* Floating animation for medical elements */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(2deg); }
    66% { transform: translateY(-5px) rotate(-2deg); }
}

#hero .absolute.top-1\/4 { animation: float 6s ease-in-out infinite; }
#hero .absolute.top-3\/4 { animation: float 8s ease-in-out infinite reverse; }
#hero .absolute.bottom-1\/4 { animation: float 7s ease-in-out infinite; }

/* Enhanced gradient background */
#hero .bg-gradient-to-br {
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    #hero p {
        font-size: 1.25rem;
    }
    
    /* Hide floating elements on mobile for cleaner look */
    #hero .absolute.text-white\/5,
    #hero .absolute.text-white\/8 {
        display: none;
    }
    
    /* More aggressive text shadows on mobile */
    #hero h1, #hero p {
        text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.6);
    }
    
    /* Larger buttons on mobile */
    #hero a {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 102, 179, 0.15);
}

/* Section Spacing */
.section-padding {
    padding: 80px 0;
}

/* Custom Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Statistics Counter Animation */
.counter, .counter-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
    transition: transform 0.2s ease;
}

.counter-number {
    font-size: 1.125rem;
    display: inline-block;
    min-width: 3ch;
    text-align: center;
}

/* Counter Animation Effects */
@keyframes countUp {
    0% { 
        transform: translateY(20px) scale(0.8); 
        opacity: 0; 
    }
    50% { 
        transform: translateY(-5px) scale(1.02); 
        opacity: 0.8; 
    }
    100% { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

.counter-animating {
    animation: countUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Enhance number display */
.counter-number {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: -0.02em;
}

/* Navigation Styles */
.navbar-scrolled {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Mobile Menu */
.mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.mobile-menu.active {
    max-height: 300px;
}

/* Achievement Cards */
.achievement-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 102, 179, 0.1);
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 102, 179, 0.15);
    border-color: var(--primary-color);
}

/* Scholarship Cards */
.scholarship-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.scholarship-card:hover {
    background: white;
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* Curriculum Timeline */
.curriculum-year {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.curriculum-year::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.curriculum-year::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 10px;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary-color);
}

/* Progress Bars */
.progress-bar {
    background: #e2e8f0;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 2.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { 
        transform: translateX(-100%); 
        opacity: 0;
    }
    50% { 
        opacity: 1;
    }
    100% { 
        transform: translateX(100%); 
        opacity: 0;
    }
}

/* Contact Form Styles */
.contact-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
}

.contact-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.1);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll-to-top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 102, 179, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 102, 179, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .curriculum-year {
        padding-left: 1.5rem;
    }
    
    .counter {
        font-size: 2rem;
    }
    
    /* Mobile video optimizations */
    #hero-video {
        object-position: center center;
        transform: scale(1.1); /* Slight zoom to avoid black bars */
    }
    
    /* Hide video controls on very small screens */
    #video-toggle {
        display: none;
    }
    
    /* Enhance text contrast on mobile */
    #hero h1, #hero p {
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .section-padding {
        padding: 40px 0;
    }
}

/* Modal Styles */
.modal-overlay {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    animation: slideUp 0.3s ease;
    max-height: 90vh;
}

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

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal iframe responsive */
.modal-iframe {
    min-height: 500px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .card-hover,
    .achievement-card,
    .scholarship-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}