/* ============================================
   CAMRAIL PAGE STYLESHEET
   Author: Donfack Fortune
   ============================================ */

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

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Header */
header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.header-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    letter-spacing: -0.5px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

nav a {
    color: #999;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.3s;
}

nav a:hover,
nav a.active {
    color: #333;
}

.header-social {
    display: flex;
    gap: 20px;
}

.social-link {
    color: #999;
    font-size: 18px;
    transition: color 0.3s;
}

.social-link:hover {
    color: #333;
}

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

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    padding: 12px 0 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    list-style: none;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu a {
    display: block;
    padding: 6px 0;
    color: #ccc;
    font-size: 13px;
    text-align: center;
    transition: color 0.2s;
}

.dropdown-menu a:hover {
    color: #666;
}

/* Hero Section */
.company-hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.company-logo {
    width: 170px;
    height: auto;
    margin: 5px auto;
}

.company-hero h2 {
    font-size: 20px;
    font-weight: 400;
    color: #333;
    letter-spacing: 1px;
    margin-bottom: 0;
}

/* Intro Section */
.company-intro {
    max-width: 1200px;
    margin: 20px auto 20px;
    padding: 0 40px;
}

.company-intro p {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    text-align: justify;
}

/* Projects Container */
.projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.project-item {
    padding: 25px 0;
    border-bottom: 1px solid #ddd;
}

.project-item:last-child {
    border-bottom: none;
}

.project-item h3 {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.project-item p {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    text-align: justify;
}

/* Project Gallery */
.project-gallery {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 40px;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    overflow: hidden;
}

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

.image-wrapper {
    position: relative;
    overflow: hidden;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.overlay-text {
    color: #000;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    padding: 0 1rem;
}

.image-wrapper:hover .image-overlay {
    background-color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

.hidden-rows {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    margin-top: 0;
}

.hidden-rows.expanded {
    max-height: 2000px;
    opacity: 1;
    margin-top: 1.5rem;
}

.see-more-btn {
    display: block;
    margin: 2.5rem auto 0;
    padding: 0.875rem 2.5rem;
    background: transparent;
    color: #333;
    border: 1px solid #333;
    font-size: 0.95rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Lato', sans-serif;
}

.see-more-btn:hover {
    background: #333;
    color: #fff;
}

/* Fullscreen Modal */
.fullscreen-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 2rem;
    right: 3rem;
    color: #fff;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #ccc;
}

/* Back Link */
.back-link-wrapper {
    max-width: 1200px;
    margin: 30px auto 40px;
    padding: 0 40px;
    text-align: left;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #2c3e50;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.back-link:hover {
    background: #3498db;
}

.back-link i {
    font-size: 12px;
}

/* Pre-Footer */
.pre-footer {
    background: #f9f9f9;
    padding: 35px 40px;
    text-align: center;
}

.pre-footer p {
    color: #666;
    font-size: 15px;
    margin-bottom: 8px;
}

/* Footer */
footer {
    background: #fff;
    padding: 20px 40px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

footer p {
    color: #999;
    font-size: 14px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: #2c3e50;
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #3498db;
}

/* Tablet */
@media (max-width: 1024px) {

    .header-wrapper,
    .company-hero,
    .company-intro,
    .projects-container,
    .project-gallery,
    .back-link-wrapper {
        padding: 0 30px;
    }

    .gallery-container,
    .hidden-rows {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header-wrapper {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    nav ul {
        gap: 20px;
    }

    .company-hero {
        margin: 20px auto 15px;
        padding: 0 20px;
    }

    .company-logo {
        width: 200px;
        margin-bottom: 10px;
    }

    .company-hero h2 {
        font-size: 18px;
    }

    .company-intro,
    .projects-container,
    .project-gallery,
    .back-link-wrapper {
        padding: 0 20px;
    }

    .company-intro {
        margin: 20px auto;
    }

    .project-item {
        padding: 20px 0;
    }

    .project-item h3 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .company-intro p,
    .project-item p {
        font-size: 15px;
        line-height: 1.6;
    }

    .gallery-container,
    .hidden-rows {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .back-link-wrapper {
        margin: 25px auto 30px;
    }

    .back-link {
        width: 100%;
        justify-content: center;
    }

    .pre-footer {
        padding: 30px 20px;
    }

    .pre-footer p {
        margin-bottom: 6px;
    }

    .has-dropdown .dropdown-menu {
        display: none;
    }

    .close-modal {
        top: 1rem;
        right: 1.5rem;
        font-size: 2.5rem;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .logo a {
        font-size: 20px;
    }

    nav ul {
        gap: 15px;
    }

    nav a {
        font-size: 14px;
    }

    .company-logo {
        width: 150px;
    }

    .company-hero h2 {
        font-size: 16px;
    }

    .gallery-container,
    .hidden-rows {
        grid-template-columns: 1fr;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}