@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #0d47a1;     /* Deep Blue */
    --primary-light: #1565c0;
    --primary-dark: #0a2f6c;
    --accent-color: #ff6f00;      /* Vibrant Orange */
    --accent-hover: #e65100;
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: rgba(226, 232, 240, 0.8);
    --border-radius: 16px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(13, 71, 161, 0.08), 0 8px 10px -6px rgba(13, 71, 161, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(13, 71, 161, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(255, 111, 0, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    border-radius: 0 0 24px 24px;
    border-top: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 48px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.logo-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.2);
}

.nav-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(13, 71, 161, 0.3);
}

.nav-btn.outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* Hero Carousel */
.hero-section {
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.carousel-container {
    position: relative;
    height: 450px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 47, 108, 0.95) 0%, rgba(13, 71, 161, 0.4) 60%, transparent 100%);
    color: white;
    padding: 3rem 4rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.carousel-tag {
    background-color: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    width: max-content;
    margin-bottom: 12px;
}

.carousel-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.carousel-meta {
    display: flex;
    gap: 20px;
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 12px;
    font-weight: 500;
}

.carousel-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: white;
    width: 24px;
    border-radius: 5px;
}

/* Empty Carousel Placeholder Styling */
.carousel-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    color: white;
    text-align: center;
    padding: 2rem;
}

.carousel-empty h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Agenda Grid Section */
.agenda-section {
    padding: 3rem 5% 5rem;
    max-width: 1400px;
    margin: 2rem auto;
    background-image: linear-gradient(rgba(248, 250, 252, 0.88), rgba(248, 250, 252, 0.88)), url('../img/crua_jardin.jpeg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 8px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.search-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

.search-input {
    flex-grow: 1;
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    outline: none;
    transition: var(--transition);
    background-color: white;
    font-weight: 500;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

/* Agenda Calendar Layout */
.agenda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Month Separator */
.month-separator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 0.5rem;
}

.month-separator-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(13, 71, 161, 0.25), transparent);
    border-radius: 2px;
}

.month-separator-label {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 8px 22px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(13, 71, 161, 0.25);
}

.month-icon {
    font-size: 1.2rem;
    line-height: 1;
}

/* Card Modern styling */
.activity-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 20px rgba(13, 71, 161, 0.08) !important;
}

.activity-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(13, 71, 161, 0.15) !important;
}

.card-img-container {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.activity-card:hover .card-img-container img {
    transform: scale(1.05);
}

.card-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(13, 71, 161, 0.9);
    backdrop-filter: blur(8px);
    color: white;
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.card-date-badge span {
    font-size: 1.1rem;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    color: var(--primary-color);
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.card-responsible {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

.card-action-btn {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.card-action-btn:hover {
    color: var(--accent-color);
    transform: translateX(3px);
}

/* Modals glassmorphic styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1.5rem;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.modal-overlay.open .modal-container {
    transform: translateY(0);
}

.modal-hero {
    height: 300px;
    position: relative;
}

.modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.9);
}

.modal-body {
    padding: 2rem;
}

.modal-date-time {
    display: flex;
    gap: 15px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.modal-desc {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 2rem;
    white-space: pre-line;
}

.modal-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Buttons standard styles */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(13, 71, 161, 0.3);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.2);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 111, 0, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Login Page */
.login-container {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header img {
    height: 70px;
    margin-bottom: 1rem;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-color);
}

.form-input {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

/* Dashboard Panel */
.dashboard-container {
    padding: 2rem 5% 5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-badge {
    background-color: rgba(13, 71, 161, 0.1);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Custom Styled Table */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    text-align: left;
}

.modern-table th {
    background-color: #f1f5f9;
    color: var(--primary-color);
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: 2px solid #e2e8f0;
}

.modern-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.table-img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 8px;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: white;
}

.icon-btn.view { background-color: #0d47a1; }
.icon-btn.edit { background-color: #f59e0b; }
.icon-btn.delete { background-color: #ef4444; }
.icon-btn.pdf { background-color: #10b981; }

.icon-btn:hover {
    transform: scale(1.1);
    filter: brightness(0.9);
}

/* Footer Section */
footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 3rem 5% 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

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

.footer-copy {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 1rem;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .navbar { padding: 1rem 3%; }
    .hero-section, .agenda-section, .dashboard-section { padding-left: 3%; padding-right: 3%; }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        border-radius: 0;
    }
    .logo {
        flex-direction: column;
        text-align: center;
    }
    .nav-links {
        width: 100%;
        justify-content: center;
    }
    .carousel-container {
        height: 300px;
    }
    .carousel-title {
        font-size: 1.5rem;
    }
    .carousel-meta {
        font-size: 0.8rem;
        flex-wrap: wrap;
        gap: 10px;
    }
    .carousel-overlay {
        padding: 1.5rem;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .search-filter-bar {
        max-width: 100%;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .modern-table th:nth-child(4),
    .modern-table td:nth-child(4),
    .modern-table th:nth-child(5),
    .modern-table td:nth-child(5),
    .modern-table th:nth-child(6),
    .modern-table td:nth-child(6) {
        display: none; /* Hide description, responsible and email on small screens */
    }
}
