/* Variables */
:root {
    --primary-color: #141E61;
    --secondary-color: #0d47a1;
    --accent-color: #2962ff;
    --text-color: #333;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 15vh 0 15vh 0;
    text-align: center;
    border-radius: 0 0 5% 5%;
    min-height: 40vh;
    height: fit-content;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    padding: 4rem 0;
}

/* Department Navigation */
.department-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dept-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--white);
    border: none;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.dept-btn i {
    font-size: 2rem;
    color: var(--primary-color);
}

.dept-btn span {
    font-weight: 600;
    color: black;
}

.dept-btn:hover,
.dept-btn.active {
    transform: translateY(-5px);
    background: var(--primary-color);
}

.dept-btn:hover i,
.dept-btn:hover span,
.dept-btn.active i,
.dept-btn.active span {
    color: white;
}

/* Department Content */
.department-content {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.dept-section {
    display: none;
}

.dept-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Semester Tabs */
.semester-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 10px;
    overflow-x: auto;
}

.sem-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: var(--white);
    color: var(--text-color);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    white-space: nowrap;
}

.sem-tab:hover,
.sem-tab.active {
    background: var(--primary-color);
    color: var(--white);
}

/* Subject Grid */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.subject-card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px -1px rgba(0, 0, 0, 0.15);
}

.subject-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.subject-links {
    display: flex;
    gap: 0.5rem;
}

.subject-links a {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@media (max-width:991px) {
    .hero {
        min-height: 30vh;
        height: fit-content;
        padding: 2rem 1rem;
    }
}

/* Responsive Design */
@media (max-width: 770px) {
    .hero {
        min-height: 18rem;
        height: fit-content;
        padding: 2rem 1rem;

        h1 {
            font-size: 1.5rem;
        }

        p {
            font-size: 0.8rem;
        }
    }

    .department-nav {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .dept-btn {
        padding: 1rem;
    }

    .dept-btn i {
        font-size: 1.5rem;
    }

    .semester-tabs {
        padding: 0.5rem;
    }

    .sem-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .subject-grid {
        grid-template-columns: 1fr;
    }
}

/* Compact Floating Cloud Card */
.floating-cloud-card {
    position: fixed;
    top: 120px;
    right: 25px;
    width: 220px;
    z-index: 1000;
    animation: float 4s ease-in-out infinite;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateX(0);
}

.floating-cloud-card.hidden {
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

.cloud-content {
    background: linear-gradient(135deg, #1a237e, #ffc107);
    border-radius: 40px 40px 40px 15px;
    padding: 20px 18px 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
}

.cloud-content::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 193, 7, 0.2) 0%, transparent 50%);
    border-radius: 55px 55px 55px 25px;
    z-index: -1;
    animation: glow 3s ease-in-out infinite alternate;
}

.cloud-header {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 10;
}

.cloud-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cloud-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.cloud-body {
    position: relative;
    z-index: 5;
}

.cloud-icon {
    font-size: 2rem;
    color: #ffc107;
    margin-bottom: 12px;
    animation: bounce 2s ease-in-out infinite;
}

.cloud-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.cloud-message {
    margin-bottom: 12px;
}

.cloud-text {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: #ffeb3b;
}

.cloud-features {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
}

.cloud-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.cloud-feature:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.cloud-feature i {
    font-size: 0.9rem;
    color: #ffc107;
    margin-bottom: 3px;
}

.cloud-feature span {
    font-size: 0.75rem;
    font-weight: 600;
}

.cloud-cta {
    display: inline-block;
    background: linear-gradient(45deg, #ffc107, #ffeb3b);
    color: #1a237e;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    margin-top: 10px;
}

.cloud-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 193, 7, 0.4);
    color: #1a237e;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes glow {
    from {
        box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
    }

    to {
        box-shadow: 0 0 25px rgba(255, 193, 7, 0.5);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* Responsive Design */
@media (max-width: 770px) {
    .floating-cloud-card {
        top: 100px;
        right: 15px;
        width: 150px;
    }

    .cloud-content {
        padding: 10px 10px 10px;
        border-radius: 15px 15px 15px 5px;
    }

    .cloud-title {
        font-size: 1rem;
    }

    .cloud-text {
        font-size: 0.8rem;
    }

    .cloud-features {
        gap: 10px;
    }

    .cloud-feature {
        padding: 5px 8px;
    }

    .cloud-feature span {
        font-size: 0.7rem;
    }

    .cloud-cta {
        padding: 7px 15px;
        font-size: 0.8rem;
    }
}