/* Root Variables */
@import url(root-variables.css);

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    width: 100%;
    font-family: var(--body-font);
    line-height: 1.6;
    color: #333;
    background-color: var(--body-color);
    letter-spacing: 0.01em;
}

html {
    scroll-behavior: smooth;
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 570px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hero-gradient);
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

.background-grid {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background-image:
        linear-gradient(rgba(129, 133, 135, 0.342) 1px, transparent 1px),
        linear-gradient(90deg, rgba(129, 133, 135, 0.342) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridShift 20s linear infinite;
    pointer-events: none;
}

@keyframes gridShift {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(25px, 0);
    }

    50% {
        transform: translate(50px, 25px);
    }

    75% {
        transform: translate(25px, 50px);
    }

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

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ffffff;
    border-radius: 50%;
    animation: float 4s ease-in-out infinite;
    opacity: 0.7;
}

.particle:nth-child(1) {
    top: 5%;
    left: 5%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 5%;
    left: 50%;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    top: 5%;
    right: 5%;
    animation-delay: 2s;
}

.particle:nth-child(4) {
    top: 25%;
    left: 15%;
    animation-delay: 3s;
}

.particle:nth-child(5) {
    top: 25%;
    left: 50%;
    width: 4px;
    height: 4px;
    animation-delay: 0.5s;
    animation-name: float-alt;
    animation-duration: 6s;
}

.particle:nth-child(6) {
    top: 25%;
    right: 15%;
    width: 2px;
    height: 2px;
    animation-delay: 1.5s;
}

.particle:nth-child(7) {
    top: 50%;
    left: 5%;
    width: 5px;
    height: 5px;
    animation-delay: 2.5s;
}

.particle:nth-child(8) {
    top: 50%;
    left: 30%;
    animation-delay: 3.5s;
    animation-name: float-alt;
    animation-duration: 7s;
}

.particle:nth-child(9) {
    top: 50%;
    right: 30%;
    width: 4px;
    height: 4px;
    animation-delay: 0.7s;
    animation-duration: 6s;
}

.particle:nth-child(10) {
    top: 50%;
    right: 5%;
    width: 2px;
    height: 2px;
    animation-delay: 1.7s;
    animation-duration: 7s;
}

.particle:nth-child(11) {
    top: 75%;
    left: 15%;
    width: 3px;
    height: 3px;
    animation-delay: 2.7s;
    animation-duration: 5s;
    animation-name: float-alt;
}

.particle:nth-child(12) {
    top: 75%;
    left: 50%;
    width: 4px;
    height: 4px;
    animation-delay: 3.7s;
    animation-duration: 8s;
}

.particle:nth-child(13) {
    top: 75%;
    right: 15%;
    width: 3px;
    height: 3px;
    animation-delay: 0.3s;
    animation-duration: 6.5s;
}

.particle:nth-child(14) {
    bottom: 5%;
    left: 25%;
    width: 2px;
    height: 2px;
    animation-delay: 1.3s;
    animation-duration: 5.5s;
    animation-name: float-alt;
}

.particle:nth-child(15) {
    bottom: 5%;
    right: 25%;
    width: 4px;
    height: 4px;
    animation-delay: 2.3s;
    animation-duration: 7.5s;
}

.vtu-logo-bg {
    width: 300px;
    background-image: url('../images/VTU-Logo.webp');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.15;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    animation: pulse 8s ease-in-out infinite alternate;
    position: absolute;
    top: 30%;
    left: 30%;
    transform: translate(-50%, -50%);
    height: 230px;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 1;
    padding: 2rem;
    max-width: 700px;
    animation: fadeIn 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease-out;
    color: #fff;
    max-width: 90%;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.3s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.5;
    letter-spacing: 0.01em;
    word-spacing: 0.05em;
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    animation: fadeInUp 1s ease-out 0.9s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

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

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

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

@keyframes float-alt {

    0%,
    100% {
        transform: translate(0px, 0px) rotate(0deg);
        opacity: 0.7;
    }

    33% {
        transform: translate(15px, -10px) rotate(120deg);
        opacity: 0.9;
    }

    66% {
        transform: translate(-15px, -20px) rotate(240deg);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        min-height: 500px;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
    }

    .hero-background {
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
    }

    .hero-content {
        padding: 1.5rem;
        max-width: 600px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
    }

    .vtu-logo-bg {
        width: 300px;
        height: 230px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 450px;
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
    }

    .hero-background {
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .vtu-logo-bg {
        width: 220px;
        height: 170px;
        /* Position is handled by the main class now */
    }

    .hero-background::before {
        opacity: 0.4;
    }

    .filter-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        min-width: 80px;
    }

    .semester-filter {
        padding: 0.5rem;
        margin: 1rem 0;
        gap: 0.5rem;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) transparent;
    }

    .semester-filter::-webkit-scrollbar {
        height: 4px;
    }
}

/* Semester Filter */
.semester-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin: 2rem 0;
    padding: 0.5rem;
    background-color: white;
    border-radius: 3px;
    box-shadow: var(--shadow);
    position: relative;
}

.filter-btn {
    background: #f1f5f9;
    color: var(--dark-color);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover {
    background-color: #e2e8f0;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--gradient);
    color: white;
}

.filter-btn:active {
    transform: translateY(1px);
}

/* Semester Section */
.semester-section {
    margin-bottom: 2rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.semester-section h2 {
    color: var(--dark-color);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: var(--heading-letter-spacing);
    font-family: var(--heading-font);
    line-height: var(--heading-line-height);
}

.subjects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Subject Cards */
.subject-card {
    background: white;
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.142);
    opacity: 0;
    transform: translateY(20px);
    width: 100%;
    box-sizing: border-box;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.228);
}

.subject-header {
    background: var(--gradient);
    color: white;
    padding: 1rem;
    position: relative;
}

.subject-header h3 {
    margin-bottom: 0.3rem;
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: var(--heading-letter-spacing);
    font-family: var(--heading-font);
    line-height: var(--heading-line-height);
}

.subject-code {
    font-size: 0.8rem;
    opacity: 0.8;
    background-color: rgba(255, 255, 255, 0.11);
    padding: 2px 8px;
    border-radius: 12px;
    font-family: var(--body-font);
    font-weight: 500;
    letter-spacing: 0.05em;
}

.subject-content {
    padding: 1.2rem;
}

.materials {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    box-sizing: border-box;
}

.material-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--dark-color);
    text-decoration: none;
    padding: 0.8rem;
    border-radius: 8px;
    transition: var(--transition);
    background-color: var(--light-color);
    font-weight: 500;
    letter-spacing: 0.02em;
    font-family: var(--body-font);
    word-break: break-word;
    overflow-wrap: break-word;
}

.material-link:hover {
    background-color: #f0f3f8;
    transform: translateX(5px);
}

.material-link i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Contact and Contribution Section */
.contact-section {
    margin: 3rem 0 5rem;
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(245, 247, 250, 0), #f5f7fa);
    z-index: -1;
}

.contact-section h2 {
    color: var(--primary-color);
    padding-bottom: 0.8rem;
    border-bottom: none;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
    font-size: 2.2rem;
    position: relative;
    letter-spacing: 0.02em;
}

.contact-section h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 10px;
}

.contact-section>p {
    margin-bottom: 2.5rem;
    max-width: 800px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.15rem;
    color: #555;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

.upload-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    background-color: white;
    padding: 2.5rem;
    border-radius: var(--card-border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.upload-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient);
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

/* Form Focus Effects */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    opacity: 0;
}

.form-group:focus-within::after {
    display: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background-color: white;
    transform: translateY(-2px);
}

.form-group label {
    display: block;
    margin-bottom: 0.7rem;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.form-group label::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.form-group:focus-within label {
    color: var(--primary-color);
    transform: translateX(3px);
}

.form-group:focus-within label::after {
    display: none;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8fafc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) inset;
}

.form-group input:hover,
.form-group select:hover {
    border-color: #cbd5e1;
}

.file-upload {
    position: relative;
    margin-bottom: 1.5rem;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

.upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    color: var(--dark-color);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px dashed #cbd5e1;
    width: 100%;
}

.upload-btn i {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.upload-btn:hover {
    background: linear-gradient(to right, #f1f5f9, #e2e8f0);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.upload-btn:hover i {
    transform: translateY(-3px);
}

#fileNameDisplay {
    display: block;
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: #64748b;
    padding-left: 0.5rem;
    font-weight: 500;
}

.share-options {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    text-decoration: none;
    flex: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.email-btn {
    background: linear-gradient(to right, var(--email-color), #f06b59);
}

.whatsapp-btn {
    background: linear-gradient(to right, var(--whatsapp-color), #128C7E);
}

.share-btn:hover {
    opacity: 0.95;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.share-btn:active {
    transform: translateY(-1px);
}

.contact-info {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    padding: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(67, 97, 238, 0.1);
    width: 100%;
    max-width: 100%;
}

.contact-info::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at bottom right, rgba(67, 97, 238, 0.1), transparent 70%);
    border-radius: 0 0 var(--card-border-radius) 0;
    z-index: 0;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-weight: 700;
    font-size: 1.5rem;
    position: relative;
    display: inline-block;
}

.contact-info h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 10px;
}

.contact-info>p {
    color: #64748b;
    font-size: 1.05rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
    transition: all 0.3s ease;
    padding: 0.7rem;
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.contact-method:hover {
    background-color: rgba(255, 255, 255, 0.7);
    transform: translateX(5px);
}

.contact-method i {
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    background: var(--gradient);
    border-radius: 8px;
    margin-right: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.25);
    flex-shrink: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

.contact-method:hover i {
    transform: rotate(10deg);
    box-shadow: 0 6px 12px rgba(67, 97, 238, 0.35);
}

.contact-method span {
    font-weight: 500;
    color: #334155;
    font-size: 1.05rem;
}

.contact-note {
    background: linear-gradient(to right, #f8f9fa, #f1f5f9);
    padding: 1.2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    border-left: 4px solid var(--primary-color);
    position: relative;
    z-index: 1;
    margin-top: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

/* Submit Button */
.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    width: 100%;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn i {
    font-size: 1.1rem;
}

/* Thank You Message */
.thank-you-message {
    background: linear-gradient(145deg, #e9f7ef, #d1f2e4);
    border: none;
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    margin: 1.5rem auto;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    display: none;
    position: relative;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.thank-you-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, #4ade80, #22c55e);
    border-radius: 5px 5px 0 0;
}

.thank-you-message i {
    font-size: 4rem;
    color: #16a34a;
    margin-bottom: 1.5rem;
    display: block;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.thank-you-message h3 {
    color: #166534;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.8rem;
}

.thank-you-message p {
    color: #166534;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.thank-you-message p:last-child {
    font-weight: 600;
    opacity: 0.9;
}

.thank-you-message.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
    animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Upload Illustration */
.upload-illustration {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 2rem auto 3rem;
    max-width: 500px;
    width: 100%;
    position: relative;
}

.upload-illustration::after {
    content: '';
    position: absolute;
    bottom: -20px;
    width: 80%;
    height: 15px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.1), transparent 80%);
    border-radius: 50%;
    filter: blur(5px);
}

.upload-vector {
    max-width: 100%;
    min-width: 300px;
    height: auto;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

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

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

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(67, 97, 238, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0);
    }
}



/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top i {
    font-size: 1.5rem;
}



@media (max-width: 768px) {

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }

    .back-to-top i {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    /* No specific styles for this breakpoint */
}

@media (max-width: 480px) {
    /* No specific styles for this breakpoint */
}

@media (max-width: 360px) {
    .testimonials-container {
        min-height: 520px;
    }

    .testimonial-slide {
        padding: 1.2rem 0.6rem;
    }

}

/* PDF Modal Styles */
.pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.pdf-modal.show {
    opacity: 1;
    visibility: visible;
}

.pdf-modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 800px;
    width: 98%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.pdf-modal.show .pdf-modal-content {
    transform: scale(1);
}

.pdf-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--gradient);
    color: white;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.pdf-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    padding-right: 30px;
}

.pdf-modal-header p {
    margin: 5px 0 0;
    font-size: 1rem;
    opacity: 0.9;
}

.pdf-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 38px;
    font-weight: 700;
    color: #e74444;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    z-index: 5;
}

.pdf-close-btn:hover {
    color: #ffffffcd;
}

.pdf-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 100px);
}

.pdf-list {
    position: relative;
}

.pdf-files-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pdf-file-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pdf-file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    background-color: #f1f5f9;
}

.pdf-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.pdf-file-info i {
    color: #e74c3c;
    font-size: 1.6rem;
    flex-shrink: 0;
}

/* Add specific styling for image file icons */
.pdf-file-info i.fa-file-image {
    color: #4361ee;
    /* Blue color matching the site's primary color */
}

.pdf-file-name {
    font-weight: 500;
    font-size: 0.95rem;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.pdf-file-actions {
    display: flex;
    gap: 8px;
}

.pdf-view-btn,
.pdf-download-btn {
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    justify-content: center;
}

.pdf-view-btn {
    background-color: #2563eb;
    color: white;
}

.pdf-view-btn:hover {
    background-color: #1d4ed8;
}

.pdf-download-btn {
    background-color: #22c55e;
    color: white;
}

.pdf-download-btn:hover {
    background-color: #16a34a;
}

.pdf-download-btn i {
    margin-right: 4px;
}

.pdf-message {
    margin-top: 15px;
    padding: 12px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    border-radius: 6px;
    text-align: center;
}

.no-files-message {
    padding: 30px;
    text-align: center;
    color: #6c757d;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.no-files-message i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 15px;
}

.no-files-message p {
    margin: 5px 0;
}

.no-files-message p:first-of-type {
    font-weight: 500;
    font-size: 1.1rem;
}

.contribute-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    margin-top: 1.2rem;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contribute-btn i {
    margin-right: 6px;
    font-size: 0.9rem;
    color: white;
}

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

.loading-text {
    padding: 30px;
    text-align: center;
    color: #6c757d;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-text i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .subjects-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .welcome-banner h2 {
        font-size: 1.8rem;
    }

    .welcome-banner p {
        font-size: 1rem;
    }

    .upload-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1.5rem;
    }

    /* Header styles moved to menu.css */

    .submit-btn {
        padding: 0.8rem 1.5rem;
    }

    .upload-vector {
        max-width: 500px;
    }

    .upload-illustration {
        width: 100%;
        margin: 1.5rem auto;
    }

    .pdf-modal-content {
        width: 98%;
        max-height: 80vh;
        box-sizing: border-box;
    }

    .pdf-file-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }

    .pdf-file-actions {
        width: auto;
        display: flex;
        justify-content: flex-end;
        box-sizing: border-box;
        max-width: 100%;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .contact-section>p {
        padding: 0 1rem;
    }

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

    .contact-info {
        text-align: left;
        box-shadow: none;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .contact-info h3 {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .container {
        width: 98%;
        padding: 0 3px;
    }

    /* Header styles moved to menu.css */

    .welcome-banner {
        padding: 0.8rem;
        margin: 0.5rem 0;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .welcome-banner h2 {
        font-size: 1.5rem;
    }

    .welcome-banner p {
        font-size: 0.9rem;
    }

    .semester-section h2 {
        font-size: 1.3rem;
    }

    .semester-filter {
        padding: 0.7rem 0.5rem;
        gap: 0.5rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin: 1.5rem 0;
        border-radius: 12px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
        position: relative;
        background-image: linear-gradient(to right, transparent 80%, rgba(255, 255, 255, 0.8) 100%);
        background-size: 120% 100%;
        background-position: 0 0;
        background-repeat: no-repeat;
    }

    .semester-filter::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .filter-btn {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
        flex: 0 0 auto;
        white-space: nowrap;
        margin: 0.2rem;
        min-width: 70px;
    }

    .filter-btn.active {
        box-shadow: 0 3px 8px rgba(67, 97, 238, 0.25);
        transform: translateY(-2px);
    }

    .subjects-container {
        gap: 0.8rem;
    }

    .subject-header h3 {
        font-size: 1rem;
    }

    .subject-content {
        padding: 0.8rem;
        width: 100%;
        box-sizing: border-box;
    }

    .material-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
        line-height: 1.4;
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }

    .contact-section h2 {
        font-size: 2rem;
        font-weight: 700;
        padding: 3.2rem 0.5rem 0.7rem 0.5rem;
        margin: 0 auto 0.5rem auto;
        text-align: center;
        line-height: 1.2;
        letter-spacing: 0.01em;
    }

    .contact-section>p {
        padding: 0 1rem;
        font-size: 0.95rem;
        text-align: center;
    }

    .upload-form,
    .contact-info {
        padding: 1.5rem 1rem;
        width: 100%;
    }

    .upload-form {
        margin-bottom: 1rem;
    }

    .upload-container {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .share-options {
        flex-direction: column;
        gap: 0.8rem;
    }

    .upload-vector {
        max-width: 100%;
    }

    .upload-illustration {
        width: 550px;
        margin: 1rem auto 0.5rem;
    }

    .form-group {
        margin-bottom: 1.2rem;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .form-group input,
    .form-group select,
    .upload-btn {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .submit-btn {
        width: 100%;
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }

    .contact-info {
        text-align: left;
    }

    .contact-info h3 {
        text-align: left;
        margin-top: 0;
    }

    .contact-method i {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .contact-method {
        gap: 0.6rem;
        margin-bottom: 0.8rem;
    }

    .contact-method span {
        font-size: 0.95rem;
    }

    .pdf-file-item {
        padding: 8px;
        gap: 0.3rem;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }

    .pdf-file-name {
        font-size: 0.8rem;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: break-word;
        line-height: 1.3;
        max-width: 100%;
    }

    .pdf-file-actions {
        display: flex;
        flex-direction: row;
        width: 100%;
        margin-top: 0.5rem;
        gap: 0.5rem;
    }

    .pdf-download-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        flex: 1;
    }

    .pdf-view-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        flex: 1;
        margin-right: 0;
    }

    .pdf-modal-header h3 {
        font-size: 1.2rem;
    }

    .pdf-modal-header p {
        font-size: 0.9rem;
    }

    .thank-you-message {
        padding: 1.5rem;
        margin: 1.5rem 0.5rem;
    }

    .thank-you-message i {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .thank-you-message h3 {
        font-size: 1.4rem;
    }

    .contact-section h2 {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .contact-section>p {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 360px) {
    /* Header styles moved to menu.css */

    .welcome-banner h2 {
        font-size: 1.1rem;
    }

    .welcome-banner p {
        font-size: 0.75rem;
    }

    .filter-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
        margin: 0.25rem;
        min-width: 80px;
        border-radius: 10px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .filter-btn.active {
        box-shadow: 0 3px 8px rgba(67, 97, 238, 0.25);
    }

    .contact-section h2 {
        font-size: 1.3rem;
    }

    .contact-section>p {
        font-size: 0.85rem;
    }

    .upload-container {
        padding: 1.2rem 0.8rem;
        border-radius: 10px;
        width: 100%;
        margin: 0;
    }

    .upload-form,
    .contact-info {
        padding: 1.2rem 0.8rem;
    }

    .contact-info {
        margin-top: 1rem;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group select,
    .upload-btn {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .contact-info h3 {
        font-size: 1.3rem;
    }

    .contact-method i {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .contact-method span {
        font-size: 0.9rem;
    }

    .contact-note {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .upload-vector {
        max-width: 280px;
    }

    .upload-illustration {
        margin: 0.5rem auto 1.5rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .contact-method {
        gap: 0.6rem;
        margin-bottom: 0.8rem;
    }

    .pdf-file-item {
        padding: 6px;
        gap: 0.3rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }

    .pdf-file-name {
        font-size: 0.75rem;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: break-word;
        line-height: 1.3;
        max-width: calc(100% - 80px);
    }

    .pdf-file-actions {
        display: flex;
        flex-direction: row;
        width: auto;
        margin-top: 0;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .pdf-download-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        flex: 1;
    }

    .pdf-view-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        flex: 1;
        margin-right: 0;
    }

    .pdf-file-info i {
        font-size: 1.3rem;
    }

    .pdf-file-info i.fa-file-image {
        color: #4361ee;
    }

    .semester-filter {
        padding: 0.8rem 0.6rem;
        gap: 0.6rem;
        margin: 1.2rem 0;
        border-radius: 15px;
    }

    .material-link {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
        line-height: 1.3;
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }
}

/* File Upload Animation */
.file-upload .upload-btn {
    position: relative;
    overflow: hidden;
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.file-upload .upload-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: rgba(67, 97, 238, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.file-upload:focus-within .upload-btn::after {
    animation: ripple 1s ease-out;
}

/* Style for form select elements to remove unwanted borders */
.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%233f37c9' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 20px auto;
    padding-right: 35px;
}

/* Button styles for mobile */
@media (max-width: 480px) {
    .btn-about {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
        min-width: 190px;
    }
}

/* Testimonials Section */
.testimonials-section {
    margin: 3rem 0;
    padding: 1rem 0;
}

.testimonials-section .section-title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 10px;
}

.testimonials-section .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

.testimonials-container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background: var(--testimonials-gradient);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    padding-bottom: 40px;
    /* Space for indicators */
}

.testimonials-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.testimonials-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    width: 0%;
    z-index: 10;
    transition: width 0.1s linear;
}

.testimonials-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
    width: 100%;
    height: 100%;
}

.testimonial-slide {
    flex: 0 0 100%;
    min-width: 100%;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0.7;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
    position: relative;
    height: 100%;
    justify-content: center;
}

.testimonial-slide.active {
    opacity: 1;
    transform: scale(1);
}

.testimonial-slide.slide-in {
    animation: slideIn 0.6s ease forwards;
}

@keyframes slideIn {
    0% {
        opacity: 0.7;
        transform: scale(0.95) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.testimonial-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.testimonial-slide.active .testimonial-image {
    transform: scale(1.05);
}

.testimonial-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--light-color);
    position: relative;
}

.testimonial-name::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.testimonial-info {
    font-size: 0.9rem;
    color: var(--light-color);
    margin: 15px 0;
    font-weight: 500;
}

.testimonial-quote-icon {
    font-size: 2.5rem;
    color: #c7cfdb84;
    margin-bottom: 10px;
    line-height: 1;
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--light-color);
    max-width: 95%;
    margin: 0 auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.testimonials-button {
    position: absolute;
    top: 40%;
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.testimonials-button:hover,
.testimonials-button:focus {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.testimonials-button.prev-button {
    left: 10px;
}

.testimonials-button.next-button {
    right: 10px;
}

.testimonials-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    width: auto;
    justify-content: center;
    padding: 0 10px;
}

.testimonial-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.637);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.testimonial-indicator:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

.testimonial-indicator.active {
    background-color: var(--light-color);
    transform: scale(1.2);
}

/* Responsive styles for testimonials */
@media (max-width: 768px) {
    .testimonials-container {
        min-height: 450px;
        max-width: 90%;
    }

    .testimonial-text {
        font-size: 0.95rem;
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .testimonial-slide {
        padding: 1.8rem 1rem;
    }
}

@media (max-width: 480px) {
    .testimonials-container {
        min-height: 500px;
        max-width: 95%;
    }

    .testimonial-text {
        font-size: 0.9rem;
    }

    .testimonials-button {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .testimonial-slide {
        padding: 1.5rem 0.8rem;
    }
}

/* Testimonial Action Button */
.testimonial-action {
    text-align: center;
    margin: 2rem auto 1rem;
}

.feedback-action-btn {
    background: var(--gradient);
    color: var(--light-color);
    padding: 0.9rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.feedback-action-btn i {
    font-size: 0.9rem;
}

.feedback-action-btn:hover {
    color: var(--light-color);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .testimonial-action {
        margin-top: 1.5rem;
    }

    .feedback-action-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .testimonial-action {
        margin-top: 1.2rem;
    }

    .feedback-action-btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top i {
    font-size: 1.5rem;
}

/* Contact Info Styles */
.contact-info {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    padding: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(67, 97, 238, 0.1);
    width: 100%;
    height: fit-content;
    max-width: 100%;
}

.contact-header {
    background: var(--gradient);
    padding: 1.5rem;
    color: white;
    width: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    text-align: center;
}

.contact-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), transparent),
        radial-gradient(circle at bottom right, rgba(58, 12, 163, 0.3), transparent 70%),
        radial-gradient(circle at top left, rgba(67, 97, 238, 0.2), transparent 70%);
    opacity: 1;
    z-index: 0;
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
    z-index: 1;
    position: relative;
    display: inline-block;
}

.contact-info h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.contact-info>p {
    text-align: center;
    color: #555;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    padding: 0 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1.2rem auto;
    padding: 0 1.5rem 0.8rem;
    width: 90%;
    max-width: 500px;
}

.contact-method {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background-color: rgba(67, 97, 238, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.contact-method:hover {
    background-color: rgba(67, 97, 238, 0.1);
    transform: translateX(5px);
    border-left: 3px solid var(--primary-color);
}

.contact-method i {
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    background: var(--gradient);
    border-radius: 8px;
    margin-right: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.25);
    flex-shrink: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

.contact-method:hover i {
    transform: rotate(10deg);
    box-shadow: 0 6px 12px rgba(67, 97, 238, 0.35);
}

.contact-method span {
    font-weight: 500;
    color: #444;
    font-size: 0.95rem;
    max-width: calc(100% - 60px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-note {
    margin: 1.5rem auto;
    padding: 1rem;
    background-color: rgba(67, 97, 238, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    width: 90%;
    max-width: 500px;
}

.contact-note p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
}

/* Responsive styles for contact section */
@media (max-width: 768px) {
    .contact-info {
        width: 100%;
        margin-top: 1rem;
    }

    .contact-header {
        padding: 1.2rem 1rem;
    }

    .contact-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .contact-header h3 {
        font-size: 1.5rem;
    }

    .contact-info>p {
        padding: 0 1rem;
        margin-bottom: 1rem;
    }

    .contact-methods {
        margin: 1rem;
        gap: 0.8rem;
        width: auto;
        padding: 0 1rem 0.8rem;
    }

    .contact-method {
        width: 100%;
        justify-content: flex-start;
        padding: 0.7rem 1rem;
    }

    .contact-method i {
        min-width: 36px;
        min-height: 36px;
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-right: 0.8rem;
    }

    .contact-method span {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .contact-methods {
        margin: 0.8rem;
        gap: 0.8rem;
    }

    .contact-method {
        width: 100%;
        justify-content: flex-start;
        padding: 0.6rem 0.8rem;
    }

    .contact-method i {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        font-size: 1rem;
        margin-right: 0.8rem;
    }

    .contact-method span {
        font-size: 0.85rem;
        max-width: calc(100% - 50px);
    }
}

/* Contribution Section Mobile Responsive Styles */
@media (max-width: 768px) {
    .contact-section {
        text-align: center;
        margin: 2rem 0 3rem;
        padding: 0;
    }

    .upload-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 1.5rem;
        width: 100%;
        margin: 0 auto;
    }

    .upload-form {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .form-group {
        margin-bottom: 1rem;
        width: 100%;
    }

    .form-group label {
        text-align: left;
        display: block;
        width: 100%;
    }

    .form-group input,
    .form-group select {
        width: 100%;
        max-width: 100%;
    }

    .share-options {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }

    .upload-btn {
        margin: 0 auto;
        width: 100%;
    }

    .upload-illustration {
        max-width: 200px;
        margin: 0 auto 1.5rem;
    }

    .submit-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .upload-container {
        padding: 1rem;
        border-radius: 8px;
    }

    .upload-form {
        padding: 1rem;
    }

    .form-group input,
    .form-group select,
    .upload-btn {
        font-size: 0.9rem;
        padding: 0.7rem;
    }

    .upload-vector {
        max-width: 180px;
    }
}

/* Contact Admin Header Styles */
.contact-header h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Remove the underline from Contact Admin heading */
.contact-header h3::after {
    display: none;
}

@media (max-width: 768px) {
    .contact-header h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .contact-header h3 {
        font-size: 1.3rem;
        margin-bottom: 0.3rem;
    }
}

/* Fix for rotating icons in contact admin section */
.contact-info .contact-method i {
    /* Improved hardware acceleration and rendering */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
    /* Better transitions to prevent opacity flicker */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.3s ease,
        background-color 0.3s ease,
        color 0.3s ease;
}

.contact-info .contact-method:hover i {
    /* Smooth rotation with cubic bezier easing */
    transform: rotate(10deg);
}

/* Main Subjects Container Styles */
.main-subjects-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.main-subjects-container a {
    flex: 1;
    padding: 13px 15px;
    text-align: center;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.main-subjects-container a.btn-maths {
    background: linear-gradient(135deg, #f08469 0%, #c64b1b 100%);
}

.main-subjects-container a.btn-phy {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.main-subjects-container a.btn-chem {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.main-subjects-container a:hover,
.main-subjects-container a:focus {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.main-subjects-container i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* For small mobile screens between 310px and 400px */
@media (max-width: 400px) and (min-width: 310px) {
    .container {
        width: 96%;
        padding: 0 5px;
    }
}

/* Specific fix for very narrow screens under 320px */
@media (max-width: 320px) {
    .container {
        width: 98%;
        padding: 0 2px;
    }
}

/* Enhanced Desktop Optimizations for Home Page */
@media (min-width: 1200px) {

    /* Improve container width for better desktop experience */
    .container {
        max-width: 1400px;
        width: 90%;
        padding: 0 1.5rem;
    }

    /* Enhanced hero section */
    .hero-section {
        min-height: 600px;
        border-bottom-left-radius: 40px;
        border-bottom-right-radius: 40px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }

    .hero-background {
        border-bottom-left-radius: 40px;
        border-bottom-right-radius: 40px;
    }

    .hero-content {
        max-width: 800px;
        padding: 2.5rem;
    }

    .hero-title {
        font-size: 3.8rem;
        margin-bottom: 1.5rem;
        text-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

    .hero-subtitle {
        font-size: 1.7rem;
        margin-bottom: 2rem;
    }

    .hero-cta {
        gap: 2rem;
    }

    .btn {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }

    .vtu-logo-bg {
        width: 350px;
        height: 270px;
    }

    /* Enhanced semester sections */
    .semester-section {
        margin-bottom: 3.5rem;
        padding: 0.5rem;
        position: relative;
    }

    .semester-section h2 {
        font-size: 1.8rem;
        padding-bottom: 0.8rem;
        margin-bottom: 2rem;
        letter-spacing: 0.02em;
    }

    /* Enhanced subject cards layout */
    .subjects-container {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.8rem;
        margin: 2rem 0;
    }

    .subject-card {
        transition: all 0.35s ease;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

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

    .subject-header {
        padding: 1.2rem 1.5rem;
    }

    .subject-header h3 {
        font-size: 1.25rem;
        margin-bottom: 0.4rem;
    }

    .subject-code {
        font-size: 0.85rem;
        padding: 3px 10px;
    }

    .subject-content {
        padding: 1.5rem;
    }

    .material-link {
        padding: 1rem 1.2rem;
        font-size: 1.05rem;
        transition: all 0.3s ease;
    }

    .material-link:hover {
        transform: translateX(8px);
    }

    .material-link i {
        font-size: 1.2rem;
    }

    /* Enhanced welcome banner */
    .welcome-banner {
        padding: 2.5rem;
        margin: 2rem 0;
        border-radius: 15px;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    }

    .welcome-banner h2 {
        font-size: 2.4rem;
    }

    .welcome-banner p {
        font-size: 1.2rem;
        max-width: 900px;
        margin-top: 1.8rem;
    }

    .btn-about {
        padding: 1rem 3.5rem;
        font-size: 1.2rem;
        border-radius: 6px;
    }

    /* Enhanced semester filter */
    .semester-filter {
        padding: 1rem 1.5rem;
        gap: 1rem;
        margin: 2.5rem 0;
        border-radius: 15px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    }

    .filter-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        border-radius: 10px;
    }

    /* Enhanced testimonials section */
    .testimonials-section {
        margin: 4rem 0;
        padding: 2rem 0;
    }

    .testimonials-section .section-title {
        font-size: 2.2rem;
        margin-bottom: 2.5rem;
    }

    .testimonials-container {
        max-width: 850px;
        min-height: 450px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
        padding-bottom: 50px;
    }

    .testimonial-slide {
        padding: 3rem 2.5rem;
    }

    .testimonial-image {
        width: 100px;
        height: 100px;
        border-width: 5px;
        margin-bottom: 1.2rem;
    }

    .testimonial-name {
        font-size: 1.4rem;
    }

    .testimonial-info {
        font-size: 1rem;
        margin: 1.2rem 0;
    }

    .testimonial-quote-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .testimonial-text {
        font-size: 1.15rem;
        max-width: 90%;
        line-height: 1.7;
        overflow-wrap: break-word;
        word-wrap: break-word;
        margin: 0 auto;
    }

    .testimonials-button {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }

    .testimonial-action {
        margin: 3rem auto 2rem;
    }

    .feedback-action-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    /* Enhanced contribution section */
    .contact-section {
        margin: 4rem 0 6rem;
    }

    .upload-container {
        gap: 3.5rem;
        padding: 3.5rem;
        max-width: 1400px;
        margin: 3.5rem auto;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    }

    .upload-illustration {
        margin: 2.5rem auto 3.5rem;
        max-width: 450px;
    }

    .upload-vector {
        max-width: 100%;
    }

    .contact-section h2 {
        font-size: 2.4rem;
        margin-bottom: 2rem;
    }

    .contact-section>p {
        font-size: 1.2rem;
        max-width: 900px;
        margin-bottom: 3rem;
    }

    .form-group label {
        font-size: 1.05rem;
        margin-bottom: 0.8rem;
    }

    .form-group input,
    .form-group select {
        padding: 1rem 1.2rem;
        font-size: 1.05rem;
    }

    .upload-btn {
        padding: 1.2rem 1.5rem;
        font-size: 1.05rem;
    }

    .submit-btn {
        padding: 1.2rem 2.5rem;
        font-size: 1.1rem;
    }

    .contact-header {
        padding: 2rem;
    }

    .contact-icon {
        font-size: 3rem;
    }

    .contact-info h3 {
        font-size: 2rem;
    }

    .contact-info>p {
        font-size: 1.1rem;
    }

    .contact-method {
        padding: 1rem 1.5rem;
    }

    .contact-method i {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .contact-method span {
        font-size: 1.05rem;
    }
}

/* Extra large desktop enhancements */
@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }

    .subjects-container {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }

    .welcome-banner {
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
    }

    .testimonials-container {
        max-width: 900px;
    }

    .upload-container {
        max-width: 1600px;
    }

    .hero-section {
        max-height: 700px;
    }

    .hero-content {
        max-width: 850px;
    }
}

/* Mobile styles for testimonials */
@media (max-width: 768px) {
    .testimonials-container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 10px;
        min-height: 380px;
    }

    .testimonial-text {
        font-size: 0.95rem;
        line-height: 1.5;
        padding: 0 15px;
    }

    .testimonial-slide {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .testimonials-container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 10px;
        min-height: 350px;
    }

    .testimonial-text {
        font-size: 0.9rem;
        padding: 0 10px;
    }

    .testimonials-button {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .testimonial-slide {
        padding: 1.2rem 0.8rem;
    }
}

/* PDF Viewer Modal Styles */
.pdf-viewer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pdf-viewer-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.pdf-viewer-content {
    background-color: white;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.pdf-viewer-modal.show .pdf-viewer-content {
    transform: translateY(0);
}

.pdf-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.pdf-viewer-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.pdf-viewer-close {
    font-size: 1.8rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
}

.pdf-viewer-close:hover {
    transform: scale(1.2);
}

.pdf-viewer-body {
    flex: 1;
    overflow: hidden;
    background-color: #f5f5f5;
    position: relative;
}

#pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* PDF loading indicator */
.pdf-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(245, 245, 245, 0.9);
    z-index: 5;
}

.pdf-loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.pdf-loading p {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

/* Responsive styles for PDF viewer */
@media (max-width: 768px) {
    .pdf-viewer-content {
        width: 95%;
        height: 85vh;
    }

    .pdf-viewer-header h3 {
        font-size: 1.1rem;
        max-width: 70%;
    }


}

@media (max-width: 480px) {
    .pdf-viewer-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .pdf-viewer-header {
        padding: 0.8rem 1rem;
        border-radius: 0;
    }

    .pdf-viewer-header h3 {
        font-size: 1rem;
        max-width: 65%;
    }

    .pdf-viewer-close {
        font-size: 1.5rem;
    }


}

@media (max-width: 360px) {
    .pdf-loading p {
        font-size: 0.85rem;
    }
}

.pdf-loading p {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

@media (max-width: 768px) {
    .pdf-loading-spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }

    .pdf-loading p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .pdf-loading-spinner {
        width: 35px;
        height: 35px;
        border-width: 3px;
    }

    .pdf-loading p {
        font-size: 0.85rem;
    }
}

/* Responsive styles for PDF viewer */
@media (max-width: 480px) {
    .pdf-file-item {
        padding: 10px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
        gap: 8px;
    }

    .pdf-file-info {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .pdf-file-name {
        font-size: 0.9rem;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: break-word;
        line-height: 1.3;
        max-width: calc(100% - 30px);
    }

    .pdf-file-actions {
        display: flex;
        flex-direction: row;
        margin-top: 5px;
        gap: 8px;
        width: 100%;
        justify-content: flex-start;
    }

    .pdf-view-btn,
    .pdf-download-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        flex: 0 0 auto;
    }
}

@media (max-width: 360px) {
    .pdf-file-item {
        padding: 8px;
        gap: 6px;
    }

    .pdf-file-name {
        font-size: 0.8rem;
        max-width: calc(100% - 25px);
    }

    .pdf-file-actions {
        gap: 6px;
    }

    .pdf-view-btn,
    .pdf-download-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .pdf-file-info i {
        font-size: 1.3rem;
        margin-right: 8px;
    }
}

/* Custom Alert Styles */
.custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-alert.show {
    opacity: 1;
    visibility: visible;
}

.custom-alert-content {
    background-color: white;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.custom-alert.show .custom-alert-content {
    transform: scale(1);
}

.custom-alert-header {
    padding: 15px;
    background: var(--gradient);
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-alert-header i {
    font-size: 1.5rem;
}

.custom-alert-header span {
    font-size: 1.2rem;
    font-weight: 600;
}

.custom-alert-body {
    padding: 20px;
}

.custom-alert-body p {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    line-height: 1.5;
}

.custom-alert-footer {
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #eee;
}

.custom-alert-button {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-alert-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive styles for custom alert */
@media (max-width: 768px) {
    .custom-alert-content {
        max-width: 90%;
    }

    .custom-alert-header i {
        font-size: 1.3rem;
    }

    .custom-alert-header span {
        font-size: 1.1rem;
    }

    .custom-alert-body p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .custom-alert-content {
        width: 95%;
    }

    .custom-alert-header {
        padding: 12px;
    }

    .custom-alert-body {
        padding: 15px;
    }

    .custom-alert-footer {
        padding: 12px;
    }
}

/* Search Bar Styles */
.search-container {
    width: 92%;
    max-width: 600px;
    margin: 6.5rem auto 3rem;
    position: relative;
}

.search-bar {
    display: flex;
    width: 100%;
}

.search-bar input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: var(--body-font);
}

.search-bar input:focus {
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.25);
}

.search-bar button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 0 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-bar button:hover {
    background: var(--secondary-color);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 450px;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.search-results.active {
    display: block;
}

.search-results {
    overflow-y: auto;
}

.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 8px 0;
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

@media (max-width: 480px) {
    .search-results::-webkit-scrollbar {
        width: 5px;
    }
}

.search-result-item {
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.search-result-item:hover {
    background: #f5f8ff;
    transform: translateX(3px);
}

.search-result-item:last-of-type {
    border-bottom: none;
}

.result-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    word-break: break-word;
}

.result-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .result-title {
        font-size: 0.95rem;
    }

    .result-code {
        font-size: 0.8rem;
    }
}

.result-code {
    font-size: 0.85rem;
    color: #666;
    margin-left: 14px;
    padding-left: 0;
}

.no-results {
    padding: 12px 16px;
    color: #666;
    font-style: italic;
    text-align: center;
}

.highlight {
    background-color: rgba(67, 97, 238, 0.15);
    color: var(--primary-color);
    font-weight: bold;
    border-radius: 2px;
    padding: 0 2px;
}

.search-result-semester {
    padding: 8px 16px;
    background: #f2f6ff;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e0e6f5;
    position: sticky;
    top: 0;
    z-index: 2;
}

@media (max-width: 768px) {
    .search-container {
        width: 98%;
        max-width: 500px;
        margin: 6rem auto 2.5rem;
    }
}

@media (max-width: 480px) {
    .search-container {
        width: 98%;
        max-width: 100%;
        margin: 6rem auto 2rem;
    }

    .search-bar input {
        font-size: 0.9rem;
        padding: 10px 14px;
    }

    .search-bar button {
        padding: 0 15px;
    }
}

/* Quiz Button */
.main-subjects-container a.btn-quiz {
    background: linear-gradient(135deg, #4cc9f0 0%, #4361ee 100%);
}

.main-subjects-container a.btn-planner {
    background: linear-gradient(135deg, #3a86ff 0%, #2563eb 100%);
}

/* Enhanced Mobile Responsiveness for Main Subjects Container */
@media (max-width: 768px) {
    .main-subjects-container {
        gap: 12px;
    }

    .main-subjects-container a {
        padding: 12px 10px;
        font-size: 0.95rem;
    }

    .main-subjects-container i {
        font-size: 1.2rem;
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .main-subjects-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .main-subjects-container a {
        padding: 10px 8px;
        font-size: 0.9rem;
        min-width: 0;
    }

    .main-subjects-container i {
        font-size: 1rem;
        margin-right: 6px;
    }
}

/* Feature Highlight */
.feature-highlight {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 255, 0.95) 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 3rem 0;
    box-shadow: 0 15px 30px rgba(67, 97, 238, 0.15);
    position: relative;
    overflow: hidden;
    border-left: none;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.feature-highlight:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(67, 97, 238, 0.2);
}

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

.feature-highlight::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.08) 0%, rgba(76, 201, 240, 0.08) 100%);
    border-radius: 50%;
    z-index: 0;
}

.highlight-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-highlight h2 {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    font-family: var(--heading-font);
    line-height: 1.3;
    letter-spacing: var(--heading-letter-spacing, 0.015em);
}

.feature-highlight h2 i {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.25);
    font-size: 1.2rem;
}

.feature-highlight p {
    margin-bottom: 1.8rem;
    max-width: 700px;
    line-height: 1.7;
    font-size: 1.1rem;
    color: #4b5563;
    font-family: var(--body-font);
}

.feature-highlight .btn-primary {
    background: #4361ee;
    color: #fff;
    border: none;
    padding: 0.7rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.feature-highlight .btn-primary:hover,
.feature-highlight .btn-primary:focus {
    background: #2743a6;
    color: #fff;
}

.feature-highlight .btn-primary i {
    font-size: 1.1rem;
}

.feature-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.feature-bullet {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 5px;
    font-family: var(--body-font);
    flex: 1;
    min-width: 170px;
}

.feature-bullet i {
    color: var(--primary-color);
    font-size: 0.9rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .feature-highlight {
        padding: 2rem;
    }

    .feature-highlight h2 {
        font-size: 1.6rem;
        gap: 0.6rem;
    }

    .feature-highlight h2 i {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .feature-highlight p {
        font-size: 1rem;
    }

    .feature-highlights {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .feature-bullet {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .feature-highlight {
        padding: 1.5rem;
        margin: 2rem 0;
        border-radius: 15px;
    }

    .feature-highlight h2 {
        font-size: 1.3rem;
        gap: 0.5rem;
        line-height: 1.3;
        align-items: flex-start;
        margin-bottom: 0.8rem;
    }

    .feature-highlight h2 i {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .feature-highlight p {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
        line-height: 1.5;
    }

    .feature-highlight .btn-primary {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        width: 100%;
    }

    .feature-highlights {
        flex-direction: column;
        gap: 6px;
        margin-bottom: 15px;
    }

    .feature-bullet {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .feature-bullet i {
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .feature-highlight {
        padding: 1.2rem;
        margin: 1.5rem 0;
    }

    .feature-highlight h2 {
        font-size: 1.2rem;
    }

    .feature-highlight p {
        font-size: 0.85rem;
    }
}


@media (min-width: 992px) {
    .contact-section {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        position: relative;
        padding: 0 8%;
        max-width: 1400px;
        margin: 0 auto;
    }

    .contact-section h2 {
        padding-top: 160px;
        text-align: left;
        margin-left: 0;
        max-width: 45%;
    }

    .contact-section>p {
        text-align: left;
        margin-left: 0;
        max-width: 45%;
    }

    .contact-section h2::after {
        left: 40px;
        transform: none;
    }

    .upload-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
        background-color: white;
        padding: 2.5rem;
        border-radius: var(--card-border-radius);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        position: relative;
        overflow: hidden;
        max-width: 90%;
        margin: 20px auto 0 auto;
        align-items: flex-start;
    }

    .upload-form {
        align-items: flex-start;
    }

    .contact-section .upload-illustration {
        position: absolute;
        top: 20px;
        right: 8%;
        max-width: 38%;
        margin: 0;
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
    }

    .upload-illustration img,
    .upload-vector {
        max-width: 100%;
        height: auto;
        display: block;
        margin-left: auto;
    }
}

@media (max-width: 991px) {

    .contact-section,
    .upload-container {
        display: block !important;
        padding: 0 1rem;
    }

    .contact-section h2,
    .contact-section>p {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }

    .upload-illustration {
        position: static !important;
        max-width: 100% !important;
        margin: 2rem auto 3rem auto !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .upload-illustration img,
    .upload-vector {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .contact-section h2 {
        font-size: 2rem;
        font-weight: 700;
        padding: 3.2rem 0.5rem 0.7rem 0.5rem;
        margin: 0 auto 0.5rem auto;
        text-align: center;
        line-height: 1.2;
        letter-spacing: 0.01em;
    }
}

/* Testimonial Action Button */