:root {
    --primary: #0f766e;
    --primary-dark: #0b5c56;
    --accent: #f59e0b;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg-soft: #f8fafc;
    --danger: #dc2626;
    --success: #16a34a;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.55;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(6px);
    z-index: 10;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
}
.logo img { border-radius: 6px; display: block; }
.logo em { color: var(--primary); font-style: normal; }
nav a {
    margin-left: 18px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
}
.btn-nav {
    background: var(--primary);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 8px;
}
.btn-nav:hover { background: var(--primary-dark); }

/* Update maximum container width to fit logo, 728px ad, and nav menu */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header layout adjustments */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;      /* NEW: let items drop to a new line instead of crushing */
}
/* Update Header Ad Slot in assets/css/style.css */
/* Fixed Header Ad Slot for Mobile & Desktop */
/* Add to style.css to keep placeholder height while waiting for ad fill */
.header-ad-slot {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
	min-height: 90px;
    max-width: 728px;
    margin: 0 auto;
}

.ad-container-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 728px;
    overflow: visible; /* Prevents vertical clipping */
    margin: 0 auto;
}

.ad-scale-box {
    display: block;
    margin: 0 auto;
    transform-origin: top center !important; /* Forces scaling from the top edge */
}

.ad-scale-box iframe {
    display: block !important;
    border: 0 !important;
}

/* Responsive handling for tablet and mobile screens */
@media (max-width: 991px) {
    .header-inner {
        flex-direction: column;
        gap: 12px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .header-ad-slot {
        width: 100%;
    }
}


/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 60px;
    padding: 24px 0;
    color: var(--muted);
    font-size: 0.9rem;
}
.footer-inner { text-align: center; }
.trust-row {
    display: flex;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s;
}
.btn:hover { background: var(--primary-dark); }
.btn-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    font-weight: 500;
}
.btn-secondary:hover { background: var(--bg-soft); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=password], input[type=month], textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
}
textarea { resize: vertical; min-height: 80px; }
.form-card {
    max-width: 440px;
    margin: 50px auto;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}
.form-card h1 { margin-top: 0; font-size: 1.4rem; }
.form-card .subtitle { color: var(--muted); font-size: 0.9rem; margin-top: -12px; margin-bottom: 20px; }
.error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.success-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--success);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0;
    font-size: 0.85rem;
    color: var(--muted);
}
.consent-row input { width: auto; margin-top: 3px; }
.consent-row a { color: var(--primary); }

/* Verification banner shown on dashboard until email is confirmed */
.verify-banner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 14px 18px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    font-size: 0.9rem;
}

/* Dashboard */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.cv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}
.cv-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
}
.cv-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.cv-card .meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 14px; }
.cv-card .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

/* Builder */
.builder-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 30px;
    margin: 30px 0 60px;
}
.builder-tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 76px;
    align-self: start;
}
.builder-tabs button {
    text-align: left;
    padding: 10px 14px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.builder-tabs button .step-num {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--border);
    color: var(--muted);
    font-size: 0.7rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.builder-tabs button.active { background: var(--bg-soft); font-weight: 600; color: var(--primary); }
.builder-tabs button.active .step-num { background: var(--primary); color: #fff; }
.builder-section { display: none; }
.builder-section.active { display: block; }
.repeat-block {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    position: relative;
}
.repeat-block .remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.85rem;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.checkbox-row input { width: auto; }

/* Template picker with thumbnails */
.template-picker { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.template-choice {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    width: 160px;
}
.template-choice img {
    width: 100%;
    display: block;
    border-radius: 6px;
    border: 1px solid var(--border);
    margin-bottom: 8px;
}
.template-choice .t-name { font-weight: 600; font-size: 0.9rem; }
.template-choice .t-desc { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.template-choice.selected { border-color: var(--primary); background: var(--bg-soft); }

.builder-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.skill-tag-input { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.skill-tag {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.skill-tag button { background: none; border: none; cursor: pointer; color: var(--muted); }

/* Preview / CV render */
.preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0;
    flex-wrap: wrap;
    gap: 10px;
}
.cv-render-wrapper {
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    max-width: 800px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
}

@media (max-width: 800px) {
    .builder-layout { grid-template-columns: 1fr; }
    .builder-tabs { flex-direction: row; overflow-x: auto; position: static; }
    .two-col { grid-template-columns: 1fr; }
}
