/* Good Design Styles */
:root {
    --primary: #4f46e5;
    --secondary: #f59e0b;
    --text: #1e293b;
    --bg: #ffffff;
}

* {
    scroll-behavior: smooth;
}

/* Animation utilities */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out forwards;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection color */
::selection {
    background: rgba(79, 70, 229, 0.2);
    color: #312e81;
}

/* Service card hover enhancement */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Form focus animations */
input, textarea {
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    transform: translateY(-2px);
}

/* Carousel smooth transitions */
#carousel-track {
    will-change: transform;
}

/* LinkedIn icon animation */
.team-card a {
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.team-card:hover a {
    transform: translateY(0);
    opacity: 1;
}

/* Button pulse effect */
#design-toggle {
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(15, 23, 42, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(15, 23, 42, 0); }
    100% { box-shadow: 0 0 0 0 rgba(15, 23, 42, 0); }
}

/* BAD DESIGN STYLES - Applied when body has .bad-design class */
.bad-design {
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive, sans-serif !important;
    background: repeating-linear-gradient(
        45deg,
        #ff00ff,
        #ff00ff 20px,
        #00ffff 20px,
        #00ffff 40px
    ) !important;
}

.bad-design .font-sans,
.bad-design h1, .bad-design h2, .bad-design h3, .bad-design h4, .bad-design p, .bad-design span, .bad-design a, .bad-design button, .bad-design input, .bad-design textarea, .bad-design label {
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive, sans-serif !important;
}

/* Header chaos */
.bad-design custom-navbar::part(navbar) {
    background: yellow !important;
    border-bottom: 5px solid red;
}

.bad-design nav {
    background: yellow !important;
    transform: rotate(-1deg);
    border: 3px solid red;
}

/* Hero destruction */
.bad-design #hero {
    background: linear-gradient(to bottom, #ff0000, #00ff00) !important;
    transform: rotate(1deg);
    margin: 20px;
    border: 10px dashed purple;
}

.bad-design #hero h1 {
    color: #ffff00;
    text-shadow: 3px 3px #ff0000, -3px -3px #0000ff;
    font-size: 3rem !important;
    text-transform: uppercase;
    letter-spacing: -2px;
    animation: blink 0.5s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

.bad-design #hero p {
    color: #ffffff;
    background: rgba(0,0,0,0.8);
    padding: 10px;
    transform: skew(-5deg);
}

.bad-design #hero img {
    filter: hue-rotate(90deg) contrast(200%);
}

/* Services chaos */
.bad-design .service-card {
    background: cyan !important;
    border: 5px solid magenta;
    box-shadow: 10px 10px 0px blue;
    transform: rotate(-2deg);
    margin: 20px 0;
}

.bad-design .service-card:nth-child(even) {
    transform: rotate(2deg);
    background: lime !important;
    border-color: red;
}

.bad-design .service-card h3 {
    color: red;
    text-decoration: underline wavy blue;
    font-size: 1.8rem;
}

.bad-design .service-card p {
    color: purple;
    font-weight: bold;
    line-height: 1.2;
}

.bad-design .service-card div:first-child {
    background: yellow !important;
    border-radius: 0 !important;
    border: 3px solid black;
}

/* Case studies destruction */
.bad-design #case-studies {
    background: orange;
}

.bad-design .case-card {
    background: pink !important;
    border: 8px double green;
    transform: scale(0.95) rotate(-1deg);
}

.bad-design .case-card img {
    filter: sepia(100%) hue-rotate(180deg);
}

.bad-design .case-card h3 {
    color: green;
    text-shadow: 2px 2px white;
    font-family: 'Papyrus', fantasy !important;
}

/* Testimonials chaos */
.bad-design #testimonials {
    background: repeating-linear-gradient(
        90deg,
        black,
        black 10px,
        #333 10px,
        #333 20px
    ) !important;
}

.bad-design #testimonials > div > div > div {
    background: yellow !important;
    border: 5px solid red;
    transform: rotate(random);
    color: red !important;
}

.bad-design #testimonials p, .bad-design #testimonials h2 {
    color: lime !important;
    text-shadow: 2px 2px black;
}

.bad-design #testimonials .text-secondary-400 {
    color: red !important;
    font-weight: bold;
    font-size: 2rem;
}

/* Team chaos */
.bad-design .team-card {
    background: red !important;
    border: 5px solid yellow;
    border-radius: 0 !important;
    transform: skew(-3deg);
    box-shadow: 15px 15px 0 black;
}

.bad-design .team-card:nth-child(2n) {
    background: blue !important;
    transform: skew(3deg);
}

.bad-design .team-card img {
    filter: contrast(200%) brightness(1.2);
    border: 5px solid white;
}

.bad-design .team-card h3 {
    color: yellow;
    text-transform: uppercase;
    text-decoration: underline;
}

.bad-design .team-card p {
    color: white !important;
}

/* Blog chaos */
.bad-design #blog article {
    background: lime;
    border: 4px dotted red;
    padding: 20px;
}

.bad-design #blog article:nth-child(2) {
    background: orange;
    transform: translateY(20px);
}

.bad-design #blog h3 {
    color: blue;
    text-shadow: 1px 1px white;
    font-size: 1.5rem;
    line-height: 1.1;
}

/* Contact form chaos */
.bad-design #contact {
    background: purple !important;
}

.bad-design form {
    background: cyan !important;
    border: 5px solid yellow;
    transform: rotate(-1deg);
}

.bad-design input, .bad-design textarea {
    background: yellow !important;
    border: 3px solid red !important;
    color: red !important;
    font-size: 1.2rem;
}

.bad-design input::placeholder, .bad-design textarea::placeholder {
    color: blue;
    font-weight: bold;
}

.bad-design button[type="submit"] {
    background: red !important;
    border: 5px solid black !important;
    color: yellow !important;
    font-size: 1.5rem;
    text-transform: uppercase;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Footer chaos */
.bad-design custom-footer::part(footer) {
    background: black !important;
    color: lime !important;
    border-top: 10px solid red;
}

/* Toggle button in bad design */
.bad-design #design-toggle {
    background: red !important;
    color: yellow !important;
    border: 3px solid white;
    font-weight: bold;
    animation: spin 4s linear infinite;
    z-index: 10000;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* General text chaos in bad mode */
.bad-design h2 {
    color: #ff00ff !important;
    text-shadow: 2px 2px #00ff00;
    text-transform: uppercase;
    letter-spacing: 5px;
}

.bad-design .text-primary-600 {
    color: red !important;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Links in bad mode */
.bad-design a {
    color: blue !important;
    text-decoration: underline wavy red !important;
    font-weight: bold;
}

.bad-design a:hover {
    color: red !important;
    background: yellow;
}