/* EMPATHIA Stylesheet */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    background-image: 
        linear-gradient(#d3d3d3 1px, transparent 1px),
        linear-gradient(90deg, #d3d3d3 1px, transparent 1px),
        linear-gradient(#e8e8e8 1px, transparent 1px),
        linear-gradient(90deg, #e8e8e8 1px, transparent 1px);
    background-size: 200px 200px, 200px 200px, 40px 40px, 40px 40px;
    background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    margin: 0;
    padding: 0 15px 0 23px;
    text-align: left;
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Title Section */
.title-section {
    border-bottom: 1px solid #ced4da;
    text-align: left !important;
    padding: 15px 20px 15px 0 !important;
    margin-left: -23px !important;
    margin-right: -20px !important;
    margin-top: 0 !important;
    padding-left: 38px !important;
    overflow-x: visible;
}

.title-section * {
    text-align: left !important;
}

.title-section .container {
    padding-left: 0 !important;
    margin-left: 0 !important;
    max-width: 100% !important;
}

.title-section .container > * {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.title-section h1,
.title-section p,
.title-section .authors,
.title-section .affiliations,
.title-section .buttons,
.title-section .module-buttons {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.title-section .display-3,
.title-section .submission-text {
    text-align: left !important;
    margin-left: -9px !important;
    padding-left: 0 !important;
}

.title-section h1.display-3 {
    margin-left: -9px !important;
    position: relative;
    left: 0 !important;
}

.display-3 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    text-align: left;
    padding-left: 0 !important;
    margin-left: -9px !important;
}

@media (max-width: 1200px) {
    .display-3 {
        font-size: 2.25rem;
    }
}

.author-group {
    font-size: 1.25rem;
}

.submission-text {
    font-size: 1.25rem;
    font-style: italic;
    color: #dc3545;
}

.author-name {
    color: #007bff;
    text-decoration: none;
}

.author-name:hover {
    text-decoration: underline;
}

.affiliations {
    font-size: 0.9rem;
}

/* Buttons - Very Rounded */
.btn {
    font-size: 1.1rem;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: background-color 0.3s;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.btn:hover {
    transform: scale(1.05);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background-color: #4a4a4a;
    border-color: #4a4a4a;
    color: white;
}

.btn-primary:hover {
    background-color: #333333;
    border-color: #333333;
}

.btn-primary:active,
.btn-primary:focus,
.btn-primary:visited {
    background-color: #3a3a3a !important;
    border-color: #3a3a3a !important;
    color: white !important;
    box-shadow: none !important;
}

.btn-secondary {
    background-color: #4a4a4a;
    border-color: #4a4a4a;
    color: white;
}

.btn-secondary:hover {
    background-color: #333333;
    border-color: #333333;
}

.btn-secondary:active,
.btn-secondary:focus,
.btn-secondary:visited {
    background-color: #3a3a3a !important;
    border-color: #3a3a3a !important;
    color: white !important;
    box-shadow: none !important;
}

.btn-info {
    background-color: #4a4a4a;
    border-color: #4a4a4a;
    color: white;
}

.btn-info:hover {
    background-color: #333333;
    border-color: #333333;
}

.btn-info:active,
.btn-info:focus,
.btn-info:visited {
    background-color: #3a3a3a !important;
    border-color: #3a3a3a !important;
    color: white !important;
    box-shadow: none !important;
}

.btn-warning {
    background-color: #4a4a4a;
    border-color: #4a4a4a;
    color: white;
}

.btn-warning:hover {
    background-color: #333333;
    border-color: #333333;
    color: white;
}

.btn-warning:active,
.btn-warning:focus,
.btn-warning:visited {
    background-color: #3a3a3a !important;
    border-color: #3a3a3a !important;
    color: white !important;
    box-shadow: none !important;
}

.btn-success {
    background-color: #4a4a4a;
    border-color: #4a4a4a;
    color: white;
}

.btn-success:hover {
    background-color: #333333;
    border-color: #333333;
}

.btn-success:active,
.btn-success:focus,
.btn-success:visited {
    background-color: #3a3a3a !important;
    border-color: #3a3a3a !important;
    color: white !important;
    box-shadow: none !important;
}

/* Assessment button */
.btn-assessment {
    background-color: #5DADE2;
    border: 2px solid #2E86C1;
    color: #000000;
    padding: 8px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-assessment:hover {
    background-color: #3498DB;
    border-color: #2E86C1;
    transform: scale(1.05);
    color: #000000;
}

/* Module buttons container */
.module-buttons {
    display: inline-flex;
    border: 2.8px solid #4a4a4a;
    border-radius: 40px;
    padding: 9px 15px 9px 20px;
    margin-left: 5px !important;
    margin-right: auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    left: -12px;
}

/* Module buttons */
.module-buttons .btn {
    transition: none;
    font-weight: bold;
    margin: 0 !important;
    position: relative;
    left: 6px;
}

.module-buttons .btn-seed {
    left: 8.2px;
}

.module-buttons .btn-rise {
    left: 7.5px;
}

.btn-seed {
    background-color: #5DADE2;
    border: 2px solid #2E86C1;
    color: #000000;
    font-size: 1.1rem;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(1);
    transform-origin: center center;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: inline-block;
}

.btn-seed:hover {
    background-color: #3498DB;
    border-color: #2E86C1;
    transform: scale(1.08) translateZ(0) !important;
    transform-origin: center center !important;
    text-decoration: underline;
    color: #000000;
    z-index: 100;
    box-shadow: 0 8px 16px rgba(0,0,0,0.25);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Remove any conflicting animations */
.module-buttons .btn-seed:hover {
    animation: none !important;
    transform: scale(1.08) !important;
    transform-origin: center center !important;
}

.btn-rise {
    background-color: #F5B041;
    border: 2px solid #D68910;
    color: #000000;
    cursor: not-allowed;
    opacity: 0.8;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    font-size: 1.1rem;
    padding: 0.5rem 1.5rem;
}

.btn-rise:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    transform: none !important;
    text-decoration: none !important;
    color: #000000 !important;
}

.btn-thrive {
    background-color: #BB8FCE;
    border: 2px solid #8E44AD;
    color: #000000;
    cursor: not-allowed;
    opacity: 0.8;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    font-size: 1.1rem;
    padding: 0.5rem 1.5rem;
}

.btn-thrive:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    transform: none !important;
    text-decoration: none !important;
    color: #000000 !important;
}


/* Headers */
h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 0;
    color: #333;
}

/* Box titles specific styling */
.content-section h3 {
    margin-top: 7px !important;
}

/* Cards - LLaVA Style */
.card {
    border: 1px solid #ddd;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: box-shadow, transform;
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    padding: 0.75rem 1rem;
    border-radius: 15px 15px 0 0;
}

.card-body {
    padding: 1.25rem;
    padding-bottom: 5px;
}

/* Tables */
.table {
    font-size: 0.95rem;
}

.table-bordered {
    border: 1px solid #ddd;
}

.table-bordered td,
.table-bordered th {
    border: 1px solid #ddd;
}

/* Forms */
.form-control {
    border: 1px solid #ced4da;
    border-radius: 8px;
}

label {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

/* Assessment Results */
#assessment-results {
    min-height: 150px;
}

.assessment-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
}

/* Score Display */
#emotional-score,
#cultural-score,
#ethical-score {
    color: #007bff;
    font-weight: 600;
    font-size: 2rem;
}

/* Pre-formatted text */
pre {
    font-size: 0.875rem;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 15px;
}

/* Copy button */
.btn-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 0.875rem;
    z-index: 10;
    transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: background-color, transform;
}

.btn-copy:hover {
    background-color: #5a6268;
    color: white;
    transform: scale(1.05) translateZ(0);
}

/* Responsive */
@media (max-width: 768px) {
    .display-3 {
        font-size: 1.5rem;
    }
    
    .author-group {
        font-size: 1rem;
    }
    
    .btn {
        margin-bottom: 0.5rem;
    }
    
    .form-row .form-group {
        margin-bottom: 10px;
    }
}

/* Links */
a {
    color: #007bff;
}

a:hover {
    color: #0056b3;
}

/* Utility */
.text-justify {
    text-align: left;
}

.align-middle {
    vertical-align: middle !important;
}

/* Remove container background - use body background throughout */
.container, .container-fluid {
    background-color: transparent;
    text-align: left;
    max-width: calc(100% - 20px) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: -8px !important;
    margin-right: 0 !important;
}

/* Force all text alignment to left */
* {
    text-align: left !important;
}

/* Center alignment override for specific elements */
.text-center {
    text-align: left !important;
}

.text-right {
    text-align: left !important;
}

/* Align all flex containers to start */
.d-flex, .flex-row, .flex-column {
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

/* Remove Bootstrap's default margins and centering */
.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Ensure uniform alignment for all elements */
.container > *, .container-fluid > * {
    padding-left: 15px !important;
}

/* Main content sections */
.row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0px !important;
    align-items: stretch !important;
    gap: 16px;
}

/* Fix title section row to display cube on the right */
.title-section .row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0;
    align-items: flex-start;
}

/* Paragraphs and headers in main content */
.container p, .container h1, .container h2, .container h3, .container h4, .container h5, .container h6,
.container-fluid p, .container-fluid h1, .container-fluid h2, .container-fluid h3, .container-fluid h4, .container-fluid h5, .container-fluid h6 {
    padding-left: 15px !important;
}

/* All direct children of body except title section */
body > div:not(.title-section) {
    padding-left: 15px !important;
}

/* Rounded box for main content sections */
.content-box {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    margin-right: 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Style for content sections in 2-column layout */
.content-section {
    background-color: white;
    border: 1.5px solid #ddd;
    border-radius: 20px;
    padding: 5px 15px 8px 15px;
    margin-top: 12px;
    margin-bottom: 12px;
    margin-left: 0;
    margin-right: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-height: auto;
    width: 100%;
    overflow-x: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Add extra top padding for first row boxes (Abstract and System Architecture) */
.container .row:first-child .content-section {
    margin-top: 24px;
}

/* Remove padding from outer edges and shift boxes */
.col-md-6:first-child .content-section {
    padding-left: 15px !important;
    margin-right: 8px !important;
    margin-left: -14px !important;
}

.col-md-6:last-child .content-section {
    padding-right: 15px !important;
    margin-left: 8px !important;
    margin-right: -14px !important;
}

/* Ensure columns have proper spacing for side-by-side layout */
.container .col-md-6 {
    max-width: calc(50% - 8px) !important;
    flex: 0 0 calc(50% - 8px) !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    margin-right: 0 !important;
    display: flex;
    flex-direction: column;
}

.col-md-6:last-child {
    margin-right: 0 !important;
}

/* Full width sections */
.col-12 .content-section {
    margin-left: -26px !important;
    margin-right: -26px !important;
    width: calc(100% + 52px);
}

/* Add margin to specific demo and results sections */
#demo.content-section {
    margin-bottom: 27px !important;
}

#results.content-section {
    margin-bottom: 27px !important;
}


/* Section spacing */
section, .section {
    padding-top: 20px !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

/* Override Bootstrap's justify-content-center */
.justify-content-center {
    justify-content: flex-start !important;
}

/* Force specific columns to full width and left align */
.col-lg-10, .col-lg-8 {
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 0 !important;
}

/* Abstract and all text paragraphs */
p, .text-justify {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Images */
img, .img-fluid {
    margin-left: 0 !important;
    display: block !important;
}

/* Remove centering from all divs */
div {
    text-align: left !important;
}

/* Authors and affiliations */
.authors, .author-group, .affiliations {
    text-align: left !important;
    justify-content: flex-start !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Buttons group */
.buttons {
    text-align: left !important;
    justify-content: flex-start !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Module buttons and more soon text alignment */
.module-buttons + div {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Button icon styling */
.btn-icon {
    width: 18px;
    height: 18px;
    filter: invert(1);
    margin-right: 5px;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Font Awesome and Material Icons in buttons */
.btn i.fas, .btn i.fab, .btn i.material-icons {
    color: white;
    font-size: 18px;
    margin-right: 5px;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    will-change: transform;
}

/* Hover effects for button icons */
.btn:hover .btn-icon {
    transform: scale(1.3) rotate(10deg) translateZ(0);
    margin-right: 8px;
}

.btn:hover i.fas, .btn:hover i.fab {
    transform: scale(1.3) rotate(10deg) translateZ(0);
    margin-right: 8px;
}

/* Subtle Professional Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px) translateZ(0);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

@keyframes subtleGlow {
    0%, 100% {
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    50% {
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
}

/* Smooth fade-in for content sections */
.content-section {
    animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-fill-mode: both;
}

/* Staggered animation for multiple sections */
.row:nth-child(1) .col-md-6:nth-child(1) .content-section {
    animation-delay: 0.1s;
}

.row:nth-child(1) .col-md-6:nth-child(2) .content-section {
    animation-delay: 0.2s;
}

.row:nth-child(2) .col-md-6:nth-child(1) .content-section {
    animation-delay: 0.3s;
}

.row:nth-child(2) .col-md-6:nth-child(2) .content-section {
    animation-delay: 0.4s;
}

.row:nth-child(3) .col-md-6:nth-child(1) .content-section {
    animation-delay: 0.5s;
}

.row:nth-child(3) .col-md-6:nth-child(2) .content-section {
    animation-delay: 0.6s;
}

/* Title animation */
.display-3 {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Authors fade in */
.authors, .affiliations {
    animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

/* Button group animations */
.buttons {
    animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.module-buttons {
    animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    animation-delay: 0.5s;
    animation-fill-mode: both;
}

/* Subtle hover for content boxes */
.content-section {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.content-section:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Professional gradient background animation for title section */
@keyframes subtleGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.title-section {
    background: linear-gradient(90deg, #e8ecf0, #f0f4f8, #e8ecf0);
    background-size: 200% 100%;
    animation: subtleGradient 20s ease infinite;
    position: relative;
    z-index: 1;
}

/* Smooth transitions for all interactive elements */
a, button, .btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

/* Module buttons hover - no pulse animation */
.module-buttons .btn-rise:hover,
.module-buttons .btn-thrive:hover {
    transform: scale(1.05) translateZ(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Text selection color */
::selection {
    background-color: rgba(93, 173, 226, 0.3);
    color: inherit;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* 3D Spinning Cube Styles */
.cube-container {
    width: 226px;
    height: 226px;
    perspective: 1000px;
    margin: 50px 0;
    position: relative;
    left: -17px;
    margin-left: 0;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 15s infinite linear;
    will-change: transform;
}

.cube-face {
    position: absolute;
    width: 226px;
    height: 226px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #ddd;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.cube-face i {
    font-size: 60px;
    margin-bottom: 14px;
}

.cube-face-front {
    transform: translateZ(113px);
}

.cube-face-front i {
    color: #5DADE2;
}

.cube-face-right {
    transform: rotateY(120deg) translateZ(113px);
}

.cube-face-right i {
    color: #F5B041;
}

.cube-face-left {
    transform: rotateY(-120deg) translateZ(113px);
}

.cube-face-left i {
    color: #BB8FCE;
}

@keyframes rotateCube {
    0% {
        transform: rotateY(0deg) translateZ(0);
    }
    100% {
        transform: rotateY(360deg) translateZ(0);
    }
}

/* Adjust title section layout for cube */
.title-section .col-md-9 {
    padding-left: 0 !important;
    max-width: 75% !important;
    flex: 0 0 75% !important;
}

.title-section .col-md-3 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 0 !important;
    max-width: 25% !important;
    flex: 0 0 25% !important;
}