@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

:root {
    --bg-color: #121416; /* Deep charcoal */
    --surface-color: rgba(255, 255, 255, 0.05);
    --surface-accent: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --primary: #5c677d; /* Darker Steel Blue for better contrast */
    --primary-glow: rgba(92, 103, 125, 0.4);
    --accent: #ced4da; /* Pure Silver */
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --pattern-color: rgba(255, 255, 255, 0.02);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(rgba(33, 37, 41, 0.6), rgba(33, 37, 41, 0.7)),
        url('admin_hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Fixed background as requested */
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* Header */
header {
    background: rgba(26, 28, 30, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content { display: flex; justify-content: space-between; align-items: center; }

.logo {
    font-size: 1.4rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9); /* White text for contrast */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.logo span { 
    color: #ffffff; 
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo .admin-tag {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 1px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-header {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-header:hover {
    background: white;
    color: var(--primary);
}


/* Hero */
.hero {
    padding: 220px 0;
    text-align: left;
    background: transparent; /* Let body background show through */
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}

.hero h1 { 
    font-size: 4rem; 
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero h1 span {
    color: var(--primary);
    filter: brightness(1.2);
}

.hero p { 
    color: rgba(255, 255, 255, 0.9); 
    font-size: 1.3rem; 
    max-width: 800px; 
    margin: 0 0 2.5rem 0;
    text-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 20px var(--primary-glow);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.hero-cta:hover {
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px var(--primary-glow);
}

/* Interactive Cards */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 80px 0 100px; /* Adjusted padding */
}

.section-alt {
    background: transparent;
    padding: 100px 0;
}






@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.card {
    background: var(--surface-color);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: all 0.8s ease;
    z-index: 1;
    pointer-events: none;
}

.card:nth-child(2) { animation-delay: 1s; }
.card:nth-child(3) { animation-delay: 2s; }

.card:hover::before {
    left: 200%;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    background: var(--surface-color); /* Maintain white background, no glow-out */
}

.card h3 { 
    font-size: 1.6rem;
    margin-bottom: 1.5rem; 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    margin-top: 2rem;
    text-align: center;
}

.btn-primary { 
    background: var(--primary); 
    color: white; 
    box-shadow: 0 50x 20px var(--primary-glow);
}

.btn-primary:hover { 
    background: var(--accent);
    transform: translateY(-2px);
}

.btn-link { 
    color: var(--primary); 
    text-decoration: none;
    font-weight: 600;
}


/* AI Chatbot Premium Styles */
.ai-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #9d50bb, #6e48aa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(157, 80, 187, 0.4);
    z-index: 2001;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-fab:hover { transform: scale(1.1) rotate(10deg); }

.ai-icon { font-size: 1.8rem; }

.ai-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 550px;
    max-height: calc(100vh - 110px);
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    z-index: 2001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: aiSlideUp 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes aiSlideUp {
    from { transform: translateY(50px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.ai-header {
    background: var(--primary);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.ai-header-info { display: flex; align-items: center; gap: 12px; }

.ai-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    border: 2px solid white;
}

.ai-header h3 { font-size: 1.1rem; margin: 0; }
.ai-header p { font-size: 0.75rem; margin: 0; opacity: 0.8; }

.ai-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.3s;
}

.ai-close:hover { opacity: 1; }

.ai-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.ai-msg {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
    animation: aiFadeIn 0.3s ease;
}

@keyframes aiFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.ai-msg.bot {
    background: #f8f9fa;
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--glass-border);
}

.ai-msg.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}.ai-wa-btn {
    display: inline-block;
    background: #25d366;
    color: white !important;
    padding: 10px 15px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: 0.3s;
    border: none;
}

.ai-wa-btn:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.ai-input-wrapper {
    padding: 15px 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-input-area {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(157, 80, 187, 0.3);
    border-radius: 50px;
    padding: 5px 5px 5px 20px;
    display: flex;
    align-items: center;
}

.ai-input-area input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    padding: 10px 0;
    outline: none;
    font-size: 0.95rem;
}

#ai-send-btn {
    background: #9d50bb;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

#ai-send-btn:hover { background: #6e48aa; transform: scale(1.05); }

#ai-send-btn svg { width: 20px; height: 20px; fill: white; }

.ai-typing-indicator {
    padding: 10px 0;
    display: flex;
    gap: 4px;
}

.ai-typing-indicator span {
    width: 6px;
    height: 6px;
    background: #9d50bb;
    border-radius: 50%;
    animation: aiBounce 1.4s infinite ease-in-out;
}

.ai-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Modal Form */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 3.5rem;
    border-radius: 28px;
    width: 95%;
    max-width: 650px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
    color: white;
    max-height: 92vh;
    overflow-y: auto;
    animation: modalBounce 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modalBounce {
    from { transform: scale(0.8) translateY(30px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); 
}

.form-group input, .form-group select, .form-group textarea {
    transition: var(--transition);
}

.form-group { margin-bottom: 1.5rem; }

.form-helper {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 1rem;
    animation: aiFadeIn 0.8s ease;
}

.helper-avatar {
    width: 110px;
    height: 110px;
    background-image: url('asistente.png');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 15px 35px var(--primary-glow);
    border: 4px solid white;
    background-color: var(--primary);
    animation: avatarPulse 2.5s infinite ease-in-out;
}

@keyframes avatarPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 25px var(--primary-glow); }
    50% { transform: scale(1.1); box-shadow: 0 15px 35px var(--primary-glow); }
}

.helper-bubble {
    background: #f8f9fa;
    border: 1px solid var(--glass-border);
    padding: 15px 22px;
    border-radius: 20px;
    border-top-left-radius: 2px;
    color: #1a1c1e; /* Dark text for light background */
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    position: relative;
    box-shadow: 5px 5px 20px rgba(0,0,0,0.05);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 18px;
    border-radius: 12px;
    color: #ffffff;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}


.form-group select option {
    background: #1a1c1e;
    color: #ffffff;
}

.form-group textarea { height: 100px; resize: none; }

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

footer {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 100px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    border-top: 1px solid var(--glass-border);
    margin-top: 8rem;
}

.footer-logo {
    height: 140px;
    margin-bottom: 2.5rem;
    filter: brightness(0) invert(1) opacity(0.7); /* Perfect white monochrome */
    transition: var(--transition);
}

.footer-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}


.btn-link {
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    display: inline-block;
}

.btn-link:hover {
    color: var(--text-primary) !important;
    text-decoration: underline;
    transform: translateX(5px);
}
