/* --- Variáveis e Reset --- */
:root {
    --primary-color: #2c3e50;
    /* Azul escuro corporativo */
    --secondary-color: #34495e;
    --accent-color: #3498db;
    /* Azul destaque */
    --success-color: #27ae60;
    /* Verde compra */
    --text-dark: #333;
    --text-light: #ecf0f1;
    --bg-light: #f4f7f6;
    --container-width: 1100px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* === Navbar Bootstrap Override === */
.iso-navbar {
    background-color: var(--primary-color) !important;
    padding: 0.6rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.iso-navbar .navbar-brand.iso-logo {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    color: white !important;
}

.iso-navbar .nav-link {
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.85) !important;
    transition: color 0.2s;
}

.iso-navbar .nav-link:hover,
.iso-navbar .nav-link:focus {
    color: #ffffff !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.iso-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.4);
}


body.high-contrast {
    --primary-color: #000;
    --secondary-color: #111;
    --bg-light: #000;
    --text-dark: #fff;
    --text-light: #fff;
    --accent-color: #ffff00;
}

body.high-contrast * {
    border-color: #ffff00 !important;
    color: #fff !important;
}

body.high-contrast .main-header,
body.high-contrast .main-footer {
    background-color: #000;
    border-top: 1px solid #ffff00;
    border-bottom: 1px solid #ffff00;
}

body.high-contrast .course-card {
    background-color: #111;
    border: 1px solid #ffff00;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: auto;
}

/* --- Componentes Globais --- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-accent {
    background-color: var(--accent-color);
    color: white;
}

.btn-accent:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

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

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.page-title {
    margin: 30px 0;
    text-align: center;
    color: var(--primary-color);
}

.section-title {
    margin-bottom: 25px;
    color: var(--primary-color);
    font-size: 1.8rem;
}

/* --- Header & Footer --- */
.main-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    color: white;
}

.nav-list {
    display: flex;
}

.nav-list li a {
    padding: 10px 15px;
    color: var(--text-light);
    transition: color 0.3s;
}

.nav-list li a:hover {
    color: var(--accent-color);
}

.cart-link {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin-left: 10px;
}

.main-content {
    padding: 40px 0;
    min-height: 60vh;
}

/* --- Aside / Side Nav --- */
.side-nav {
    position: fixed;
    left: 0;
    top: 80px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white !important;
    padding: 14px 10px;
    text-decoration: none;
    width: 68px;
    text-align: center;
    transition: background 0.25s, width 0.25s;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 0 6px 6px 0;
}

.side-nav-link:first-child {
    border-radius: 0 6px 0 0;
}

.side-nav-link:last-child {
    border-radius: 0 0 6px 0;
}

.side-nav-link:hover {
    background: var(--accent-color);
    width: 78px;
}

.side-nav-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 6px;
    display: block;
}

.side-nav-label {
    font-size: 0.65rem;
    font-weight: bold;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .side-nav {
        display: none;
    }
}

.main-footer {
    background: var(--secondary-color);
    color: var(--text-light);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* --- Home & Grid de Cursos --- */
.hero-banner {
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)), url('https://placehold.co/1200x400/2c3e50/ffffff?text=ISO+Standards+Background');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 80px 20px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-text p {
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.grid-courses {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #eef2f7;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-destaque {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 6px 10px;
    border-radius: 999px;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.course-subtitle {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* --- Detalhe do Produto --- */
.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.product-image img {
    border-radius: 8px;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(44, 62, 80, 0.15);
}

.breadcrumbs {
    font-size: 0.9rem;
    color: #6b7a89;
    margin-bottom: 12px;
}

.breadcrumbs a {
    color: var(--accent-color);
}

.benefits-list {
    margin-bottom: 24px;
}

.benefits-list li {
    margin-bottom: 8px;
}

.product-info h1 {
    color: var(--primary-color);
}

.subtitle {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-weight: 400;
}

.description {
    margin-bottom: 30px;
}

.purchase-box {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.big-price {
    display: block;
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

.payment-info {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.back-link {
    color: var(--accent-color);
}

/* --- Carrinho e Checkout --- */
.cart-container,
.checkout-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.btn-remove {
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

.cart-summary {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.summary-row.total {
    font-weight: bold;
    font-size: 1.3rem;
    color: var(--primary-color);
    border-top: 2px solid #ddd;
    padding-top: 15px;
}

.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--accent-color);
}

.checkout-form {
    max-width: 600px;
    margin: auto;
}

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

.form-section h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--secondary-color);
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

/* --- Auth & Login --- */
.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.auth-box {
    padding: 40px;
}

.login-box {
    background: var(--bg-light);
    border-right: 1px solid #ddd;
}

.auth-box h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.auth-box p {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.auth-box form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.auth-box form label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.auth-box form input {
    width: 100%;
    border: 1px solid #ccc;
    padding: 12px;
    border-radius: 5px;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.forgot-password {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-right: 15px;
}

/* --- Footer Completo --- */
.main-footer {
    background: var(--primary-color);
    color: #ecf0f1;
    padding: 50px 0 20px 0;
    margin-top: 50px;
    font-size: 0.9rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: white;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
    display: inline-block;
}

.logo-footer {
    display: inline-block;
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: white !important;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a,
.social-links a {
    color: #bdc3c7;
    transition: color 0.3s;
}

.footer-column ul li a:hover,
.social-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-column p {
    color: #bdc3c7;
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #95a5a6;
}

.footer-bottom a {
    color: #95a5a6;
    margin: 0 5px;
    text-decoration: underline;
}

.footer-bottom a:hover {
    color: white;
}

/* --- Responsividade & Acessibilidade --- */
.accessibility-bar {
    margin-top: 10px;
    text-align: right;
}

.accessibility-bar button {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 3px;
    cursor: pointer;
    padding: 2px 8px;
    font-weight: bold;
    margin-left: 5px;
}

.accessibility-bar button:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .login-box {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .nav-list {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-list li a {
        padding: 5px 10px;
    }

    .product-detail-container,
    .cart-container {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .accessibility-bar {
        text-align: center;
        margin-top: 15px;
    }
}