/**
 * Custom CSS for University Result Portal
 * Educational Purpose Only
 */

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* University Header */
.university-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Top Red Banner */
.top-red-banner {
    background-color: #dc3545;
    color: white;
    padding: 8px 0;
    font-size: 13px;
}

.top-red-banner a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    padding: 0 5px;
}

.top-red-banner a:hover {
    text-decoration: underline;
    color: #ffeb3b;
}

/* Main Navigation */
.main-navbar {
    background-color: #00695c !important;
}

/* Image Carousel/Slider */
#mainCarousel {
    width: 100%;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    background-color: #000;
}

#mainCarousel .carousel-inner {
    width: 100%;
    height: 500px; /* Fixed height for carousel */
    overflow: hidden;
}

#mainCarousel .carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Maintain aspect ratio while filling container */
    object-position: center;
}

#mainCarousel .carousel-item {
    transition: transform 1s ease-in-out; /* Smooth slide transition */
}

#mainCarousel .carousel-indicators {
    margin-bottom: 15px;
    z-index: 10;
}

#mainCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    border: 2px solid rgba(255,255,255,0.8);
    margin: 0 5px;
    opacity: 0.7;
    transition: all 0.3s;
}

#mainCarousel .carousel-indicators button.active {
    background-color: #fff;
    opacity: 1;
    transform: scale(1.2);
}

#mainCarousel .carousel-control-prev,
#mainCarousel .carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    opacity: 0.7;
    transition: all 0.3s;
    z-index: 10;
}

#mainCarousel .carousel-control-prev {
    left: 20px;
}

#mainCarousel .carousel-control-next {
    right: 20px;
}

#mainCarousel .carousel-control-prev:hover,
#mainCarousel .carousel-control-next:hover {
    background-color: rgba(0,0,0,0.8);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

#mainCarousel .carousel-control-prev-icon,
#mainCarousel .carousel-control-next-icon {
    width: 25px;
    height: 25px;
    filter: brightness(0) invert(1); /* White arrows */
}

/* Responsive carousel height */
@media (max-width: 768px) {
    #mainCarousel .carousel-inner {
        height: 300px;
    }
    
    #mainCarousel .carousel-control-prev,
    #mainCarousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    #mainCarousel .carousel-control-prev {
        left: 10px;
    }
    
    #mainCarousel .carousel-control-next {
        right: 10px;
    }
    
    #mainCarousel .carousel-indicators {
        margin-bottom: 10px;
    }
    
    #mainCarousel .carousel-indicators button {
        width: 10px;
        height: 10px;
        margin: 0 3px;
    }
}

@media (max-width: 576px) {
    #mainCarousel .carousel-inner {
        height: 250px;
    }
}

/* Announcements Section (PRSU Style) */
.announcements-section {
    padding: 40px 0;
    background-color: #f8f9fa;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

/* Announcement Cards */
.announcement-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.announcement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.announcement-image-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.announcement-card:hover .announcement-image {
    transform: scale(1.05);
}

.announcement-text {
    padding: 15px;
    text-align: center;
    color: #333;
    background: white;
}

.announcement-text strong {
    color: #1e3c72;
    font-size: 14px;
}

/* Leadership Cards */
.leadership-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.leadership-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.leadership-image-wrapper {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #1e3c72;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leadership-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.leadership-card:hover .leadership-image {
    transform: scale(1.05);
}

.leadership-info {
    color: #333;
}

.leadership-name {
    color: #1e3c72;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.leadership-title {
    color: #dc3545;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
}

/* Responsive for Announcements */
@media (max-width: 768px) {
    .announcement-image-wrapper {
        height: 150px;
    }
    
    .leadership-image-wrapper {
        width: 150px;
        height: 150px;
    }
    
    .section-title {
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .announcement-image-wrapper {
        height: 120px;
    }
    
    .leadership-image-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .leadership-name {
        font-size: 16px;
    }
    
    .leadership-title {
        font-size: 14px;
    }
}

/* Photo Gallery Section */
.photo-gallery-section {
    padding: 50px 0;
    background-color: #ffffff;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 60, 114, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
    transform: scale(0);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

.gallery-link {
    text-decoration: none;
    display: block;
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .gallery-image-wrapper {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .gallery-image-wrapper {
        height: 180px;
    }
}

/* Breadcrumb */
.breadcrumb-section {
    background-color: #f5f5f5;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.breadcrumb {
    margin-bottom: 0;
}

/* Examination Corner Title */
.examination-corner-title {
    text-align: center;
    color: #dc3545;
    font-size: 32px;
    font-weight: bold;
    margin: 20px 0;
}

/* Helpline Box */
.helpline-box {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.helpline-box a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.helpline-box a:hover {
    text-decoration: underline;
}

/* Section Buttons */
.section-button {
    background-color: #dc3545;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    margin: 10px 0;
    display: block;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s;
}

.section-button:hover {
    background-color: #c82333;
    color: white;
}

.section-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Section Links */
.section-link {
    color: #0066cc;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    margin-left: 20px;
    transition: color 0.3s;
}

.section-link:hover {
    text-decoration: underline;
    color: #004499;
}

/* New Badge */
.new-badge {
    background-color: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

/* NAAC Badge */
.naac-badge {
    background: #FFD700;
    color: #000;
    padding: 8px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.university-logo {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Result Cards */
.result-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 10px;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15) !important;
}

.result-icon {
    margin-bottom: 15px;
}

/* Captcha Box */
.captcha-box {
    border-radius: 5px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Styles */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Card Styles */
.card {
    border-radius: 10px;
    border: none;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}

/* Table Styles */
.table {
    border-radius: 5px;
    overflow: hidden;
}

.table thead th {
    background-color: #0d6efd;
    color: white;
    border: none;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Button Styles */
.btn {
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
}

/* Footer */
.footer-main {
    background-color: #2c3e50 !important;
    background-image: 
        repeating-linear-gradient(45deg, #2c3e50, #2c3e50 10px, rgba(0,0,0,0.2) 10px, rgba(0,0,0,0.2) 20px);
    color: #ecf0f1;
    padding: 40px 0 20px 0;
    margin-top: 50px;
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    min-height: 300px;
}

.footer-heading {
    color: #ffffff !important;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #e0e0e0 !important;
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    display: block;
    font-weight: 500;
}

.footer-links a:hover {
    color: #3498db;
    padding-left: 5px;
}

.footer-text {
    color: #e0e0e0 !important;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-text strong {
    color: #ffffff !important;
    font-weight: 600;
}

.footer-text a {
    color: #3498db;
    text-decoration: none;
}

.footer-text a:hover {
    text-decoration: underline;
}

.footer-divider {
    border-color: #34495e;
    border-width: 1px;
    margin: 20px 0;
    opacity: 0.5;
}

.footer-copyright {
    color: #d0d0d0 !important;
    font-size: 13px;
    font-weight: 500;
}

.visitor-counter {
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
}

.visitor-counter strong {
    color: #3498db;
}

.social-icons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.social-icon {
    width: 35px;
    height: 35px;
    background: #34495e;
    color: #ecf0f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}

.social-icon:hover {
    background: #3498db;
    color: white;
    transform: translateY(-3px);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s;
    z-index: 1000;
}

.scroll-to-top:hover {
    background: #c82333;
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.scroll-to-top.show {
    display: flex;
}

footer {
    margin-top: auto;
}

.footer-main .container {
    background: transparent !important;
    position: relative;
    z-index: 2;
}

.footer-main * {
    position: relative;
    z-index: 2;
}

/* Print Styles */
@media print {
    .navbar,
    .university-header,
    footer,
    .btn,
    .alert {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .university-header h4,
    .university-header h5 {
        font-size: 0.9rem;
    }
    
    .result-card {
        margin-bottom: 20px;
    }
    
    .top-red-banner {
        font-size: 11px;
    }
    
    .top-red-banner a {
        margin: 0 5px;
        padding: 0 3px;
    }
    
    .examination-corner-title {
        font-size: 24px;
    }
    
    .footer-heading {
        font-size: 14px;
        margin-top: 20px;
    }
    
    .social-icons {
        justify-content: center;
        margin-top: 15px;
    }
    
    .visitor-counter {
        text-align: center;
        margin: 15px 0;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .helpline-box .row {
        text-align: center;
    }
    
    .helpline-box .col-md-4 {
        margin-top: 15px;
        text-align: center !important;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

