/* ========================================
   CALCULADORA DE NOTAS - CSS COMPLETO
   ======================================== */

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
}

/* ========================================
   LAYOUT BASE
   ======================================== */

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.calculator-wrapper {
    width: 100%;
}

/* ========================================
   BREADCRUMB
   ======================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.breadcrumb-link {
    color: var(--gray-600);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: var(--gray-300);
}

.breadcrumb-current {
    color: var(--gray-900);
    font-weight: 500;
}

/* ========================================
   HEADER
   ======================================== */

.calculator-header {
    text-align: center;
    margin-bottom: 40px;
}

.calculator-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-icon {
    font-size: 2.2rem;
}

.calculator-description {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ========================================
   CALCULATOR LAYOUT
   ======================================== */

.calculator-layout {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 30px;
    margin-bottom: 50px;
    align-items: start;
}

/* ========================================
   MODE SELECTOR
   ======================================== */

.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn {
    flex: 1;
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.mode-btn:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-color: transparent;
}

/* ========================================
   FORM SECTION
   ======================================== */

.form-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    margin-bottom: 20px;
}

.form-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-icon {
    font-size: 1.4rem;
}

/* Notas Container */
.notas-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.nota-row {
    display: grid;
    grid-template-columns: 1fr 120px 40px;
    gap: 10px;
    align-items: center;
    padding: 15px;
    background: var(--gray-50);
    border-radius: 12px;
    border: 2px solid var(--gray-200);
    transition: all 0.3s;
}

.nota-row:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.nota-row input {
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    font-weight: 500;
}

.nota-row input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.nota-row input[type="number"] {
    text-align: center;
}

.btn-eliminar-nota {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--danger);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-eliminar-nota:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Add Button */
.btn-add {
    width: 100%;
    padding: 12px 20px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add:hover {
    background: #059669;
    transform: translateY(-2px);
}

.form-help {
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-top: 15px;
}

/* Form Group */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    transition: all 0.3s;
    font-family: inherit;
    color: var(--gray-900);
    font-weight: 500;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-suffix {
    position: absolute;
    right: 16px;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.95rem;
    pointer-events: none;
}

.form-input:has(~ .input-suffix) {
    padding-right: 60px;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-calculate {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-bottom: 12px;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-arrow {
    font-size: 1.3rem;
    transition: transform 0.3s;
}

.btn-calculate:hover .btn-arrow {
    transform: translateX(5px);
}

.btn-reset {
    width: 100%;
    padding: 12px 24px;
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-reset:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

/* ========================================
   RESULTS SECTION
   ======================================== */

.results-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
}

.results-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-main {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 16px;
    margin-bottom: 25px;
    color: white;
}

.result-main.success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.result-main.warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.result-main.danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.result-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.result-value {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.result-note {
    font-size: 1rem;
    opacity: 0.9;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.result-item {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    gap: 12px;
    border: 1px solid var(--gray-200);
}

.result-item-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.result-item-content {
    flex: 1;
}

.result-item-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.result-item-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-900);
}

.recommendation {
    background: #fef3c7;
    border-left: 4px solid var(--warning);
    border-radius: 8px;
    padding: 18px;
}

.recommendation.success {
    background: #d1fae5;
    border-left-color: var(--success);
}

.recommendation.danger {
    background: #fee2e2;
    border-left-color: var(--danger);
}

.recommendation h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.recommendation p {
    color: var(--gray-700);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* Empty State */
.empty-state {
    background: white;
    border-radius: 20px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px dashed var(--gray-200);
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.empty-text {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========================================
   CONTENT SECTIONS
   ======================================== */

.content-section {
    margin-bottom: 50px;
}

.content-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.content-section p {
    color: var(--gray-600);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 18px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
    transition: all 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.info-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.info-card p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.step-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 15px;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
}

/* Tutorial List */
.tutorial-list {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 25px 25px 25px 45px;
    margin: 20px 0;
}

.tutorial-list li {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--gray-700);
}

.tutorial-list li:last-child {
    margin-bottom: 0;
}

/* Example Box */
.example-box, .formula-box {
    background: #eff6ff;
    border-left: 4px solid var(--info);
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.example-box h4, .formula-box h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.example-box code {
    display: block;
    background: white;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    margin: 10px 0;
}

/* Example Table */
.example-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.example-table th,
.example-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.example-table th {
    background: var(--gray-100);
    font-weight: 700;
    color: var(--gray-900);
}

.example-table .total-row {
    background: var(--gray-50);
    font-weight: 700;
}

/* Scales Grid */
.scales-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.scale-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
}

.scale-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.scale-card p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.tip-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
    transition: all 0.3s;
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.tip-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.tip-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.tip-card p {
    font-size: 0.95rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.6;
}

/* FAQ */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
}

.faq-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.faq-item p {
    margin: 0;
}

/* Related Grid */
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
    transition: all 0.3s;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.related-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.related-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.related-card p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }
    
    .info-grid,
    .steps-grid,
    .scales-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .calculator-title {
        font-size: 1.8rem;
    }
    
    .info-grid,
    .steps-grid,
    .scales-grid,
    .tips-grid,
    .results-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .mode-selector {
        flex-direction: column;
    }
    
    .result-value {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 20px 15px 60px;
    }
    
    .nota-row {
        grid-template-columns: 1fr 80px 40px;
        gap: 8px;
        padding: 12px;
    }
}