* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
}

.hero-section {
    background: linear-gradient(135deg, #c41e3a 0%, #228b22 100%);
    padding: 120px 0;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.moving-text-container {
    position: relative;
    z-index: 2;
}

.moving-text {
    animation: slideIn 2s ease-out;
}

.slogan-carousel {
    margin-top: 30px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slogan {
    position: absolute;
    opacity: 0;
    animation: fadeSlide 12s infinite;
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.slogan:nth-child(1) { animation-delay: 0s; }
.slogan:nth-child(2) { animation-delay: 4s; }
.slogan:nth-child(3) { animation-delay: 8s; }

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeSlide {
    0%, 33.33% {
        opacity: 1;
        transform: translateX(0);
    }
    36.33%, 100% {
        opacity: 0;
        transform: translateX(20px);
    }
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #f0f0f0;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(196, 30, 58, 0.3);
    border-color: #c41e3a;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

footer {
    margin-top: auto;
    background: linear-gradient(90deg, #228b22 0%, #c41e3a 100%);
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.social-links a {
    transition: transform 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    transform: scale(1.2);
}

.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 12px 20px;
}

.sidebar .nav-link:hover {
    background-color: #ffe6e6;
    color: #c41e3a;
}

.sidebar .nav-link i {
    margin-right: 8px;
}

main {
    margin-top: 56px;
}

@media (max-width: 768px) {
    .sidebar {
        position: relative;
        top: 0;
    }
    
    main {
        margin-top: 0;
    }
}

/* Red, White, Green Theme */
.btn-primary {
    background: linear-gradient(135deg, #c41e3a 0%, #a01729 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a01729 0%, #c41e3a 100%);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(196, 30, 58, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #228b22 0%, #1a6b1a 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1a6b1a 0%, #228b22 100%);
    transform: scale(1.05);
}

.text-success {
    color: #228b22 !important;
}

.navbar-dark {
    background: linear-gradient(90deg, #c41e3a 0%, #228b22 100%) !important;
}

.navbar-brand {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.card-title {
    color: #c41e3a;
    font-weight: 600;
}

.highlight-green {
    color: #228b22;
    font-weight: bold;
}

.highlight-red {
    color: #c41e3a;
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .slogan {
        font-size: 1.2rem;
        padding: 0 20px;
    }
    
    .hero-section {
        padding: 80px 0;
    }
}

/* ========================================
   User Module Styles
   ======================================== */

/* Dashboard Cards - prevent hover effect on quick-link cards */
.card.shadow-sm {
    border: 1px solid #e0e0e0;
}

/* User dropdown in navbar */
.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* CV Builder tab styles */
.nav-tabs .nav-link {
    color: #555;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: #c41e3a;
    border-bottom: 3px solid #c41e3a;
    font-weight: 600;
}

.nav-tabs .nav-link .badge {
    font-size: 0.7rem;
}

/* Profile photo placeholder */
.profile-photo-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Success notification auto-dismiss animation */
.alert-success {
    animation: fadeIn 0.3s ease;
}

/* CV Preview container for A4 display */
.cv-preview-container {
    border: 1px solid #ddd;
    background: white;
}

/* Letter editor textarea */
#content {
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    min-height: 400px;
}

/* Template selector cards */
.template-card {
    transition: all 0.2s ease;
    cursor: pointer;
}

.template-card:hover {
    transform: translateY(-2px);
    border-color: #c41e3a !important;
}

.template-card.active {
    border-color: #c41e3a !important;
    background-color: #fff5f5;
}

/* Progress bar for profile completion */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
    font-weight: 600;
}

/* Responsive adjustments for user module */
@media (max-width: 768px) {
    .cv-preview-container {
        padding: 10mm !important;
        min-height: auto !important;
        width: 100% !important;
    }

    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .nav-tabs .nav-link {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .table-responsive {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .card-body .d-flex.gap-2 {
        flex-direction: column;
    }

    .btn-lg {
        font-size: 1rem;
        padding: 0.6rem 1.2rem;
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   AI Interview Coach Styles
   ======================================== */

/* Main coach interface card */
.interview-coach-card {
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.interview-coach-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.interview-coach-card .card-header {
    background: linear-gradient(135deg, #c41e3a 0%, #228b22 100%);
    color: #fff;
    border-radius: 10px 10px 0 0;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

/* Learnership selector */
.interview-coach-card .learnership-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.interview-coach-card .learnership-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.interview-coach-card .learnership-item:hover {
    background-color: #fff5f5;
}

.interview-coach-card .learnership-item.active {
    background-color: #ffe6e6;
    border-left: 3px solid #c41e3a;
}

/* Question practice interface */
.question-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    background-color: #fafafa;
    position: relative;
}

.question-card .question-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    background-color: #f0f0f0;
    color: #555;
}

.question-card .question-category.category-technical {
    background-color: #e8f4fd;
    color: #0d6efd;
}

.question-card .question-category.category-behavioural {
    background-color: #fff3cd;
    color: #856404;
}

.question-card .question-category.category-situational {
    background-color: #d1e7dd;
    color: #0f5132;
}

.question-card .question-category.category-experience-based {
    background-color: #f8d7da;
    color: #842029;
}

.question-card .question-category.category-role-specific {
    background-color: #e2d9f3;
    color: #5a2d82;
}

.question-card .question-text {
    font-size: 1.15rem;
    font-weight: 500;
    color: #333;
    line-height: 1.6;
}

/* Interview progress indicator */
.interview-progress {
    margin-bottom: 1.5rem;
}

.interview-progress .progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.interview-progress .progress-bar {
    background: linear-gradient(90deg, #c41e3a 0%, #228b22 100%);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.interview-progress .progress-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
}

/* Character counter */
.char-counter {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: right;
    margin-top: 0.25rem;
    transition: color 0.2s ease;
}

.char-counter.warning {
    color: #e67e22;
    font-weight: 500;
}

.char-counter.danger {
    color: #c41e3a;
    font-weight: 600;
}

/* Answer textarea styling */
.answer-textarea {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    min-height: 150px;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.answer-textarea:focus {
    border-color: #c41e3a;
    box-shadow: 0 0 0 0.2rem rgba(196, 30, 58, 0.15);
    outline: none;
}

/* Score cards on results page */
.score-card {
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    border: 2px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.score-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.score-card .score-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.score-card .score-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    color: #555;
}

.score-card .score-dimension {
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.25rem;
}

/* Score color schemes */
.score-needs-improvement {
    background-color: #fdf0f0;
    border-color: #f5c6cb;
    color: #c41e3a;
}

.score-needs-improvement .score-value {
    color: #c41e3a;
}

.score-needs-improvement .score-label {
    color: #a01729;
}

.score-good-progress {
    background-color: #fff8e6;
    border-color: #ffeeba;
    color: #e67e22;
}

.score-good-progress .score-value {
    color: #e67e22;
}

.score-good-progress .score-label {
    color: #c56e1a;
}

.score-interview-ready {
    background-color: #e8f5e9;
    border-color: #c3e6cb;
    color: #228b22;
}

.score-interview-ready .score-value {
    color: #228b22;
}

.score-interview-ready .score-label {
    color: #1a6b1a;
}

/* Score bar (progress bar for score dimensions) */
.score-bar {
    height: 10px;
    border-radius: 5px;
    background-color: #e9ecef;
    overflow: hidden;
    margin-top: 0.5rem;
}

.score-bar .score-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s ease;
}

.score-bar .score-bar-fill.fill-needs-improvement {
    background: linear-gradient(90deg, #dc3545, #c41e3a);
}

.score-bar .score-bar-fill.fill-good-progress {
    background: linear-gradient(90deg, #ffc107, #e67e22);
}

.score-bar .score-bar-fill.fill-interview-ready {
    background: linear-gradient(90deg, #28a745, #228b22);
}

/* Per-question results accordion/cards */
.question-result-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.question-result-card:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.question-result-card .result-header {
    padding: 1rem 1.25rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-result-card .result-header .question-number {
    font-weight: 700;
    color: #c41e3a;
    margin-right: 0.75rem;
}

.question-result-card .result-header .question-score {
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.question-result-card .result-body {
    padding: 1.25rem;
}

.question-result-card .result-body .feedback-text {
    background-color: #f0f8ff;
    border-left: 3px solid #0d6efd;
    padding: 0.75rem 1rem;
    border-radius: 0 6px 6px 0;
    margin-top: 1rem;
    font-style: italic;
    color: #333;
}

.question-result-card .result-body .user-answer {
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #444;
}

/* Skipped question styling */
.skipped-question {
    opacity: 0.7;
    border: 2px dashed #adb5bd;
    background-color: #f8f9fa;
}

.skipped-question .result-header {
    background-color: #f1f1f1;
}

.skipped-question .skipped-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background-color: #6c757d;
    color: #fff;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Share card styling */
.share-card {
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.share-card .share-card-header {
    background: linear-gradient(135deg, #c41e3a 0%, #228b22 100%);
    color: #fff;
    padding: 1.5rem;
    text-align: center;
}

.share-card .share-card-header .brand-logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.share-card .share-card-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.share-card .share-card-body {
    padding: 2rem 1.5rem;
    text-align: center;
}

.share-card .share-card-body .share-score {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.share-card .share-card-body .share-category {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 1rem;
}

.share-card .share-card-body .share-learnership {
    font-size: 0.95rem;
    color: #555;
    margin-top: 0.75rem;
}

.share-card .share-card-body .share-user {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.share-card .share-card-footer {
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
    color: #6c757d;
}

/* Social sharing buttons */
.share-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.share-buttons .btn-share {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.share-buttons .btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-buttons .btn-copy-link {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

.share-buttons .btn-copy-link:hover {
    background-color: #e9ecef;
}

.share-buttons .btn-whatsapp {
    background-color: #25d366;
    color: #fff;
}

.share-buttons .btn-whatsapp:hover {
    background-color: #1ebe5d;
}

/* Copy link confirmation toast */
.copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #333;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Interview Coach CTA section on interview_prep.php */
.interview-coach-cta {
    background: linear-gradient(135deg, #fff5f5 0%, #f0fff0 100%);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.interview-coach-cta h3 {
    color: #c41e3a;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.interview-coach-cta p {
    color: #555;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive adjustments for AI Interview Coach */
@media (max-width: 768px) {
    .interview-coach-card .card-header {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .question-card {
        padding: 1rem;
    }

    .question-card .question-text {
        font-size: 1rem;
    }

    .score-card .score-value {
        font-size: 2rem;
    }

    .share-card {
        max-width: 100%;
        border-radius: 12px;
    }

    .share-card .share-card-body .share-score {
        font-size: 3rem;
    }

    .share-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .share-buttons .btn-share {
        justify-content: center;
    }

    .question-result-card .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .interview-coach-cta {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .score-card {
        padding: 1rem;
    }

    .score-card .score-value {
        font-size: 1.75rem;
    }

    .interview-progress .progress-label {
        font-size: 0.8rem;
    }

    .answer-textarea {
        min-height: 120px;
        padding: 0.75rem;
    }
}
