/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* --- General Body Styling --- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Navbar Customization --- */
.bg-custom-dark {
    background-color: #2c3e50; /* A dark, professional blue-slate */
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.4rem;
}

.nav-link {
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #1abc9c !important; /* A bright, hopeful teal for hover */
}

/* --- Card Styling & Hover Effects --- */
.card {
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 1rem; /* Softer corners */
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 3rem rgba(44, 62, 80, 0.15) !important;
}

.card-title {
    color: #34495e; /* A softer dark color than pure black */
    font-weight: 600;
}

/* --- Form Elements --- */
.form-control, .form-select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 0 0.25rem rgba(26, 188, 156, 0.25);
}

/* --- Custom Button Styles --- */
.btn {
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #3498db; /* A friendly, trustworthy blue */
    border-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-success {
    background-color: #1abc9c; /* Teal for success */
    border-color: #1abc9c;
}

.btn-success:hover {
    background-color: #16a085;
    border-color: #16a085;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* --- Result Display --- */
#result {
    border-radius: 1rem;
    display: none; /* Initially hidden, JS will manage visibility */
}

/* Error validation styling */
.form-control.error, .form-select.error {
    border-color: #e74c3c !important;
    background-color: #fff6f5;
}

.error-message {
    color: #e74c3c;
    font-size: 0.875em;
    margin-top: 0.25rem;
    display: block;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- Scalability Page Styles --- */

.accordion-item {
    border: 1px solid #e0e6ed;
    border-radius: 0.75rem !important; /* Overwrite bootstrap default */
    margin-bottom: 1rem;
    overflow: hidden; /* Ensures rounded corners are visible */
    transition: box-shadow 0.3s ease-in-out;
}

.accordion-item:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.accordion-header {
    margin-bottom: 0;
}

.accordion-button {
    font-weight: 600;
    font-size: 1.1rem;
    color: #34495e; /* Softer dark text color */
    background-color: #f8f9fa;
    box-shadow: none !important; /* Remove default focus shadow */
    border-radius: 0 !important;
    padding: 1.25rem 1.5rem;
}

/* Style for when the accordion item is OPEN */
.accordion-button:not(.collapsed) {
    color: #ffffff;
    background: linear-gradient(135deg, #1abc9c, #16a085); /* Main theme teal gradient */
}

/* Style for the accordion content area */
.accordion-body {
    background-color: #ffffff;
    font-size: 1rem;
    line-height: 1.7;
    padding: 1.5rem;
}

.accordion-body strong {
    color: #2c3e50;
}

/* Icon styling */
.accordion-icon {
    margin-right: 1rem;
    width: 22px;
    height: 22px;
    color: #3498db; /* Primary theme blue for icons */
    flex-shrink: 0; /* Prevents icon from shrinking */
}

.accordion-button:not(.collapsed) .accordion-icon {
    color: #ffffff; /* White icon on active background */
}

/* Customizing the accordion's default arrow icon */
.accordion-button::after {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    margin-left: auto;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233498db'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 1.5rem;
    transition: transform 0.2s ease-in-out;
}

.accordion-button:not(.collapsed)::after {
     background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}


/* --- Form Elements Sizing --- */

/* Set a consistent height for all text inputs and Select2 boxes */
.form-control,
.select2-container--default .select2-selection--single {
    height: 50px !important; /* Standard height for all inputs */
    display: flex;
    align-items: center;
}

/* Ensure placeholder and value text is vertically centered */
.form-control::placeholder,
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 50px !important; /* Match the height */
}
/* --- Select2 Dropdown Search Box --- */

/* Increase placeholder text size and adjust color */
/* --- Select2 Dropdown Search Box --- */

/* Increases the height and padding of the search input field */
.select2-search--dropdown .select2-search__field {
    height: 48px;       /* Set a specific height for the box */
    padding: 0 15px;    /* Adds horizontal spacing for the text */
    font-size: 1rem;    /* Sets the size for the text you type */
}


/* select2 custom css for cross and dropdown arrow ---------------------------------------------------------------- */

    .select2-container--default .select2-selection--single {
        position: relative;
        height: 55px;
        border-radius: 10px;
        border: 1.5px solid #ced4da;
        font-size: 18px;
        display: flex;
        align-items: center;
        padding: 6px 14px;
        transition: all 0.2s ease-in-out;
    }

    /* Hover effect */
    .select2-container--default .select2-selection--single:hover {
        border-color: #007bff;
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
    }

    /* Move dropdown arrow to the LEFT side */
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        position: absolute;
        left: 15px;
        right: auto;
        top: 40%;
        transform: translateY(-50%);
        height: auto;
        width: auto;
    }

    /* Increase arrow size */
    .select2-container--default .select2-selection--single .select2-selection__arrow b {
        border-width: 18px 12px 0 12px;
        border-color: #6c757d transparent transparent transparent;
        display: block;
        transition: transform 0.2s ease;
    }

    /* Arrow hover effect */
    .select2-container--default .select2-selection--single:hover .select2-selection__arrow b {
        transform: scale(1.2);
        border-color: #007bff transparent transparent transparent;
    }

    /* Search input inside dropdown */
    .select2-search__field {
        font-size: 16px;
        padding: 8px;
        border-radius: 6px;
    }

    /* Clear (×) icon — move to right side */
    .select2-container--default .select2-selection--single .select2-selection__clear {
        position: absolute;
        right: 10px;
        /* align to right */
        top: 50%;
        transform: translateY(-50%);
        font-size: 28px;
        line-height: 1;
        color: #000000;
        font-weight: bold;
        cursor: pointer;
        z-index: 5;
        transition: transform 0.2s ease;
    }

    .select2-container--default .select2-selection--single .select2-selection__clear:hover {
        transform: translateY(-50%) scale(1.2);
        color: #b02a37;
    }

    /* Adjust padding so text doesn't overlap arrow or cross */
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        padding-left: 40px;
        /* space for left arrow */
        padding-right: 40px;
        /* space for right clear button */
    }