/* Project Info Bar (below header) */
.project-bar {
    /* Use 100% instead of 100vw to avoid horizontal overflow when a vertical scrollbar is present */
    width: 100%;
    background: #f8f8f8;
    border-bottom: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(44,44,44,0.04);
    padding: 0;
    margin: 0;
    z-index: 10;
}
.project-bar-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 32px 8px 32px;
    gap: 18px;
        .serviciu-card,
        .contact-info-card,
        .despre-proiect-card,
        .comunicate-pnrr-card {
            /* Unify all cards behavior on phones */
            align-items: center;
            width: calc(100% - 24px);
            max-width: 520px;
            min-width: 0;
            margin: 12px auto;
            padding: 12px 14px;
            min-height: unset;
            box-sizing: border-box;
            flex: 1 1 auto;
        }
        /* Remove stray invalid declaration; keep explicit left padding compact */
        .serviciu-card { padding-left: 14px; }
    font-weight: 600;
    letter-spacing: 0.2px;
}
.project-bar-title {
    font-size: 1.08em;
    font-weight: 600;
    color: #232c2c;
    margin-right: 12px;
    white-space: normal;
}
.project-bar-link {
    color: #2c5aa0;
    font-weight: 600;
            /* Ensure card never exceeds viewport width accounting for margins */
            width: calc(100% - 24px);
            max-width: 520px;
            min-width: 0;
            margin: 12px auto;
            padding: 8px 12px; /* compact padding */
            font-size: 0.97em;
            min-height: 70px; /* compact min height */
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            box-sizing: border-box;
            flex: 1 1 auto;
    align-items: center;
    gap: 12px;
}
.project-bar-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
}
@media (max-width: 900px) {
    .project-bar-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 12px 8px 12px;
    }
    .project-bar-right {
        gap: 8px;
    }
    .project-bar-logo {
        height: 32px;
    }
}
/* ...existing code... */
html, body {
    font-family: 'Roboto', 'Poppins', 'Libre Baskerville', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    height: 100%;
    width: 100%;
    /* Prevent any accidental horizontal scrollbars/gaps from 100vw or transforms */
    overflow-x: hidden;
    scroll-behavior: smooth;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

/* Contact bar */
#Contacts {
    color: #f5f5f5;
    background: #4a4a4a;
    font-family: 'Roboto', sans-serif;
    margin-bottom: 0;
    text-align: right;
    font-size: 1em;
    padding: 6px 30px 6px 0;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px; /* reduced gap for more compact look */
    flex-wrap: wrap;
}
#Contacts span, #Contacts a {
    color: #f5f5f5;
    margin-left: 0; /* remove extra left margin for better alignment */
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1em;
}
.contact-emoji {
    color: #f5f5f5;
    font-size: 1em;
    font-family: 'Segoe UI Symbol', Arial, sans-serif !important;
    font-weight: normal;
    vertical-align: middle;
    margin-right: 2px;
    display: inline;
    filter: none;
    line-height: 1;
}

/* Header */
header {
    background: #f0f0f0;
    padding: 0;
    border-bottom: none;
    box-shadow: none;
}
.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px 10px 32px;
    max-width: 1600px;
    margin: 0 auto;
    background: #f0f0f0;
    /* gap removed for full stretch */
}
.header-left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
    padding-top: 0;
    padding-left: 0;
}
.header-extra-imgs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1 1 0;
    margin-left: 32px;
    gap: 0;
}
.header-side-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 8px;
    background: transparent;
    border: none;
    padding: 4px;
    flex: 1 1 0;
    /* ensures images stretch to fill available space */
}
.header-extra-imgs img:first-child {
    justify-self: flex-start;
}
.header-extra-imgs img:last-child {
    justify-self: flex-end;
}
.header-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 0;
    justify-content: center;
}
#DoljConstruct {
    color: #2c2c2c;
    font-family: 'Roboto', sans-serif;
    font-size: 1.35em;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.1;
}
#Proiectare {
    color: #5a5a5a;
    font-family: 'Roboto', sans-serif;
    font-size: 1.05em;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.1;
}

/* Hero Section */
.hero {
    /* Make the landing section fill the screen on first load.
       Use viewport height minus the top bars (Contacts + Header),
       which is provided via the CSS variable --top-offset set by JS. */
    min-height: calc(100vh - var(--top-offset, 0px)); /* fallback */
    min-height: calc(100svh - var(--top-offset, 0px)); /* modern mobile safe unit */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 10px 60px 10px;
    box-sizing: border-box;
}
.hero h1 {
    font-size: 3em;
    font-weight: 700;
    color: #232c2c;
    margin-bottom: 16px;
    line-height: 1.1;
    text-shadow: 0 2px 12px #fff8, 0 1px 0 #fff, 0 0 2px #0005;
}
.hero .highlight {
    color: #232c2c;
    font-size: 1.2em;
    display: block;
    font-weight: 700;
    text-shadow: 0 2px 12px #fff8, 0 1px 0 #fff, 0 0 2px #0005;
}
.hero-subtitle {
    color: #232c2c;
    font-size: 1.3em;
    margin-bottom: 36px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 12px #fff8, 0 1px 0 #fff, 0 0 2px #0005;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border 0.2s;
    cursor: pointer;
}
.btn-primary {
    background: #5a5a5a;
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(90,90,90,0.10);
}
.btn-primary:hover {
    background: #727272;
    color: #fff;
}
.btn-outline {
    background: transparent;
    color: #5a5a5a;
    border: 2px solid #5a5a5a;
}
.btn-outline:hover {
    background: #5a5a5a;
    color: #fff;
    border-color: #5a5a5a;
}
.btn-primary span {
    margin-left: 10px;
    font-size: 1.2em;
    transition: margin-left 0.2s;
}
.btn-primary:hover span {
    margin-left: 16px;
}

/* Servicii Section Modern */
.servicii {
    background: #f0f0f0;
    padding: 60px 0px 60px 0;
    margin-top: 0px;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
}
.servicii h2 {
    color: #5a5a5a;
    font-size: 2.8em;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}
.servicii-subtitle {
    color: #727272;
    font-size: 1.25em;
    text-align: center;
    margin-bottom: 48px;
    font-family: 'Roboto', sans-serif;
}
.servicii-lista,
.contact-info-lista {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
}
.serviciu-card,
.contact-info-card {
    background: #e8e8e8;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(44,44,44,0.08);
    padding: 36px 28px 28px 28px;
    min-width: 260px;
    max-width: 320px;
    width: 320px;
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.18s, box-shadow 0.18s;
    text-align: center;
    /* asigură proporționalitate */
    box-sizing: border-box;
    margin: 12px;
    border: 1.5px solid #c0c0c0;
}
.serviciu-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px rgba(90,90,90,0.13);
}
.serviciu-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    background: #c0c0c0;
}
.serviciu-card h3 {
    font-size: 1.35em;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #5a5a5a;
    margin-bottom: 8px;
    margin-top: 0;
    text-align: center;
}
.serviciu-card p {
    color: #727272;
    font-size: 1em;
    text-align: center;
    margin-bottom: 16px;
}
.serviciu-card ul {
    list-style: disc inside;
    color: #6a6a6a;
    padding-left: 0;
    margin: 0;
    text-align: left;
}
.serviciu-card ul li {
    color: #5a5a5a;
    font-size: 1em;
    margin-bottom: 6px;
    padding-left: 0;
}
.serviciu-card ul li::marker {
    color: #727272;
    font-size: 1.1em;
}

.serviciu-card#contact ul {
    margin-top: 10px;
}
.serviciu-card#contact ul li {
    color: #232c3b;
    font-size: 1em;
    margin-bottom: 6px;
    padding-left: 0;
    list-style: none;
}
.serviciu-card#contact ul li b {
    color: #6a6a6a;
    font-weight: 600;
}
.serviciu-card#contact a {
    word-break: break-all;
}

/* Footer */
footer {
    text-align: center;
    color: #fff;
    background: #5a5a5a;
    padding: 15px 0;
    margin-top: 40px;
    position: relative;
    z-index: 2;
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
    letter-spacing: 0.5px;
}

/* Contact Info Section */
.contact-info {
    background: #f0f0f0;
    padding: 10px 0 60px 0;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
}
.contact-info h2 {
    color: #5a5a5a;
    font-size: 2.2em;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
}
.contact-info-lista {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
    
}
.contact-info-card {
    /* Folosește exact aceleași stiluri ca .serviciu-card */
    background: #e8e8e8;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(44,44,44,0.08);
    padding: 36px 28px 28px 28px;
    min-width: 260px;
    max-width: 320px;
    width: 320px;
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.18s, box-shadow 0.18s;
    text-align: center;
}
.contact-info-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px rgba(90,90,90,0.13);
}
.contact-info-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    background: #c0c0c0;
}
.contact-info-card h3 {
    font-size: 1.35em;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #5a5a5a;
    margin-bottom: 8px;
    margin-top: 0;
    text-align: center;
}
.contact-link {
    color: #5a5a5a;
    font-size: 0.98em;
    text-decoration: none;
    margin-top: 4px;
    word-break: normal;
    white-space: nowrap;
    overflow-x: auto;
    max-width: 100%;
}
.contact-link:hover {
    color: #727272;
    text-decoration: underline;
}

/* Comunicate PNRR Section */
.comunicate-pnrr {
    background: #f0f0f0;
    padding: 40px 0 60px 0;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
}
.comunicate-pnrr h2 {
    color: #5a5a5a;
    font-size: 2.2em;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
}
.comunicate-pnrr-lista {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
}
.comunicate-pnrr-card {
    background: #e8e8e8;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(44,44,44,0.08);
    padding: 36px 28px 28px 28px;
    min-width: 260px;
    max-width: 320px;
    width: 320px;
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.18s, box-shadow 0.18s;
    text-align: center;
    box-sizing: border-box;
    margin: 12px;
    border: 1.5px solid #c0c0c0;
}
.comunicate-pnrr-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px rgba(90,90,90,0.13);
}
.comunicate-pnrr-card h3 {
    font-size: 1.15em;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #5a5a5a;
    margin-bottom: 8px;
    margin-top: 0;
    text-align: center;
}
.comunicate-pnrr-card a {
    color: #5a5a5a;
    font-size: 1.1em;
    text-decoration: none;
    margin-top: 8px;
    word-break: break-all;
    font-weight: 600;
}
.comunicate-pnrr-card a:hover {
    color: #727272;
    text-decoration: underline;
}
.comunicate-pnrr-card .pdf-icon {
    font-size: 2.5em;
    color: #e74c3c;
    margin-bottom: 12px;
}

/* Simple section header with logo */
.section-header-with-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.section-logo {
    height: 60px;
    width: auto;
}

@media (max-width: 768px) {
    .section-header-with-logo {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-logo {
        height: 50px;
    }
}

/* Despre Proiect Section */
.despre-proiect {
    background: #f0f0f0;
    padding: 60px 0;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
}

.despre-proiect h2 {
    color: #5a5a5a;
    font-size: 2.8em;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.despre-proiect-subtitle {
    color: #727272;
    font-size: 1.25em;
    text-align: center;
    margin-bottom: 48px;
    font-family: 'Roboto', sans-serif;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.despre-proiect-content {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
}

.despre-proiect-card {
    background: #e8e8e8;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(44,44,44,0.08);
    padding: 36px 28px 28px 28px;
    min-width: 260px;
    max-width: 320px;
    width: 320px;
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.18s, box-shadow 0.18s;
    text-align: center;
    box-sizing: border-box;
    margin: 12px;
    border: 1.5px solid #c0c0c0;
}

.despre-proiect-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px rgba(90,90,90,0.13);
}

.despre-proiect-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    background: #c0c0c0;
}

.despre-proiect-card h3 {
    font-size: 1.35em;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #5a5a5a;
    margin-bottom: 12px;
    margin-top: 0;
    text-align: center;
}

.despre-proiect-card p {
    color: #6c757d;
    font-size: 1em;
    text-align: center;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Responsive pentru max-width: 1000px */
@media (max-width: 1000px) {
    .header-main {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 12px 12px 12px;
        gap: 0;
    }
    .header-left {
        justify-content: flex-start;
        width: 100%;
        padding-left: 0;
    }
    .header-title {
        align-items: flex-start;
    }
    .navbar {
        justify-content: flex-start;
        width: 100%;
        padding-left: 0;
        margin-left: 0;
    }
    #Contacts {
        padding: 6px 12px 6px 0;
        font-size: 0.98em;
    }
    .servicii-lista,
    .contact-info-lista {
        flex-direction: column;
        align-items: center;
        gap: 28px;
    }
    .serviciu-card,
    .contact-info-card {
        max-width: 90vw;
        min-width: 0;
        width: 60%;
        padding: 28px 12px 20px 12px;
    }
}

@media (max-width: 900px) {
    .site-footer-content {
        flex-direction: column;
        gap: 0;
        padding: 0 8px;
        justify-content: center;
        text-align: center;
    }
    .site-footer-col {
        margin-bottom: 0;
        padding-bottom: 0;
        padding-top: 0;
        text-align: center;
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    .site-footer-logo-row {
        margin-bottom: 0;
    }
    .site-footer-desc {
        margin: 2px 0 0 0;
    }
    .site-footer-section-title {
        margin-bottom: 2px;
    }
    .site-footer-contact-list {
        gap: 0;
    }
    .site-footer-contact-item {
        margin-bottom: 0;
        padding-bottom: 0;
        padding-top: 0;
    }
    .site-footer {
        padding-top: 16px;
        padding-bottom: 8px;
    }
}

@media (max-width: 600px) {
    .site-footer-content {
        align-items: center;
    }
    .site-footer-content {
        padding: 0 2px;
    }
    .site-footer {
        padding-top: 8px;
        padding-bottom: 4px;
    }
    .site-footer-col {
        height: 150px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        width: 100%;
        padding-bottom: 25px;
        padding-top: 50px;
    }
    .site-footer-logo-row {
        margin-bottom: 0;
    }
    .site-footer-desc {
        margin: 1px 0 0 0;
    }
    .site-footer-section-title {
        margin-bottom: 1px;
    }
    .site-footer-contact-list {
        gap: 0;
    }
    .site-footer-contact-item {
        margin-top: 0;
        margin-bottom: 0;
        padding-bottom: 0;
        padding-top: 0;
    }
}

@media (max-width: 700px) {
    .comunicate-pnrr-card{
        width: calc(100% - 24px);
        max-width: 520px;
        min-width: 0;
        margin: 12px auto;
        padding: 8px 12px; /* compact padding */
        font-size: 0.97em;
        min-height: 70px; /* compact min height */
        display: flex;
        flex-direction: column;
        justify-content: center; /* centreaza vertical */
        align-items: center;
        text-align: center;
        box-sizing: border-box;
        flex: 1 1 auto;
    }
    #Contacts {
        display: none !important;
    }
    .hero h1 {
        font-size: 2em;
    }
    .hero .highlight {
        font-size: 1em;
    }
    .hero-buttons {
        flex-direction: column;
        gap: 14px;
    }
    .serviciu-card,
    .contact-info-card,
    .despre-proiect-card {
        width: calc(100% - 24px);
        max-width: 520px;
        min-width: 0;
        margin: 12px auto;
        padding: 8px 12px; /* compact padding */
        font-size: 0.97em;
        min-height: 70px; /* inaltime minima mica */
        display: flex;
        flex-direction: column;
        justify-content: center; /* centreaza vertical */
        align-items: center;
        text-align: center;
        box-sizing: border-box;
        flex: 1 1 auto;
        padding-left: 12px;
        padding-right: 12px;
    }
    .serviciu-icon,
    .contact-info-icon {
        margin-bottom: 8px;
    }
    .serviciu-card h3,
    .contact-info-card h3 {
        font-size: 1em;
    }
    .contact-link {
        text-align: center;
        display: block;
        width: 100%;
        word-break: break-word;
    }
    /* Hide header extra images (st, mij, dr) under 700px */
    .header-extra-imgs {
        display: none !important;
    }
    /* Show title text on phones */
    #DoljConstruct,
    #Proiectare {
        display: inline !important;
    }
    /* Resize logo */
    .logo {
        width: 100px !important;
        height: 80px !important;
    }
    /* Resize phone/tel in header */
    .header-tel, 
    #header-tel {
        width: 300px !important;
        padding-left: 10% !important;
    }
    .tel-icon { display: none !important; }
    .header-left {
        width: 100%;
        gap: 0;
        padding: 0;
        margin: 0;
    }
}

@media (max-width: 600px) {
    .header-main {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 6px 6px 6px;
        gap: 0;
    }
    .header-title {
        align-items: flex-start;
    }
    .navbar {
        justify-content: flex-start;
        width: 100%;
        padding-left: 0;
        margin-left: 0;
        padding-top: 0;
    }
}

/* --- Custom Footer Section --- */
.site-footer {
    background: #131c2a;
    color: #fff;
    padding: 48px 0 18px 0;
    margin-top: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
    letter-spacing: 0.2px;
}
.site-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 40px;
}
.site-footer-col {
    flex: 1 1 260px;
    min-width: 220px;
    max-width: 460px; /* a bit wider to make ANPC pictograms bigger */
    text-align: center;
    align-items: center;
    display: flex;
    flex-direction: column;
}
.site-footer-logo-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}
.site-footer-logo {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    padding: 2px;
    object-fit: contain;
}
.logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 10px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    display: block;
}
.site-footer-title {
    font-size: 1.25em;
    font-weight: bold;
    color: #fff;
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.site-footer-subtitle {
    color: #e8e8e8;
    font-size: 1em;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0;
}
.site-footer-desc {
    color: #f0f0f0;
    font-size: 1em;
    line-height: 1.6;
}
.site-footer-section-title {
    color: #fff;
    font-size: 1.08em;
    font-weight: 700;
    margin-bottom: 18px;
    margin-top: 0;
}
.site-footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: #f0f0f0;
    font-size: 1em;
}
.site-footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* Base social cubes layout */
.social-cubes {
    display: inline-flex;
    gap: 8px;
}
/* When inside a footer contact row, nudge slightly right on wide screens */
.site-footer-contact-item .social-cubes {
    margin-left: 8px;
}
.social-cube {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform .15s ease;
}
.social-cube:hover { transform: translateY(-2px); }
.social-cube-img { width: 28px; height: 28px; object-fit: contain; display: block; background: transparent; }
.site-footer-contact-icon {
    color: #727272;
    font-size: 1.1em;
    width: 20px;
    display: inline-flex;
    justify-content: center;
}
.site-footer-contact-link {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}
.site-footer-contact-link:hover {
    color: #ffffff;
    text-decoration: underline;
}
.site-footer-hours-list {
    color: #f0f0f0;
    font-size: 1em;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-footer-hours-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 2px;
}
.site-footer-hours-icon {
    color: #727272;
    font-size: 1.1em;
    width: 20px;
    display: inline-flex;
    justify-content: center;
    margin-top: 2px;
}
.site-footer-hours-label {
    font-weight: 500;
    color: #fff;
    min-width: 90px;
}
.site-footer-hr {
    border: none;
    border-top: 1px solid #c0c0c0;
    margin: 36px 0 18px 0;
}
.site-footer-copyright {
    color: #c0c0c0;
    font-size: 0.97em;
    text-align: center;
    margin: 0;
    padding-bottom: 8px;
}

/* ANPC footer pictograms */
.footer-anpc {
    display: flex;
    justify-content: space-between; /* left and right */
    gap: 12px;
    margin: 8px auto 8px auto;
    flex-wrap: nowrap;
    flex-direction: row; /* side by side */
    align-items: center;
}
.site-footer-col .footer-anpc { margin-top: auto; width: 100%; }
/* Center single pictograms within their columns */
.footer-anpc.single { justify-content: center; }
.footer-anpc.single .anpc-picto { margin: 0 auto; }
.anpc-picto { display: inline-flex; width: calc(50% - 6px); border-radius: 16px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.28); transition: transform .15s ease, filter .15s ease; }
.anpc-picto:hover { transform: translateY(-2px); filter: brightness(1.03); }
.anpc-img { width: 100%; height: auto; display: block; }
/* When there is only one pictogram in a column, let it take full width */
.footer-anpc.single .anpc-picto { width: 80%; max-width: 420px; }

/* Social buttons in footer */
.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 10px auto 14px auto;
    flex-wrap: wrap;
}
.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    letter-spacing: .3px;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    transition: transform .15s ease, filter .15s ease;
}
.social-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.social-btn .social-icon {
    width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff2; color: #fff; font-weight: 900;
}
.social-btn.facebook { background: #1877F2; }
.social-btn.instagram {
    background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

/* Optional: on very narrow screens allow wrapping under each other to avoid overflow */
@media (max-width: 520px) {
    .footer-anpc { flex-wrap: wrap; }
    .anpc-picto { width: 100%; }
}

/* Keep social icons neat on small screens */
@media (max-width: 700px) {
    .site-footer-contact-item { flex-wrap: wrap; }
    .site-footer-contact-item .social-cubes {
        margin-left: 0;
        margin-top: 3px;
        margin-bottom: 3px;
        width: 100%;
        justify-content: center;
    }
}

/* Responsive Footer */
@media (max-width: 900px) {
    .site-footer-content {
        flex-direction: column;
        gap: 0;
        padding: 0 8px;
        justify-content: center;
        text-align: center;
    }
    .site-footer-col {
        margin-bottom: 0;
        padding-bottom: 0;
        padding-top: 0;
        text-align: center;
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    .site-footer-logo-row {
        margin-bottom: 0;
    }
    .site-footer-desc {
        margin: 2px 0 0 0;
    }
    .site-footer-section-title {
        margin-bottom: 2px;
    }
    .site-footer-contact-list {
        gap: 0;
    }
    .site-footer-contact-item {
        margin-bottom: 0;
        padding-bottom: 0;
        padding-top: 0;
    }
    .site-footer {
        padding-top: 16px;
        padding-bottom: 8px;
    }
}

@media (max-width: 600px) {
    .site-footer-content {
        align-items: center;
    }
    .site-footer-content {
        padding: 0 2px;
    }
    .site-footer {
        padding-top: 8px;
        padding-bottom: 4px;
    }
    .site-footer-col {
        height: 150px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        width: 100%;
        padding-bottom: 25px;
        padding-top: 50px;
    }
    .site-footer-logo-row {
        margin-bottom: 0;
    }
    .site-footer-desc {
        margin: 1px 0 0 0;
    }
    .site-footer-section-title {
        margin-bottom: 1px;
    }
    .site-footer-contact-list {
        gap: 0;
    }
    .site-footer-contact-item {
        margin-top: 0;
        margin-bottom: 0;
        padding-bottom: 0;
        padding-top: 0;
    }
}

@media (max-width: 400px) {
    .header-main {
        padding: 4px 2px 4px 2px !important;
    }
    .header-side-img {
        width: 16px !important;
        height: 16px !important;
        padding: 0 !important;
    }
    .tel-icon {
        width: 70% !important;
        height: 60px !important;
    }
    .logo {
        margin-top: 5px !important;
        margin-left: 5px !important;
        width: 80px !important;
        height: 60px !important;
    }
    .header-tel, 
    #header-tel {
        font-size: 0.95em !important;
    }
    .despre-proiect-card, .comunicate-pnrr-card {
        margin-left: 12px !important;
        margin-right: 12px !important;
    }
}

/* Secțiunea Proiect Principal */

#bg-fader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transition: opacity 1s;
    opacity: 1;
    pointer-events: none;
}

#bg-fader1, #bg-fader2 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -1;
    transition: transform 0.7s cubic-bezier(.77,0,.18,1);
}

/* Removed overlay to keep sliding photos crisp */

/* ========== Tablet tweaks (701px–1024px) ========== */
@media (min-width: 701px) and (max-width: 1024px) {
    .header-main { padding: 14px 16px 10px 16px; }
    .hero { padding: 24px 10px 44px 10px; }
    .hero h1 { font-size: 2.4em; }
    .hero .highlight { font-size: 1.1em; }
    .hero-subtitle { font-size: xx-large; margin-bottom: 28px; }
    .hero-buttons { gap: 16px; }
    .btn { padding: 14px 24px; }
    .serviciu-card, .contact-info-card, .despre-proiect-card {
        width: calc(50% - 40px);
        max-width: 460px;
        padding: 28px 20px 22px 20px;
    }
}

/* ========== Phone tweaks (<=700px) ========== */
@media (max-width: 700px) {
    .hero { padding: 20px 10px 36px 10px; }
    .hero h1 { font-size: xxx-large; }
    .hero .highlight { font-size: 0.9em; }
    .hero-subtitle { font-size: 1.02em; margin-bottom: 22px; margin-left: 30px; margin-right: 30px; }
    .hero-buttons { width: 100%; gap: 12px; align-items: center; }
    .btn { width: 100%; max-width: 340px; padding: 14px 18px; }
    .serviciu-card, .contact-info-card, .despre-proiect-card, .comunicate-pnrr-card {
    /* Ensure cards never exceed viewport width (account for margins) */
    align-items: center;
    width: calc(100% - 24px);
    max-width: 520px;
    min-width: 0;
    margin: 12px auto;
    padding: 12px 14px;
    min-height: unset;
    box-sizing: border-box;
    flex: 1 1 auto;
    }
    
}

/* --- Footer: Mobile fixes (placed at end to win specificity) --- */
@media (max-width: 700px) {
    .site-footer { padding: 24px 0 12px 0; }
    .site-footer-content { flex-direction: column; gap: 14px; padding: 0 12px; align-items: center; text-align: center; }
    .site-footer-col { height: auto; padding-top: 0px; padding-bottom: 0 !important; min-width: 0; width: 100%; max-width: 680px; }
    .site-footer-logo-row { justify-content: center; }
    .site-footer-desc { max-width: 680px; margin-left: auto; margin-right: auto; }
    .site-footer-contact-item { justify-content: center; }
    .footer-anpc { flex-wrap: wrap; justify-content: center; }
    .footer-anpc .anpc-picto { width: 100%; max-width: 420px; }
    .site-footer-hr { margin: 16px 0 12px 0; }
    /* Map iframe responsive height on phones */
    .site-footer-col iframe { width: 100% !important; height: 160px !important; }
}

/* === Updates 2025-09-11: Homepage improvements (header, hero, CTAs, overlay) === */
/* Contact bar: spacing/alignment and link hover */
#Contacts {
    background: #3f3f3f;
    padding: 8px 24px;
    gap: 16px;
}
#Contacts span, #Contacts a {
    gap: 6px;
    font-size: 0.98em;
}
#Contacts a:hover { text-decoration: underline; }

/* Header brand: slightly larger logo and brand text */
.logo {
    width: 84px;
    height: 84px;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
}
#DoljConstruct { font-size: 1.45em; }
.header-main { padding: 16px 32px 14px 32px; }

/* Navigation: desktop + mobile hamburger */
.site-nav { display: flex; align-items: center; margin-left: auto; }
.nav-list { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.nav-list a { color: #2c2c2c; text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: 8px; transition: color .15s ease, background .15s ease; }
.nav-list a:hover { background: #e9eef7; color: #2F80ED; }
.nav-toggle { display: none; background: transparent; border: none; padding: 8px; margin-left: 12px; border-radius: 8px; cursor: pointer; }
.nav-toggle:focus-visible { outline: 2px solid #2F80ED; outline-offset: 2px; }
.nav-toggle-bar { display: block; width: 22px; height: 2px; background: #2c2c2c; margin: 4px 0; border-radius: 2px; }

@media (max-width: 900px) {
    .site-nav { position: absolute; top: 100%; right: 12px; margin-top: 8px; background: #fff; border: 1px solid #e6e6e6; box-shadow: 0 10px 30px rgba(0,0,0,.08); border-radius: 12px; padding: 10px; display: none; }
    .site-nav.open { display: block; }
    .nav-list { flex-direction: column; gap: 6px; }
    .nav-list a { padding: 10px 12px; }
    .nav-toggle { display: inline-flex; }
    .header-main { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
    /* Leave hamburger near the logo on the left */
    .nav-toggle { margin-left: 0; }
}

/* Hero overlay for better readability over background */
#bg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 28, 0.42);
    z-index: -1; /* stays above #bg-fader layers due to later DOM order */
    pointer-events: none;
}

/* Hero typography, layout, and fade-in animation */
.hero { padding: 40px 10px 70px 10px; }
.hero h1 {
    color: #ffffff;
    font-size: 3.2em;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 12px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.35);
    animation: fadeUp 800ms ease-out 80ms both;
}
.hero .highlight { display: none; }
.hero-subtitle {
    color: #e8eef6;
    font-size: 1.25em;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 28px;
    text-shadow: 0 8px 24px rgba(0,0,0,0.35);
    animation: fadeUp 900ms ease-out 160ms both;
}
.hero-buttons { gap: 16px; align-items: center; animation: fadeUp 950ms ease-out 220ms both; }

/* CTA buttons: bright accent + hover */
.btn {
    font-size: 1.06em;
    font-weight: 700;
    padding: 14px 26px;
    border-radius: 12px;
    transition: background 0.2s, color 0.2s, border 0.2s, transform .15s ease, box-shadow .2s ease;
}
.btn-primary {
    background: #2F80ED; /* blue */
    color: #fff;
    border: none;
    box-shadow: 0 8px 24px rgba(47,128,237,0.35);
}
.btn-primary:hover { background: #1e6fe0; color: #fff; transform: translateY(-1px); }
.btn-primary span { transition: margin-left 0.2s; }
.btn-primary:hover span { margin-left: 16px; }
.btn-secondary {
    background: #27AE60; /* green */
    color: #fff;
    border: none;
    box-shadow: 0 8px 24px rgba(39,174,96,0.32);
}
.btn-secondary:hover { background:#1f9a54; transform: translateY(-1px); }

/* Fade-in animation keyframes */
@keyframes fadeUp {
    0% { opacity: 0; transform: translate3d(0, 12px, 0); }
    100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Card hover polish and reveal-on-scroll */
.serviciu-card, .despre-proiect-card, .contact-info-card { transform: translate3d(0, 0, 0); opacity: 1; }
.serviciu-card.in-view, .despre-proiect-card.in-view, .contact-info-card.in-view { animation: fadeUp .5s ease-out both; }
.serviciu-card:hover, .despre-proiect-card:hover, .contact-info-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 10px 28px rgba(0,0,0,.12); }

/* Tidy up small screens for nav + header */
@media (max-width: 700px) {
    .header-left { gap: 12px; }
    #DoljConstruct { font-size: 1.2em; }
}

/* Tablet adjustments */
@media (min-width: 701px) and (max-width: 1024px) {
    .hero { padding: 28px 10px 50px 10px; }
    .hero h1 { font-size: 2.6em; }
    .hero-buttons { gap: 14px; }
}

/* Phones: scale text and stack buttons */
@media (max-width: 700px) {
    .hero { padding: 24px 10px 40px 10px; }
    .hero h1 { font-size: 2.1em; }
    .hero-subtitle { font-size: 1.05em; margin: 0 18px 18px 18px; }
    .hero-buttons { width: 100%; gap: 10px; flex-direction: column; }
    .btn { width: 100%; max-width: 340px; padding: 13px 16px; }
}