/* CSS Personalizado - ETEC Morato */

:root {
    --primary-color: #dc3545;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Reset e configurações gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: #333;
}

/* PDF Viewer Styles */
.pdf-viewer-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pdf-viewer-frame {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.pdf-display-area {
    position: relative;
}

.pdf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #6c757d;
}

.pdf-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

.pdf-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #6c757d;
}

.pdf-fallback i {
    margin-bottom: 1rem;
    opacity: 0.7;
}

.pdf-view-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pdf-view-btn:not(.active):hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

/* Responsive PDF viewer */
@media (max-width: 768px) {
    .pdf-viewer-container {
        padding: 0.5rem;
    }
    
    .pdf-viewer-frame {
        height: 400px !important;
    }
    
    .pdf-viewer-container .btn-group {
        flex-wrap: wrap;
    }
    
    .pdf-viewer-container .btn-group .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Header Styles */
.top-bar {
    font-size: 0.875rem;
}

.social-links a {
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
}

.main-header {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo-sp {
    max-height: 60px;
    width: auto;
}

.logo-text h4 {
    font-size: 1.5rem;
    font-weight: 700;
}

.search-box .form-control {
    border-radius: 25px;
    border: 2px solid #e9ecef;
    padding: 0.5rem 1rem;
}

.search-box .btn {
    border-radius: 25px;
    padding: 0.5rem 1rem;
}

.accessibility-tools .btn {
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: background-color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
}

/* Slider Section */
.slider-section {
    position: relative;
}

.carousel-item img {
    height: 400px;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0,0,0,0.6);
    border-radius: 10px;
    padding: 2rem;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
}

.carousel-caption h5 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.carousel-caption p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.card-text {
    color: #666;
    font-size: 0.95rem;
}

/* Highlights Section */
.highlights-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.highlights-section .card {
    border: 1px solid rgba(0,0,0,0.05);
}

/* News Section */
.news-section {
    background-color: var(--white);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
}

/* Buttons */
.btn {
    border-radius: 25px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

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

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
    transform: translateY(-2px);
}

.btn-outline-danger {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-danger:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

footer h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

footer p {
    color: #bdc3c7;
    margin-bottom: 0.5rem;
}

footer .social-links a {
    transition: transform 0.3s ease, color 0.3s ease;
}

footer .social-links a:hover {
    transform: scale(1.2);
    color: var(--primary-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-item img {
        height: 250px;
    }
    
    .carousel-caption {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        padding: 1rem;
    }
    
    .carousel-caption h5 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .main-header .row {
        text-align: center;
    }
    
    .main-header .col-md-3,
    .main-header .col-md-6,
    .main-header .col-md-3 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .top-bar .col-md-8,
    .top-bar .col-md-4 {
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .accessibility-tools {
        margin-top: 1rem;
    }
    
    .card-img-top {
        height: 150px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c82333;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.shadow-custom {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.rounded-custom {
    border-radius: 15px;
}

/* PDF Viewer Styles */
.pdf-viewer-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pdf-viewer-container h6 {
    color: var(--dark-color);
    font-weight: 600;
}

.pdf-viewer-container .btn-outline-danger {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.pdf-viewer-container iframe {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .pdf-viewer-container {
        padding: 0.75rem;
        margin: 1rem 0;
    }
    
    .pdf-viewer-container .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pdf-viewer-container .btn-outline-danger {
        align-self: flex-start;
    }
    
    .pdf-viewer-container .border {
        height: 400px !important;
    }
}

@media (max-width: 576px) {
    .pdf-viewer-container .border {
        height: 300px !important;
    }
}

/* Print Styles */
@media print {
    .top-bar,
    .navbar,
    .social-links,
    .accessibility-tools,
    footer {
        display: none !important;
    }
    
    .main-header {
        border-bottom: 2px solid #000;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .pdf-viewer-container {
        break-inside: avoid;
        background: #fff;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .pdf-viewer-container iframe {
        display: none;
    }
    
    .pdf-viewer-container::after {
        content: "PDF: " attr(data-pdf-name) " - Visualize online para ver o conteúdo completo";
        display: block;
        padding: 2rem;
        text-align: center;
        color: #666;
        font-style: italic;
    }
}

/* Estilos para avatares de usuários */
.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
    font-weight: 600;
}

.avatar-md {
    width: 48px;
    height: 48px;
    font-size: 1.125rem;
    font-weight: 600;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Estilos para tabelas administrativas */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Estilos para badges de status */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Estilos para formulários administrativos */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Estilos para alertas */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-success {
    background-color: #d1edff;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Estilos para modais */
.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

/* Estilos para cards administrativos */
.card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
}

/* Estilos responsivos para tabelas */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.125rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .avatar-sm {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}