/* Admissions.UG - Public Pages Stylesheet */
/* Includes landing pages, registration pages, and authentication pages */

/* Gabarito font for headers and display elements */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
.hero-title, .section-title, .page-title,
.navbar-brand,
.nav-link,
.btn,
.lead {
  font-family: 'Gabarito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --success-color: #10b981;
    --info-color: #0ea5e9;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
}

html {
    height: 100%;
}

body {
    font-family: 'Gabarito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #334155;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* Navbar Styles */
.navbar {
    transition: all 0.3s ease;
    background-color: transparent !important;
    z-index: 1030;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.75rem !important;
}

.navbar-brand img {
    transition: all 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #64748b !important;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Mobile navbar dropdown styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
        border-radius: 8px;
        margin-top: 10px;
        padding: 15px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .navbar:not(.scrolled) .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.98) !important;
    }
    
    .navbar.scrolled .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.98) !important;
        margin-top: 5px;
    }
    
    .navbar-nav .nav-link {
        color: #334155 !important;
        font-weight: 500;
        padding: 8px 0 !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .navbar-nav .nav-link:hover {
        color: var(--primary-color) !important;
        background-color: rgba(30, 58, 138, 0.05);
        border-radius: 4px;
        padding-left: 8px !important;
        transition: all 0.2s ease;
    }
    
    .navbar-login-btn {
        margin-top: 10px !important;
        text-align: center;
        width: 100%;
        background-color: var(--primary-color) !important;
        color: white !important;
        border-color: var(--primary-color) !important;
        height: 38px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .navbar-login-btn:hover {
        background-color: var(--secondary-color) !important;
        border-color: var(--secondary-color) !important;
        transform: translateY(-1px);
    }
    
    /* Fix dropdown toggle button height to match login button in mobile */
    .navbar-nav .btn-group .dropdown-toggle-split {
        height: 38px !important;
        margin-top: 10px !important;
        background-color: var(--primary-color) !important;
        border-color: var(--primary-color) !important;
        color: white !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .navbar-nav .btn-group .dropdown-toggle-split:hover {
        background-color: var(--secondary-color) !important;
        border-color: var(--secondary-color) !important;
    }
    
    /* Fix dropdown positioning - remove end alignment on mobile */
    .navbar-nav .dropdown-menu {
        position: absolute !important;
        left: 0 !important;
        right: auto !important;
        transform: none !important;
        margin-top: 0.5rem !important;
    }
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 700;
}

/* Hero Section */
.hero-wrapper {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    padding-top: 120px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.hero-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 300%; /* Triple width for seamless loop */
    height: 100%;
    background-image: url('/images/hero-scroll-background.png');
    background-repeat: repeat-x;
    background-position: center;
    background-size: 1200px auto;
    opacity: 0.06;
    animation: scrollBackground 120s linear infinite;
    z-index: 0;
}

.hero-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        270deg, 
        rgba(225, 244, 255, 0.6),  /* Light blue */
        rgba(244, 225, 255, 0.6),  /* Light purple */
        rgba(225, 255, 244, 0.6),  /* Light mint */
        rgba(255, 244, 225, 0.6),  /* Light orange */
        rgba(240, 255, 228, 0.6),  /* Light green */
        rgba(255, 225, 244, 0.6)   /* Light rose */
    );
    background-size: 600% 600%;
    animation: shimmerOverlay 90s ease infinite;
    z-index: 1;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 600px;
    min-height: 50vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 3;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    max-width: 1000px;
}

.hero-content h1 {
    line-height: 1.2;
}

@keyframes scrollBackground {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.33%); /* Move by 1/3 since width is 300% */
    }
}

@keyframes shimmerOverlay {
    0% {
        background-position: 0% 50%;
    }
    16% {
        background-position: 100% 25%;
    }
    33% {
        background-position: 75% 75%;
    }
    50% {
        background-position: 25% 100%;
    }
    66% {
        background-position: 75% 50%;
    }
    83% {
        background-position: 50% 25%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .hero-wrapper {
        padding-top: 100px;
    }
    
    .hero-container {
        height: auto;
        padding: 2rem 1rem;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem !important;
    }
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    background: linear-gradient(
        135deg,
        #ffffff,     /* White */
        #fef7f7,     /* Light pink tint */
        #f7f7fe,     /* Light blue tint */
        #f7fef7,     /* Light green tint */
        #fefef7,     /* Light yellow tint */
        #fdf7fe,     /* Light purple tint */
        #ffffff      /* Back to white */
    );
    background-size: 600% 600%;
    animation: subtleShimmer 60s ease infinite;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    animation-duration: 8s;
}

@keyframes subtleShimmer {
    0% {
        background-position: 0% 0%;
    }
    16% {
        background-position: 100% 25%;
    }
    33% {
        background-position: 75% 75%;
    }
    50% {
        background-position: 25% 100%;
    }
    66% {
        background-position: 75% 50%;
    }
    83% {
        background-position: 50% 25%;
    }
    100% {
        background-position: 0% 0%;
    }
}

.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* How It Works Section */
.step-number {
    position: relative;
    transition: transform 0.3s ease;
}

.step-number:hover {
    transform: scale(1.1);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.bg-primary-shimmer {
    background: linear-gradient(
        135deg,
        #1e3a8a,  /* Primary blue */
        #3b82f6,  /* Secondary blue */
        #6366f1,  /* Indigo */
        #8b5cf6,  /* Purple */
        #a855f7,  /* Violet */
        #3b82f6,  /* Back to secondary */
        #1e3a8a   /* Back to primary */
    ) !important;
    background-size: 400% 400%;
    animation: ctaShimmer 50s ease infinite;
}

@keyframes ctaShimmer {
    0% {
        background-position: 0% 50%;
    }
    16% {
        background-position: 100% 25%;
    }
    33% {
        background-position: 75% 75%;
    }
    50% {
        background-position: 25% 100%;
    }
    66% {
        background-position: 75% 50%;
    }
    83% {
        background-position: 50% 25%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Button Styles */
.btn {
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.navbar-login-btn {
    min-width: 120px;
    padding: 0.5rem 2rem;
}

/* Fix dropdown toggle height to match main button */
.btn-group .dropdown-toggle-split {
    padding: 0.5rem 0.75rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* Footer Styles */
footer {
    background-color: #1e293b !important;
    flex-shrink: 0;
    margin-top: auto;
}

footer a:hover {
    color: #fff !important;
}

footer img {
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

footer img:hover {
    opacity: 1;
}

/* Form Styles for Registration/Authentication Pages */
.form-section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #007bff 20%, #007bff 80%, transparent 100%);
    margin: 2rem 0;
    opacity: 0.3;
}

/* PSM Customer Section Styles - Bulletproof Responsive Solution */
.psm-customer-section {
    overflow: hidden; /* Prevent any content overflow */
}

.psm-customer-section .psm-text-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Mobile First: Stack everything vertically */
@media (max-width: 991.98px) {
    .psm-customer-section .row > div {
        text-align: center !important;
    }
    
    .psm-customer-section .btn {
        max-width: 250px;
        margin: 0 auto;
    }
}

/* Tablets (768px - 1023px): Special handling */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .psm-customer-section {
        font-size: 0.95rem;
    }
    
    .psm-customer-section .psm-text-content span {
        display: block !important;
        margin-top: 0.25rem;
    }
}

/* Small desktops (1024px - 1199px): Optimize layout */
@media (min-width: 1024px) and (max-width: 1199.98px) {
    .psm-customer-section {
        padding: 0.75rem !important;
    }
    
    .psm-customer-section .psm-text-content {
        font-size: 0.9rem;
    }
    
    .psm-customer-section .btn {
        padding: 0.25rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Large desktops (1200px+): Full layout */
@media (min-width: 1200px) {
    .psm-customer-section .psm-text-content span {
        display: inline;
        margin-left: 0.25rem;
    }
}

.text-danger {
    font-size: 0.8rem !important;
}

/* Fix for select dropdown right border visibility with scrollbar */
.select-wrapper {
    position: relative;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem;
    overflow: hidden;
    display: block;
    width: 100%;
}

.select-wrapper .form-select {
    border: none !important;
    padding-right: 2.25rem;
    background-clip: padding-box;
    width: 100%;
    border-radius: 0;
    outline: none !important;
    box-shadow: none !important;
}

/* Ensure focus state still works properly */
.select-wrapper:focus-within {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Override any Bootstrap form-select border styles */
.select-wrapper .form-select:focus {
    border: none !important;
    box-shadow: none !important;
}

/* Ensure border is visible even with scrollbar on webkit browsers */
select.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.25rem;
}

/* Fix dropdown option styling for better border visibility */
select.form-select option {
    padding: 0.375rem 0.75rem;
}

/* Specific Registration Page Styles */
.registration-container {
    padding-top: 120px !important;
}

.registration-icon {
    font-size: 3rem;
}

.psm-link-icon {
    font-size: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .display-5 {
        font-size: 1.75rem !important;
    }
}

/* Utility Classes */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-opacity-10 {
    --bs-bg-opacity: 0.1;
}

.bg-light-shimmer {
    background: linear-gradient(
        45deg, 
        #faf8ff,  /* Light purple */
        #f8fff8,  /* Light green */
        #fff8f8,  /* Light pink */
        #f8f8ff,  /* Light blue */
        #fffaf8,  /* Light orange */
        #f8fffa,  /* Light mint */
        #fff8fa,  /* Light rose */
        #fafff8   /* Light lime */
    );
    background-size: 400% 400%;
    animation: backgroundShimmer 70s ease infinite;
}

@keyframes backgroundShimmer {
    0% {
        background-position: 0% 25%;
    }
    12% {
        background-position: 25% 75%;
    }
    25% {
        background-position: 50% 50%;
    }
    37% {
        background-position: 75% 25%;
    }
    50% {
        background-position: 100% 75%;
    }
    62% {
        background-position: 75% 100%;
    }
    75% {
        background-position: 50% 25%;
    }
    87% {
        background-position: 25% 50%;
    }
    100% {
        background-position: 0% 25%;
    }
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* School Badge Styles for Browse Page */
.school-badge-container {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.school-badge {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    filter: brightness(1.1) contrast(1.05);
}

/* Enhanced Validation Summary Styles */
.validation-summary-alert {
    border-left: 4px solid #dc3545 !important;
    background-color: #f8d7da !important;
    animation: slideDown 0.3s ease-out;
}

.validation-summary-alert .alert-heading {
    color: #721c24;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.validation-summary-alert ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.validation-summary-alert ul li {
    color: #721c24;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.25rem 0;
}

.validation-summary-alert ul li:hover {
    color: #491217;
    text-decoration: underline;
    transform: translateX(5px);
}

/* Shake Animation for Validation Summary */
.shake-animation {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Highlight validation errors */
.field-validation-error {
    font-size: 0.875rem !important;
    font-weight: 500;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Fix hover effect for login dropdown button */
.navbar-login-btn,
.dropdown-toggle-split {
    transform: none !important;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out !important;
}

.navbar-login-btn:hover,
.dropdown-toggle-split:hover {
    transform: none !important;
}

/* Ensure consistent styling for the button group */
.btn-group .btn {
    transform: none !important;
}

.btn-group .btn:hover {
    transform: none !important;
}

/* ============================================
   PRICING SECTION STYLES
   ============================================ */

.pricing-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.pricing-card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--info-color) 100%);
}

.pricing-card.border-primary::before {
    background: linear-gradient(90deg, var(--primary-color) 0%, #3b82f6 100%);
}

.pricing-icon {
    width: 80px;
    height: 80px;
    transition: all 0.3s ease;
}

.pricing-card:hover .pricing-icon {
    transform: scale(1.05);
}

.pricing-price .price-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.pricing-features ul li {
    position: relative;
    padding-left: 0;
    transition: all 0.2s ease;
}

.pricing-features ul li:hover {
    padding-left: 0.25rem;
}

.pricing-features ul li i {
    margin-right: 0.75rem !important;
}

.pricing-note {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-left: 4px solid var(--info-color) !important;
}

.pricing-description {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Responsive pricing adjustments */
@media (max-width: 992px) {
    .pricing-card {
        margin-bottom: 2rem;
    }
}

/* Pricing badge styles */
.badge.fs-7 {
    font-size: 0.75rem;
}

/* Animation for pricing cards on scroll */
.pricing-card.animate-in {
    animation: slideUpFade 0.6s ease-out forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scrolling for pricing anchor */
html {
    scroll-behavior: smooth;
}

/* Enhanced pricing comparison */
.pricing-comparison {
    background: linear-gradient(45deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
}

/* Pricing highlights */
.pricing-highlight {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success-color);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 0 0 8px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}