:root {
    --primary-color: #3b305f;
    --primary-dark: #2a2144;
    --primary-light: #4d3d7a;
    --primary-extra-light: #e8e5f2;
    --secondary-color: #ff9900;
    --secondary-dark: #e68a00;
    --success-color: #198754; /* Added from previous full CSS */
    --success-soft-bg: #e8f5e9; /* Added from previous full CSS */
    --danger-color: #dc3545; /* Added from previous full CSS */
    --danger-soft-bg: #f8d7da; /* Added from previous full CSS */
    --text-dark: #343a40;
    --text-muted: #6c757d;
    --bg-light-pro: #f8f9fa;
    --white: #ffffff;
    --border-color: #dee2e6;
}

/* General Section Padding */
.section-padding {
    padding: 60px 0;
}

.certificate-verification-pro {
    background: linear-gradient(to bottom, var(--primary-extra-light) 0%, var(--white) 30%, var(--white) 100%);
}

.search-card-v4 {
    border-radius: 15px;
    background: var(--white);
    border: 1px solid #e9ecef;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.search-card-v4 .card-body {
    padding: 1.5rem;
}

/* Authentication Header Styles */
.auth-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem !important;
}

.auth-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-extra-light);
    border-radius: 10px;
    color: var(--primary-color);
    flex-shrink: 0;
    box-shadow: 0 3px 6px rgba(59, 48, 95, 0.08);
}


.auth-icon-wrapper .fas {
   font-size: 1.5rem;
}

.auth-text-wrapper h1 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.auth-text-wrapper .text-muted.small {
    color: var(--text-muted) !important;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0;
}

/* Input Group Styling */
.input-group-pro {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    height: 50px;
}

.input-group-pro:focus-within {
    border-color: var(--primary-light);
}

.input-icon-pro-span {
    padding: 0 12px;
}

.input-icon-pro {
    font-size: 1rem;
}

.form-control-pro {
    flex-grow: 1;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0.75rem 1rem 0.75rem 0;
    font-size: 0.95rem;
    height: 100%;
    color: var(--text-dark);
}

.form-control-pro::placeholder {
    color: #999;
    opacity: 1;
}

.form-control-pro:focus {
    outline: none;
    box-shadow: none;
}

/* Updated Button Styling */
.btn-verify-now {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    border: none;
    color: var(--white);
    padding: 0 30px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 1rem;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
    min-width: auto;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1.5rem;
    box-shadow: 0 4px 10px rgba(59, 48, 95, 0.15);
}

.btn-verify-now:hover {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(59, 48, 95, 0.25);
}

.btn-verify-now:disabled {
    background: var(--text-muted);
    box-shadow: none;
    transform: none;
    opacity: 0.65;
}

.btn-verify-now .spinner-border-sm {
    width: 1.2rem;
    height: 1.2rem;
    border-width: .2em;
}

/* Results Area Styling */
.results-pro-area {
    margin-top: 30px;
}

.result-card-pro {
    border-radius: 15px;
    background: var(--white);
    border: 1px solid var(--primary-extra-light);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    /* overflow: hidden; Temporarily comment out or be very careful if re-enabling */
    position: relative;
}



/* Ensure "VERIFIED RECORD" text is white and increase padding in the header */
.result-card-pro .card-header-pro {
    padding: 1rem 1rem; /* Increased padding for mobile */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-bottom: 3px solid var(--secondary-color);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    position: relative;
    z-index: 1;
}

.result-card-pro .card-header-pro h3 {
    color: var(--white); /* Explicitly set to white */
    font-size: 1.15rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Adjust card-body padding and remove negative margin from avatar section */
.result-card-pro .card-body {
    padding: 1rem;
    padding-top: 30px; /* Adjusted to provide space above avatar on mobile */
    position: relative;
    z-index: 0;
}

.result-card-pro .avatar-and-name-section {
    margin-top: 0; /* Remove negative margin to prevent hiding and add space */
    text-align: center;
    position: relative;
    z-index: 2;
}



.result-card-pro .profile-pic-pro {
    width: 80px;   /* Mobile avatar size */
    height: 80px;  /* Mobile avatar size */
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--white); /* Mobile border size */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Slightly stronger shadow for pop */
    background: var(--white);
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.2rem; /* Space between avatar and name */
    margin-top: 3px;
}

.result-card-pro .student-name { /* Was h2 */
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: bold; /* Ensure it's bold */
    margin-top: 0; /* Reset margin if any from h2 default */
    margin-bottom: 0.25rem;
}

.result-card-pro .father-name-text { /* Was p.text-muted */
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.75rem; /* Space before badge */
}

.result-card-pro .badge-verified {
    background: var(--success-soft-bg);
    color: var(--success-color);
    font-size: 0.85rem;
    padding: 0.5em 0.9em;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    margin-top: 0; /* Space handled by father_name_text margin-bottom */
}

.result-card-pro .details-section {
    background: var(--bg-light-pro);
    padding: 1rem;
    margin: 1.25rem 0 0 0; /* Margin top from badge/name section */
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 1rem; /* ADDED MARGIN BOTTOM FOR Certificate ID spacing */
}

.detail-row {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    gap: 4px;
}

.detail-row:last-child {
    border-bottom: none;
    /* padding-bottom: 0; /* Optional: remove padding from last item if margin-bottom on parent is enough */
}

.detail-row .label {
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

.detail-row .label i {
    color: var(--primary-light);
    margin-right: 8px;
    width: 18px;
    text-align: center;
    font-size: 0.9em;
}

.detail-row .value {
    font-weight: 500;
    color: var(--text-dark);
    text-align: left;
    font-size: 0.9rem;
    word-break: break-word;
    padding-left: 26px;
}

.detail-row .value.cert-id {
    font-weight: 600;
    color: var(--secondary-dark);
    background: #fff3e0;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.result-card-pro .card-footer {
    background: var(--primary-extra-light);
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    position: relative; /* Ensure it's above any negative margin bleed from card-body if overflow was an issue */
    z-index: 1;
}

/* Alert Message Styling */
.alert-danger-v4 {
    border-radius: 10px;
    border: 1px solid #f5c2c7;
    background: var(--danger-soft-bg);
    color: #842029;
    border-left: 4px solid var(--danger-color);
    padding: 1rem;
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.08);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-danger-v4 i {
    color: var(--danger-color);
    font-size: 1.3em;
    margin-top: 0.1em;
}
.alert-danger-v4 .alert-heading{
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}
.alert-danger-v4 p{
    font-size: 0.9rem;
    line-height: 1.4;
}

@media (min-width: 992px) {
    
}
/* --- Media Queries for Larger Screens --- */
@media (min-width: 768px) {
     .result-card-pro .card-header-pro {
        padding: 1.25rem 1.5rem; /* Slightly increased padding */
    }
    .result-card-pro .card-body {
        padding: 1.5rem 2rem;
        padding-top: 40px; /* Adjusted for desktop */
    }
    .section-padding { padding: 80px 0; }
    .search-card-v4 .card-body { padding: 2.5rem; }
    .auth-header { gap: 20px; margin-bottom: 2.5rem !important; }
    .auth-icon-wrapper { width: 65px; height: 65px; border-radius: 12px; }
    .auth-icon-wrapper .fas { font-size: 2rem; }
    .auth-text-wrapper h1 { font-size: 1.6rem; }
    .auth-text-wrapper .text-muted.small { font-size: 0.9rem; }
    .input-group-pro { border-radius: 12px; height: 56px; }
    .input-icon-pro-span { padding: 0 15px; }
    .input-icon-pro { font-size: 1.1rem; }
    .form-control-pro { padding: 0.75rem 1.5rem 0.75rem 0; font-size: 1rem; }
    .btn-verify-now { padding: 0 40px; border-radius: 12px; font-size: 1.05rem; height: 56px; width: auto; min-width: 220px; margin-top: 2rem; }
    .results-pro-area { margin-top: 40px; }

    .result-card-pro .card-header-pro { padding: 1rem 1.5rem; }
    .result-card-pro .card-header-pro h3 { font-size: 1.25rem; }
    .result-card-pro .card-header-pro i { font-size: 1.15rem; margin-right: 0.6rem; }


    .result-card-pro .card-body {
        padding: 1.5rem 2rem;
        padding-top: 50px; /* (avatar_desktop_height/2) + space (130/2) = 65px */
    }

    .result-card-pro .avatar-and-name-section {
        margin-top: -50px; /* Adjust for desktop avatar (130px height) */
                          /* Pull up by approx (avatar_height - desired_visible_overlap_above_card_body_content_start_line) */
    }

    .result-card-pro .profile-pic-pro {
        width: 150px;
        height: 150px;
        border-width: 4px;
        margin-bottom: 0.20rem;
        margin-top: 76px;
    }

    .result-card-pro .student-name { font-size: 1.75rem; margin-bottom: 0.3rem;}
    .result-card-pro .father-name-text { font-size: 1rem; margin-bottom: 1rem;}
    .result-card-pro .badge-verified { font-size: 1rem; padding: 0.6em 1em; }

    .result-card-pro .details-section {
        padding: 1.5rem;
        margin: 1.5rem 0 0 0; /* Adjusted top margin */
        border-radius: 10px;
        margin-bottom: 1.5rem; /* More margin on desktop */
    }

    .detail-row { flex-direction: row; justify-content: space-between; padding: 12px 0; gap: 0; }
    .detail-row .label { font-size: 0.95rem; }
    .detail-row .label i { margin-right: 10px; width: 20px; font-size: 1em; }
    .detail-row .value { text-align: right; font-size: 1rem; padding-left: 0; }

    .alert-danger-v4 { border-radius: 12px; padding: 1.5rem; gap: 1rem; }
    .alert-danger-v4 i { font-size: 1.5em; }
    .alert-danger-v4 .alert-heading { font-size: 1.25rem; }
    .alert-danger-v4 p { font-size: 1rem; }
}

@media (min-width: 992px) {
    .result-card-pro .card-body {
        padding: 2rem 2.5rem;
        padding-top: 50px; /* Adjusted for larger desktop */
    }
    .result-card-pro .avatar-and-name-section {
        margin-top: -115px; /* Adjust for 150px avatar */
    }
    .result-card-pro .profile-pic-pro {
        width: 150px;
        height: 150px;
    }
}