/* Global Styles */
* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #333;
}

/* Header */
.header {
    width: 100%;
    background-color: #2ecc71;
    color: white;
    text-align: center;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    height: 60px;
    object-fit: contain;
    margin-right: 20px;
}

.header-title {
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    flex-grow: 1;
}

/* Main Content */
.swot-container {
    max-width: 1200px;
    width: 100%;
    padding: 2rem;
    margin: 2rem auto;
}

.section-card {
    background: white;
    padding: 2rem;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h2 {
    color: #2ecc71;
    border-bottom: 2px solid #2ecc71;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-align: center;
}

/* SWOT Intro */
.swot-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.swot-item {
    padding: 15px;
    border-radius: 8px;
    color: white;
}

.swot-item.s { background-color: #2ecc71; } /* Strengths */
.swot-item.w { background-color: #e74c3c; } /* Weaknesses */
.swot-item.o { background-color: #3498db; } /* Opportunities */
.swot-item.t { background-color: #f39c12; } /* Threats */

.swot-item .swot-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.swot-item .swot-description {
    font-size: 0.9rem;
    margin-top: 5px;
}

/* SWOT Matrix */
.swot-matrix {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.swot-quadrant {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.swot-quadrant.s { border-left: 5px solid #2ecc71; }
.swot-quadrant.w { border-left: 5px solid #e74c3c; }
.swot-quadrant.o { border-left: 5px solid #3498db; }
.swot-quadrant.t { border-left: 5px solid #f39c12; }

.swot-quadrant h3 {
    margin-top: 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
}

.swot-quadrant h3 .add-item-btn {
    cursor: pointer;
    color: #2ecc71;
    font-size: 1rem;
    transition: transform 0.2s;
}
.swot-quadrant h3 .add-item-btn:hover {
    transform: scale(1.2);
}

.swot-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    flex-grow: 1;
}

.swot-item-card {
    background-color: white;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: grab;
    transition: box-shadow 0.2s;
}
.swot-item-card:hover {
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
.swot-item-card.dragging {
    opacity: 0.5;
}

.swot-item-card textarea {
    width: 100%;
    border: none;
    resize: none;
    font-size: 1rem;
    min-height: 40px;
    background: transparent;
}
.swot-item-card textarea:focus {
    outline: 1px solid #ccc;
    background: #f0f0f0;
}

.item-actions {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 5px;
}
.item-actions .action-btn {
    color: #777;
    cursor: pointer;
    transition: color 0.2s;
}
.item-actions .action-btn:hover {
    color: #000;
}
.item-actions .fa-trash-alt:hover { color: #e74c3c; }

.rating-container {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    margin-top: 5px;
}
.rating-container .stars {
    display: flex;
}
.rating-container .fa-star {
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s;
}
.rating-container .fa-star.active {
    color: #ffc107;
}

/* Buttons */
.button-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}
.form-label {
    font-weight: bold;
}
.form-control {
    width: 250px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-primary, .btn-success {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.btn-primary { background-color: #007bff; color: white; }
.btn-success { background-color: #2ecc71; color: white; }
.btn-primary:hover, .btn-success:hover { filter: brightness(1.1); }

/* Chart and Strategy */
.chart-container {
    height: 400px;
    max-width: 100%;
    margin-top: 25px;
}
.strategic-suggestions {
    margin-top: 30px;
    border-top: 2px dashed #ddd;
    padding-top: 20px;
}
.strategic-suggestions h3 {
    text-align: center;
    color: #2ecc71;
}
.strategic-suggestions h4 {
    color: #3498db;
    margin-bottom: 5px;
}

/* Footer */
.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    width: 100%;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .swot-container {
        padding: 1rem;
    }
    .header-title {
        font-size: 1rem;
    }
    .swot-intro {
        grid-template-columns: 1fr;
    }
    .swot-matrix {
        grid-template-columns: 1fr;
    }
    .swot-quadrant {
        min-height: 200px;
    }
}