/* Base Styling */
body, html {
    scroll-behavior: smooth;
    background: #f4f4f4;
    color: black;
    overflow-x: hidden;
}

.hero {
    position: relative;
    background-image: url('./img/projects/large/elysium_logan4_large.webp');
    background-size: cover;
    background-attachment: fixed; /* Parallax effect */
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-align: center;
    color: white;
    /* Performance optimizations */
    will-change: transform;
    contain: layout style paint;
}

.hero h1 {
    font-size: 6em;
    z-index: 2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero p {
    font-size: 1.2em;
    margin-top: 10px;
    z-index: 2;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.41);
    z-index: 1;
    pointer-events: none; /* Ensure that the overlay does not interfere with user interactions */
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0; /* Initial opacity */
    animation: fadeIn 1.75s ease-in-out forwards; /* Fade-in animation */
    transform: translateY(0);
    animation: fadeInUp 2s ease-in-out forwards;
    margin-top: -50px;
    width: 90%;
    max-width: 800px;
}


/* Flooring Services Styling */
.flooring-services {
    background-color: white;
    padding: 60px 5%;
}

.responsive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal-width columns */
    align-items: center;
    gap: 40px;
    margin: 0 auto;
    max-width: 1400px;
}

/* Mobile adjustments: stack sections and reduce headings */
@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: 60vh;
        background-attachment: scroll;
        padding: 80px 20px 40px;
        /* Mobile performance optimizations */
        will-change: auto;
        filter: none;
        image-rendering: auto;
    }
    
    /* Fix overlay opacity for better text readability on mobile */
    .overlay {
        background-color: rgba(0, 0, 0, 0.25) !important;
        height: 100% !important;
    }
    
    /* Ensure hero content is properly visible */
    .hero-content {
        margin-top: 0;
        opacity: 1;
        width: 95%;
    }
    
    .hero h1 {
        font-size: 2.4em;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .flooring-services-text h1,
    .full-service-offerings h1,
    .pre-construction-text h1,
    .project-management h1,
    .products-we-offer h1,
    .full-service-approach h1 {
        font-size: 2.4em;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .flooring-services-text p,
    .project-management p,
    .pre-construction-text p,
    .products-we-offer .card p {
        font-size: 1.1em;
        line-height: 1.6;
        text-align: left !important;
        text-align-last: left !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .responsive-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
    }
    
    .products-we-offer {
        padding: 40px 5%;
    }
    
    .flooring-services {
        padding: 40px 20px;
    }
    
    .full-service-offerings {
        padding: 40px 20px;
    }
    
    .pre-construction {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2em;
    }
    
    .flooring-services-text h1,
    .full-service-offerings h1,
    .pre-construction-text h1,
    .project-management h1,
    .products-we-offer h1,
    .full-service-approach h1 {
        font-size: 2.2em;
    }
}

.flooring-services-text h1 {
    font-size: 5em;
    color: #0b477c;
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.flooring-services-text p {
    text-align: left;
    font-size: 1.6em;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.flooring-services-image {
    display: flex;
    justify-content: center;
}

.flooring-services-image img {
    width: 100%;
    height: auto;
}

/* Full Services Offering Styling */

.full-service-offerings {
    background-color: #f9f9f9;
    padding: 60px 5%;
    text-align: center;
}

.full-service-offerings h1 {
    color: #0b477c;
    font-size: 5em;
    margin-bottom: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.full-service-offerings p {
    max-width: 100%;
    font-size: 1.6em;
    margin: 0 auto 40px auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.accordion-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 auto;
}

.accordion-item {
    background-color: #0b477c;
    border-radius: 8px;
    overflow: hidden;
}

/* Button style */
.accordion-toggle {
    background: none;
    border: none;
    width: 100%;
    padding: 18px 25px;
    color: white;
    font-size: 1.7em;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.accordion-toggle span:first-child {
    font-size: 1.6em;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .accordion-toggle {
        font-size: 1.4em;
        padding: 15px 20px;
    }
    
    .accordion-toggle span:first-child {
        font-size: 1.3em;
    }
}

/* Hidden content style */
.accordion-content {
    background-color: #e7e7e7;
    color: #000;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 25px;
}

.accordion-content.active {
    max-height: 500px;
    padding: 20px 25px;
}

.accordion-content p {
    font-size: 1.4em;
    line-height: 1.6;
    margin-bottom: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .accordion-content {
        padding: 0 20px;
    }
    
    .accordion-content.active {
        padding: 15px 20px;
    }
    
    .accordion-content p {
        font-size: 1.1em;
        line-height: 1.6;
    }
}

/* Plus icon */
.plus-icon {
    font-size: 1.5em;
    transition: transform 0.3s ease;
}

.accordion-toggle.active .plus-icon {
    transform: rotate(45deg);
}

/* Pre-Construction Section */
.pre-construction {
    background-color: white;
    padding: 60px 5%;
}

.pre-construction-text h1 {
    font-size: 5em;
    color: #0b477c;
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pre-construction-text p {
    font-size: 1.6em;
    line-height: 1.6;
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pre-construction-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.reverse-layout {
    direction: rtl;
}

.reverse-layout > * {
    direction: ltr;
}

@media (max-width: 768px) {
    .pre-construction-text h1 {
        font-size: 2.4em;
        line-height: 1.2;
    }
    
    .pre-construction-text p {
        font-size: 1.1em;
        line-height: 1.6;
    }
}

/* Products We Offer Section */
.products-we-offer {
    background-color: #f4f4f4;
    padding: 60px 5%;
    text-align: center;
}

.products-we-offer h1 {
    color: #0b477c;
    font-size: 5em;
    margin-bottom: 30px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.products-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.card {
    background: white;
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: #0b477c;
    font-size: 2.2em;
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card p {
    font-size: 1.4em;
    color: #666;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .products-we-offer {
        padding: 40px 20px;
    }
    
    .products-we-offer h1 {
        font-size: 2.4em;
        line-height: 1.2;
    }
    
    .products-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .card {
        padding: 20px 15px;
    }
    
    .card h3 {
        font-size: 1.8em;
    }
    
    .card p {
        font-size: 1.2em;
    }
}

/* Keyframes for the fade-in and slide-in effect */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(50px); /* Start below the view */
    }
    100% {
        opacity: 1;
        transform: translateY(0); /* Move to original position */
    }
}

/* Animation class for cards */
.card.animate {
    animation: fadeInUp 0.4s ease-out forwards; /* Each card animation lasts 0.4 seconds */
}

/* Staggered delays for individual cards */
.card:nth-of-type(1) { animation-delay: 0s; }
.card:nth-of-type(2) { animation-delay: 0.2s; }
.card:nth-of-type(3) { animation-delay: 0.4s; }
.card:nth-of-type(4) { animation-delay: 0.6s; }
.card:nth-of-type(5) { animation-delay: 0.8s; }
.card:nth-of-type(6) { animation-delay: 1s; }
.card:nth-of-type(7) { animation-delay: 1.2s; }
.card:nth-of-type(8) { animation-delay: 1.4s; }

/* Project Management */
.project-management {
    background-color: white;
    padding: 60px 5%;
}
.project-management h1 {
    color: #0b477c;
    font-size: 5em;
    margin-bottom: 20px;
}
.project-management p {
    font-size: 1.6em;
    line-height: 1.4;
    text-align: left;
    margin-bottom: 20px;
}
/* Numbered Circle List */
.numbered-circle-list {
    list-style: none;        /* Remove default bullet styling */
    margin: 0;
    padding: 0;
  }
  
  .numbered-circle-list li {
    display: flex;           /* Place the circle and text side by side */
    align-items: flex-start; 
    margin-bottom: 20px;     /* Spacing between items */
  }
  
  .numbered-circle-list .circle {
    min-width: 40px;
    min-height: 40px;
    background-color: #ffffff;
    border: 2px solid #0b477c;   /* Circle border color */
    border-radius: 50%;         /* Make it perfectly round */
    color: #0b477c;             /* Text color for the number */
    font-weight: bold;
    font-size: 20px;
    display: flex;
    justify-content: center;    /* Center the number horizontally */
    align-items: center;        /* Center the number vertically */
    margin-right: 15px;         /* Spacing between circle and text */
  }
  
  .numbered-circle-list .text {
    font-size: 20px;            /* Adjust text size as needed */
    line-height: 1.4;
    max-width: 600px;           /* Optional: constrain width for readability */
    margin-left: 20px;
  }

  /* Grid Element Base Styling */
.remainingGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    color: white;
}

.gridElementAbout, .gridElementServices {
    background: linear-gradient(135deg, rgba(29, 108, 177), rgba(11, 71, 124));
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 2; /* Ensure these elements are on top */
}

.gridElementAbout:hover, .gridElementServices:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.gridElementAbout::before, .gridElementServices::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1; /* Lower z-index for the pseudo-element */
}

.gridElementAbout:hover::before, .gridElementServices:hover::before {
    opacity: 1;
}

/* Heading Styling */
.gridElementAbout h2, .gridElementServices h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

/* Paragraph Styling */
.gridElementAbout p, .gridElementServices p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #f1f1f1;
}

/* Learn More Link Styling */
.learn-more-link {
    display: inline-flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: bold;
    text-decoration: none;
    color: #00ccff;
    transition: color 0.3s ease;
    margin-top: 15px;
    cursor: pointer;
    position: relative;
    z-index: 3;
}

.learn-more-link:hover {
    color: #00aaff;
}

.learn-more-link .arrow {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.learn-more-link:hover .arrow {
    transform: translateX(5px);
}

/* Grid Element Animations */
@keyframes fadeInGrid {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.gridElementAbout, .gridElementServices {
    animation: fadeInGrid 1s ease-in-out forwards;
}

.remainingGrid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 15px;
    max-height: 300px; /* Optional: cap image height */
    display: block;
}

/* Section Styles */
section {
    padding: 100px 60px;
    /* background: linear-gradient(135deg, #489de9, #1987e8); */
    /* background-color: #0b477c; */
    background-color: #333;
    margin-top: 10px 0;
}

section p, section ul {
    font-size: 1.6em;
    line-height: 1.6;
}

section a {
    color: #00ccff;
}

.image-column {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* space between images */
    align-items: center; /* optional: center images horizontally */
}
  
.image-column img {
    width: 100%;
    max-width: 300px; /* default max width */
    height: auto;
    transition: transform 0.3s ease-in-out;
    border: 13.5px solid #0b477c;
}

/* Scale up images on larger screens */
@media (min-width: 768px) {
    .image-column img {
        max-width: 400px;
    }
}

@media (min-width: 1024px) {
    .image-column img {
        max-width: 500px;
    }
}

/* Image and text */
.full-service-approach {
    text-align: justify;
    text-align-last: center;
    justify-content: center;
    align-items: center;
}

.full-service-approach img {
    width: 100%;
    transform: scale(0.85);
    transform-origin: center;
}

.full-service-approach h1 {
    color: #0b477c;
    font-size: 5em;
    margin-bottom: 20px;
}

.full-service-approach p {
    font-size: 1.6em;
    line-height: 1.8;
    text-align: left;
    margin-bottom: 20px;
}
