* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: white;
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Dropdown Menu Styles */
.nav-item-dropdown {
    position: relative;
}

.nav-item-dropdown > a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-item-dropdown > a::after {
    content: '▼';
    font-size: 0.6rem;
    margin-left: 0.25rem;
    transition: transform 0.3s;
}

.nav-item-dropdown:hover > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    padding-left: 1.25rem;
}

.auth-links {
    display: flex;
    gap: 0.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.main {
    min-height: calc(100vh - 200px);
}

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hero .btn {
    margin: 0 0.5rem;
}

.page-header {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section {
    padding: 4rem 0;
}

.services-section,
.blog-section,
.about-section,
.contact-section,
.offer-section {
    background: white;
}

.services-grid,
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card,
.blog-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    transition: box-shadow 0.3s;
}

.service-card:hover,
.blog-card:hover {
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3,
.blog-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.text-center {
    text-align: center;
    margin-top: 2rem;
}

.cta-section {
    background: var(--primary-color);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section .btn {
    margin: 0.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.auth-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 100%;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card > p {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.stats-section {
    background: var(--bg-color);
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-info {
    color: var(--secondary-color);
}

.blog-meta {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.blog-image-large {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.blog-content-full {
    line-height: 1.8;
    font-size: 1.1rem;
}

.footer {
    background: var(--text-color);
    color: white;
    padding: 3rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.badge-new {
    background: #dbeafe;
    color: #1e40af;
}

.badge-contacted {
    background: #fef3c7;
    color: #92400e;
}

.badge-closed {
    background: #dcfce7;
    color: #166534;
}

.badge-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-approved {
    background: #dcfce7;
    color: #166534;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.badge-admin {
    background: #fee2e2;
    color: #991b1b;
}

.badge-engineer {
    background: #dbeafe;
    color: #1e40af;
}

.badge-customer {
    background: #dcfce7;
    color: #166534;
}

.badge-in_progress {
    background: #fef3c7;
    color: #92400e;
}

.badge-completed {
    background: #dcfce7;
    color: #166534;
}

/* Documents Section Styles */
.documents-section {
    padding: 4rem 0;
    background: white;
}

.document-category {
    margin-bottom: 3rem;
}

.document-category h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.document-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
}

.document-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.document-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.document-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.document-card p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.document-meta {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: var(--bg-color);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.document-card .btn {
    margin: 0.25rem 0;
}

.document-detail {
    padding: 4rem 0;
    background: white;
}

.document-info {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    font-weight: 500;
    color: var(--secondary-color);
}

.info-item .value {
    color: var(--text-color);
}

.document-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
}

.empty-state p {
    color: var(--secondary-color);
    font-size: 1.25rem;
}

/* Services Slider Styles */
.services-slider-section {
    padding: 4rem 0;
    background: white;
}

.services-slider {
    position: relative;
    margin: 2rem 0;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.service-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 1rem;
    overflow: hidden;
}

.service-image {
    flex: 1;
    min-height: 400px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-content {
    flex: 1;
    padding: 3rem;
    text-align: center;
}

.service-slide .service-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.service-slide h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.service-slide p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s, transform 0.3s;
}

.slider-prev:hover,
.slider-next:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* References Slider Styles */
.references-slider-section {
    padding: 3rem 0;
    background: var(--bg-color);
}

.references-slider-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.references-slider {
    position: relative;
    margin: 2rem 0;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    background: white;
    padding: 2rem;
}

.references-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 2rem;
}

.reference-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.reference-logo {
    width: 200px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.reference-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s, opacity 0.3s, transform 0.3s;
}

.reference-logo img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.reference-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reference-company-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.reference-website {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.reference-website:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.references-prev,
.references-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s, transform 0.3s;
}

.references-prev:hover,
.references-next:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

.references-prev {
    left: 15px;
}

.references-next {
    right: 15px;
}

.references-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
}

.references-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.references-dots .dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.document-preview-container {
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.preview-warning {
    background: var(--warning-color);
    color: white;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 500;
}

.pdf-iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
}

.pdf-renderer {
    background: #f5f5f5;
    min-height: 600px;
    padding: 20px;
}

.pdf-page {
    display: block;
    margin: 0 auto 20px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 100%;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--secondary-color);
}

.error {
    text-align: center;
    padding: 40px;
    color: var(--error-color);
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .services-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
}
