/* ============================================
   ROPIATRA.EU - v3
   Culori: gri + alb + accent rosu
   Font: Arial, sans-serif
   ============================================ */

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

:root {
    --alb:        #ffffff;
    --gri-1:      #f7f7f7;
    --gri-2:      #eeeeee;
    --gri-3:      #cccccc;
    --gri-text:   #555555;
    --negru:      #222222;
    --rosu:       #cc2200;
    --rosu-hover: #aa1800;
    --sidebar-bg: #2a2a2a;
    --sidebar-txt:#dddddd;
    --sidebar-act:#cc2200;
    --header-h:   60px;
    --sidebar-w:  220px;
}

html { scroll-behavior: smooth; }

body {
    font-family: Arial, sans-serif;
    font-size: 15px;
    color: var(--negru);
    background: var(--gri-2);
    padding-top: var(--header-h);
}

/* ============================================
   BLOC 1: HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--negru);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.2rem;
}

.logo { display: flex; flex-direction: column; }

.logo-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rosu);
    letter-spacing: 0.05em;
    line-height: 1;
}

.logo-sub {
    font-size: 0.68rem;
    color: var(--gri-3);
    letter-spacing: 0.15em;
    margin-top: 2px;
}

/* HAMBURGER */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--alb);
    transition: all 0.25s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   BLOC 2: HERO
   ============================================ */
.hero-block {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(150deg, rgba(255,255,255,0.15), transparent 40%),
        repeating-linear-gradient(165deg, #d8cbbb 0 28px, #b9a894 28px 54px, #7e7062 54px 60px);
}

.hero-text {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.42);
    color: var(--alb);
    text-align: center;
    padding: 1rem;
}

.hero-text h1 {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.hero-text p {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--gri-3);
}

/* ============================================
   LAYOUT: SIDEBAR + CONTENT
   ============================================ */
.layout {
    display: flex;
    min-height: calc(100vh - var(--header-h) - 280px - 56px);
}

/* ============================================
   BLOC 3: SIDEBAR / MENIU
   ============================================ */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--sidebar-bg);
}

.nav-list {
    list-style: none;
    padding-top: 0.5rem;
}

.nav-list li { border-bottom: 1px solid #3a3a3a; }

.nav-link {
    display: block;
    padding: 0.9rem 1.4rem;
    color: var(--sidebar-txt);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
    background: #3a3a3a;
    color: var(--alb);
}

.nav-link.active {
    background: var(--sidebar-act);
    color: var(--alb);
    font-weight: 700;
}

.nav-ai {
    color: #88ccff;
}

.nav-ai.active, .nav-ai:hover {
    background: #1a3a5a;
    color: #aaddff;
}

/* ============================================
   BLOC 4: CONTINUT DINAMIC
   ============================================ */
.content-area {
    flex: 1;
    background: var(--alb);
    min-width: 0;
}

.section {
    display: none;
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.2rem, 4vw, 2.5rem);
    animation: fadeIn 0.25s ease;
}

.section.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.section h2 {
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--negru);
}

.intro {
    color: var(--gri-text);
    line-height: 1.7;
    margin-bottom: 1.6rem;
    max-width: 680px;
}

/* ACASA: hero foto */
.hero-foto {
    height: 220px;
    margin-bottom: 1.6rem;
    background:
        radial-gradient(circle at 28% 20%, rgba(255,255,255,0.8), transparent 30%),
        linear-gradient(130deg, #f0ebe0, #c8c0b0 50%, #e8e0d0);
    border: 1px solid var(--gri-2);
}

.cta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-rosu, .btn-gri {
    display: inline-block;
    padding: 0.7rem 2rem;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.06em;
    transition: background 0.15s;
}

.btn-rosu {
    background: var(--rosu);
    color: var(--alb);
}
.btn-rosu:hover { background: var(--rosu-hover); }

.btn-gri {
    background: var(--gri-2);
    color: var(--negru);
    border: 1px solid var(--gri-3);
}
.btn-gri:hover { background: var(--gri-3); }

/* FOTO GRID: 2 coloane */
.foto-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.foto {
    position: relative;
    height: 180px;
    overflow: hidden;
    border: 1px solid var(--gri-2);
    display: flex;
    align-items: flex-end;
}

.foto span {
    position: relative;
    z-index: 2;
    padding: 0.4rem 0.8rem;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    width: 100%;
}

/* Culori placeholder marmura */
.foto-m1 { background: linear-gradient(135deg, #f8f4ee, #d8d0c4); }
.foto-m2 { background: linear-gradient(135deg, #2a2826, #4a4844); }
.foto-m3 { background: linear-gradient(135deg, #c8c4c0, #9a9590); }
.foto-m4 { background: linear-gradient(135deg, #e8dcc8, #c8b898); }

/* Culori placeholder granit */
.foto-g1 { background: linear-gradient(135deg, #1e1e1c, #3a3a38); }
.foto-g2 { background: linear-gradient(135deg, #6a1a10, #8a3020); }
.foto-g3 { background: linear-gradient(135deg, #606060, #888880); }
.foto-g4 { background: repeating-linear-gradient(45deg, #404040 0 4px, #505050 4px 8px); }

/* Culori placeholder scari */
.foto-s1 {
    background: repeating-linear-gradient(165deg, #e8e0d0 0 20px, #c8c0b0 20px 38px);
}
.foto-s2 {
    background: repeating-linear-gradient(165deg, #3a3a38 0 20px, #5a5a58 20px 38px);
}
.foto-s3 { background: linear-gradient(135deg, #d8d0c0, #b8b0a0); }
.foto-s4 { background: linear-gradient(135deg, #c0b8a8, #a8a090); }

/* CONTACT */
.contact-info {
    margin-bottom: 2rem;
    border: 1px solid var(--gri-2);
}

.contact-rand {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid var(--gri-2);
}
.contact-rand:last-child { border-bottom: none; }

.contact-rand strong {
    width: 90px;
    font-size: 0.82rem;
    color: var(--gri-text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.contact-rand a {
    color: var(--rosu);
    text-decoration: none;
    font-weight: 700;
}
.contact-rand a:hover { text-decoration: underline; }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 480px;
}

.contact-form input,
.contact-form textarea {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--gri-3);
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--rosu);
}

.contact-form button {
    padding: 0.8rem;
    background: var(--rosu);
    color: var(--alb);
    border: none;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: background 0.15s;
}
.contact-form button:hover { background: var(--rosu-hover); }

/* AI CHAT */
.ai-box {
    border: 1px solid var(--gri-2);
    max-width: 580px;
}

.ai-mesaje {
    padding: 1rem;
    min-height: 160px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--gri-1);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ai-msg {
    padding: 0.6rem 0.9rem;
    font-size: 0.88rem;
    line-height: 1.5;
    max-width: 88%;
}

.ai-msg.bot {
    background: var(--alb);
    border: 1px solid var(--gri-2);
    align-self: flex-start;
    color: var(--negru);
}

.ai-msg.user {
    background: var(--rosu);
    color: var(--alb);
    align-self: flex-end;
}

.ai-rand {
    display: flex;
    border-top: 1px solid var(--gri-2);
}

.ai-rand input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    outline: none;
}

.ai-rand button {
    padding: 0.7rem 1.2rem;
    background: var(--rosu);
    color: var(--alb);
    border: none;
    font-family: Arial, sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.ai-rand button:hover { background: var(--rosu-hover); }

.ai-nota {
    padding: 0.5rem 1rem;
    font-size: 0.76rem;
    color: var(--gri-text);
    background: var(--gri-1);
    border-top: 1px solid var(--gri-2);
}

/* ============================================
   BLOC 6: FOOTER
   ============================================ */
.site-footer {
    background: var(--negru);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.9rem 1rem;
    flex-wrap: wrap;
}

.footer-tel {
    color: var(--alb);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
}
.footer-tel:hover { color: var(--gri-3); }

.footer-btn {
    padding: 0.5rem 1.5rem;
    background: var(--rosu);
    color: var(--alb);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    transition: background 0.15s;
}
.footer-btn:hover { background: var(--rosu-hover); }

.footer-wa {
    color: #4fcf70;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
}
.footer-wa:hover { text-decoration: underline; }

/* ============================================
   BUTON X FIX
   ============================================ */
.btn-close {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--rosu);
    color: var(--alb);
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0,0,0,0.35);
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.btn-close:hover { background: var(--rosu-hover); }
.btn-close.visible { display: flex; }

/* ============================================
   RESPONSIVE - MOBIL
   ============================================ */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .sidebar {
        position: fixed;
        top: var(--header-h);
        left: -100%;
        width: var(--sidebar-w);
        height: calc(100vh - var(--header-h));
        z-index: 99;
        transition: left 0.25s ease;
        overflow-y: auto;
    }

    .sidebar.open { left: 0; }

    .layout { flex-direction: column; }

    .foto-grid { grid-template-columns: 1fr; }

    .hero-block { height: 200px; }
}
