/* Formidable Journalist Directory Plugin Styles */
:root {
    --primary-color: #605ca4;
    --secondary-color: #f0f2f5;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --text-muted: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--secondary-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* Search Container */
.formidable-search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    flex-wrap: wrap;
}

.formidable-search-container input[type="text"] {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.formidable-search-container input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

.formidable-search-container button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.formidable-search-container button:hover {
    background-color: #4a4780;
}

#formidable-clear-search {
    background-color: var(--danger-color);
}

#formidable-clear-search:hover {
    background-color: #c82333;
}

/* Cards Container */
.formidable-cards-container {
    margin-top: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.formidable-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    justify-content: center;
}

.formidable-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.formidable-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.formidable-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.formidable-card-header {
    position: relative;
    background-color: var(--primary-color);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

.formidable-newsx-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--warning-color);
    color: var(--dark-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
}

.formidable-card-photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background-color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.formidable-placeholder {
    width: 100%;
    height: 100%;
    background-color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.8em;
    text-align: center;
    line-height: 1.2;
}

.formidable-card-content {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.formidable-card-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 1.3em;
    line-height: 1.3;
}

.formidable-byline, .formidable-location {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.formidable-card-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.formidable-card-button:hover {
    background-color: #4a4780;
    text-decoration: none;
}

.formidable-card-footer {
    background-color: #f8f8f8;
    padding: 15px;
    border-top: 1px solid #eee;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.formidable-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.formidable-badge-active {
    background-color: var(--success-color);
}

.formidable-badge-inactive {
    background-color: var(--danger-color);
}

/* Welcome and Profile Containers */
.formidable-welcome-container, 
.formidable-profile-container, 
.journalist-stories-container {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin: 30px auto;
    max-width: 900px;
    border: 1px solid #f0f0f0;
}

.formidable-welcome-header, 
.formidable-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 15px;
}

.formidable-welcome-header h2, 
.formidable-profile-header h2, 
.journalist-stories-container h2 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.8em;
}

/* Welcome Page Styles */
.formidable-welcome-content { 
    text-align: center; 
}

.formidable-welcome-journalist-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--light-color);
    border-radius: 10px;
    flex-wrap: wrap;
}

.formidable-welcome-photo {
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    overflow: hidden;
    border: 3px solid #fff; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background-color: #e0e0e0; 
    display: flex; 
    justify-content: center;
    align-items: center; 
    flex-shrink: 0;
}

.formidable-welcome-photo img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.formidable-welcome-details h3 { 
    margin: 0 0 5px 0; 
    color: var(--text-color); 
    font-size: 1.4em; 
}

.formidable-welcome-byline { 
    color: var(--text-muted); 
    font-style: italic; 
    margin: 0; 
}

.formidable-welcome-status { 
    margin-bottom: 30px; 
}

.formidable-welcome-status-card { 
    background-color: var(--light-color); 
    border-radius: 10px; 
    padding: 25px; 
    border: 2px solid #e9ecef; 
}

.formidable-status-icon {
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    display: flex;
    align-items: center; 
    justify-content: center; 
    font-size: 24px;
    font-weight: bold; 
    margin: 0 auto 15px auto; 
    color: #fff;
}

.formidable-status-active { 
    background-color: var(--success-color); 
}

.formidable-status-inactive { 
    background-color: var(--danger-color); 
}

.formidable-welcome-status-card h4 { 
    margin: 0 0 10px 0; 
    color: var(--text-color); 
    font-size: 1.3em; 
}

.formidable-welcome-status-card p { 
    color: var(--text-muted); 
    line-height: 1.6; 
    margin-bottom: 15px; 
}

.formidable-status-badge { 
    display: inline-block; 
    padding: 8px 16px; 
    border-radius: 20px; 
    font-size: 0.8em; 
    font-weight: bold; 
    color: #fff; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

.formidable-welcome-actions p { 
    color: var(--text-color); 
    font-size: 1.1em; 
    margin-bottom: 20px; 
}

.formidable-welcome-buttons { 
    display: flex; 
    gap: 15px; 
    justify-content: center; 
    flex-wrap: wrap; 
}

.formidable-proceed-button, 
.formidable-cancel-button { 
    color: #fff !important; 
    padding: 12px 25px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: 500; 
    transition: var(--transition); 
}

.formidable-proceed-button { 
    background-color: var(--success-color); 
}

.formidable-proceed-button:hover { 
    background-color: #218838; 
}

.formidable-cancel-button { 
    background-color: var(--text-muted); 
}

.formidable-cancel-button:hover { 
    background-color: #5a6268; 
}

/* Profile Page Styles */
.formidable-profile-header-actions { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    flex-wrap: wrap; 
}

.formidable-verified-badge { 
    background-color: var(--success-color); 
    color: #fff; 
    padding: 8px 15px; 
    border-radius: 20px; 
    font-size: 0.8em; 
    font-weight: bold; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

.formidable-unverified-badge { 
    background-color: var(--danger-color); 
    color: #fff; 
    padding: 8px 15px; 
    border-radius: 20px; 
    font-size: 0.8em; 
    font-weight: bold; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

.formidable-back-button { 
    background-color: var(--text-muted); 
    color: #fff !important; 
    padding: 10px 18px; 
    border-radius: 6px; 
    text-decoration: none; 
    font-size: 0.9em; 
    transition: var(--transition); 
}

.formidable-back-button:hover { 
    background-color: #5a6268; 
}

.formidable-profile-main-info { 
    display: flex; 
    align-items: flex-start; 
    gap: 30px; 
    margin-bottom: 30px; 
    padding-bottom: 30px; 
    border-bottom: 1px solid #eee; 
    flex-wrap: wrap; 
}

.formidable-profile-photo { 
    width: 120px; 
    height: 120px; 
    border-radius: 50%; 
    overflow: hidden; 
    border: 4px solid #fff; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    flex-shrink: 0; 
    background-color: var(--secondary-color); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

.formidable-profile-photo img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.formidable-profile-text-info { 
    text-align: left; 
    flex: 1; 
    min-width: 250px; 
}

.formidable-profile-text-info h2 { 
    margin-top: 0; 
    margin-bottom: 5px; 
    font-size: 2em; 
    color: var(--text-color); 
}

.formidable-profile-byline { 
    font-size: 1.1em; 
    color: var(--text-muted); 
    margin-bottom: 5px; 
}

.formidable-profile-location { 
    font-size: 1em; 
    color: var(--text-muted); 
    margin-bottom: 15px; 
}

.formidable-profile-roles { 
    background-color: var(--secondary-color); 
    padding: 10px 15px; 
    border-radius: 8px; 
    font-size: 0.9em; 
    color: var(--text-color); 
    line-height: 1.5; 
}

.formidable-profile-contact-info { 
    display: flex; 
    justify-content: space-around; 
    margin-bottom: 30px; 
    padding-bottom: 30px; 
    border-bottom: 1px solid #eee; 
    flex-wrap: wrap; 
    gap: 15px; 
}

.formidable-profile-contact-info p { 
    margin: 5px 0; 
    color: var(--text-color); 
    font-size: 1em; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.formidable-profile-contact-info span { 
    font-size: 1.2em; 
}

.formidable-profile-contact-info a { 
    color: var(--primary-color); 
    text-decoration: none; 
    transition: var(--transition); 
}

.formidable-profile-contact-info a:hover { 
    color: #4a4780; 
    text-decoration: underline; 
}

.formidable-profile-section { 
    background-color: var(--light-color); 
    border-radius: 10px; 
    padding: 20px; 
    margin-bottom: 20px; 
    border: 1px solid #e9ecef; 
}

.formidable-field-label { 
    color: var(--text-color); 
    font-weight: 600; 
    display: block; 
    margin-bottom: 8px; 
    font-size: 1.1em; 
}

.formidable-field-value { 
    color: var(--text-color); 
    line-height: 1.6; 
    font-size: 1em; 
}

.formidable-profile-image { 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px; 
    margin-top: 10px; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
}

.formidable-visibility-controls { 
    background-color: var(--secondary-color); 
    border-radius: 10px; 
    padding: 25px; 
    margin-bottom: 30px; 
    border: 1px solid #ddd; 
}

.formidable-visibility-controls h3 { 
    margin-top: 0; 
    color: var(--text-color); 
    font-size: 1.3em; 
}

.formidable-visibility-control { 
    margin-top: 10px; 
    display: flex; 
    gap: 15px; 
    flex-wrap: wrap; 
}

.formidable-visibility-control label { 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    font-size: 0.9em; 
    color: var(--text-color); 
    cursor: pointer; 
}

.formidable-save-visibility-btn { 
    background-color: var(--success-color); 
    color: #fff; 
    padding: 12px 25px; 
    border: none; 
    border-radius: 8px; 
    font-size: 1em; 
    cursor: pointer; 
    transition: var(--transition); 
    margin-top: 20px; 
}

.formidable-save-visibility-btn:hover { 
    background-color: #218838; 
}

.formidable-success-message { 
    background-color: #d4edda; 
    color: #155724; 
    padding: 15px; 
    border-radius: 8px; 
    border: 1px solid #c3e6cb; 
    margin-bottom: 20px; 
    text-align: center; 
}

.formidable-error, 
.formidable-no-entries, 
.formidable-no-results { 
    background-color: #f8d7da; 
    color: #721c24; 
    padding: 15px; 
    border-radius: 8px; 
    border: 1px solid #f5c6cb; 
    margin: 20px auto; 
    max-width: 800px; 
    text-align: center; 
}

/* Enhanced Stories CSS with Modern Design */
.journalist-stories-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.journalist-stories-container h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 2.5em;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.journalist-stories-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 2px;
}

.stories-count {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-style: italic;
    font-size: 1.1em;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    margin-left: 50%;
    transform: translateX(-50%);
}

.story-item {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--primary-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.story-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color), var(--success-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.story-item:hover::before {
    transform: scaleX(1);
}

.story-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-left-color: var(--info-color);
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.story-header h3 {
    margin: 0;
    flex: 1;
    min-width: 300px;
    font-size: 1.4em;
    line-height: 1.3;
    font-weight: 600;
}

.story-header h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.story-header h3 a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    transition: width 0.3s ease;
}

.story-header h3 a:hover {
    color: var(--primary-color);
}

.story-header h3 a:hover::after {
    width: 100%;
}

.story-date {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(96, 92, 164, 0.3);
    position: relative;
    overflow: hidden;
}

.story-date::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.story-item:hover .story-date::before {
    left: 100%;
}

.story-summary {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.05em;
    text-align: justify;
    position: relative;
    padding-left: 20px;
}

.story-summary::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 2em;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: Georgia, serif;
}

.story-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    transition: all 0.3s ease;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.story-read-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.story-read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.story-read-more:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(96, 92, 164, 0.3);
}

.story-read-more:hover::before {
    left: 0;
}

.story-read-more:hover::after {
    transform: translateX(5px);
}

.stories-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    gap: 25px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.pagination-prev,
.pagination-next {
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(96, 92, 164, 0.3);
    position: relative;
    overflow: hidden;
}

.pagination-prev::before,
.pagination-next::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.pagination-prev:hover::before,
.pagination-next:hover::before {
    left: 100%;
}

.pagination-prev:hover,
.pagination-next:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(96, 92, 164, 0.4);
}

.pagination-info {
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1em;
    padding: 10px 20px;
    background: rgba(96, 92, 164, 0.1);
    border-radius: 20px;
    border: 2px solid rgba(96, 92, 164, 0.2);
}

/* Enhanced loading animation for stories */
@keyframes storyFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.story-item {
    animation: storyFadeIn 0.6s ease forwards;
}

.story-item:nth-child(even) {
    animation-delay: 0.1s;
}

.story-item:nth-child(odd) {
    animation-delay: 0.2s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .formidable-search-container { 
        flex-direction: column; 
        align-items: stretch; 
    }
    
    .formidable-cards-grid { 
        grid-template-columns: 1fr; 
    }
    
    .formidable-card { 
        max-width: 100%; 
    }
    
    .formidable-profile-container, 
    .formidable-welcome-container { 
        margin: 15px; 
        padding: 20px; 
    }
    
    .formidable-profile-header, 
    .formidable-welcome-header { 
        flex-direction: column; 
        text-align: center; 
    }
    
    .formidable-profile-header-actions { 
        justify-content: center; 
    }
    
    .formidable-profile-header h2, 
    .formidable-welcome-header h2 { 
        font-size: 1.5em; 
    }
    
    .formidable-profile-main-info { 
        flex-direction: column; 
        align-items: center; 
        text-align: center; 
    }
    
    .formidable-profile-text-info { 
        text-align: center; 
    }
    
    .formidable-profile-contact-info { 
        flex-direction: column; 
        align-items: center; 
    }
    
    .formidable-welcome-journalist-info { 
        flex-direction: column; 
        text-align: center; 
    }
    
    .formidable-welcome-buttons { 
        flex-direction: column; 
        align-items: center; 
    }
    
    .formidable-proceed-button, 
    .formidable-cancel-button { 
        width: 100%; 
        text-align: center; 
    }
    
    .story-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .story-header h3 {
        min-width: auto;
    }
    
    .stories-pagination {
        flex-direction: column;
        gap: 15px;
    }
    
    .journalist-stories-container h2 {
        font-size: 1.8em;
    }
}
