@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a1a;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --border-color: #27272a;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 0.5rem 0;
    background: rgba(10, 10, 10, 0.98);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 0.5rem; /* Added padding to increase tap area */
    border-radius: 4px; /* Optional: for visual feedback on tap area */
    transition: background-color 0.2s ease-out; /* Feedback on hover/tap */
}

.hamburger:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Slight hover effect */
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="%23333" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.1;
    animation: pulseGlow 4s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% { opacity: 0.1; }
    100% { opacity: 0.2; }
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
    position: relative;
    z-index: 2;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInRight 1s ease-out 0.3s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: slideInLeft 1s ease-out 0.6s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    animation: bounceIn 1s ease-out 0.9s both;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.03); /* Added scale and more lift */
    box-shadow: 0 18px 45px rgba(59, 130, 246, 0.5); /* More pronounced shadow */
    background: var(--accent-hover); /* Darken accent color on hover, assuming --accent-hover is darker */
}

/* Sections */
.section {
    padding: 5rem 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about {
    background: var(--secondary-bg);
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: fadeInUpCss 0.7s ease-out forwards; /* Replaced and using forwards */
    opacity: 0; /* Initial state for animation */
}

.about h2 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.about p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Majors Grid */
.majors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.major-card {
    background: var(--secondary-bg);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.major-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: left 0.5s ease;
}

.major-card:hover::before {
    left: 0;
}

.major-card:hover {
    transform: translateY(-12px) scale(1.02); /* Slightly more lift and scale */
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.3); /* Enhanced shadow */
}

.major-icon {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.major-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.major-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.featured {
    border: 2px solid var(--accent-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    background: var(--secondary-bg);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-item i {
    font-size: 1.5rem;
    margin-left: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-item div h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-item div p {
    color: var(--text-secondary);
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.map-container iframe {
    width: 100%;
    height: 300px;
    border: none;
}

/* Footer */
.footer {
    background: var(--secondary-bg);
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    line-height: 1.8;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.footer-bottom a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.95);
        width: 100%;
        text-align: center;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        padding: 2rem 0;
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
        transform: translateY(20px);
        opacity: 0;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active li {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-menu.active li:nth-child(4) { transition-delay: 0.4s; }
    
    .nav-menu a {
        font-size: 1.2rem; /* Font size is okay */
        padding: 0.8rem 1rem; /* Adjusted padding */
        display: flex; /* Added for centering content */
        align-items: center; /* Vertically center content */
        justify-content: center; /* Horizontally center content */
        min-height: 44px; /* Minimum tap target height */
        border-radius: 10px;
        margin: 0 1rem;
        background: rgba(59, 130, 246, 0.1);
        border: 1px solid rgba(59, 130, 246, 0.2);
    }
    
    .nav-menu a:hover {
        background: rgba(59, 130, 246, 0.2);
        transform: scale(1.05);
    }
    
    .hero {
        padding: 0 1rem;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.0rem; /* Adjusted from 2.2rem */
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .hero p {
        font-size: 1rem; /* Adjusted from 1.1rem */
        margin-bottom: 2.5rem;
        padding: 0 1rem;
    }
    
    .cta-button {
        padding: 1.2rem 2.5rem; /* Existing padding is good */
        font-size: 1.1rem;
        border-radius: 25px;
        min-height: 48px; /* Added minimum tap target height */
    }
    
    .section {
        padding: 4rem 1.5rem;
    }
    
    .section-title {
        font-size: 2rem; /* Adjusted from 2.2rem */
        margin-bottom: 2.5rem;
    }
    
    .about {
        padding: 2.5rem 2rem;
        margin: 1rem 0;
        border-radius: 15px;
    }
    
    .about h2 {
        font-size: 1.6rem; /* Adjusted from 1.8rem */
        margin-bottom: 1.5rem;
    }
    
    .majors-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    animation: fadeInUpCss 0.7s ease-out 0.2s forwards;
    opacity: 0;
    }
    
    .major-card {
        padding: 2rem 1.5rem; /* Adjusted padding */
        border-radius: 20px;
    }
    
    .major-icon {
        font-size: 3.5rem;
        margin-bottom: 1.5rem;
    }
    
    .major-card h3 {
        font-size: 1.3rem; /* Adjusted from 1.4rem */
        margin-bottom: 1.2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        padding: 2.5rem 2rem;
    }
    
    .contact-item {
        margin-bottom: 2rem;
        padding: 1rem;
        background: rgba(59, 130, 246, 0.05);
        border-radius: 10px;
        border: 1px solid rgba(59, 130, 246, 0.1);
    }
    
    .contact-item i {
        font-size: 2rem;
        margin-left: 1.5rem;
    }
    
    .map-container {
        order: -1;
        margin-bottom: 2rem;
    }
    
    .map-container iframe {
        height: 250px;
        border-radius: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    
    .footer-section {
        padding: 1.5rem;
        background: rgba(59, 130, 246, 0.05);
        border-radius: 15px;
        border: 1px solid rgba(59, 130, 246, 0.1);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 3rem 1rem;
    }
    
    .about {
        padding: 2rem 1.5rem;
    }
    
    .major-card {
        padding: 2rem 1.5rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item i {
        margin: 0 0 1rem 0;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ripple effect CSS added dynamically by JS, but included here for completeness */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes fadeInUpCss {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}