/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #124559;
    --secondary-color: #598392;
    --accent-color: #aec3b0;
    --text-dark: #01161e;
    --text-light: #598392;
    --background: #eff6e0;
    --surface: #aec3b0;
    --border: #598392;
    --shadow: 0 4px 6px -1px rgba(1, 22, 30, 0.2), 0 2px 4px -1px rgba(1, 22, 30, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(1, 22, 30, 0.2), 0 4px 6px -2px rgba(1, 22, 30, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--background);
    margin: 0;
    padding: 0;
}

main {
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

/* Header and Navigation */
.header {
    background: rgba(239, 246, 224, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand h1 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.contact-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--text-dark), var(--primary-color), var(--secondary-color));
    padding: 3rem 0.5rem 1.5rem;
    text-align: center;
    color: var(--background);
    margin-top: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    opacity: 0.9;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border-radius: 0.4rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--background);
    border-color: var(--background);
}

.btn-secondary:hover {
    background: var(--background);
    color: var(--primary-color);
}

/* Sections */
section {
    padding: 1.5rem 0;
}

section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-dark);
}

/* About Section */
.about {
    background: var(--accent-color);
}

.about p {
    font-size: 1rem;
    text-align: left;
    max-width: 800px;
    margin: 0 auto 1rem auto;
    color: var(--text-dark);
    line-height: 1.6;
}

.about p:last-child {
    margin-bottom: 0;
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.project-card {
    background: var(--surface);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
}

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

.project-icon {
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: var(--background);
    font-size: 1.25rem;
}

.project-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
}

.project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card p {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    flex: 1;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.project-link:hover {
    color: var(--secondary-color);
}

/* Services Section */
.services {
    background: var(--background);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.service-card i {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.service-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.service-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.service-card a:hover {
    color: var(--secondary-color);
}

/* Contact Section */
.contact {
    text-align: center;
}

.contact p {
    color: var(--text-dark);
    margin-bottom: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: var(--background);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.contact-option:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.contact-option i {
    font-size: 1.25rem;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--background);
    text-align: center;
    padding: 1rem 0;
}

.footer p {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    .nav-links {
        gap: 0.75rem;
    }

    .hero {
        padding: 4rem 1rem 2rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    section h2 {
        font-size: 1.875rem;
    }

    .project-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-options {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.875rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .project-card,
    .service-card {
        padding: 1.25rem;
    }
}

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

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

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(1, 22, 30, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--surface);
    margin: 2% auto;
    padding: 0;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-content.pdf-modal {
    max-width: 1200px;
    height: 85vh;
}

.modal-header {
    background: var(--primary-color);
    color: var(--background);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--background);
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

/* Carousel Styles */
.carousel-container {
    padding: 1.5rem;
}

.carousel-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.carousel-image-container {
    position: relative;
    max-width: 100%;
    max-height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-image-container img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.carousel-btn {
    position: absolute;
    background: var(--primary-color);
    color: var(--background);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.carousel-btn.prev {
    left: -3rem;
}

.carousel-btn.next {
    right: -3rem;
}

.image-counter {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(1, 22, 30, 0.8);
    color: var(--background);
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

.carousel-thumbnails {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* PDF Viewer Styles */
.pdf-container {
    height: calc(85vh - 80px);
    display: flex;
    flex-direction: column;
}

#pdfViewer {
    flex: 1;
    width: 100%;
    min-height: 500px;
}

.pdf-controls {
    padding: 1rem;
    background: var(--background);
    display: flex;
    justify-content: center;
    gap: 1rem;
    border-top: 1px solid var(--border);
}

/* Button Styles */
.download-btn,
.fullscreen-btn {
    background: var(--primary-color);
    color: var(--background);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-btn:hover,
.fullscreen-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Project link button styling - unified with anchor links */
.project-link[onclick] {
    background: none;
    color: var(--primary-color);
    border: none;
    padding: 0;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    font-size: 0.875rem;
    font-family: inherit;
}

.project-link[onclick]:hover {
    color: var(--secondary-color);
    background: none;
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }
    
    .carousel-btn.prev {
        left: -2rem;
    }
    
    .carousel-btn.next {
        right: -2rem;
    }
    
    .carousel-image-container {
        max-height: 50vh;
    }
    
    .thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .pdf-container {
        height: calc(85vh - 120px);
    }
    
    .pdf-controls {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .carousel-btn {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }
    
    .carousel-btn.prev {
        left: -1.5rem;
    }
    
    .carousel-btn.next {
        right: -1.5rem;
    }
}