/* ========================================
   Kanban Board Tool - Styles
   ======================================== */

:root {
    --primary-color: #C62E2E;
    --secondary-color: #1e1e1e;
    --accent-color: #C1E172;
    --background-color: #f8f9fa;
    --text-dark: #1e1e1e;
    --text-muted: #6c757d;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-color);
}

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a02424 100%);
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="2" height="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 800px;
    margin: 0 auto 2rem;
}

.hero-icon {
    margin-top: 2rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ========================================
   Container & Layout
   ======================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Tool Section
   ======================================== */

.tool-section {
    padding: 4rem 0;
}

.tool-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

/* ========================================
   Board Controls
   ======================================== */

.board-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.control-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.board-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.board-selector label {
    font-weight: 600;
    color: var(--text-dark);
}

.board-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
}

.board-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #a02424;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background-color: #dc3545;
    color: var(--white);
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    font-size: 1.2rem;
}

.btn-icon:hover {
    background-color: var(--background-color);
    border-color: var(--primary-color);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ========================================
   Kanban Board
   ======================================== */

.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    min-height: 500px;
}

.kanban-column {
    background: var(--background-color);
    border-radius: 12px;
    min-width: 300px;
    max-width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.kanban-column.drag-over {
    background: rgba(193, 225, 114, 0.1);
    border: 2px dashed var(--accent-color);
}

.column-header {
    padding: 1rem 1.25rem;
    background: var(--white);
    border-radius: 12px 12px 0 0;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.column-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.column-title.editing {
    border: 2px solid var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    outline: none;
    background: var(--white);
}

.task-count {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.column-actions {
    display: flex;
    gap: 0.5rem;
}

.column-actions button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    opacity: 0.6;
    transition: var(--transition);
}

.column-actions button:hover {
    opacity: 1;
    transform: scale(1.1);
}

.column-body {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
    max-height: 600px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 100px;
}

/* ========================================
   Task Cards
   ======================================== */

.task-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    cursor: move;
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.task-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.task-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.task-card.priority-high {
    border-left-color: #dc3545;
}

.task-card.priority-medium {
    border-left-color: #ffc107;
}

.task-card.priority-low {
    border-left-color: #28a745;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.task-title {
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
    word-wrap: break-word;
}

.task-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: var(--transition);
}

.task-card:hover .task-actions {
    opacity: 1;
}

.task-actions button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    opacity: 0.6;
}

.task-actions button:hover {
    opacity: 1;
}

.task-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}

.task-priority {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.task-priority.high {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.task-priority.medium {
    background: rgba(255, 193, 7, 0.1);
    color: #d39e00;
}

.task-priority.low {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.task-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.add-task-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--white);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

.add-task-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(198, 46, 46, 0.05);
}

/* ========================================
   Board Stats
   ======================================== */

.board-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--background-color);
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ========================================
   Modal
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-body {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ========================================
   Features Section
   ======================================== */

.features-section {
    padding: 4rem 0;
    background: var(--white);
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background: var(--background-color);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-item p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ========================================
   How to Use Section
   ======================================== */

.how-to-section {
    padding: 4rem 0;
}

.how-to-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.step-item:hover {
    box-shadow: var(--shadow-md);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.step-item p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2d2d2d 100%);
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.cta-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.cta-stat {
    text-align: center;
}

.cta-stat strong {
    display: block;
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}

.cta-stat span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* ========================================
   FAQ Section
   ======================================== */

.faq-section {
    padding: 4rem 0;
    background: var(--white);
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    padding: 1.25rem;
    background: var(--background-color);
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-icon {
    font-size: 1.5rem;
    transition: var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--white);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ========================================
   Content Section
   ======================================== */

.content-section {
    padding: 4rem 0;
    background: var(--background-color);
}

.tool-article {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.tool-article h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.tool-article h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-dark);
}

.tool-article p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1200px) {
    .kanban-board {
        overflow-x: scroll;
    }
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .board-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group {
        width: 100%;
    }

    .control-group .btn {
        flex: 1;
    }

    .board-selector {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .board-select {
        width: 100%;
    }

    .kanban-column {
        min-width: 280px;
    }

    .board-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-stats {
        gap: 2rem;
    }

    .tool-article {
        padding: 1.5rem;
    }

    .tool-article h2 {
        font-size: 1.5rem;
    }

    .tool-article h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }

    .tool-card {
        padding: 1rem;
    }

    .kanban-column {
        min-width: 260px;
    }

    .modal-content {
        padding: 1.5rem;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .board-controls,
    .cta-section,
    .faq-section {
        display: none;
    }

    .kanban-board {
        overflow-x: visible;
    }

    .task-card {
        break-inside: avoid;
    }
}