/*
 * Custom styles for Studio Tecnico Borrelli one-page website.
 *
 * The design borrows from the dark “Bauen” theme by DuruThemes
 * but is implemented from scratch.  Colours and typography
 * follow the original palette: dark charcoal backgrounds with
 * warm golden highlights and light grey copy.  Sections are
 * spaced generously for a comfortable scrolling experience.
 */

@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Oswald:wght@200;300;400;500;600;700&display=swap');

/* Base reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    scroll-behavior: smooth;
    font-family: 'Didact Gothic', sans-serif;
    background-color: #272727;
    color: #999;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

a {
    color: #b19777;
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    margin-bottom: 0.5em;
    color: #b19777;
    text-transform: uppercase;
    font-weight: 400;
}

p {
    margin-bottom: 1.2em;
    line-height: 1.7;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(39, 39, 39, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 10px 40px;
}
.navbar .logo {
    display: flex;
    align-items: center;
}
.navbar .logo img {
    height: 48px;
    width: auto;
    margin-right: 10px;
}
.navbar nav {
    display: flex;
    gap: 25px;
    flex: 1;
    justify-content: center;
}
.navbar nav a {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #b19777;
}
.navbar nav a:hover,
.navbar nav a.active {
    color: #ffffff;
}

/* Social icons in the navigation bar */
.navbar .nav-social {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-left: 20px;
}
.navbar .nav-social a {
    /* style nav icons as circular buttons */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #b19777;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: #b19777;
    transition: background 0.3s ease, color 0.3s ease;
}
.navbar .nav-social a:hover {
    background: #b19777;
    color: #272727;
}

/* Sections */
.section {
    padding: 80px 0;
    position: relative;
}
/* Hero/slider section */
#home {
    /* Leave space for the fixed navigation bar */
    height: calc(100vh - 60px);
    margin-top: 60px;
    overflow: hidden;
    position: relative;
}
#home .slides {
    height: 100%;
    width: 100%;
    position: relative;
}
#home .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
#home .slide.active {
    opacity: 1;
}
#home .slide .caption {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #ffffff;
    max-width: 80%;
}
#home .slide .caption h2 {
    font-size: 48px;
    font-weight: 500;
    margin-bottom: 0.3em;
}
#home .slide .caption p {
    font-size: 20px;
    color: #ddd;
    margin-bottom: 0;
}
#home .slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
#home .slider-dots span {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #b19777;
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}
#home .slider-dots span.active {
    background: #b19777;
    transform: scale(1.2);
}

/* Slider navigation arrows */
#home .slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    cursor: pointer;
    background: rgba(39,39,39,0.75);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

/* Prefer a robust fallback that does not depend on Font Awesome loading */
#home .slider-nav i {
    display: none; /* hide FA icon to avoid "invisible icon" issues if the CDN fails */
}

/* White chevrons rendered via CSS (always visible) */
#home .slider-nav.prev::before,
#home .slider-nav.next::before {
    color: #ffffff;
    font-size: 42px;
    font-weight: 600;
    line-height: 1;
}

#home .slider-nav.prev::before { content: "\2039"; } /* ‹ */
#home .slider-nav.next::before { content: "\203A"; } /* › */

#home .slider-nav:hover {
    background: rgba(39,39,39,0.9);
    transform: translateY(-50%) scale(1.1);
}

#home .slider-nav.prev { left: 20px; }
#home .slider-nav.next { right: 20px; }

/* Mobile sizing */
@media (max-width: 768px) {
    #home .slider-nav {
        width: 48px;
        height: 48px;
    }
    #home .slider-nav.prev::before,
    #home .slider-nav.next::before {
        font-size: 30px;
    }
}

/* About */
#about {
    background: #272727;
}
#about .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
#about .intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}
#about .intro .text {
    flex: 1 1 400px;
}
#about .intro .image {
    flex: 1 1 400px;
    position: relative;
}
#about .intro .image img {
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* Services */
#services {
    background: #1e1e1e;
}
#services .services-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}
#services .service-item {
    text-align: center;
    padding: 30px;
    border: 1px solid #323232;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#services .service-item i {
    font-size: 40px;
    color: #b19777;
    margin-bottom: 20px;
}
#services .service-item h3 {
    font-size: 22px;
    margin-bottom: 10px;
}
#services .service-item p {
    color: #bbb;
}
#services .service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}

/* Portfolio */
#portfolio {
    background: #272727;
}
#portfolio .grid {
    display: grid;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* Display four items in a single row on large screens */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
#portfolio .grid .item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    aspect-ratio: 1 / 1; /* ensure square items */
}
#portfolio .grid .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
#portfolio .grid .item:hover img {
    transform: scale(1.1);
}
#portfolio .grid .item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#portfolio .grid .item:hover .overlay {
    opacity: 1;
}
#portfolio .grid .item .overlay h4 {
    font-size: 20px;
    color: #b19777;
}

/* Team */
#team {
    background: #1e1e1e;
}
#team .team-grid {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
}
#team .member {
    flex: 1 1 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #bbb;
}
#team .member img {
    border-radius: 50%;
    width: 180px;
    height: 180px;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid #b19777;
}
#team .member h3 {
    font-size: 20px;
    margin-bottom: 5px;
    color: #b19777;
}
#team .member span {
    font-size: 14px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}
#team .member p {
    margin-top: 15px;
}

/* Testimonials */
#testimonials {
    background: #272727;
    text-align: center;
}
#testimonials .testimonial-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 40px 20px;
}
#testimonials .testimonial {
    display: none;
    color: #bbb;
}
#testimonials .testimonial.active {
    display: block;
}
#testimonials .testimonial p {
    font-size: 20px;
    margin-bottom: 20px;
}
#testimonials .testimonial .author {
    font-size: 16px;
    color: #b19777;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1px;
}
#testimonials .testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}
#testimonials .testimonial-dots span {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #b19777;
    cursor: pointer;
    transition: background 0.3s ease;
}
#testimonials .testimonial-dots span.active {
    background: #b19777;
}

/* Contact */
#contact {
    background: #1e1e1e;
}
#contact .contact-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}
#contact .contact-container.single {
    justify-content: center;
}
#contact .contact-container.single .contact-details {
    flex: 1 1 600px;
}
#contact .contact-details,
#contact .contact-form {
    flex: 1 1 400px;
}
#contact .contact-details h3 {
    margin-bottom: 15px;
    color: #b19777;
}
#contact .contact-details p {
    color: #bbb;
    line-height: 1.6;
}
#contact .contact-details ul {
    list-style: none;
    margin-top: 20px;
}
#contact .contact-details ul li {
    margin-bottom: 10px;
    font-size: 16px;
}
#contact .contact-form form {
    display: flex;
    flex-direction: column;
}
#contact .contact-form input,
#contact .contact-form textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid #323232;
    padding: 10px 5px;
    margin-bottom: 20px;
    color: #bbb;
    font-family: 'Didact Gothic', sans-serif;
}
#contact .contact-form input:focus,
#contact .contact-form textarea:focus {
    outline: none;
    border-bottom: 1px solid #b19777;
}
#contact .contact-form button {
    background: #b19777;
    color: #272727;
    border: none;
    padding: 12px 25px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    align-self: flex-start;
    transition: background 0.3s ease;
}
#contact .contact-form button:hover {
    background: #fff;
    color: #272727;
}

/* Footer */
footer {
    background: #272727;
    border-top: 1px solid #323232;
    color: #666;
}
footer .footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
footer .footer-logo img {
    height: 50px;
    width: auto;
}
footer .footer-social {
    display: flex;
    gap: 15px;
}
footer .footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #b19777;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: #b19777;
    transition: background 0.3s ease, color 0.3s ease;
}
footer .footer-social a:hover {
    background: #b19777;
    color: #272727;
}
footer .footer-bottom {
    text-align: center;
    padding: 15px 20px;
    border-top: 1px solid #323232;
    font-size: 14px;
}
footer .footer-bottom p {
    margin: 0;
    color: #666;
}

/* Utility classes */
.container-center {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    #home .slide .caption h2 {
        font-size: 32px;
    }
    #home .slide .caption p {
        font-size: 16px;
    }
    .navbar nav {
        gap: 15px;
    }
    #team .member img {
        width: 140px;
        height: 140px;
    }

    /* On small screens show portfolio items in two per row for better fit */
    #portfolio .grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}
