:root {
    --primary-green: #059669;
    --primary-teal: #0d9488;
    --secondary-blue: #0891b2;
    --text-dark: #1f2937;
    --bg-light: #f0fdf4;
}

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background: #ffffff;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-weight: 700;
    color: #ffffff;
}

header p {
    color: #ffffff;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.nav-link {
    position: relative;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    color: #ffffff !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link:hover {
    color: #6ee7b7 !important;
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0;
    display: none;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu.show {
    display: block;
}

.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
}

.dropdown-item {
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    color: #333;
}

.dropdown-item:hover {
    background: var(--primary-green);
    color: white;
    padding-left: 2rem;
}

.dropdown-toggle::after {
    margin-left: 0.3rem;
}

/* Header Logo */
.header-logo {
    transition: transform 0.3s ease;
    background: white;
    padding: 5px;
    border-radius: 5px;
}

.header-logo:hover {
    transform: scale(1.05);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
    color: white;
    padding: 80px 0;
    margin: 30px 0 40px 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.3);
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.hero-section .lead {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* Section Titles */
.section-title {
    color: var(--primary-green);
    font-weight: 700;
    font-size: 2rem;
    margin: 50px 0 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-green);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: white;
}

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

/* Publish Section */
.publish-section {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 15px;
    margin: 40px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

/* Buttons */
.btn {
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(5, 150, 105, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
}

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

.btn-light:hover {
    background: var(--bg-light);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
}

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

/* Form Styles */
.form-control {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
    color: white;
    border: none;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border: none;
    padding: 15px 25px;
}

/* Alert */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Footer - BDC Style */
footer {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    color: #ffffff;
    padding: 50px 0 20px;
    margin-top: 80px;
}

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

.footer-section h3 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-green);
}

.footer-section p,
.footer-section ul {
    color: #b8b8b8;
    font-size: 0.95rem;
    line-height: 1.8;
}

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

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

.footer-section ul li a {
    color: #b8b8b8;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-section ul li a:hover {
    color: var(--primary-green);
    padding-left: 5px;
}

.footer-section ul li i {
    color: var(--primary-green);
    margin-right: 10px;
    width: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary-green);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: #b8b8b8;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary-green);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Navbar Brand - Mobile Only */
.navbar-brand {
    display: none;
}

/* Table Responsive */
table {
    width: 100%;
}

/* Archives Table Styling */
.table-hover tbody tr {
    transition: background-color 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

.table thead th {
    background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
    color: white;
    font-weight: 600;
    border: none;
    padding: 15px;
    vertical-align: middle;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #e5e7eb;
}

.table tbody td:first-child {
    font-weight: 700;
    color: var(--primary-green);
    font-size: 1.1rem;
}

.table tbody td strong {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

.table tbody td:nth-child(2) strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.table tbody td:nth-child(3) span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.table .btn-sm {
    padding: 8px 20px;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* Responsive Design */
@media (max-width: 991px) {
    .navbar-brand {
        display: block;
    }
    
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        background: #f8f9fa;
    }
    
    header .container {
        padding: 1rem !important;
    }
    
    header img {
        max-height: 60px !important;
        height: 60px !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-section {
        padding: 40px 20px;
        margin: 20px 0 30px 0;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin: 30px 0 20px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .publish-section {
        padding: 20px 15px;
        margin: 30px 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    footer {
        padding: 30px 0 15px;
        margin-top: 50px;
    }
    
    .header-logo {
        height: 50px !important;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .accordion-button {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    table, table tbody, table tr, table td {
        display: block;
        width: 100%;
    }
    
    table thead {
        display: none;
    }
    
    table tr {
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
    }
    
    table td {
        text-align: right;
        padding: 8px;
        border: none;
        position: relative;
        padding-left: 50%;
    }
    
    table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        color: var(--primary-green);
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 30px 15px;
        border-radius: 10px;
        margin: 15px 0 20px 0;
    }
    
    .hero-section h1 {
        font-size: 1.4rem;
    }
    
    .hero-section .lead {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.3rem;
        margin: 20px 0 15px;
    }
    
    .btn-lg {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    header .container {
        padding: 0.75rem !important;
    }
    
    .header-logo {
        height: 40px !important;
    }
    
    header img[alt="Buddha Journal of Technology"] {
        max-height: 40px !important;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .card h4, .card h5 {
        font-size: 1rem;
    }
    
    .card p {
        font-size: 0.9rem;
    }
    
    .footer-section h3 {
        font-size: 1rem;
    }
    
    .footer-section p, .footer-section ul {
        font-size: 0.85rem;
    }
    
    .navbar-brand img {
        height: 35px !important;
    }
    
    ul li {
        font-size: 0.9rem;
    }
    
    .alert {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}

@media (max-width: 400px) {
    .hero-section h1 {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .header-logo {
        height: 35px !important;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

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

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

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

/* Nested Dropdown (Dropend) */
.dropend .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: 0.125rem;
    display: none !important;
}

.dropend .dropdown-toggle::after {
    border-left: 0.3em solid;
    border-right: 0;
    border-bottom: 0.3em solid transparent;
    border-top: 0.3em solid transparent;
    margin-left: auto;
    float: right;
}

.dropend:hover > .dropdown-menu {
    display: block !important;
}

@media (max-width: 991px) {
    .dropend .dropdown-menu {
        position: static !important;
        margin-left: 1rem;
        box-shadow: none;
    }
    
    .dropend .dropdown-toggle::after {
        transform: rotate(90deg);
    }
}
