/* ==== Variables & Theme ==== */
/* Important Notice Bar */
.notice-bar {
    background: linear-gradient(90deg, #ff4b2b, #ff416c);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 1050;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.notice-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
}

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

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

:root {
    --primary-blue: #360a54;
    /* CUTM Blue */
    --primary-orange: #F57200;
    /* CUTM Orange */
    --hover-orange: #e06800;
    --light-bg: #f8f9fa;
    --input-bg: #f3f6f9;

    /* Fluid Sizing */
    --container-padding: clamp(1rem, 5vw, 2.5rem);
    --card-radius: clamp(15px, 3vw, 25px);
}

html {
    scroll-behavior: smooth !important;
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* Custom Scrollbar for modern look */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-orange);
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    background-color: #ffffff !important;
    background-image: none !important;
    /* Mobile First: Prevent iOS stretching bugs */
    position: relative;
    min-height: 90vh;
    overflow-x: hidden !important;
    max-width: 100vw !important;
    animation: fadeInPage 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInPage {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Global Transitions for smooth experience (Targeted) */
a, button, .btn, .registration-card, .stat-box, .school-card, .program-card, .info-card {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                background-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Click feedback for all buttons */
button:active:not(:disabled), .btn:active:not(:disabled) {
    transform: scale(0.95);
    filter: brightness(0.9);
}

body::before {
    content: none;
}

.theme-color-primary {
    color: var(--primary-blue);
}

.theme-color-secondary {
    color: var(--primary-orange);
}

/* ==== Navbar & Header ==== */
.navbar {
    border-bottom: 2px solid var(--primary-orange);
}

.naac-logo {
    transition: transform 0.3s ease;
    object-fit: contain;
}

.naac-logo:hover {
    transform: scale(1.05);
}

/* ==== Banner Section ==== */
.banner-section {
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ff8c2b 100%);
    box-shadow: 0 4px 15px rgba(245, 114, 0, 0.2);
    padding: 01px 0 !important;
}

.banner-section h6 {
    font-size: clamp(1.2rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.banner-section small {
    font-size: clamp(0.8rem, 2vw, 1.1rem);
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.1"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.5;
    pointer-events: none;
}


/* Hide external reCAPTCHA badge */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* ==== Registration Card ==== */
.registration-card {
    border-radius: var(--card-radius);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    background-color: #ffffff !important;
}


.registration-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 90%;
    height: 3px;
    background: var(--primary-blue);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* Form Elements */
.form-floating>.form-control,
.form-floating>.form-select {
    background-color: var(--input-bg) !important;
    border-radius: 10px;
    font-size: 16px !important;
    /* Prevents iOS auto-zoom */
}

.form-floating>.form-control:focus,
.form-floating>.form-select:focus {
    background-color: #fff;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.15rem rgba(10, 50, 84, 0.15);
}

.input-group-text {
    border-radius: 10px 0 0 10px;
    font-size: 16px !important;
    /* Prevents iOS auto-zoom */
}

.form-control.border-start-0 {
    border-radius: 0 10px 10px 0;
}

/* Button overrides */
.btn-primary {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(245, 114, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
    background-color: var(--hover-orange) !important;
    border-color: var(--hover-orange) !important;
    box-shadow: 0 8px 20px rgba(245, 114, 0, 0.5) !important;
    transform: translateY(-3px) scale(1.02);
}

.btn-outline-primary {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    color: #fff;
    transform: translateY(-2px);
}

/* Social Media Icons */
.hover-opacity {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.hover-opacity:hover {
    opacity: 1;
    color: var(--primary-orange) !important;
}

/* ==== Animations ==== */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-pop {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animate-card-enter {
    animation: cardEnter 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

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

    80% {
        transform: scale(1.1);
        opacity: 1;
    }

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

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Success icon shadow pulse */
.success-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.success-icon-wrapper i {
    text-shadow: 0 10px 20px rgba(25, 135, 84, 0.3);
}

/* Specific error display */
.invalid-mobile {
    font-size: 0.875em;
    color: var(--bs-form-invalid-color);
    margin-top: 0.25rem;
}

.credit-card-highlight {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-blue) !important;
    border: 2px solid var(--primary-blue);
    font-weight: 700;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    animation: badgePulse 2s infinite ease-in-out;
    cursor: default;
    transition: all 0.3s ease;
}

.credit-card-highlight:hover {
    transform: scale(1.05);
    background: #fff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.7);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    }
}

/* Typography Utilities */
.tracking-wider {
    letter-spacing: 0.05em;
}

.filter-white {
    filter: brightness(0) invert(1);
}

/* ==== Responsive Breakpoints (Mobile-First) ==== */

/* Base CSS applies to Mobile (320px - 480px) */
.registration-card {
    padding: 1.25rem;
}

/* Tablet (481px - 768px) */
@media (min-width: 481px) {
    .registration-card {
        padding: 1.75rem;
    }
}

/* Laptop (769px - 1024px) */
@media (min-width: 769px) {
    .registration-card {
        padding: 2.25rem;
    }

    .banner-section {
        padding: 1.25rem 0 !important;
    }
}

/* Desktop (1025px+) */
@media (min-width: 1025px) {
    body {
        /* Enable fixed background only on large screens, preventing touch scrolling bugs */
        background-attachment: fixed !important;
        background-position: center center !important;
    }

    .registration-card {
        padding: 2.5rem;
    }
}

/* ==== Call Float and Message ==== */
.call-container {
    position: fixed;
    bottom: 200px;
    /* Top button */
    right: 40px;
    z-index: 2147483646 !important; /* Top layer */
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.call-msg {
    background-color: #ffffff;
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    color: #333;
    font-size: 14px;
    position: relative;
    opacity: 0;
    transform: translateX(20px);
    animation: popSlideInOut 6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: 1s;
}

.call-msg::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

@keyframes pulseOrange {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(245, 114, 0, 0.8), 0 0 20px rgba(245, 114, 0, 0.6);
    }

    50% {
        transform: scale(1.1) translateY(-5px);
        box-shadow: 0 0 20px rgba(245, 114, 0, 1), 0 0 40px rgba(245, 114, 0, 0.8);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(245, 114, 0, 0.8), 0 0 20px rgba(245, 114, 0, 0.6);
    }
}

.call-float {
    width: 65px;
    height: 65px;
    background-color: var(--primary-orange) !important;
    color: #FFF;
    border-radius: 50px;
    border: 3px solid #FFF;
    text-align: center;
    font-size: 28px;
    transition: all 0.3s ease;
    animation: pulseOrange 2s infinite ease-in-out;
}

.call-float:hover {
    transform: scale(1.2);
    background-color: var(--hover-orange) !important;
}


/* ==== WhatsApp Float and Message ==== */
.whatsapp-container {
    position: fixed;
    bottom: 120px;
    right: 40px;
    z-index: 2147483646 !important; /* Top layer */
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.whatsapp-msg {
    background-color: #ffffff;
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    color: #333;
    font-size: 14px;
    position: relative;
    opacity: 0;
    transform: translateX(20px);
    animation: popSlideInOut 6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: 1.5s;
}

.whatsapp-msg::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

@keyframes popSlideInOut {
    0% {
        opacity: 0;
        transform: translateX(20px) scale(0.9);
    }

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

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

    100% {
        opacity: 0;
        transform: translateX(20px) scale(0.9);
        visibility: hidden;
    }
}

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(37, 211, 102, 0.8),
            0 0 20px rgba(37, 211, 102, 0.6);
    }

    50% {
        transform: scale(1.1) translateY(-5px);
        box-shadow: 0 0 20px rgba(37, 211, 102, 1),
            0 0 40px rgba(37, 211, 102, 0.8),
            0 0 60px rgba(37, 211, 102, 0.6),
            0 0 80px rgba(37, 211, 102, 0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(37, 211, 102, 0.8),
            0 0 20px rgba(37, 211, 102, 0.6);
    }
}

.whatsapp-float {
    width: 65px;
    height: 65px;
    background-color: #25d366 !important;
    color: #FFF;
    border-radius: 50px;
    border: 3px solid #FFF;
    text-align: center;
    font-size: 32px;
    transition: all 0.3s ease;
    animation: pulseGlow 1.8s infinite ease-in-out;
}

.whatsapp-float:hover {
    transform: scale(1.2);
    background-color: #1ebe56 !important;
}

/* Adjust WhatsApp float for Mobile */
@media (max-width: 768px) {
    .whatsapp-container {
        bottom: 130px; /* Raised above the 55px sticky footer */
        right: 15px;
        gap: 8px;
    }

    .whatsapp-msg,
    .call-msg {
        font-size: 11px;
        padding: 6px 10px;
    }

    .call-container {
        bottom: 200px; /* Raised above whatsapp + sticky footer */
        right: 15px;
        gap: 8px;
    }

    .whatsapp-float,
    .call-float {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}

/* ==== AI Chatbot ==== */
.ai-chatbot-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 2147483645 !important; /* Top layer */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.ai-msg {
    background-color: #ffffff;
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 14px;
    position: relative;
    opacity: 0;
    transform: translateX(20px);
    animation: popSlideInOut 6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: 2s;
    /* Show slightly after WhatsApp msg */
}

/* Triangle pointer for the message bubble */
.ai-msg::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

@keyframes aiGlow {
    0% {
        box-shadow: 0 0 10px rgba(10, 50, 84, 0.5), 0 0 20px rgba(10, 50, 84, 0.4);
    }

    50% {
        box-shadow: 0 0 15px rgba(245, 114, 0, 0.8), 0 0 30px rgba(245, 114, 0, 0.6);
    }

    100% {
        box-shadow: 0 0 10px rgba(10, 50, 84, 0.5), 0 0 20px rgba(10, 50, 84, 0.4);
    }
}

.ai-float-btn {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--primary-blue), #1a5c96);
    border: 3px solid #FFF;
    color: white;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: aiGlow 3s infinite alternate;
}

.ai-float-btn:hover {
    transform: scale(1.1) rotate(10deg);
    background: linear-gradient(135deg, var(--primary-orange), #ff8c2b);
    color: white;
}

.ai-chat-window {
    width: 300px;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-chat-window.d-none {
    display: block !important;
    /* Override bootstrap */
    opacity: 0;
    transform: scale(0) translateY(20px);
    pointer-events: none;
}

.ai-chat-window.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.chat-message.bot-message {
    align-self: flex-start;
    max-width: 85%;
}

.chat-message.user-message {
    align-self: flex-end;
    max-width: 85%;
}

.user-message .msg-bubble {
    background: var(--primary-blue);
    color: white;
    border-bottom-right-radius: 0 !important;
}

.ai-quick-reply {
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.ai-quick-reply:hover {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Adjust AI Bot for Mobile */
@media (max-width: 768px) {
    .ai-chatbot-container {
        bottom: 70px; /* Raised above the 55px sticky footer */
        right: 10px;
    }

    .ai-float-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .ai-chat-window {
        width: min(280px, 85vw);
        position: fixed;
        bottom: 120px; /* Raised above chatbot btn + sticky footer */
        right: 10px;
    }

    .ai-chat-messages {
        height: 200px !important; /* Smaller chat area on mobile */
    }

    .ai-chat-header h6 {
        font-size: 0.8rem;
    }

    .ai-quick-reply {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .ai-chat-input-area input {
        font-size: 0.8rem;
    }
}
