/* RVCE Plugin Styles - Premium UI Refinement */

/* 1. LAYOUT RESET & SPECIFICITY */
.rvce-container,
.rvce-container *,
.rvce-details-wrapper,
.rvce-details-wrapper * {
    box-sizing: border-box;
}

.rvce-container {
    max-width: 1240px;
    margin: 40px auto;
    padding: 0 25px;
    line-height: 1.6;
    color: #334155;
}

/* 2. SPECIFIC LINK & BUTTON RESET (Remove Underlines) */
.rvce-container a,
.rvce-container button,
.rvce-sidebar-btn,
.rvce-back-link,
.rvce-faculty-item,
.rvce-dept-card {
    text-decoration: none !important;
    text-decoration-line: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.rvce-back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 30px;
    color: #0c4b8e !important;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 15px;
    background: #f1f5f9;
    border-radius: 6px;
}

.rvce-back-link:hover {
    background: #e2e8f0;
    transform: translateX(-5px);
}

/* 3. GRID LAYOUTS */
.rvce-dept-grid,
.rvce-faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* 4. DEPARTMENT CARDS (Home View) */
.rvce-dept-card {
    background: #ffffff;
    border: 1px solid #e1e7ef;
    border-radius: 20px;
    padding: 40px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.rvce-dept-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(12, 75, 142, 0.15);
    border-color: #0c4b8e;
}

.rvce-dept-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #0c4b8e;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.rvce-dept-card:hover::after {
    transform: scaleX(1);
}

.rvce-dept-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #0c4b8e 0%, #2e3192 100%);
    color: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 16px rgba(12, 75, 142, 0.2);
}

.rvce-dept-card:hover .rvce-dept-icon {
    transform: scale(1.1) rotate(5deg);
}

.rvce-dept-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b !important;
    margin: 0 0 15px 0 !important;
    line-height: 1.4;
}

.rvce-dept-card span {
    font-size: 13px;
    font-weight: 600;
    color: #0c4b8e;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* 5. SIDEBAR - Modern Sidebar UI */
.rvce-details-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Aggressive Specificity to beat Elementor/Theme overrides */
.rvce-container .rvce-sidebar {
    min-width: 300px;
    width: 300px;
    background: #0c4b8e !important;
    border-radius: 16px;
    padding: 15px !important;
    box-shadow: 0 10px 25px rgba(12, 75, 142, 0.2);
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 0 !important;
    border: none !important;
}

/* Force override Elementor Kit button styles */
.rvce-container .rvce-sidebar button.rvce-sidebar-btn,
.rvce-container .rvce-sidebar .rvce-sidebar-btn {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border: none !important;
    padding: 14px 20px !important;
    text-align: left !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    display: block !important;
    text-decoration: none !important;
    text-transform: none !important;
    box-shadow: none !important;
}

.rvce-container .rvce-sidebar button.rvce-sidebar-btn:hover,
.rvce-container .rvce-sidebar .rvce-sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    padding-left: 30px !important;
    text-decoration: none !important;
}

.rvce-container .rvce-sidebar button.rvce-sidebar-btn.active,
.rvce-container .rvce-sidebar .rvce-sidebar-btn.active {
    background: #bce256 !important;
    color: #0c4b8e !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 12px rgba(188, 226, 86, 0.3) !important;
    text-decoration: none !important;
}

/* 6. CONTENT AREA */
.rvce-content-area {
    flex-grow: 1;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.rvce-tab-content {
    display: none;
    animation: slideUp 0.4s cubic-bezier(0, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* 7. PROFILE CARD */
.rvce-profile-card {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.rvce-img-box {
    flex: 0 0 280px;
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 2px solid #f1f5f9;
}

.rvce-img-box img {
    width: 100%;
    border-radius: 8px;
    display: block;
    object-fit: cover;
}

/* Default Logo styling in Detail View */
.rvce-img-box.rvce-default-img {
    background: #ffffff;
    padding: 30px;
}

.rvce-img-box.rvce-default-img img {
    object-fit: contain;
    width: 100%;
    height: auto;
    max-height: 300px;
}

.rvce-info-table {
    width: 100%;
    border-collapse: collapse;
}

.rvce-info-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 15px;
}

.rvce-info-table td:first-child {
    width: 180px;
    background: #f8fafc;
    color: #0c4b8e;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 8. FACULTY GRID CARDS - Premium Refinement */
.rvce-faculty-item {
    background: linear-gradient(135deg, #0c4b8e 0%, #083666 100%);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 15px -3px rgba(12, 75, 142, 0.1);
    height: 100%;
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rvce-faculty-item:hover {
    transform: scale(1.03) translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(12, 75, 142, 0.25);
}

.rvce-img-container {
    width: 100%;
    aspect-ratio: 3 / 3.8;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
    border-bottom: 4px solid #bce256;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rvce-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.6s ease;
    display: block;
}

/* Specific styling for fallback/logo images */
.rvce-img-container.rvce-default-img {
    background: #ffffff;
    padding: 30px;
}

.rvce-img-container.rvce-default-img img {
    object-fit: contain;
    width: 80%;
    height: 80%;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
}

.rvce-faculty-item:hover .rvce-img-container img {
    transform: scale(1.1);
}

.rvce-card-content {
    padding: 25px 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rvce-name {
    color: #fff !important;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.rvce-desig {
    color: #bce256 !important;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 5px;
}

.rvce-dept-name {
    margin-top: auto;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: 10px;
}

/* 8. LIST STYLES (Journals, list-items) */
.rvce-simple-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.rvce-simple-list li {
    padding: 20px 0;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    line-height: 1.6;
    font-size: 15px;
    position: relative;
}

.rvce-simple-list li:last-child {
    border-bottom: none;
}

/* 9. RESPONSIVE SETUP - Mobile Card Layouts */
@media (max-width: 1024px) {
    .rvce-details-wrapper {
        flex-direction: column;
    }

    .rvce-sidebar {
        width: 100% !important;
        min-width: 100%;
        margin-bottom: 30px;
    }

    .rvce-profile-card {
        flex-direction: column;
        align-items: center;
    }

    .rvce-img-box {
        margin-bottom: 30px;
        flex: none;
        width: 100%;
        max-width: 320px;
    }

    .rvce-content-area {
        padding: 25px 20px;
        width: 100%;
    }

    /* Transform Data Tables into Mobile Cards */
    .rvce-data-table,
    .rvce-data-table thead,
    .rvce-data-table tbody,
    .rvce-data-table th,
    .rvce-data-table td,
    .rvce-data-table tr {
        display: block !important;
        width: 100% !important;
    }

    .rvce-data-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .rvce-data-table tr {
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        margin-bottom: 15px;
        padding: 10px;
        background: #f8fafc;
    }

    .rvce-data-table td {
        border: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
        position: relative;
        padding: 15px 10px !important;
        /* Balanced padding for stacking */
        text-align: left !important;
        white-space: normal !important;
        font-size: 14px !important;
        display: block !important;
        color: #334155;
    }

    .rvce-data-table td:last-child {
        border-bottom: none !important;
    }

    /* Stack Label (Title) on top */
    .rvce-data-table td:before {
        display: block !important;
        margin-bottom: 6px;
        content: attr(data-label);
        font-weight: 700;
        color: #0c4b8e;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .rvce-info-table td {
        display: block !important;
        width: 100% !important;
        padding: 10px !important;
    }

    .rvce-info-table td:first-child {
        width: 100% !important;
        background: #f1f5f9;
        border-radius: 4px;
        margin-bottom: 5px;
    }
}

/* Wrapper */
.ai-faculty-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 55px;
  padding: 10px;
}

/* Card */
.ai-card {
  width: 260px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.4s ease;

	
}

.ai-card:hover {
	  transition: transform 0.4s ease;
  transform: translateY(-8px);
}

/* Gradient */
.ai-card-top {
  height: 110px;
  background: linear-gradient(135deg, #4f46e5, #22c55e);
}

/* Image wrapper */
.ai-img-box {
  display: flex!important;
  justify-content: center!important;
  margin-top: -90px!important;
}

/* Perfect circle + focus fix */
.ai-img-box img {
  width: 180px!important;
	z-index: 2;
  height: 180px!important;
  border-radius: 50%!important;
  transition: transform 0.4s ease;

  /* KEY SETTINGS */
  object-fit: cover!important;        /* fills circle without distortion */
  object-position: 50% 10%!important;  /* always center focus */
  box-shadow: 0 5px 15px rgba(0,0,0,0.15)!important;
  border: 5px solid #fff!important;
  background: #e5e7eb!important;
}

.ai-img-box {
  position: relative;
	z-index: 2;
}

/* Gradient rotating ring */
.ai-img-box::before {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(
    #4f46e5,
    #22c55e,
    #06b6d4,
    #4f46e5
  );
  z-index: 0;
  animation: none;
  transition: 0.3s;
}

/* Inner white layer */
.ai-img-box::after {
  content: "";
  position: absolute;
  width: 124px;
  height: 124px;
  background: #fff;
  border-radius: 50%;
  z-index: 1;
}
/* 🔥 Rotate animation on hover */
.ai-card:hover .ai-img-box::before {
  animation: rotateBorder 2s linear infinite;
}

/* Keyframes */
@keyframes rotateBorder {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Content */
.ai-content {
  padding: 15px 20px 25px;
}

.ai-content h3 {
  font-size: 18px!important;
  font-weight: 700!important;
  color: #1f2937!important;
  margin-top: 10px!important;
}

/* Role */
.ai-role {
  color: #22c55e!important;
  font-weight: 600!important;
  margin: 8px 0!important;
}

/* Dept */
.ai-dept {
  font-size: 13px!important;
  color: #6b7280!important;
  line-height: 1.4!important;
}

/* Responsive */
@media (max-width: 768px) {
  .ai-faculty-container {
    flex-direction: column;
    align-items: center;
  }
}