/* Variables moved to variables.css */

body {
    font-family: "Montserrat", sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
    min-height: 100vh;
}

header {
    background-color: #ffffff;
    color: var(--primary-color);
    text-align: center;
    padding: 1rem;
    box-shadow: var(--box-shadow);
}

main {
    padding: 2rem;
}

.card-container, .container-material, .card-container-doc {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.card, .item, .item-colab {
    background-color: var(--box-background);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    padding: 0.2rem;
    width: 250px;
    text-align: center;
    transition: all 0.3s ease;
}

.card:hover, .item:hover, .item-colab:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.card h2, .card h5 {
    margin-bottom: 0.5rem;
    margin-top: 0rem;
    color: var(--primary-color);
}

.card h5 {
    font-weight: bold;
}

.card p, .item p, .item-colab p {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.item-colab img {
    margin-top: -15px;
}

.card a, .container-material a {
    color: inherit;
    text-decoration: none;
}

.card a:hover, .container-material a:hover {
    text-decoration: none;
}

h2 {
    color: var(--primary-color);
    text-align: center;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.card-doc {
    background-color: #dadada83;
    border-radius: 8px;
    padding: 0.5rem;
    width: 240px;
    height: 250px;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
    position: relative;
}

.card-doc h5 {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.card-doc.flipped {
    transform: rotateY(180deg);
}

.card-doc-front, .card-doc-back {
    background-color: var(--background-color);
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
}

.card-doc-front {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card-doc-back {
    transform: rotateY(180deg);
    justify-content: flex-start;
    align-items: flex-start;
}

.card-doc-front img {
    margin-top: 5px;
}

.card-doc-back ul {
    padding-left: 10px;
    margin-top: 1px;
}

.card-doc-back li {
    font-size: 0.9em;
    margin-bottom: 2px;
    color: var(--secondary-color);
}

.card-doc-back img {
    margin-right: 10px;
}

.card-doc-back a {
    color: inherit;
    text-decoration: none;
}

.card-doc-front:hover {
    transform: translateY(-7px);
}

/* Estilos para páginas de contenido mejoradas */
.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary-color), #1e5a9b);
    color: white;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.page-header h1 {
    margin-bottom: 15px;
    font-size: 2.2em;
}

.page-header .lead {
    font-size: 1.2em;
    opacity: 0.9;
    margin: 0;
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-size: 1.4em;
}

.section h2 i {
    margin-right: 10px;
}

.content-box {
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    margin-bottom: 10px;
}

.connective-section {
    margin-bottom: 30px;
}

.connective-section h3 {
    background: var(--box-background);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4em;
}

.connective-symbol {
    font-size: 1.5em;
    color: #0984e3;
    margin-right: 10px;
    font-weight: bold;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.example-item {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    font-style: italic;
    font-weight: 500;
}

.formula-box {
    background: #0984e3;
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    font-size: 1em;
    font-weight: 500;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.alert-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.alert-warning {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.styled-list {
    list-style: none;
    padding-left: 0;
}

.styled-list li {
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
}

.styled-list li:before {
    content: "→";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.comparison-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.incorrect, .correct {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.incorrect {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.correct {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.incorrect h4, .correct h4 {
    margin-bottom: 10px;
}

.incorrect code, .correct code {
    font-size: 1.2em;
    font-weight: bold;
}

/* Responsive design */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 10px;
    }
    
    .page-header {
        padding: 20px 15px;
    }
    
    .page-header h1 {
        font-size: 1.8em;
    }
    
    .example-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-box {
        grid-template-columns: 1fr;
    }
}

/* Footer styles moved to shared-components.css */

/* Exercise statement and quote-box moved to shared-components.css */

/* Step styles moved to shared-components.css */

.propositions-grid {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.proposition-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #0984e3;
}

.prop-symbol {
    font-weight: bold;
    color: #0984e3;
    min-width: 25px;
    font-size: 1em;
}

.prop-text {
    margin-left: 10px;
    flex: 1;
}

.connectors-grid {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.connector-item {
    display: grid;
    grid-template-columns: 2fr auto 1fr 2fr;
    align-items: center;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    gap: 8px;
}

.natural-lang {
    font-style: italic;
    font-weight: 500;
    color: #495057;
    font-size: 0.9em;
}

.arrow {
    color: #0984e3;
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
}

.formal-symbol {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
}

.connector-name {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.final-formula {
    background: #495057;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 18px;
    margin: 18px 0;
    text-align: center;
    font-size: 1.1em;
}

.formula-explanation {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.formula-explanation ul {
    margin: 15px 0 0 0;
    padding-left: 20px;
}

.formula-explanation li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Responsive para ejercicios */
@media (max-width: 768px) {
    .connector-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 6px;
        padding: 8px 10px;
    }
    
    .step h3 {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .propositions-grid,
    .connectors-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .exercise-statement {
        padding: 12px;
    }
    
    .quote-box {
        padding: 12px;
    }
    
    .toggle-btn {
        padding: 8px 16px;
        font-size: 0.85em;
    }
    
    .step-content {
        padding: 12px;
    }
    
    .step-header {
        padding: 8px 12px;
    }
    
    .formula-explanation {
        padding: 12px;
    }
    
    .analysis-box {
        padding: 12px;
    }
}

/* Interactive solution toggles */
.solution-toggle {
    margin: 15px 0;
    text-align: center;
}

.toggle-btn {
    background: #0984e3;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-btn:hover {
    background: #0056b3;
}

.toggle-btn i {
    margin-right: 6px;
}

/* Exercise solution, step containers, and analysis box moved to shared-components.css */