/* css/style.css - Vibrant Student Vibe Redesign */
:root {
    --bg-color: #f4f6f8; /* Soft cool gray */
    --surface-color: #ffffff;
    --text-primary: #0a0a0a;
    --text-secondary: #5a6b7c;
    
    --accent-red: #e63946; /* Vibrant energizing red */
    --accent-dark-red: #c1121f;
    --accent-black: #1d3557; /* Deep navy-black */
    
    --gradient-red: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
    --gradient-dark: linear-gradient(135deg, #1d3557 0%, #000000 100%);
    
    --border-color: rgba(29, 53, 87, 0.1);
    
    --shadow-soft: 0 10px 30px -5px rgba(29, 53, 87, 0.1);
    --shadow-hover: 0 20px 40px -10px rgba(230, 57, 70, 0.3);
    
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    /* Subtle dot grid pattern for that "study/tech" vibe */
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    margin-top: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--accent-red);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--accent-black);
    font-weight: 700;
    transition: var(--transition);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-red);
    transition: width 0.3s ease;
}

.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--accent-red);
}

.main-nav .nav-btn {
    background: var(--gradient-red);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.main-nav .nav-btn::after {
    display: none;
}

.main-nav .nav-btn:hover {
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

/* Hero Section with High Energy Background */
.hero {
    position: relative;
    padding: 6rem 0 5rem;
    text-align: center;
    overflow: hidden;
    /* Soft white gradient over the dot grid to make text readable */
    background: radial-gradient(circle at top, rgba(255,255,255,1) 0%, rgba(255,255,255,0.7) 60%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    animation: float 8s infinite alternate ease-in-out;
}

.shape-1 {
    background: var(--accent-red);
    width: 400px;
    height: 400px;
    top: -100px;
    left: -50px;
}

.shape-2 {
    background: var(--accent-black);
    width: 300px;
    height: 300px;
    bottom: -50px;
    right: 5%;
    animation-delay: -4s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 40px) scale(1.1); }
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--accent-black);
    font-weight: 800;
}

.hero-title span {
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
    font-weight: 500;
}

/* Main Content Area */
.content-area {
    padding: 3rem 0 6rem;
    position: relative;
    z-index: 10;
}

.breadcrumb {
    margin-bottom: 3rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-color);
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    width: fit-content;
    box-shadow: var(--shadow-soft);
    margin-left: auto;
    margin-right: auto;
    font-weight: 600;
}

.breadcrumb span {
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.breadcrumb span:hover {
    color: var(--accent-red);
}

.breadcrumb .separator {
    color: #ccc;
    cursor: default;
}

/* Dynamic Content Animation */
#dynamic-content {
    animation: slideUp 0.5s ease-out;
}

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

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--accent-black);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 800;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: var(--gradient-red);
    border-radius: 5px;
}

/* Grid Layouts for Branches and Semesters */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--surface-color);
    border: none;
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Gradient card background on hover */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-red);
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: var(--transition);
}

.animated-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
    animation: floatingIcon 3s ease-in-out infinite;
}

@keyframes floatingIcon {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.8rem;
    color: var(--accent-black);
    font-weight: 800;
    transition: var(--transition);
}

.card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

/* White text when card is hovered (red background) */
.card:hover h3, .card:hover p, .card:hover .card-icon {
    color: white;
}
.card:hover .card-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Tables for Question Papers */
.table-container {
    background: var(--surface-color);
    border-radius: 16px;
    border: none;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th, td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--gradient-dark);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: #fcfcfc;
}

.paper-name {
    display: flex;
    align-items: center;
    gap: 15px;
}

.paper-icon {
    font-size: 1.5rem;
    background: rgba(230, 57, 70, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.paper-name strong {
    font-size: 1.1rem;
    color: var(--accent-black);
}

.badge {
    background: var(--bg-color);
    color: var(--accent-black);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid var(--border-color);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-red);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.2);
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4);
    color: white;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 4rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(230, 57, 70, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-red);
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin: 0 auto 1.5rem auto;
}

/* Footer */
.main-footer {
    background: var(--gradient-dark);
    padding: 2rem 0 1rem;
    color: white;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-brand h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
}
.footer-brand p {
    color: #a0aec0;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.copyright {
    color: #718096;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    width: 100%;
}

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

@media (max-width: 768px) {
    .hero-title { font-size: 2.8rem; }
    .header-container { flex-direction: column; gap: 1rem; }
}
