/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e5a8e;
    --secondary-color: #5fa3d0;
    --accent-color: #f4c542;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    background: #d5dbe3;
}

/* Boxed Layout Wrapper */
.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--white);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.12);
    position: relative;
    min-height: 100vh;
}

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

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 1400px;
    margin: 0 auto;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    height: 90px;
    overflow: hidden;
}

.logo:hover {
    transform: scale(1.1);
}

.logo:active {
    transform: scale(1.1);
}

.logo-icon {
    height: 120px;
    width: auto;
    display: block;
    object-fit: contain;
    margin: -15px 0;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

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

.nav-menu a:hover {
    color: var(--secondary-color);
}

.quote-button {
    background: var(--accent-color);
    color: #333;
    padding: 0.75rem 1.75rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.quote-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 197, 66, 0.4);
}

/* Contact Dropdown */
.contact-dropdown {
    position: relative;
}

.contact-popup {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    white-space: nowrap;
    z-index: 1001;
}

.contact-popup.active {
    display: block;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.contact-option:hover {
    background: var(--light-gray);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    background: url('../assets/hero-bg.jpg') center center / cover no-repeat;
    padding: 160px 0 120px;
    margin-top: 100px;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(10, 40, 70, 0.82) 0%,
        rgba(10, 40, 70, 0.6) 40%,
        rgba(10, 40, 70, 0.2) 75%,
        transparent 100%
    );
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    align-items: center;
}

.hero-text {
    max-width: 550px;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Services Section */
.services {
    padding: 100px 0;
    background: var(--light-gray);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    padding: 1.5rem 1.25rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

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

.service-card i {
    font-size: 2.25rem;
    color: var(--accent-color);
    line-height: 1;
}

.service-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--primary-color);
    margin: 0;
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: var(--white);
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow);
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.load-more-container {
    text-align: center;
    margin-top: 2.5rem;
}

.load-more-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.85rem 2.5rem;
    border-radius: 25px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 90, 142, 0.3);
    background: var(--secondary-color);
}

/* About & Legal Section */
.about {
    padding: 100px 0;
    background: var(--light-gray);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 1rem;
    text-align: center;
}

.about-logo {
    margin-top: 0.5rem;
}

.about-logo img {
    max-height: 400px;
    width: auto;
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(1200%) hue-rotate(182deg) brightness(95%) contrast(87%);
}

.legal-section {
    margin-top: 0.5rem;
}

.legal-section h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

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

.legal-item h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.legal-item p {
    color: var(--dark-gray);
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0;
}

.footer-content {
    text-align: center;
}

.footer p {
    opacity: 0.8;
}

/* Gallery Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85%;
    top: 50%;
    transform: translateY(-50%);
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: translateY(-50%) scale(0.8);
    }
    to {
        transform: translateY(-50%) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--white);
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2001;
}

.modal-close:hover {
    color: var(--accent-color);
}

.modal-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    text-align: center;
    font-size: 1.2rem;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    font-size: 30px;
    padding: 20px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 2001;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.4);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* Responsive Design */

/* Boxed layout goes full-width on smaller screens */
@media (max-width: 1400px) {
    .page-wrapper {
        max-width: 100%;
        box-shadow: none;
    }

    .navbar {
        max-width: 100%;
    }
}

/* Medium Desktop */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet */
@media (max-width: 768px) {
    .hero {
        min-height: 400px;
        padding: 140px 0 100px;
    }

    .hero-overlay {
        background: linear-gradient(
            to right,
            rgba(10, 40, 70, 0.85) 0%,
            rgba(10, 40, 70, 0.65) 50%,
            rgba(10, 40, 70, 0.35) 100%
        );
    }

    .hero-text {
        text-align: center;
        max-width: 100%;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }

    .project-gallery {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }

    .legal-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-width: 95%;
        max-height: 80%;
    }

    .modal-nav {
        font-size: 25px;
        padding: 15px;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }

    .modal-close {
        right: 20px;
        font-size: 40px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-right {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 0;
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        gap: 0;
    }

    .nav-right.active {
        max-height: 400px;
        padding: 1rem 0;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-menu li {
        padding: 0.75rem 2rem;
        text-align: center;
    }

    .contact-dropdown {
        width: 100%;
        text-align: center;
    }

    .quote-button {
        margin: 1rem 2rem 0.5rem;
        display: block;
        text-align: center;
    }

    .contact-popup {
        position: static;
        box-shadow: none;
        padding: 0.25rem 2rem;
        white-space: normal;
    }

    .logo {
        height: 70px;
    }

    .logo-icon {
        height: 90px;
        margin: -10px 0;
    }

    .hero {
        padding: 100px 0 60px;
        margin-top: 90px;
        min-height: 350px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .services {
        padding: 60px 0;
    }

    .projects {
        padding: 60px 0;
    }

    .about {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .about-section p {
        font-size: 1rem;
    }

    .modal-content {
        max-width: 100%;
        max-height: 70%;
    }

    .modal-nav {
        font-size: 20px;
        padding: 10px;
    }

    .modal-close {
        right: 10px;
        top: 10px;
        font-size: 35px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .container {
        padding: 0 15px;
    }

    .logo {
        height: 60px;
    }

    .logo-icon {
        height: 80px;
        margin: -10px 0;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .service-card {
        padding: 1.25rem 1rem;
    }
}

