/* =========================================
   ePiesa Service - Stylesheet
   Paleta inspirata din epiesa.ro:
   - Albastru: #1d4ed8 / #1e3a8a (primary)
   - Rosu accent: #ef4444 / #dc2626
   - Galben: #fbbf24 (highlight promotii)
   ========================================= */

:root {
    --primary:      #1d4ed8;
    --primary-dark: #1e3a8a;
    --primary-light:#3b82f6;
    --accent:       #ef4444;
    --accent-dark:  #dc2626;
    --highlight:    #fbbf24;
    --highlight-dk: #f59e0b;
    --dark:         #0f172a;
    --gray-900:     #1e293b;
    --gray-700:     #334155;
    --gray-500:     #64748b;
    --gray-300:     #cbd5e1;
    --gray-200:     #e2e8f0;
    --gray-100:     #f1f5f9;
    --gray-50:      #f8fafc;
    --white:        #ffffff;
    --success:      #10b981;
    --error:        #ef4444;

    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow:    0 4px 14px rgba(0,0,0,.10);
    --shadow-lg: 0 12px 32px rgba(15,23,42,.16);
    --radius:    8px;
    --radius-lg: 14px;

    --container: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-900);
    line-height: 1.6;
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-family: 'Roboto Condensed', 'Inter', sans-serif;
    line-height: 1.2;
    color: var(--dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: .6rem; }
h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }

/* ============= TOPBAR ============= */
.topbar {
    background: var(--primary-dark);
    color: rgba(255,255,255,.92);
    font-size: .85rem;
    padding: 8px 0;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.topbar-left, .topbar-right { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.topbar-left span, .topbar-right span { display: inline-flex; align-items: center; gap: 6px; }

/* ============= HEADER ============= */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    gap: 20px;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}
.main-nav a {
    color: var(--gray-700);
    font-weight: 600;
    padding: 10px 16px;
    border-radius: var(--radius);
    transition: all .2s;
    font-size: .95rem;
}
.main-nav a:hover { color: var(--primary); background: var(--gray-100); }
.main-nav a.active { color: var(--primary); }

.btn-cta {
    background: var(--accent) !important;
    color: var(--white) !important;
    padding: 10px 20px !important;
    border-radius: var(--radius) !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(239,68,68,.3);
}
.btn-cta:hover {
    background: var(--accent-dark) !important;
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-dark);
    cursor: pointer;
}

/* ============= HERO ============= */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(30,58,138,.92) 0%, rgba(29,78,216,.85) 60%, rgba(220,38,38,.75) 100%),
        url('https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    z-index: -1;
}
.hero-inner {
    padding: 90px 0;
    max-width: 800px;
}
.hero h1 {
    color: var(--white);
    margin-bottom: 1.2rem;
    text-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.hero h1 .accent { color: var(--highlight); }
.hero p.lead {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: .95;
    max-width: 600px;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============= BUTTONS ============= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all .2s;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(239,68,68,.4);
}
.btn-primary:hover { background: var(--accent-dark); color: var(--white); transform: translateY(-2px); }

.btn-secondary {
    background: var(--white);
    color: var(--primary-dark);
    border: 2px solid var(--white);
}
.btn-secondary:hover { background: transparent; color: var(--white); }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }

/* ============= PROMO BANNER ============= */
.promo-banner {
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--white);
    padding: 24px 0;
    overflow: hidden;
    position: relative;
}
.promo-banner::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.08));
    pointer-events: none;
}
.promo-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.promo-text {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}
.promo-badge {
    background: var(--highlight);
    color: var(--dark);
    padding: 12px 18px;
    border-radius: var(--radius);
    font-weight: 800;
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    font-family: 'Roboto Condensed', sans-serif;
}
.promo-message h3 { color: var(--white); margin: 0 0 4px 0; font-size: 1.3rem; }
.promo-message p { margin: 0; opacity: .95; font-size: .98rem; }
.promo-message strong { color: var(--highlight); }

.promo-cta {
    background: var(--white);
    color: var(--accent-dark);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 700;
    flex-shrink: 0;
    transition: all .2s;
}
.promo-cta:hover { background: var(--highlight); color: var(--dark); transform: translateY(-2px); }

/* ============= SECTIONS ============= */
section { padding: 80px 0; }
.section-title {
    text-align: center;
    margin-bottom: 50px;
}
.section-title h2 { color: var(--dark); }
.section-title p { color: var(--gray-500); font-size: 1.1rem; max-width: 600px; margin: 12px auto 0; }
.section-title .underline {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 16px auto 0;
    border-radius: 2px;
}

/* ============= SERVICES GRID ============= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow-sm);
    transition: all .3s;
    border-top: 4px solid transparent;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--accent);
}
.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.service-card h3 { color: var(--dark); margin-bottom: 10px; }
.service-card p { color: var(--gray-500); font-size: .95rem; }

/* ============= INFO STRIP ============= */
.info-strip {
    background: var(--white);
    padding: 50px 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.info-item .ico {
    width: 50px;
    height: 50px;
    background: var(--gray-100);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.info-item h4 { margin-bottom: 4px; color: var(--dark); }
.info-item p { color: var(--gray-500); font-size: .9rem; margin: 0; }

/* ============= ABOUT / TEXT BLOCK ============= */
.text-block {
    background: var(--white);
    padding: 60px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.text-block p { margin-bottom: 1rem; color: var(--gray-700); font-size: 1.05rem; }
.text-block ul { padding-left: 24px; margin-bottom: 1rem; }
.text-block ul li { margin-bottom: .5rem; color: var(--gray-700); }

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.two-col .col-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
}

/* ============= FORM ============= */
.form-section {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    padding: 80px 0;
}
.form-wrapper {
    max-width: 720px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border-top: 5px solid var(--accent);
}

.form-group { margin-bottom: 18px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--gray-900);
    font-size: .95rem;
}
.form-label .req { color: var(--accent); }

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    transition: all .2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}
textarea.form-control { resize: vertical; min-height: 130px; }

.form-help { font-size: .82rem; color: var(--gray-500); margin-top: 4px; }
.form-error-text { color: var(--accent); font-size: .85rem; margin-top: 4px; display: block; }

/* ============= ALERTS ============= */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
}
.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--accent);
}
.alert ul { margin-top: 8px; padding-left: 20px; }

/* ============= FOOTER ============= */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,.8);
    padding: 60px 0 0;
    margin-top: 80px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: var(--white);
    margin-bottom: 18px;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 8px;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 36px; height: 3px;
    background: var(--accent);
    border-radius: 2px;
}
.footer-col p { font-size: .92rem; line-height: 1.7; margin-bottom: .8rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,.7); }
.footer-col a:hover { color: var(--highlight); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: .88rem;
}
.footer-bottom p { margin: 0; }

/* ============= ADMIN ============= */
.admin-body { background: var(--gray-100); }
.admin-header {
    background: var(--primary-dark);
    color: var(--white);
    padding: 16px 0;
}
.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-header h1 { color: var(--white); font-size: 1.4rem; margin: 0; }
.admin-header a.logout { color: var(--white); padding: 8px 16px; background: rgba(255,255,255,.1); border-radius: var(--radius); }
.admin-header a.logout:hover { background: rgba(255,255,255,.2); color: var(--white); }

.admin-main { padding: 30px 0 60px; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}
.stat-card.new { border-left-color: var(--accent); }
.stat-card.contacted { border-left-color: var(--highlight-dk); }
.stat-card.offered { border-left-color: var(--primary-light); }
.stat-card.closed { border-left-color: var(--success); }
.stat-card .label { font-size: .85rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; }
.stat-card .number { font-size: 2rem; font-weight: 700; color: var(--dark); margin-top: 4px; }

.admin-table-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: auto;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}
.admin-table th {
    background: var(--gray-50);
    padding: 14px 12px;
    text-align: left;
    font-weight: 700;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: top;
}
.admin-table tr:hover { background: var(--gray-50); }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.badge-new { background: #fee2e2; color: #991b1b; }
.badge-contacted { background: #fef3c7; color: #92400e; }
.badge-offered { background: #dbeafe; color: #1e40af; }
.badge-closed { background: #d1fae5; color: #065f46; }

.admin-filter {
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.admin-filter input, .admin-filter select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .9rem;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.login-card {
    max-width: 400px;
    width: 100%;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.login-card h1 { text-align: center; margin-bottom: 30px; color: var(--primary-dark); font-size: 1.6rem; }


/* ============= PROMO IMAGE BANNER ============= */
.promo-image-section {
    padding: 40px 0;
    background: var(--gray-50);
}
.promo-image-link {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform .3s, box-shadow .3s;
}
.promo-image-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15,23,42,.20);
}
.promo-image-link img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .main-nav {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 4px;
        box-shadow: var(--shadow);
        display: none;
    }
    .main-nav.open { display: flex; }
    .main-nav a { width: 100%; padding: 12px 16px; }

    .hero-inner { padding: 60px 0; }
    .promo-inner { flex-direction: column; text-align: center; }
    .promo-text { flex-direction: column; text-align: center; }
    .form-wrapper { padding: 24px; }

    .topbar-inner { font-size: .78rem; }
    .topbar-right { display: none; }

    section { padding: 60px 0; }

    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .promo-badge { font-size: 1.1rem; padding: 10px 14px; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; justify-content: center; }
}
