@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --primary: #7CB342;
    --primary-dark: #689F38;
    --primary-light: #C5E1A5;
    --bg-soft: #F8F9FA;
}

body {
    background-color: var(--bg-soft);
    font-family: 'Inter', sans-serif;
    color: #333;
}

.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bg-animated {
    background: linear-gradient(-45deg, #f8f9fa, #e8f5e9, #f1f8e9, #ffffff);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.btn-primary {
    @apply bg-[#7CB342] hover:bg-[#689F38] text-white font-semibold py-2 px-6 rounded-lg transition-all duration-300 transform hover:scale-105 active:scale-95 shadow-md;
}

.btn-order {
    @apply relative overflow-hidden bg-white text-gray-900 font-black px-8 py-4 rounded-2xl shadow-xl transition-all duration-500 hover:shadow-[#7CB342]/40 hover:-translate-y-1;
    border: 2px solid #7CB342;
}

.btn-order::after {
    content: '';
    @apply absolute inset-0 bg-[#7CB342] translate-y-full transition-transform duration-500 ease-out z-0;
}

.btn-order:hover::after {
    @apply translate-y-0;
}

.btn-order span,
.btn-order i {
    @apply relative z-10 transition-colors duration-500;
}

.btn-order:hover span,
.btn-order:hover i {
    @apply text-white;
}

.input-field {
    @apply w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#7CB342] focus:border-transparent outline-none transition-all;
}

.card-preview {
    width: 350px;
    height: 200px;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Portrait Mode for RSMC Template remains - School removed as requested */
#cardPreview.template-rsmc,
#cardPreviewBack.template-rsmc {
    width: 280px !important;
    height: 400px !important;
}

.template-school .card-bg-layer {
    background-size: cover;
}

.card-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Templates Updated for cleaner look using clip-path */
/* Standard Rehan Style (Restored & Optimized) */
.template-rehan {
    background: transparent;
    position: relative;
    color: #1A1A1A !important;
}

.template-rehan .card-design-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, #7CB342 35%, transparent 35.5%);
    z-index: 1;
}

.template-rehan .main-info {
    position: relative;
    z-index: 2;
    text-align: right;
    margin-right: 15px;
}

.template-rehan .main-info h1 {
    color: #1A1A1A !important;
    font-size: 24px;
    margin-bottom: 2px;
}

.template-rehan .main-info p {
    color: #333 !important;
    /* Business Name is Dark */
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

/* Fix: All details under Business Name on white background */
.template-rehan .contact-info {
    position: relative;
    z-index: 2;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    color: #1A1A1A !important;
    margin-left: 10px;
    margin-bottom: 5px;
}

.template-rehan .contact-info p {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 9px !important;
    font-weight: 800;
}

.template-rehan .contact-info i {
    color: #7CB342 !important;
    background: #f1f8e9;
    font-size: 8px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-right: 8px;
}

/* Blank Template for Full Background */
.template-blank {
    background: #ffffff !important;
    position: relative;
    color: #1A1A1A !important;
}

.template-blank .card-design-layer {
    display: none !important;
}

.template-blank .main-info,
.template-blank .contact-info {
    text-align: left;
    align-items: flex-start;
}

.template-blank .main-info {
    margin-right: 0;
}

.template-blank .contact-info p {
    flex-direction: row;
}

.template-modern {
    background: transparent;
    position: relative;
    color: white !important;
}

.template-modern .card-design-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(-110deg, #393c36 15%, transparent 15.5%);
    z-index: 1;
}

.template-modern .main-info {
    max-width: 150px;
    margin-right: 15px;
}

.template-modern .main-info h1,
.template-modern .main-info p,
.template-modern .main-info #previewBusiness {
    color: #FFFFFF !important;
}

.template-modern .contact-info {
    color: #FFFFFF !important;
}

.template-modern .contact-info i {
    color: #ffffff !important;
}

.template-modern>* {
    position: relative;
    z-index: 2;
}

/* --- Premium Structural Templates --- */

/* Corporate Style */
.template-corporate {
    background: transparent;
    position: relative;
}

.template-corporate .card-design-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, #7CB342 25%, transparent 25.5%);
    z-index: 1;
}

.template-corporate .main-info {
    text-align: right;
    margin-right: 20px;
    color: #1a1a1a !important;
}

.template-corporate .contact-info {
    text-align: right;
    align-items: flex-end;
    color: #666 !important;
    position: relative;
    z-index: 5;
}

/* Modern Classic */
.template-classic {
    background: #fff;
}

.template-classic .card-design-layer {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 12%;
    background: #7CB342;
    z-index: 1;
}

.template-classic .main-info {
    text-align: center;
    margin-top: 15px;
    border-bottom: 1px solid #eee;
    display: inline-block;
    padding-bottom: 5px;
}

.template-classic .contact-info {
    text-align: center;
    align-items: center;
    margin-top: 15px;
}

/* Luxury Dark */
.template-luxury {
    background: #121212;
    border: 2px solid #7CB342;
    color: #7CB342 !important;
}

.template-luxury i {
    color: #7CB342 !important;
}

.template-luxury #previewBusiness {
    color: #fff !important;
}

/* Creative Edge */
.template-creative {
    background: #fff;
}

.template-creative .card-design-layer {
    position: absolute;
    inset: 0;
    background: #2c3e50;
    clip-path: polygon(80% 0, 100% 0, 100% 100%, 70% 100%);
    z-index: 1;
}

.template-creative .contact-info {
    color: white !important;
    margin-left: 20px;
}

/* --- 15 Unique Professional Designs --- */
.template-pro-1 {
    background: #fff;
}

.template-pro-1 .card-design-layer {
    clip-path: polygon(0 0, 30% 0, 0 30%);
    background: #7CB342;
}

.template-pro-2 {
    background: #1a1c23;
    border-left: 12px solid #7CB342;
    color: #fff !important;
}

.template-pro-2 p,
.template-pro-2 h1,
.template-pro-2 i {
    color: #fff !important;
}

.template-pro-3 {
    background: #121212;
    color: #fff !important;
}

.template-pro-3 .card-design-layer {
    clip-path: polygon(70% 0, 100% 0, 100% 100%, 80% 100%);
    background: #7CB342;
}

.template-pro-3 p,
.template-pro-3 h1,
.template-pro-3 i {
    color: #fff !important;
}

.template-pro-4 {
    background: #1a1a1a;
    color: #fff !important;
}

.template-pro-4 .card-design-layer {
    clip-path: inset(0 0 85% 0);
    background: #7CB342;
}

.template-pro-4 p,
.template-pro-4 h1,
.template-pro-4 i {
    color: #fff !important;
}

.template-pro-5 {
    background: #252323;
    border: 2px solid #7CB342;
    outline: 2px solid #7CB342;
    outline-offset: -6px;
    color: #fff !important;
}

.template-pro-5 p,
.template-pro-5 h1,
.template-pro-5 i {
    color: #fff !important;
}

.template-pro-6 {
    background: linear-gradient(135deg, #7CB342 25%, #1f2226 25%);
    color: #fff !important;
}

.template-pro-6 p,
.template-pro-6 h1,
.template-pro-6 i {
    color: #fff !important;
}

.template-pro-7 {
    background: #2c3e50;
    color: #fff !important;
}

.template-pro-7 .card-design-layer {
    clip-path: circle(40% at 100% 100%);
    background: #7CB342;
}

.template-pro-7 p,
.template-pro-7 h1,
.template-pro-7 i {
    color: #fff !important;
    margin-right: 5px;
}

.template-pro-8 {
    background: #FFD600;
    border-top: 6px solid #7CB342;
    border-bottom: 6px solid #7CB342;
    color: #fff !important;
}

.template-pro-8 p,
.template-pro-8 h1,
.template-pro-8 i {
    color: #fff !important;
}

.template-pro-9 {
    background: #1a1a1a;
    color: #fff !important;
}

.template-pro-9 .card-design-layer {
    clip-path: polygon(0 0, 100% 0, 100% 30%, 0 70%);
    background: rgba(124, 179, 66, 0.2);
}

.template-pro-9 p,
.template-pro-9 h1,
.template-pro-9 i {
    color: #fff !important;
}

.template-pro-10 {
    background: #222;
    border-right: 15px solid #7CB342;
    color: #fff !important;
}

.template-pro-10 p,
.template-pro-10 h1,
.template-pro-10 i {
    color: #fff !important;
}

.template-pro-11 {
    background: #1a1c23;
    border-radius: 20px;
    border: 2px solid #7CB342;
    color: #fff !important;
}

.template-pro-11 p,
.template-pro-11 h1,
.template-pro-11 i {
    color: #fff !important;
}

/* Pill design */
.template-pro-12 {
    background: #252323;
    color: #fff !important;
}

.template-pro-12 .card-design-layer {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: #7CB342;
    opacity: 0.1;
}

.template-pro-12 p,
.template-pro-12 h1,
.template-pro-12 i {
    color: #fff !important;
}

.template-pro-13 {
    background: #1e2226;
    border-left: 8px solid #7CB342;
    border-right: 8px solid #7CB342;
    color: #fff !important;
}

.template-pro-13 p,
.template-pro-13 h1,
.template-pro-13 i {
    color: #fff !important;
}

.template-pro-14 {
    background: #333;
}

.template-pro-14 .card-design-layer {
    clip-path: ellipse(50% 25% at 50% 0%);
    background: #7CB342;
}

.template-pro-15 {
    background: #fff;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #7CB342;
}

/* Ensure design layer visibility in template-grid-items */
.template-grid-item div[class^="template-pro-"] .card-design-layer,
.template-grid-item div[class^="template-simple-"] .card-design-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* High-End Structural Templates */
.template-elite {
    background: #fff;
    position: relative;
}

.template-elite .card-design-layer {
    position: absolute;
    inset: 0;
    background: #7CB342;
    clip-path: polygon(0 0, 20% 0, 0 20%, 100% 80%, 100% 100%, 80% 100%);
    z-index: 1;
}

.template-prism {
    background: #1a1a1a;
    color: white !important;
}

.template-prism .card-design-layer {
    position: absolute;
    inset: 0;
    background: #2c3e50;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    z-index: 1;
    opacity: 0.5;
}

.template-zen {
    background: #fdfdfd;
}

.template-zen .card-design-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: #7CB342;
}

.template-zen .main-info {
    text-align: center;
    width: 100% !important;
    margin-right: 0 !important;
    margin-top: 20px;
}

.template-zen .contact-info {
    width: 100% !important;
    align-items: center;
    text-align: center;
    margin-top: 20px;
}

.template-neon {
    background: #000;
    color: #39FF14 !important;
    border: 2px solid #39FF14;
}

.template-neon i {
    color: #39FF14 !important;
    box-shadow: 0 0 10px #39FF14;
}

.template-retro {
    background: #fff;
}

.template-retro .card-design-layer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40%;
    background: #2c3e50;
}

.template-retro .contact-info {
    color: white !important;
    position: absolute;
    bottom: 10px;
    width: 100%;
    padding: 0 20px;
}

/* Add 40+ Style Variations */
.template-style-11 {
    background: #fff;
    border-top: 20px solid #7CB342;
}

.template-style-12 {
    background: #fff;
    border-bottom: 20px solid #2c3e50;
}

.template-style-13 {
    background: #f9f9f9;
    border-left: 20px solid #7CB342;
}

.template-style-14 {
    background: #1a1a1a;
    color: #fff !important;
    clip-path: circle(70% at 100% 0);
    background: #333;
}

.template-style-15 {
    background: linear-gradient(45deg, #7CB342 30%, #fff 30%);
}

.template-style-16 {
    background: linear-gradient(-45deg, #2c3e50 30%, #fff 30%);
}

.template-style-17 {
    background: #fff;
    box-shadow: inset 0 0 50px rgba(124, 179, 66, 0.1);
}

.template-style-18 {
    background: #fff;
    border: 1px solid #7CB342;
    margin: 10px;
    border-radius: 15px;
}

.template-style-19 {
    background: #333;
    color: #fff !important;
}

.template-style-19 i {
    color: #7CB342 !important;
}

.template-style-20 {
    background: #fff;
}

.template-style-20 .card-design-layer {
    clip-path: polygon(0 0, 100% 0, 100% 20%, 0 80%);
    background: #7CB342;
}

/* Template: Luxury */
.template-luxury {
    background: #1a1a1a;
    color: #D4AF37 !important;
}

.template-luxury .card-design-layer {
    position: absolute;
    inset: 10px;
    border: 2px solid #D4AF37;
    z-index: 1;
}

.template-luxury i {
    color: #D4AF37 !important;
}

/* Base style for dynamic templates */
.template-dynamic {
    position: relative;
    overflow: hidden;
}

.template-vibrant {
    background: #7CB342;
    color: white !important;
}

.template-royal {
    background: #1A1A1A;
    color: #7CB342 !important;
}

.template-clean {
    background: white;
    color: #333 !important;
    border: 1px solid #eee;
}

.template-gradient {
    background: linear-gradient(135deg, #7CB342, #9CCC65);
    color: white !important;
}

.template-dark-gold {
    background: #121212;
    color: #D4AF37 !important;
}

.template-ocean {
    background: #006064;
    color: white !important;
}

.template-sunset {
    background: #BF360C;
    color: white !important;
}

.template-minimal {
    background: #fafafa;
    color: #222 !important;
}

/* Dynamic Layout Adjustments */
.template-dynamic .main-info {
    position: relative;
    z-index: 5;
}

.template-dynamic .contact-info {
    position: relative;
    z-index: 5;
}

/* Show All / Hide logic */
.template-grid-item.hidden {
    display: none;
}

.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-bounce-subtle {
    animation: bounceSubtle 2s ease-in-out infinite;
}

@keyframes bounceSubtle {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(1deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-bounce-horizontal {
    animation: bounceHorizontal 1s infinite;
}

@keyframes bounceHorizontal {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(5px);
    }
}

/* RSMC Premium Template (Portrait) */
#cardPreview.template-rsmc,
#cardPreviewBack.template-rsmc {
    width: 280px !important;
    height: 400px !important;
    background: #ffffff;
    border: 1px solid #eee;
}

.template-rsmc .card-design-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #7CB342 0%, #33691E 100%);
    clip-path: polygon(0 0, 100% 0, 100% 25%, 0 45%);
    z-index: 1;
}

.template-rsmc .school-top-logo {
    position: absolute;
    top: 25px;
    left: 20px;
    z-index: 10;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: block !important;
}

.template-rsmc .main-info {
    position: absolute;
    top: 180px;
    left: 25px;
    right: 25px;
    z-index: 5;
    text-align: left;
    margin-right: 0 !important;
}

.template-rsmc .main-info h1 {
    font-size: 26px !important;
    font-weight: 900 !important;
    color: #1A1A1A !important;
    line-height: 1.1;
    margin-bottom: 8px;
}

.template-rsmc .main-info p {
    font-size: 12px !important;
    color: #7CB342 !important;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.template-rsmc .contact-info {
    position: absolute;
    bottom: 30px;
    left: 20px;
    right: 20px;
    z-index: 5;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 20px;
    border-left: 6px solid #7CB342;
    margin-left: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-rsmc .contact-info p {
    font-size: 10px !important;
    font-weight: 700;
    color: #444 !important;
    margin: 0 !important;
}

.template-rsmc .contact-info i {
    background: #7CB342;
    color: #fff !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    font-size: 8px !important;
    margin-right: 10px !important;
}

.template-rsmc .social-strip {
    position: absolute;
    bottom: 140px;
    left: 25px;
    display: flex;
    gap: 12px;
    color: #7CB342;
    z-index: 5;
}

.template-rsmc .social-strip i {
    font-size: 12px;
}

.auth-card {
    @apply bg-white rounded-3xl shadow-2xl p-10 border border-gray-100;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* template-elite-1: Elite Platinum */
.template-elite-1 {
    background: linear-gradient(135deg, #e5e7eb 0%, #ffffff 50%, #d1d5db 100%) !important;
    color: #1a1a1a !important;
    position: relative;
    overflow: hidden;
}

.template-elite-1::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}

.template-elite-1 .card-design-layer {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 100% 0 0 0;
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
}

/* Educational Pro Template (Clean Landscape) */
.template-school {
    background: #ffffff !important;
    position: relative;
    border: 3px solid #FFD600 !important;
    border-radius: 12px !important;
    padding: 0 !important;
    color: #000 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    overflow: hidden !important;
}

#cardPreview.template-school,
#cardPreviewBack.template-school {
    width: 350px !important;
    height: 200px !important;
}

/* Accent on Top-Right */
.template-school .card-design-layer {
    display: block !important;
    position: absolute;
    top: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    background: #1A237E;
    transform: rotate(45deg);
    z-index: 1;
}

.template-school::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    background: #FFD600;
    transform: rotate(45deg);
    z-index: 2;
    display: block !important;
}

.template-school::before {
    display: none !important;
}

/* Left Side: Logo (Extra Small) */
.template-school #logoContainer {
    width: 65px !important;
    height: 65px !important;
    border: 2px solid #1A237E;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    margin-left: 30px !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 10;
    background: white;
}

/* Right Side: Content */
.template-school .preview-inner {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    text-align: left !important;
    padding-left: 20px !important;
    padding-right: 25px !important;
    z-index: 10;
}

.template-school .main-info h1 {
    font-size: 18px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    color: #1A237E !important;
    margin: 0 !important;
    border: none !important;
    /* Removed Lines */
    padding-bottom: 0 !important;
}

.template-school .school-divider {
    display: none !important;
    /* Removed Divider */
}

.template-school .main-info p {
    font-size: 9px !important;
    font-weight: 700 !important;
    margin-top: 2px !important;
    color: #444 !important;
}

.template-school .contact-info {
    margin-top: 12px !important;
}

.template-school .contact-info p {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 5px !important;
    font-size: 9px !important;
    font-weight: 800 !important;
}

.template-school .contact-info i {
    background: #1A237E !important;
    color: #ffffff !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    display: inline-block !important;
    text-align: center !important;
    border-radius: 4px !important;
    font-size: 8px !important;
    margin-right: 10px !important;
}

/* Bottom Social Strip */
.template-school .social-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 22px;
    background: #1A237E;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 20;
    gap: 10px;
}

.template-school .social-strip i {
    background: white !important;
    color: #1A237E !important;
    width: 14px !important;
    height: 14px !important;
    line-height: 14px !important;
    border-radius: 50% !important;
    display: inline-block !important;
    text-align: center !important;
    font-size: 7px !important;
}

/* BACK SIDE ENHANCEMENTS */
.template-school#cardPreviewBack {
    background: white !important;
    padding: 25px !important;
}

.template-school#cardPreviewBack h4 {
    color: #1A237E !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    border-left: 3px solid #FFD600 !important;
    padding-left: 8px !important;
    margin-bottom: 2px !important;
}

.template-school#cardPreviewBack p {
    color: #555 !important;
    font-size: 8px !important;
    padding-left: 11px !important;
    margin-bottom: 8px !important;
}

#previewAboutSection {
    position: relative !important;
    z-index: 30 !important;
    margin-top: 10px !important;
    border-top: 1px dashed #ddd !important;
    padding-top: 5px !important;
}

#previewAboutText {
    font-size: 8px !important;
    color: #333 !important;
    font-style: italic !important;
}

.template-school .social-strip #previewSocialHandle {
    font-size: 8px !important;
    font-weight: 900 !important;
    color: #000 !important;
    margin-left: 5px;
    display: inline-block;
    vertical-align: middle;
}

.template-school .social-strip .fa-facebook-f {
    background-color: #1877F2;
}

.template-school .social-strip .fa-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.template-school .social-strip .fa-linkedin-in {
    background-color: #0A66C2;
}

.template-school .social-strip .fa-x-twitter {
    background-color: #000000;
}

.template-school .social-strip .fa-youtube {
    background-color: #FF0000;
}

/* About Section on Back Side */
#previewAboutSection {
    max-width: 90%;
    margin-top: 15px;
}

#previewAboutText {
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.template-school #previewAboutSection,
.template-rsmc #previewAboutSection {
    margin-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 10px;
}

/* Khadija Corporate Template (Portrait - Final Proportions) */
.template-khadija {
    background: #ffffff !important;
    position: relative;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    overflow: hidden !important;
}

#cardPreview.template-khadija,
#cardPreviewBack.template-khadija {
    width: 280px !important;
    height: 400px !important;
}

/* Thick Diagonal Accent Stripes (Top Right) */
.template-khadija .card-design-layer {
    display: block !important;
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: transparent !important;
    z-index: 1;
    overflow: hidden;
}

/* Solid Blue Corner */
.template-khadija .card-design-layer::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 120px;
    background: #1A237E;
    transform: rotate(-45deg);
}

/* Yellow and Blue Stripes */
.template-khadija .card-design-layer::after {
    content: '';
    position: absolute;
    top: 60px;
    right: -50px;
    width: 200px;
    height: 15px;
    background: #FFD600;
    transform: rotate(-45deg);
    box-shadow: 0 15px 0 0 #1A237E;
    /* This creates the second blue stripe perfectly */
}

/* Top Left Logo */
.template-khadija .school-top-logo {
    display: block !important;
    position: absolute;
    top: 25px;
    left: 20px;
    z-index: 10;
}

.template-khadija .school-top-logo img {
    width: 45px !important;
    height: 45px !important;
}

/* Name & Underline (Full Width) */
.template-khadija .main-info {
    text-align: center !important;
    width: 100% !important;
    margin-top: 60px !important;
    padding: 0 20px !important;
    z-index: 5;
}

.template-khadija .main-info h1 {
    font-weight: 900 !important;
    color: #000;
    margin-bottom: 5px !important;
    text-transform: uppercase;
}

.template-khadija .school-divider {
    display: block !important;
    width: 80% !important;
    height: 2px !important;
    background: #1A237E !important;
    margin: 5px auto !important;
}

.template-khadija .main-info p {
    font-weight: 700 !important;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Circular Badge (Large) */
.template-khadija .school-center-profile {
    display: block !important;
    margin: 20px auto 0 !important;
    width: 140px !important;
    height: 140px !important;
    border: 3px solid #000 !important;
    border-radius: 50% !important;
    position: relative !important;
    background: white;
    z-index: 5;
    padding: 15px !important;
}

/* Contact Details (Bottom Left) */
.template-khadija .contact-info {
    width: 100% !important;
    margin-top: auto !important;
    margin-bottom: 40px !important;
    padding-left: 20px !important;
    text-align: left !important;
    z-index: 5;
}

.template-khadija .contact-info p {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 10px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    color: #000 !important;
}

.template-khadija .contact-info i {
    background: #FFD600 !important;
    color: #000 !important;
    width: 28px !important;
    height: 28px !important;
    line-height: 25px !important;
    /* Adjusted for border */
    display: inline-block !important;
    text-align: center !important;
    border-radius: 50% !important;
    border: 2px solid #000 !important;
    font-size: 12px !important;
    margin-right: 15px !important;
}

/* Social Footer */
.template-khadija .social-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 35px;
    background: #FFD600;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    z-index: 10;
}

.template-khadija .social-strip i {
    width: 22px !important;
    height: 22px !important;
    line-height: 22px !important;
    background: #000 !important;
    color: #FFD600 !important;
    border-radius: 50% !important;
    font-size: 10px !important;
    text-align: center !important;
}

.template-khadija .social-strip .fa-facebook-f {
    background: #1877F2 !important;
    color: white !important;
}

.template-khadija .social-strip .fa-instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important;
    color: white !important;
}

.template-khadija .social-strip .fa-linkedin-in {
    background: #0A66C2 !important;
    color: white !important;
}

.template-khadija .social-strip .fa-x-twitter {
    background: #000 !important;
    color: white !important;
}

.template-khadija .social-strip .fa-youtube {
    background: #FF0000 !important;
    color: white !important;
}

.template-khadija .social-strip span {
    color: #000 !important;
    font-size: 9px !important;
    font-weight: 900;
}

/* BACK SIDE (Improved Sizes) */
.template-khadija#cardPreviewBack {
    background: #ffffff !important;
    width: 280px !important;
    height: 400px !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    position: relative;
    overflow: hidden !important;
}

.template-khadija#cardPreviewBack::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 100px 100px 0;
    border-color: transparent #1A237E transparent transparent;
}

.template-khadija#cardPreviewBack h4 {
    color: #1A237E !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    margin-top: 5px !important;
    margin-bottom: 0px !important;
}

.template-khadija#cardPreviewBack p {
    color: #444 !important;
    font-size: 8px !important;
    line-height: 1.2 !important;
    margin-bottom: 2px !important;
}