/* ========================================
   RESPONSIVE CSS FOR UNIVERSITY PORTAL
   ======================================== */

/* ========================================
   MOBILE FIRST APPROACH - BASE STYLES
   ======================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f8fafc;
    overflow-x: hidden;
}

/* ========================================
   RESPONSIVE TYPOGRAPHY
   ======================================== */

h1 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 600;
    line-height: 1.4;
}

p {
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.6;
}

/* ========================================
   RESPONSIVE CONTAINERS
   ======================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Responsive container padding */
@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

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

/* ========================================
   RESPONSIVE NAVIGATION
   ======================================== */

.top-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Logo Section - Always Visible */
.nav-left {
    flex-shrink: 0;
    z-index: 1001;
}

.university-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.logo-text {
    color: white;
}

.university-name {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.university-subtitle {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    opacity: 0.9;
    margin: 0;
}

/* Desktop Navigation */
.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
    min-height: 44px;
    /* Touch target */
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Mobile Menu Button */
.nav-right {
    flex-shrink: 0;
    z-index: 1001;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1002;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* ========================================
   RESPONSIVE GRID SYSTEMS
   ======================================== */

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Departments Grid */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* ========================================
   RESPONSIVE CARDS
   ======================================== */

.card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    width: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* ========================================
   RESPONSIVE FORMS
   ======================================== */

.form-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    min-height: 44px;
    /* Touch target */
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ========================================
   RESPONSIVE BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    min-height: 44px;
    white-space: nowrap;
    text-align: center;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* ========================================
   RESPONSIVE IMAGES
   ======================================== */

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

.responsive-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* Aspect Ratio Containers */
.aspect-ratio-16-9 {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 */
    overflow: hidden;
    border-radius: 0.5rem;
}

.aspect-ratio-4-3 {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%;
    /* 4:3 */
    overflow: hidden;
    border-radius: 0.5rem;
}

.aspect-ratio-1-1 {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    /* 1:1 */
    overflow: hidden;
    border-radius: 50%;
}

.aspect-ratio-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   FACULTY DETAILS RESPONSIVE STYLES
   ======================================== */

/* Faculty Hero Section */
.faculty-hero-section {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
    color: white;
}

.faculty-hero-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Faculty Photo Container - Enhanced */
.faculty-photo-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.faculty-photo-hero {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    background: #f3f4f6;
}

.faculty-photo-hero:hover {
    transform: scale(1.05);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4);
}

/* Faculty Status Indicator */
.faculty-status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: #10b981;
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    border: 2px solid white;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.1);
    }
}

/* Faculty Info Section */
.faculty-hero-info {
    flex: 1;
    text-align: left;
}

.faculty-hero-name {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.faculty-hero-designation {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.faculty-hero-department {
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

/* Faculty Stats */
.faculty-hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 0.75rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 80px;
}

.stat-value {
    display: block;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Faculty Actions */
.faculty-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.875rem;
    min-height: 44px;
    white-space: nowrap;
}

.action-button.primary {
    background: white;
    color: #667eea;
}

.action-button.primary:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.action-button.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-button.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.action-button .icon {
    width: 18px;
    height: 18px;
}

/* Faculty Content Grid */
.faculty-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.info-card-icon svg {
    width: 24px;
    height: 24px;
}

.info-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

/* Contact List */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.contact-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.contact-item-icon {
    width: 40px;
    height: 40px;
    background: #eff6ff;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    flex-shrink: 0;
}

.contact-item-icon svg {
    width: 20px;
    height: 20px;
}

.contact-details {
    flex: 1;
}

.contact-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.contact-value {
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 500;
}

.contact-sublabel {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */

/* Spacing */
.spacing-xs {
    margin: 0.5rem 0;
}

.spacing-sm {
    margin: 1rem 0;
}

.spacing-md {
    margin: 1.5rem 0;
}

.spacing-lg {
    margin: 2rem 0;
}

.spacing-xl {
    margin: 3rem 0;
}

/* Text Alignment */
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* Display */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

/* Flex Utilities */
.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

/* ========================================
   TABLET RESPONSIVE (768px - 1023px)
   ======================================== */

@media (min-width: 768px) and (max-width: 1023px) {

    /* Navigation adjustments */
    .nav-center {
        margin: 0 1rem;
    }

    .nav-menu {
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Grid adjustments */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.25rem;
    }

    .departments-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    /* Form adjustments */
    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    /* Typography adjustments */
    .university-name {
        font-size: 1.25rem;
    }

    .university-subtitle {
        font-size: 0.8rem;
    }

    /* Faculty adjustments */
    .faculty-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .faculty-photo-hero {
        width: 140px;
        height: 140px;
    }

    .faculty-hero-stats {
        justify-content: center;
        gap: 1.5rem;
    }

    .faculty-content-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* ========================================
   MOBILE RESPONSIVE (320px - 767px)
   ======================================== */

@media (max-width: 767px) {

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    /* Mobile Navigation - HIDDEN BY DEFAULT */
    .nav-center {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 80px 1rem 2rem;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        visibility: hidden;
        opacity: 0;
    }

    /* Mobile Navigation - SHOW WHEN ACTIVE */
    .nav-center.active {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        align-items: stretch;
        padding-top: 1rem;
    }

    .nav-item {
        width: 100%;
        transform: translateX(-50px);
        opacity: 0;
        transition: all 0.3s ease;
    }

    /* Animate menu items when menu is active */
    .nav-center.active .nav-item {
        transform: translateX(0);
        opacity: 1;
    }

    .nav-center.active .nav-item:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-center.active .nav-item:nth-child(2) {
        transition-delay: 0.15s;
    }

    .nav-center.active .nav-item:nth-child(3) {
        transition-delay: 0.2s;
    }

    .nav-center.active .nav-item:nth-child(4) {
        transition-delay: 0.25s;
    }

    .nav-center.active .nav-item:nth-child(5) {
        transition-delay: 0.3s;
    }

    .nav-center.active .nav-item:nth-child(6) {
        transition-delay: 0.35s;
    }

    .nav-center.active .nav-item:nth-child(7) {
        transition-delay: 0.4s;
    }

    .nav-center.active .nav-item:nth-child(8) {
        transition-delay: 0.45s;
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 1.25rem 1.5rem;
        font-size: 1.1rem;
        border-radius: 0.75rem;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(8px);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    }

    .nav-icon {
        width: 22px;
        height: 22px;
        margin-right: 0.75rem;
    }

    /* Mobile Menu Button - ALWAYS VISIBLE */
    .mobile-menu-btn {
        display: flex;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 0.5rem;
        padding: 0.75rem;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        position: relative;
        z-index: 1002;
    }

    .mobile-menu-btn:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    /* Hamburger Animation - SMOOTH TRANSITIONS */
    .mobile-menu-btn.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-btn.active .hamburger-line:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    .mobile-menu-btn.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Container adjustments */
    .container {
        padding: 0 0.75rem;
    }

    /* Grid adjustments */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

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

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

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

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

    /* Form adjustments */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Card adjustments */
    .card {
        padding: 1rem;
    }

    /* Button adjustments */
    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    /* Typography adjustments */
    .university-name {
        font-size: 1.125rem;
    }

    .university-subtitle {
        font-size: 0.75rem;
    }

    /* Logo adjustments */
    .logo-img {
        width: 40px;
        height: 40px;
    }

    /* Faculty Mobile Adjustments */
    .faculty-hero-section {
        padding: 2rem 1rem;
    }

    .faculty-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .faculty-photo-hero {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }

    .faculty-hero-info {
        text-align: center;
    }

    .faculty-hero-stats {
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .stat-item {
        min-width: 70px;
        padding: 0.75rem;
    }

    .faculty-hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .action-button {
        width: 100%;
        padding: 1rem;
    }

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

    .info-card {
        padding: 1rem;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .contact-item-icon {
        margin: 0 auto;
    }

    /* Spacing adjustments */
    .spacing-xs {
        margin: 0.25rem 0;
    }

    .spacing-sm {
        margin: 0.75rem 0;
    }

    .spacing-md {
        margin: 1rem 0;
    }

    .spacing-lg {
        margin: 1.5rem 0;
    }

    .spacing-xl {
        margin: 2rem 0;
    }

    /* Page header adjustments */
    .page-header,
    .welcome-section,
    .hero-section {
        padding: 2rem 1rem;
        margin: 1rem 0;
    }

    /* Hero content adjustments */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

/* ========================================
   SMALL MOBILE (320px - 479px)
   ======================================== */

@media (max-width: 479px) {

    /* Extra small adjustments */
    .container {
        padding: 0 0.5rem;
    }

    .nav-container {
        padding: 0 0.75rem;
        height: 60px;
    }

    .nav-center {
        padding: 70px 0.75rem 2rem;
    }

    .university-name {
        font-size: 1rem;
    }

    .university-subtitle {
        font-size: 0.7rem;
    }

    .logo-img {
        width: 35px;
        height: 35px;
    }

    .card {
        padding: 0.75rem;
    }

    .btn {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .nav-link {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    .mobile-menu-btn {
        padding: 0.5rem;
    }

    .hamburger-line {
        width: 22px;
        height: 2.5px;
    }

    /* Faculty Small Mobile Adjustments */
    .faculty-hero-section {
        padding: 1.5rem 0.75rem;
    }

    .faculty-photo-hero {
        width: 100px;
        height: 100px;
        border-width: 4px;
    }

    .faculty-hero-name {
        font-size: 1.5rem;
    }

    .faculty-hero-designation {
        font-size: 1rem;
    }

    .faculty-hero-department {
        font-size: 0.875rem;
    }

    .faculty-hero-stats {
        gap: 0.75rem;
    }

    .stat-item {
        min-width: 60px;
        padding: 0.5rem;
    }

    .stat-value {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .faculty-status-indicator {
        bottom: 4px;
        right: 4px;
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }

    .status-dot {
        width: 6px;
        height: 6px;
    }

    /* Reduce font sizes */
    h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    h2 {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    h3 {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }
}

/* ========================================
   LARGE DESKTOP (1024px+)
   ======================================== */

@media (min-width: 1024px) {

    /* Enhanced desktop experience */
    .nav-container {
        padding: 0 2rem;
    }

    .nav-center {
        margin: 0 3rem;
    }

    .nav-link {
        padding: 0.875rem 1.25rem;
    }

    /* Grid enhancements */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }

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

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

    /* Form enhancements */
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    /* Card enhancements */
    .card {
        padding: 2rem;
    }

    /* Enhanced hover effects */
    .card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

    /* Faculty Desktop Enhancements */
    .faculty-hero-content {
        grid-template-columns: auto 1fr auto;
        text-align: left;
        gap: 3rem;
    }

    .faculty-photo-hero {
        width: 180px;
        height: 180px;
        border-width: 8px;
    }

    .faculty-photo-hero:hover {
        transform: scale(1.08);
    }

    .faculty-hero-stats {
        gap: 2.5rem;
    }

    .stat-item {
        min-width: 90px;
        padding: 1.25rem;
    }

    .faculty-hero-actions {
        flex-direction: column;
        gap: 1.25rem;
    }

    .faculty-content-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }

    .info-card {
        padding: 2rem;
    }
}

/* ========================================
   EXTRA LARGE DESKTOP (1440px+)
   ======================================== */

@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
        padding: 0 3rem;
    }

    .nav-container {
        max-width: 1400px;
        padding: 0 3rem;
    }

    /* Enhanced spacing */
    .spacing-xl {
        margin: 4rem 0;
    }

    /* Faculty Extra Large Enhancements */
    .faculty-photo-hero {
        width: 200px;
        height: 200px;
    }

    .faculty-hero-content {
        gap: 4rem;
    }

    .faculty-content-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 2.5rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {

    .top-nav,
    .mobile-menu-btn,
    .btn,
    .nav-center,
    .faculty-hero-actions {
        display: none;
    }

    body {
        font-size: 12px;
        line-height: 1.4;
        color: black;
        background: white;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    .faculty-hero-section {
        background: none !important;
        color: black !important;
        border: 1px solid #ccc;
    }

    .faculty-photo-hero {
        border: 2px solid #ccc;
    }

    h1,
    h2,
    h3 {
        page-break-after: avoid;
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* Focus styles */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {

    .nav-link,
    .btn,
    .card,
    .faculty-photo-hero {
        border: 2px solid currentColor;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideInUp 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* ========================================
   RESPONSIVE HELPER CLASSES
   ======================================== */

/* Show/Hide on different screen sizes */
.show-mobile {
    display: none;
}

.show-tablet {
    display: none;
}

.show-desktop {
    display: block;
}

@media (max-width: 767px) {
    .show-mobile {
        display: block;
    }

    .hide-mobile {
        display: none;
    }

    .show-desktop {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .show-tablet {
        display: block;
    }

    .hide-tablet {
        display: none;
    }
}

@media (min-width: 1024px) {
    .show-desktop {
        display: block;
    }

    .hide-desktop {
        display: none;
    }
}

/* Responsive text alignment */
@media (max-width: 767px) {
    .text-center-mobile {
        text-align: center;
    }

    .text-left-mobile {
        text-align: left;
    }
}

/* Responsive margins and padding */
@media (max-width: 767px) {
    .m-0-mobile {
        margin: 0;
    }

    .p-0-mobile {
        padding: 0;
    }

    .mt-1-mobile {
        margin-top: 0.5rem;
    }

    .mb-1-mobile {
        margin-bottom: 0.5rem;
    }

    .pt-1-mobile {
        padding-top: 0.5rem;
    }

    .pb-1-mobile {
        padding-bottom: 0.5rem;
    }
}

/* ========================================
   END OF RESPONSIVE CSS
   ======================================== */