/* Modern Color Palette */
:root {
    --primary-color: #6366f1;
    --secondary-color: #818cf8;
    --accent-color: #f43f5e;
    --dark-bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --light-bg: #1e293b;
    --text-color: #f8fafc;
    --text-light: #94a3b8;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gold: #ffcc33;
    --gold-hover: #ffaa00;
}

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a, #020617) !important;
    background-attachment: fixed !important;
    color: var(--text-color) !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* Navbar */
.navbar {
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Cards */
.card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    background-color: var(--card-bg);
    backdrop-filter: blur(8px);
    overflow: hidden;
    color: var(--text-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4338ca 100%);
    border: none;
    padding: 0.6rem 1.8rem;
    font-weight: 600;
    border-radius: 0.75rem;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 0.75rem;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.3);
}

/* Footer */
footer {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gold) !important;
    padding: 3rem 0 0 0;
    margin-top: auto;
}

footer a,
footer li a,
footer .text-white {
    color: var(--gold) !important;
    transition: color 0.3s ease;
    text-decoration: none;
}

footer a:hover,
footer li a:hover {
    color: var(--gold-hover) !important;
}

footer h5 {
    color: var(--white) !important;
    font-weight: 700;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 8px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

/* Utility Overrides for Dark Mode */
.bg-white {
    background-color: rgba(30, 41, 59, 0.7) !important;
    backdrop-filter: blur(10px);
}

.bg-light {
    background-color: rgba(30, 41, 59, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.text-dark,
.text-black {
    color: var(--text-color) !important;
}

.text-muted {
    color: var(--text-light) !important;
}

.breadcrumb-item a {
    color: var(--secondary-color) !important;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-color) !important;
    opacity: 0.8;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: var(--text-light);
}

/* Form Controls Dark Mode */
.form-control {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-color) !important;
    backdrop-filter: blur(4px);
}

.form-control:focus {
    background-color: rgba(15, 23, 42, 0.8) !important;
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25) !important;
    border-color: var(--primary-color) !important;
}

.form-floating label {
    color: var(--text-light) !important;
}

.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
    color: var(--primary-color) !important;
    opacity: 1;
}

/* Alerts Dark Mode */
.alert {
    border: none !important;
    border-radius: 0.75rem !important;
}

.alert-danger-subtle {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #fca5a5 !important;
    border-left: 4px solid var(--danger) !important;
}

.alert-success-subtle {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #34d399 !important;
    border-left: 4px solid var(--success) !important;
}

/* List Groups Dark Mode */
.list-group-item {
    background-color: rgba(30, 41, 59, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-color) !important;
}

.list-group-item-action:hover {
    background-color: rgba(99, 102, 241, 0.1) !important;
    color: var(--primary-color) !important;
}

.list-group-item.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* Card Header */
.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4338ca 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    position: relative;
    margin-bottom: 3rem;
    font-weight: 800;
    font-size: 2.5rem;
    background: linear-gradient(to right, #ffffff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 80px;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

.text-gradient {
    background: linear-gradient(to right, #4A42D8, #30c2cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* WhatsApp Floating Button */
.whatsapp-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #25D366 0%, #024713 100%);
    color: #ffffff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 10px 25px 10px 10px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.whatsapp-float-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.6);
    color: #ffffff !important;
    text-decoration: none;
}

.whatsapp-float-icon-container {
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 24px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.whatsapp-float-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.ua-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.9;
    text-transform: uppercase;
    color: #ffffff;
}

.support-text {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.5px;
    color: #ffffff;
}

/* Pulse animation */
@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-float-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50px;
    animation: pulse-whatsapp 2s infinite;
    z-index: -1;
}

/* For mobile accessibility */
@media (max-width: 768px) {
    .whatsapp-float-btn {
        bottom: 20px;
        right: 20px;
        padding: 10px 15px 10px 10px;
    }

    .whatsapp-float-icon-container {
        width: 40px;
        height: 40px;
        font-size: 20px;
        margin-right: 8px;
    }

    .ua-text {
        font-size: 9px;
    }

    .support-text {
        font-size: 16px;
    }
}

/* Offer Animation */
@keyframes pulse-offer {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.pulse-offer {
    animation: pulse-offer 1.5s infinite ease-in-out;
    background-color: #ef4444 !important;
    color: white !important;
    font-weight: 800;
}

/* WhatsApp Widget Styles */
.whatsapp-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.whatsapp-widget {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background-color: #e5ddd5;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.2);
    font-family: 'Inter', sans-serif;
    z-index: 10000;
}

.whatsapp-widget.show {
    display: flex;
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.whatsapp-widget-header {
    background-color: #075e54;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.whatsapp-widget-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-widget-profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: contain;
    background-color: white;
    padding: 2px;
}

.whatsapp-widget-info {
    display: flex;
    flex-direction: column;
}

.whatsapp-widget-info strong {
    font-size: 16px;
    line-height: 1.2;
    color: white;
}

.whatsapp-status-text {
    font-size: 12px;
    color: #d1d1d1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.online-dot {
    width: 8px;
    height: 8px;
    background-color: #25D366;
    border-radius: 50%;
    display: inline-block;
}

.whatsapp-widget-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0;
}

.whatsapp-widget-close:hover {
    opacity: 1;
}

.whatsapp-widget-body {
    padding: 20px;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-size: cover;
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

.whatsapp-widget-message {
    background-color: white;
    padding: 10px 15px;
    border-radius: 0 15px 15px 15px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #303030;
    max-width: 90%;
    align-self: flex-start;
}

.whatsapp-widget-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 15px 0;
    border-color: transparent white transparent transparent;
}

.whatsapp-widget-message-name {
    font-size: 13px;
    font-weight: 700;
    color: #075e54;
    margin-bottom: 5px;
}

.whatsapp-widget-message-text {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.whatsapp-widget-message-time {
    font-size: 11px;
    color: #999;
    text-align: right;
    margin-top: 2px;
}

.whatsapp-widget-footer {
    padding: 15px;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
}

.whatsapp-chat-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-decoration: none;
}

.whatsapp-chat-input-container:hover {
    text-decoration: none;
}

.whatsapp-chat-input {
    flex: 1;
    background-color: white;
    padding: 12px 15px;
    border-radius: 24px;
    color: #667781;
    font-size: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: none;
    outline: none;
}

.whatsapp-chat-input:focus {
    color: #3b4a54;
}

.whatsapp-chat-send {
    width: 44px;
    height: 44px;
    background-color: #00a884;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: background-color 0.2s, transform 0.2s;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
}

.whatsapp-chat-input-container:hover .whatsapp-chat-send {
    background-color: #008f6f;
    transform: scale(1.05);
}

.whatsapp-chat-input-container:hover .whatsapp-chat-input {
    color: #3b4a54;
}

/* Adjust original float btn since it's now inside the container */
.whatsapp-widget-container .whatsapp-float-btn {
    position: relative;
    bottom: auto;
    right: auto;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #25D366 0%, #024713 100%);
    cursor: pointer;
}