/* ================================================================
   templates-style.css — Template Selection Page | ADmenta Design
   ================================================================ */

:root {
    --bg: #040508;
    --bg-card: #090b12;
    --bg-card-h: #0d0f1a;
    --surface: rgba(255, 255, 255, 0.032);
    --surface-h: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.06);
    --border-h: rgba(56, 189, 248, 0.38);
    --t1: #d8e4f5;
    --t2: #6e7f9a;
    --t3: #313d52;
    --cyan: #38bdf8;
    --violet: #818cf8;
    --r: 16px;
    --ease: cubic-bezier(.16, 1, .3, 1);
}

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

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--t1);
    font-family: 'Outfit', 'Poppins', system-ui, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 80px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================================================
   BACKGROUND — Dot grid, mesh gradients, aurora
   ================================================================ */

/* Dot grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.11) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 5%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 5%, transparent 80%);
}

/* Ambient colour mesh */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 45% at 12% 18%, rgba(56, 189, 248, 0.08) 0%, transparent 65%),
        radial-gradient(ellipse 50% 50% at 88% 12%, rgba(129, 140, 248, 0.07) 0%, transparent 65%),
        radial-gradient(ellipse 45% 40% at 82% 82%, rgba(56, 189, 248, 0.06) 0%, transparent 65%),
        radial-gradient(ellipse 40% 45% at 18% 88%, rgba(129, 140, 248, 0.055)0%, transparent 65%),
        radial-gradient(ellipse 65% 55% at 50% 50%, rgba(56, 189, 248, 0.03) 0%, transparent 70%);
    animation: meshDrift 20s ease-in-out infinite alternate;
}

@keyframes meshDrift {
    0% {
        transform: scale(1) translateY(0px);
    }

    50% {
        transform: scale(1.05) translateY(-20px);
    }

    100% {
        transform: scale(1.02) translateY(10px);
    }
}

/* Aurora bands */
.aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.aurora-band {
    position: absolute;
    left: -10%;
    width: 120%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(56, 189, 248, 0) 8%,
            rgba(56, 189, 248, 0.22) 28%,
            rgba(129, 140, 248, 0.28) 50%,
            rgba(56, 189, 248, 0.22) 72%,
            rgba(56, 189, 248, 0) 92%,
            transparent 100%);
    filter: blur(0.6px);
    animation: auroraDrift linear infinite;
}

.aurora-band:nth-child(1) {
    top: 20%;
    animation-duration: 13s;
    animation-delay: 0s;
    opacity: 0.9;
}

.aurora-band:nth-child(2) {
    top: 52%;
    animation-duration: 18s;
    animation-delay: -7s;
    opacity: 0.55;
    width: 80%;
    left: 10%;
}

.aurora-band:nth-child(3) {
    top: 76%;
    animation-duration: 15s;
    animation-delay: -4s;
    opacity: 0.45;
}

.aurora-band:nth-child(4) {
    top: 37%;
    animation-duration: 21s;
    animation-delay: -11s;
    opacity: 0.3;
    width: 60%;
    left: 20%;
    background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.2) 50%, transparent);
}

@keyframes auroraDrift {
    0% {
        transform: translateX(-6%) scaleX(0.85);
        opacity: 0;
    }

    12% {
        opacity: 1;
    }

    88% {
        opacity: 1;
    }

    100% {
        transform: translateX(6%) scaleX(1.12);
        opacity: 0;
    }
}

/* Cursor glow */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    margin: -300px 0 0 -300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.055) 0%, transparent 65%);
    pointer-events: none;
    z-index: 1;
    will-change: transform;
}

/* ================================================================
   NAVBAR — Glass bar, matching ADmenta
   ================================================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 5%;
    background: rgba(6, 8, 17, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background .4s ease, box-shadow .4s ease;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    color: var(--t1);
    text-decoration: none;
    letter-spacing: -0.4px;
}

.navbar .logo img {
    height: 36px;
    width: auto;
    transition: transform 0.3s;
    filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.16));
}

.navbar .logo:hover img {
    transform: rotate(10deg);
}

.navbar .logo span {
    background: linear-gradient(90deg, var(--cyan), var(--violet), var(--cyan));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineText 3s linear infinite;
}

@keyframes shineText {
    to {
        background-position: 200% center;
    }
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.navbar nav a {
    text-decoration: none;
    color: var(--t2);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    transition: color .3s;
}

.navbar nav a:hover {
    color: var(--t1);
}

.navbar nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--cyan);
    transition: width .3s ease-in-out;
}

.navbar nav a:hover::after {
    width: 100%;
}

/* ================================================================
   PAGE HEADER — Animated gradient text
   ================================================================ */
.page-header {
    text-align: center;
    padding: 50px 20px 20px;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    margin: 0 0 14px;
    letter-spacing: -0.6px;
    line-height: 1.15;
    background: linear-gradient(135deg, var(--cyan) 20%, var(--violet) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header h1 i {
    -webkit-text-fill-color: initial;
    background: none;
    color: var(--cyan);
    margin-right: 8px;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.4));
}

.page-header p {
    font-size: 0.95rem;
    color: var(--t2);
    margin: 0;
    line-height: 1.7;
    font-weight: 300;
    max-width: 520px;
    margin: 0 auto;
}

/* ================================================================
   TEMPLATE GRID
   ================================================================ */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 20px;
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 30px 80px;
    position: relative;
    z-index: 2;
}

/* ================================================================
   TEMPLATE CARD — Premium glass card with glow effects
   ================================================================ */
.template-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform .45s var(--ease), border-color .3s ease, box-shadow .3s ease;
    will-change: transform;
    opacity: 0;
    transform: translateY(40px);
    animation: cardFadeIn 0.7s var(--ease) forwards;
}

.template-card:nth-child(1) {
    animation-delay: 0.1s;
}

.template-card:nth-child(2) {
    animation-delay: 0.2s;
}

.template-card:nth-child(3) {
    animation-delay: 0.3s;
}

.template-card:nth-child(4) {
    animation-delay: 0.4s;
}

.template-card:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Top accent line — appears on hover */
.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, var(--cyan) 40%, var(--violet) 60%, transparent 90%);
    opacity: 0;
    transition: opacity .35s ease;
    z-index: 10;
}

.template-card:hover::before {
    opacity: 0.7;
}

.template-card:hover {
    border-color: var(--border-h);
    transform: translateY(-6px);
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.05) inset,
        0 20px 56px -14px rgba(0, 0, 0, 0.8),
        0 0 40px -18px rgba(56, 189, 248, 0.15);
}

/* Mouse glow effect */
.card-mouse-glow {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.09) 0%, transparent 65%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
    z-index: 0;
}

.template-card:hover .card-mouse-glow {
    opacity: 1;
}

/* Recommended Badge */
.badge-recommended {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--cyan);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 10;
    backdrop-filter: blur(10px);
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }

    50% {
        box-shadow: 0 0 16px 2px rgba(56, 189, 248, 0.15);
    }
}

/* ================================================================
   PREVIEW THUMBNAIL
   ================================================================ */
.template-preview {
    background: #ffffff;
    margin: 14px 14px 0;
    border-radius: 10px;
    height: 310px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    transition: transform .4s var(--ease);
}

.template-card:hover .template-preview {
    transform: scale(1.02);
}

.template-preview .mini-resume {
    width: 100%;
    height: 100%;
    padding: 18px 16px;
    box-sizing: border-box;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
    font-size: 7px;
    line-height: 1.4;
    overflow: hidden;
    position: relative;
}

.mini-resume .mr-name {
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    margin: 0 0 2px;
}

.mini-resume .mr-role {
    font-family: Arial, sans-serif;
    font-size: 8px;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.mini-resume .mr-contact {
    font-size: 6px;
    color: #555;
    border-bottom: 1.5px solid #000;
    padding-bottom: 5px;
    margin-bottom: 6px;
}

.mini-resume .mr-section-title {
    font-family: Arial, sans-serif;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 0.8px solid #000;
    margin-top: 6px;
    margin-bottom: 4px;
    padding-bottom: 1px;
}

.mini-resume .mr-line {
    background: #e0e0e0;
    height: 4px;
    border-radius: 2px;
    margin: 3px 0;
}

.mini-resume .mr-line.w90 {
    width: 90%;
}

.mini-resume .mr-line.w85 {
    width: 85%;
}

.mini-resume .mr-line.w75 {
    width: 75%;
}

.mini-resume .mr-line.w70 {
    width: 70%;
}

.mini-resume .mr-line.w60 {
    width: 60%;
}

.mini-resume .mr-line.w50 {
    width: 50%;
}

.mini-resume .mr-line.w40 {
    width: 40%;
}

/* Fade-out at bottom */
.template-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, #ffffff);
    pointer-events: none;
}

/* ============ Modern Mini ============ */
.mini-resume.modern-mini .mr-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
}

.mini-resume.modern-mini .mr-role {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    color: #555;
    font-size: 8px;
}

.mini-resume.modern-mini .mr-section-title {
    font-family: 'Poppins', sans-serif;
    color: #0ea5e9;
    font-size: 7px;
}

.mini-resume.modern-mini .mr-line {
    background: #d4effc;
}

/* ============ Executive Mini ============ */
.mini-resume.executive-mini {
    padding-top: 0;
}

.mini-resume.executive-mini .mr-header-block {
    background: #1a1a2e;
    color: #fff;
    margin: -18px -16px 8px;
    padding: 14px 16px 10px;
}

.mini-resume.executive-mini .mr-name {
    color: #fff;
    font-size: 14px;
    font-family: Georgia, serif;
}

.mini-resume.executive-mini .mr-role {
    font-family: Georgia, serif;
}

.mini-resume.executive-mini .mr-line {
    background: #d0d0e0;
}

/* ============ Compact Mini ============ */
.mini-resume.compact-mini {
    padding: 10px 10px;
    font-size: 6px;
    line-height: 1.3;
}

.mini-resume.compact-mini .mr-name {
    font-size: 11px;
    margin-bottom: 1px;
}

.mini-resume.compact-mini .mr-role {
    font-size: 7px;
    margin-bottom: 2px;
}

.mini-resume.compact-mini .mr-section-title {
    margin-top: 4px;
    margin-bottom: 2px;
    font-size: 6.5px;
}

.mini-resume.compact-mini .mr-line {
    height: 3px;
    margin: 2px 0;
}

/* ============ Two-Column Mini ============ */
.mini-resume.twocol-mini {
    display: flex;
    gap: 0;
    padding: 0;
}

.mini-resume.twocol-mini .mr-sidebar {
    width: 35%;
    background: #1e293b;
    color: #fff;
    padding: 14px 10px;
    box-sizing: border-box;
}

.mini-resume.twocol-mini .mr-sidebar .mr-name {
    color: #fff;
    font-size: 10px;
    margin-bottom: 3px;
}

.mini-resume.twocol-mini .mr-sidebar .mr-role {
    color: #94a3b8;
    font-size: 6px;
    margin-bottom: 6px;
}

.mini-resume.twocol-mini .mr-sidebar .mr-section-title {
    color: #38bdf8;
    border-bottom-color: rgba(56, 189, 248, 0.3);
    font-size: 6px;
}

.mini-resume.twocol-mini .mr-sidebar .mr-line {
    background: rgba(255, 255, 255, 0.15);
    height: 3px;
}

.mini-resume.twocol-mini .mr-main {
    flex: 1;
    padding: 14px 12px;
    box-sizing: border-box;
}

.mini-resume.twocol-mini .mr-main .mr-section-title {
    font-size: 7px;
}

/* ================================================================
   CARD INFO — Title, description, button
   ================================================================ */
.card-info {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.card-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--t1);
    letter-spacing: -0.3px;
    transition: color .3s;
}

.template-card:hover .card-info h3 {
    color: #fff;
}

.card-info p {
    font-size: 0.82rem;
    color: var(--t2);
    margin: 0 0 16px;
    line-height: 1.6;
    flex: 1;
    font-weight: 300;
}

/* Button — pill style, glass */
.use-template-btn {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--t1);
    padding: 10px 0;
    border-radius: 10px;
    font-family: 'Outfit', 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .35s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    letter-spacing: 0.02em;
}

.use-template-btn:hover {
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.14), 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    gap: 12px;
    color: #fff;
}

.use-template-btn i {
    transition: transform .3s var(--ease);
}

.use-template-btn:hover i {
    transform: translateX(3px);
}

/* ================================================================
   FOOTER TEXT
   ================================================================ */
.footer-text {
    text-align: center;
    color: var(--t3);
    font-size: 0.68rem;
    padding: 0 0 40px;
    position: relative;
    z-index: 2;
    letter-spacing: 0.05em;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .template-grid {
        grid-template-columns: 1fr;
        padding: 0 16px 40px;
        gap: 18px;
    }

    .template-preview {
        height: 280px;
    }
}

@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        padding: 10px 0;
        height: auto;
    }

    .navbar nav {
        margin-top: 10px;
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
        gap: 15px;
    }

    .navbar nav a {
        margin-left: 0;
        margin: 0 5px;
        font-size: 14px;
    }

    body {
        padding-top: 130px;
    }
}