/* file: css/style.css */
/* Main stylesheet for Jornal Universitário */

:root {
    --primary-red: #c1121f;
    --primary-red-dark: #a00f1a;
    --white: #ffffff;
    --black: #111111;
    --gray-light: #f5f5f5;
    --gray: #666666;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.12);
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--black);
    background-color: var(--white);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* Navbar */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 1rem 0;
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-red) !important;
}

.navbar-brand i {
    margin-right: 8px;
}

.nav-link {
    color: var(--black) !important;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-red) !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-red) 0%, #8b0000 100%);
    padding: 80px 0;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.1s both;
}

/* Search Form */
.search-form {
    max-width: 500px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.search-input {
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 50px 0 0 50px;
}

.btn-search {
    background-color: var(--black);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: 0 50px 50px 0;
    transition: all 0.3s ease;
}

.btn-search:hover {
    background-color: #333;
    color: var(--white);
}

/* News Section */
.news-section {
    padding: 80px 0;
    background-color: var(--gray-light);
}

.section-header {
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 15px;
}

.divider {
    width: 60px;
    height: 4px;
    background-color: var(--primary-red);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.1rem;
}

/* News Cards */
.news-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .card-image img {
    transform: scale(1.05);
}

.card-date {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: var(--primary-red);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--black);
}

.card-description {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-red);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.btn-read-more:hover {
    background-color: var(--primary-red-dark);
    color: var(--white);
    gap: 12px;
}

/* Footer */
.footer {
    background-color: var(--black);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer h5 {
    color: var(--primary-red);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

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

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-red);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Login Page */
.login-body {
    background: linear-gradient(135deg, var(--primary-red) 0%, #8b0000 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-hover);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary-red);
    margin-bottom: 15px;
}

.login-header h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.login-header p {
    color: var(--gray);
}

.btn-login {
    width: 100%;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: var(--primary-red-dark);
    color: var(--white);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: var(--gray);
    text-decoration: none;
}

.login-footer a:hover {
    color: var(--primary-red);
}

/* Admin Panel */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    background-color: var(--black);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    color: var(--primary-red);
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 0.8rem;
    opacity: 0.7;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
    background-color: var(--primary-red);
    color: var(--white);
}

.sidebar-menu li.logout {
    margin-top: 50px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    background-color: var(--gray-light);
    min-height: 100vh;
}

.admin-header {
    background-color: var(--white);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.admin-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-user i {
    font-size: 2rem;
    color: var(--primary-red);
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(193,18,31,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 2rem;
    color: var(--primary-red);
}

.stat-info h3 {
    font-size: 2rem;
    margin: 0;
    color: var(--primary-red);
}

.stat-info p {
    margin: 0;
    color: var(--gray);
}

/* Tables */
.recent-news {
    padding: 0 30px 30px;
}

.recent-news h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table thead {
    background-color: var(--black);
    color: var(--white);
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
}

.admin-table tbody tr:hover {
    background-color: var(--gray-light);
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    text-decoration: none;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.btn-edit {
    background-color: #ffc107;
    color: #000;
}

.btn-edit:hover {
    background-color: #e0a800;
    color: #000;
}

.btn-delete {
    background-color: #dc3545;
    color: var(--white);
}

.btn-delete:hover {
    background-color: #c82333;
    color: var(--white);
}

/* Forms */
.form-card {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    margin: 30px;
    box-shadow: var(--shadow);
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
}

.form-control {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
}

.form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(193,18,31,0.25);
}

.btn-submit {
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background-color: var(--primary-red-dark);
    color: var(--white);
}

.btn-cancel {
    background-color: var(--gray);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background-color: #555;
    color: var(--white);
}

/* Alerts */
.alert {
    margin: 20px 30px;
    border-radius: 12px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .form-card {
        margin: 20px;
        padding: 20px;
    }
}