/**
 * NTUA Alumni - Public Styles
 */

/* Variables */
:root {
    --ntua-primary: #003366;
    --ntua-primary-dark: #002244;
    --ntua-secondary: #6c757d;
    --ntua-success: #28a745;
    --ntua-warning: #ffc107;
    --ntua-danger: #dc3545;
    --ntua-info: #17a2b8;
    --ntua-light: #f8f9fa;
    --ntua-dark: #343a40;
    --ntua-border: #dee2e6;
    --ntua-text: #333;
    --ntua-text-muted: #6c757d;
    --ntua-radius: 8px;
    --ntua-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --ntua-shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
}

/* Reset & Base */
.ntua-profile-edit,
.ntua-profile-view,
.ntua-directory,
.ntua-dashboard,
.ntua-login-form {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ntua-text);
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Notices */
.ntua-notice {
    padding: 20px;
    border-radius: var(--ntua-radius);
    margin-bottom: 20px;
}

.ntua-notice h3 {
    margin: 0 0 10px;
}

.ntua-notice-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.ntua-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.ntua-notice-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.ntua-notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Buttons */
.ntua-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--ntua-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ntua-btn-primary {
    background: var(--ntua-primary);
    color: #fff;
}

.ntua-btn-primary:hover {
    background: var(--ntua-primary-dark);
    color: #fff;
}

.ntua-btn-secondary {
    background: var(--ntua-light);
    color: var(--ntua-text);
    border: 1px solid var(--ntua-border);
}

.ntua-btn-secondary:hover {
    background: #e9ecef;
}

.ntua-btn-text {
    background: transparent;
    color: var(--ntua-primary);
    padding: 5px 10px;
}

.ntua-btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

.ntua-btn-full {
    width: 100%;
    text-align: center;
}

/* Forms */
.ntua-form-section {
    background: #fff;
    border: 1px solid var(--ntua-border);
    border-radius: var(--ntua-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.ntua-form-section h2 {
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ntua-primary);
    font-size: 20px;
}

.ntua-form-section h3 {
    margin: 24px 0 16px;
    font-size: 16px;
    color: var(--ntua-secondary);
}

.ntua-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.ntua-form-group {
    flex: 1;
    margin-bottom: 16px;
}

.ntua-form-group-small {
    flex: 0 0 120px;
}

.ntua-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
}

.ntua-form-group input[type="text"],
.ntua-form-group input[type="email"],
.ntua-form-group input[type="tel"],
.ntua-form-group input[type="url"],
.ntua-form-group input[type="number"],
.ntua-form-group input[type="password"],
.ntua-form-group select,
.ntua-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--ntua-border);
    border-radius: var(--ntua-radius);
    transition: border-color 0.2s;
}

.ntua-form-group input:focus,
.ntua-form-group select:focus,
.ntua-form-group textarea:focus {
    outline: none;
    border-color: var(--ntua-primary);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.ntua-help-text {
    font-size: 12px;
    color: var(--ntua-text-muted);
    margin-top: 4px;
}

.ntua-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.ntua-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Photo Upload */
.ntua-photo-upload {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.ntua-photo-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ntua-light);
    border: 2px solid var(--ntua-border);
}

.ntua-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ntua-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ntua-text-muted);
    font-size: 12px;
}

.ntua-photo-controls input[type="file"] {
    display: none;
}

/* Repeater */
.ntua-repeater {
    margin-bottom: 16px;
}

.ntua-repeater-item {
    position: relative;
    background: var(--ntua-light);
    border: 1px solid var(--ntua-border);
    border-radius: var(--ntua-radius);
    padding: 16px;
    margin-bottom: 12px;
}

.ntua-btn-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    padding: 0;
    background: var(--ntua-danger);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 24px;
}

.ntua-add-item {
    margin-top: 8px;
}

/* Form Actions */
.ntua-form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
}

.ntua-form-message {
    font-size: 14px;
}

.ntua-form-message.success {
    color: var(--ntua-success);
}

.ntua-form-message.error {
    color: var(--ntua-danger);
}

/* Directory */
.ntua-directory-filters {
    background: #fff;
    border: 1px solid var(--ntua-border);
    border-radius: var(--ntua-radius);
    padding: 20px;
    margin-bottom: 24px;
}

.ntua-search-main {
    display: flex;
    gap: 12px;
}

.ntua-search-main input {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid var(--ntua-border);
    border-radius: var(--ntua-radius);
}

.ntua-filters-toggle {
    margin-top: 12px;
}

.ntua-filters-panel {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ntua-border);
}

.ntua-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.ntua-filter-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
}

.ntua-filter-group select,
.ntua-filter-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--ntua-border);
    border-radius: var(--ntua-radius);
}

.ntua-filter-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ntua-filter-range select {
    flex: 1;
}

.ntua-filters-options {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}

.ntua-filters-actions {
    margin-top: 16px;
}

/* Results */
.ntua-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ntua-results-count {
    font-size: 14px;
    color: var(--ntua-text-muted);
}

.ntua-results-sort select {
    padding: 6px 12px;
    border: 1px solid var(--ntua-border);
    border-radius: var(--ntua-radius);
}

/* Alumni Grid */
.ntua-alumni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.ntua-alumni-card {
    background: #fff;
    border: 1px solid var(--ntua-border);
    border-radius: var(--ntua-radius);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.ntua-alumni-card:hover {
    box-shadow: var(--ntua-shadow-lg);
    transform: translateY(-2px);
}

.ntua-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 20px;
}

.ntua-card-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
    background: var(--ntua-light);
}

.ntua-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ntua-card-content {
    text-align: center;
}

.ntua-card-name {
    font-size: 18px;
    margin: 0 0 4px;
    color: var(--ntua-primary);
}

.ntua-card-school {
    font-size: 13px;
    color: var(--ntua-text-muted);
    margin: 0 0 8px;
}

.ntua-card-position,
.ntua-card-company {
    font-size: 14px;
    margin: 0;
}

.ntua-card-company {
    color: var(--ntua-text-muted);
}

.ntua-card-location {
    font-size: 13px;
    color: var(--ntua-text-muted);
    margin: 8px 0 0;
}

.ntua-card-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.ntua-badge {
    font-size: 16px;
    cursor: help;
}

/* Profile View */
.ntua-profile-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--ntua-border);
}

.ntua-profile-photo {
    flex-shrink: 0;
}

.ntua-profile-photo img,
.ntua-profile-photo .ntua-photo-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--ntua-primary);
}

.ntua-profile-photo .ntua-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ntua-primary);
    color: #fff;
    font-size: 48px;
    font-weight: bold;
}

.ntua-profile-name {
    font-size: 28px;
    margin: 0 0 4px;
    color: var(--ntua-primary);
}

.ntua-profile-name-en {
    font-size: 16px;
    color: var(--ntua-text-muted);
    margin: 0 0 12px;
}

.ntua-profile-headline {
    font-size: 18px;
    margin: 0 0 8px;
}

.ntua-profile-school {
    font-size: 14px;
    color: var(--ntua-text-muted);
    margin: 0 0 4px;
}

.ntua-profile-year {
    font-weight: bold;
}

.ntua-profile-location {
    font-size: 14px;
    margin: 8px 0;
}

.ntua-profile-badges {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.ntua-profile-badges .ntua-badge {
    background: var(--ntua-light);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.ntua-profile-social {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.ntua-social-link {
    padding: 6px 12px;
    background: var(--ntua-light);
    border-radius: var(--ntua-radius);
    font-size: 13px;
    text-decoration: none;
    color: var(--ntua-text);
}

.ntua-social-link:hover {
    background: var(--ntua-primary);
    color: #fff;
}

.ntua-profile-section {
    margin-bottom: 30px;
}

.ntua-profile-section h2 {
    font-size: 18px;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ntua-primary);
}

/* Education */
.ntua-education-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--ntua-border);
}

.ntua-education-item:last-child {
    border-bottom: none;
}

.ntua-education-icon {
    font-size: 24px;
}

.ntua-education-content h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.ntua-education-content p {
    margin: 0;
    font-size: 14px;
    color: var(--ntua-text-muted);
}

.ntua-education-type {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 8px;
    background: var(--ntua-light);
    border-radius: 4px;
    font-size: 12px;
}

/* Experience */
.ntua-experience-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
}

.ntua-experience-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20px;
}

.ntua-timeline-dot {
    width: 12px;
    height: 12px;
    background: var(--ntua-primary);
    border-radius: 50%;
}

.ntua-experience-current .ntua-timeline-dot {
    background: var(--ntua-success);
}

.ntua-timeline-line {
    flex: 1;
    width: 2px;
    background: var(--ntua-border);
    margin-top: 8px;
}

.ntua-experience-content h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.ntua-experience-company {
    margin: 0 0 4px;
    color: var(--ntua-text-muted);
}

.ntua-experience-period {
    font-size: 13px;
    color: var(--ntua-text-muted);
    margin: 0 0 8px;
}

.ntua-experience-desc {
    font-size: 14px;
    margin: 0;
}

/* Skills */
.ntua-skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ntua-skill-tag {
    padding: 6px 14px;
    background: var(--ntua-light);
    border-radius: 20px;
    font-size: 14px;
}

/* Dashboard */
.ntua-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.ntua-dashboard-welcome h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.ntua-dashboard-welcome p {
    margin: 0;
    color: var(--ntua-text-muted);
}

.ntua-dashboard-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.ntua-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.ntua-stat-card {
    background: #fff;
    border: 1px solid var(--ntua-border);
    border-radius: var(--ntua-radius);
    padding: 20px;
    text-align: center;
}

.ntua-stat-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.ntua-stat-label {
    display: block;
    font-size: 12px;
    color: var(--ntua-text-muted);
    margin-bottom: 4px;
}

.ntua-stat-value {
    font-weight: 600;
    color: var(--ntua-primary);
}

.ntua-action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.ntua-action-card {
    display: block;
    background: #fff;
    border: 1px solid var(--ntua-border);
    border-radius: var(--ntua-radius);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}

.ntua-action-card:hover {
    box-shadow: var(--ntua-shadow-lg);
    transform: translateY(-2px);
}

.ntua-action-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.ntua-action-title {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.ntua-action-desc {
    display: block;
    font-size: 14px;
    color: var(--ntua-text-muted);
}

.ntua-dashboard-reminder {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: var(--ntua-radius);
    padding: 20px;
    margin-bottom: 30px;
}

.ntua-dashboard-reminder h3 {
    margin: 0 0 8px;
}

.ntua-dashboard-reminder ul {
    margin: 8px 0 16px;
    padding-left: 20px;
}

/* Login */
.ntua-login-form {
    max-width: 400px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border: 1px solid var(--ntua-border);
    border-radius: var(--ntua-radius);
}

.ntua-login-form h2 {
    margin: 0 0 24px;
    text-align: center;
}

.ntua-form-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ntua-forgot-link {
    font-size: 13px;
    color: var(--ntua-primary);
}

.ntua-login-register {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--ntua-border);
    text-align: center;
}

.ntua-login-register p {
    margin: 0 0 12px;
    color: var(--ntua-text-muted);
}

/* Loading */
.ntua-loading {
    text-align: center;
    padding: 40px;
    color: var(--ntua-text-muted);
}

.ntua-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--ntua-border);
    border-top-color: var(--ntua-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Load More */
.ntua-load-more {
    text-align: center;
    margin-top: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .ntua-form-row {
        flex-direction: column;
    }
    
    .ntua-form-group-small {
        flex: 1;
    }
    
    .ntua-profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .ntua-profile-photo {
        margin: 0 auto;
    }
    
    .ntua-profile-badges,
    .ntua-profile-social {
        justify-content: center;
    }
    
    .ntua-search-main {
        flex-direction: column;
    }
    
    .ntua-filters-options {
        flex-direction: column;
    }
    
    .ntua-alumni-grid {
        grid-template-columns: 1fr;
    }
}

/* =================================================================
 * [ntua_user_menu] — header user dropdown / login CTA
 * Brand palette:
 *   --ntua-brand-navy   #1B3A6B
 *   --ntua-brand-olive  #6B7A3F
 *   --ntua-brand-gold   #C5A572
 *   --ntua-brand-ivory  #F1EEE6
 *   --ntua-brand-dgreen #2D4A40
 * ================================================================= */

.ntua-user-menu {
    --ntua-um-gold: #C5A572;
    --ntua-um-gold-hover: #B89260;
    --ntua-um-navy: #1B3A6B;
    --ntua-um-ivory: #F1EEE6;
    --ntua-um-text: #2D4A40;

    position: relative;
    display: inline-flex;
    align-items: center;
    font-family: inherit;
    line-height: 1.2;
    color: var(--ntua-um-text);
}

/* Shared icon styling (gold, no fill bg, no blue hover from theme) */
.ntua-user-menu .ntua-user-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: var(--ntua-um-gold);
    background: transparent !important;     /* kill Astra / Elementor button bg */
    flex-shrink: 0;
}
.ntua-user-menu .ntua-user-menu-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* ---------- Logged-out: simple link ---------- */
.ntua-user-menu[data-state="logged-out"] .ntua-user-menu-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: var(--ntua-um-text);
    background: transparent !important;
    border: 1px solid var(--ntua-um-gold);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none !important;
    transition: color .15s, border-color .15s, background-color .15s;
}
.ntua-user-menu[data-state="logged-out"] .ntua-user-menu-login:hover,
.ntua-user-menu[data-state="logged-out"] .ntua-user-menu-login:focus-visible {
    color: var(--ntua-um-navy);
    border-color: var(--ntua-um-gold-hover);
    background: var(--ntua-um-ivory) !important;
    outline: none;
}
.ntua-user-menu[data-state="logged-out"] .ntua-user-menu-login:hover .ntua-user-menu-icon,
.ntua-user-menu[data-state="logged-out"] .ntua-user-menu-login:focus-visible .ntua-user-menu-icon {
    color: var(--ntua-um-gold-hover);
}

/* ---------- Logged-in: trigger button ---------- */
.ntua-user-menu[data-state="logged-in"] .ntua-user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 0;
    background: transparent !important;     /* kill Astra/Elementor blue */
    border: none;
    cursor: pointer;
    color: var(--ntua-um-text);
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: background-color .15s, color .15s;
}
.ntua-user-menu[data-state="logged-in"] .ntua-user-menu-trigger:hover,
.ntua-user-menu[data-state="logged-in"] .ntua-user-menu-trigger:focus-visible,
.ntua-user-menu[data-state="logged-in"].is-open .ntua-user-menu-trigger {
    background: var(--ntua-um-ivory) !important;
    color: var(--ntua-um-navy);
    outline: none;
}

/* The greeting and name inside the trigger */
.ntua-user-menu .ntua-user-menu-greeting {
    font-weight: 500;
}
.ntua-user-menu .ntua-user-menu-name {
    color: var(--ntua-um-navy);
    font-weight: 700;
    margin-left: 4px;
}

/* Caret rotates when open */
.ntua-user-menu .ntua-user-menu-caret {
    display: inline-flex;
    width: 10px;
    height: 8px;
    color: var(--ntua-um-gold);
    transition: transform .2s ease;
}
.ntua-user-menu .ntua-user-menu-caret svg { width: 100%; height: 100%; }
.ntua-user-menu.is-open .ntua-user-menu-caret { transform: rotate(180deg); }

/* ---------- Dropdown panel ---------- */
.ntua-user-menu .ntua-user-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid rgba(27, 58, 107, .12);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(27, 58, 107, .12), 0 2px 6px rgba(0,0,0,.06);
    z-index: 9999;
}
.ntua-user-menu .ntua-user-menu-panel[hidden] { display: none; }

.ntua-user-menu .ntua-user-menu-panel li { margin: 0; padding: 0; }

.ntua-user-menu .ntua-user-menu-panel a {
    display: block;
    padding: 10px 14px;
    color: var(--ntua-um-text);
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: background-color .15s, color .15s;
}
.ntua-user-menu .ntua-user-menu-panel a:hover,
.ntua-user-menu .ntua-user-menu-panel a:focus-visible {
    background: var(--ntua-um-ivory);
    color: var(--ntua-um-navy);
    outline: none;
}
.ntua-user-menu .ntua-user-menu-panel .ntua-user-menu-logout {
    color: #8B2D2D;                          /* subtle dark red, no theme blue */
    border-top: 1px solid rgba(27,58,107,.08);
    margin-top: 4px;
    padding-top: 12px;
}
.ntua-user-menu .ntua-user-menu-panel .ntua-user-menu-logout:hover,
.ntua-user-menu .ntua-user-menu-panel .ntua-user-menu-logout:focus-visible {
    background: #FBEAEA;
    color: #6B1F1F;
}

/* Tighten on small screens — hide greeting text, keep icon + caret */
@media (max-width: 480px) {
    .ntua-user-menu .ntua-user-menu-greeting { display: none; }
    .ntua-user-menu[data-state="logged-out"] .ntua-user-menu-login-label { display: none; }
}
