:root {
    --bg-color: #f4f4f0;
    --text-main: #111111;
    --accent-1: #FF4500;
    --accent-2: #1E40AF;
    --surface: #ffffff;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-color);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-font {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

/* Navbar */
.navbar {
    padding: 1.5rem 0;
    background: transparent;
    transition: padding 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
}

.navbar-brand {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -2px;
    color: var(--text-main) !important;
}

.navbar-collapse {
    background: rgba(244, 244, 240, 0.98);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
}

.nav-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 5px 0;
}

.nav-link:hover {
    color: var(--accent-1) !important;
}

/* Small screen navbar fixes */
.d-lg-none .navbar-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.d-lg-none .nav-item {
    flex: 0 0 auto;
    min-width: 0;
}

.d-lg-none .nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
}

/* Medium screen navbar fixes (menu below logo/CTA) */
.d-none.d-lg-block.d-xxl-none .navbar-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.d-none.d-lg-block.d-xxl-none .nav-item {
    flex: 0 0 auto;
    min-width: 0;
}

.d-none.d-lg-block.d-xxl-none .nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
}

/* Hamburger menu fixes for screens up to xxl */
.d-xxl-none .navbar-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.d-xxl-none .nav-item {
    flex: 0 0 auto;
    min-width: 0;
}

.d-xxl-none .nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .navbar-collapse {
        background: transparent;
        padding: 0;
        box-shadow: none;
        margin-top: 0;
    }

    .nav-pill-menu {
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(10px);
        border-radius: 50px;
        padding: 5px 15px;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-link {
        font-size: 0.85rem;
        margin: 0 5px;
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 800px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    background-color: var(--bg-color);
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(244, 244, 240, 0.85);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.giant-title {
    font-size: clamp(3rem, 12vw, 12rem);
    line-height: 0.85;
    letter-spacing: -0.05em;
    color: var(--text-main);
    margin-bottom: 0;
    display: block;
}

.giant-title-outline {
    color: transparent;
    -webkit-text-stroke: 2px var(--text-main);
}

.rotating-stamp {
    position: absolute;
    bottom: 12%;
    right: 5%;
    width: 150px;
    height: 150px;
    z-index: 3;
    animation: spin 15s linear infinite;
}

.rotating-stamp svg {
    width: 100%;
    height: 100%;
    fill: var(--accent-1);
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Infinite Marquee */
.marquee-wrapper {
    background: var(--text-main);
    color: var(--bg-color);
    padding: 15px 0;
    overflow: hidden;
    position: relative;
    z-index: 5;
    transform: rotate(-2deg);
    margin-top: -30px;
    width: 105%;
    left: -2.5%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee 25s linear infinite;
}

.marquee-text {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-right: 50px;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Global Structural */
.py-huge {
    padding: 120px 0;
}

.section-tag {
    display: inline-block;
    padding: 5px 15px;
    border: 1px solid var(--text-main);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

/* About Images */
.img-stack {
    position: relative;
    height: 500px;
    margin-top: 40px;
}

.img-stack img {
    position: absolute;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    object-fit: cover;
}

.img-1 {
    width: 70%;
    height: 350px;
    top: 0;
    left: 0;
    z-index: 1;
}

.img-2 {
    width: 60%;
    height: 300px;
    bottom: 0;
    right: 0;
    z-index: 2;
    border: 12px solid var(--bg-color);
}

/* History Section */
.history-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 4rem;
}

.history-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: -4rem;
    width: 4px;
    background-color: var(--text-main);
}

.history-item:last-child::before {
    bottom: 0;
}

.history-year {
    position: absolute;
    left: -8px;
    top: 0;
    width: 20px;
    height: 20px;
    background-color: var(--accent-1);
    border-radius: 50%;
}

/* Brutalist Services Rows */
.service-row {
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    padding: 40px 0;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
}

.service-row:last-child {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.service-row:hover {
    background-color: var(--text-main);
    color: var(--bg-color);
    padding-left: 20px;
    padding-right: 20px;
}

.service-row .service-icon {
    font-size: 2.5rem;
    color: var(--accent-1);
    transition: transform 0.4s;
}

.service-row:hover .service-icon {
    transform: rotate(45deg);
}

.service-number {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    opacity: 0.5;
    margin-right: 20px;
}

/* Bento Box Assets */
.bento-item {
    border-radius: 20px;
    padding: 40px;
    height: 100%;
    min-height: 400px;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.bento-item:hover {
    transform: translateY(-5px);
}

.bento-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.2) 60%);
    z-index: 1;
}

.bento-content {
    position: relative;
    z-index: 2;
}

.bento-pill {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border-radius: 50px;
    margin: 4px 4px 4px 0;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bg-bento-1 {
    background: url('../images/galerie-hercumes-braila%20(2).jpeg') center/cover;
}

.bg-bento-2 {
    background: url('../images/galerie-hercumes-braila%20(3).jpeg') center/cover;
}

.bg-bento-3 {
    background: url('../images/galerie-hercumes-braila%20(4).jpeg') center/cover;
}

/* Footer */
footer {
    background-color: var(--text-main);
    color: var(--bg-color);
    padding: 100px 0 15vw;
    position: relative;
    overflow: hidden;
}

.footer-giant {
    position: absolute;
    bottom: -5vw;
    left: 50%;
    transform: translateX(-50%);
    width: 150vw;
    text-align: center;
    font-size: 26vw;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    line-height: 0.7;
    white-space: nowrap;
    color: var(--bg-color);
    opacity: 0.04;
    pointer-events: none;
}

/* Modals */
.custom-modal .modal-content {
    background-color: var(--bg-color);
    border: 2px solid var(--text-main);
    border-radius: 20px;
}

.custom-modal .modal-header {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.custom-modal .btn-close {
    background-color: var(--text-main);
    opacity: 1;
    filter: invert(1);
    border-radius: 50%;
    padding: 10px;
    margin-right: 0;
}

/* =============================================
   Dropdown Navigation
   ============================================= */
.custom-dropdown {
    background-color: var(--bg-color);
    border: 2px solid var(--text-main);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    min-width: 180px;
}

.custom-dropdown .dropdown-item {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    border-radius: 8px;
    padding: 10px 16px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.custom-dropdown .dropdown-item:hover {
    background-color: var(--text-main);
    color: var(--bg-color);
}

.nav-link.dropdown-toggle::after {
    border-top-color: var(--text-main);
}

/* =============================================
   Certifications Gallery Cards (Home Page)
   ============================================= */
.cert-card-link {
    display: block;
    color: inherit;
}

.cert-card {
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cert-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
    border-color: var(--text-main);
}

.cert-card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 320px;
}

.cert-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f8f6;
    padding: 10px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cert-card:hover .cert-card-img {
    transform: scale(1.05);
}

.cert-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    color: #ffffff;
}

.cert-card:hover .cert-card-overlay {
    opacity: 1;
}

.cert-card-overlay-content {
    text-align: center;
    transform: translateY(10px);
    transition: transform 0.35s ease;
}

.cert-card:hover .cert-card-overlay-content {
    transform: translateY(0);
}

.cert-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.cert-card-standard {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-1);
    margin-bottom: 8px;
}

.cert-card-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.cert-card-cta {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.cert-card:hover .cert-card-cta {
    opacity: 1;
}

.cert-card-cta {
    margin-top: auto;
}

/* =============================================
   Certifications Detail Page (certifications.php)
   ============================================= */
.cert-img-link {
    text-decoration: none;
}

.cert-img-wrapper {
    position: relative;
    overflow: hidden;
    border: 3px solid rgba(0, 0, 0, 0.08);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.cert-img-wrapper:hover {
    border-color: var(--text-main);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.cert-page-img {
    width: 100%;
    object-fit: contain;
    background: #f8f8f6;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cert-img-wrapper:hover .cert-page-img {
    transform: scale(1.03);
}

.cert-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    color: #ffffff;
}

.cert-img-wrapper:hover .cert-hover-overlay {
    opacity: 1;
}

.cert-hover-content {
    text-align: center;
    transform: translateY(10px);
    transition: transform 0.35s ease;
}

.cert-img-wrapper:hover .cert-hover-content {
    transform: translateY(0);
}

.mb-6 {
    margin-bottom: 5rem !important;
}

.text-accent-1 {
    color: var(--accent-1) !important;
}

/* =============================================
   Istoric Timeline
   ============================================= */
.istoric-timeline {
    position: relative;
    padding-top: 2rem;
}

.istoric-timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent-1), var(--text-main));
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 5rem;
    display: flex;
    flex-direction: column;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 16px;
    top: 12px;
    width: 18px;
    height: 18px;
    background-color: var(--accent-1);
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    box-shadow: 0 0 0 3px var(--accent-1);
    z-index: 2;
}

.timeline-year {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    line-height: 1;
    color: var(--accent-1);
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 0.5rem;
    display: inline-block;
    opacity: 1;
    z-index: 1;
    user-select: none;
}

.timeline-card {
    background: var(--surface);
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 32px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.timeline-card::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 24px;
    width: 12px;
    height: 2px;
    background: rgba(0, 0, 0, 0.15);
}

.timeline-item:hover .timeline-card {
    border-color: var(--text-main);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

/* =============================================
   Prezent Page Styles
   ============================================= */
.prezent-info-card {
    background: var(--surface);
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 40px;
    height: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.prezent-info-card:hover {
    border-color: var(--text-main);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.prezent-icon {
    font-size: 3rem;
    color: var(--accent-1);
    margin-bottom: 1.5rem;
}

.prezent-stat-pill {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.partner-pill {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid var(--text-main);
    border-radius: 50px;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.partner-pill:hover {
    background-color: var(--text-main);
    color: var(--bg-color);
}

/* =============================================
   Services Detail Page
   ============================================= */
.service-detail-block {
    padding: 3rem 0;
}

.service-detail-number {
    font-size: 5rem;
    line-height: 1;
    opacity: 0.08;
    margin-bottom: -1.5rem;
}

.service-detail-icon {
    font-size: 3rem;
    color: var(--accent-1);
}

/* Responsive adjustments for new pages */
@media (max-width: 768px) {
    .cert-card-img-wrap {
        height: 240px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-year {
        font-size: 2.5rem;
    }

    .prezent-info-card {
        padding: 24px;
    }

    .service-detail-number {
        font-size: 3rem;
    }
}
