/*
* Web<Code> - Single Page Website
* Author: Your Name
* Description: Main styles for Web<Code> website
*/

/* ===== CSS VARIABLES ===== */
:root {
    /* Primary colors */
    --primary-color: #5D3FD3;
    --primary-light: #7D62E3;
    --primary-dark: #4A2DB3;
    
    /* Secondary colors */
    --secondary-color: #3F51D3;
    --secondary-light: #627BE3;
    --secondary-dark: #2A38B3;
    
    /* Neutral colors */
    --text-dark: #222222;
    --text-medium: #555555;
    --text-light: #888888;
    --background: #FFFFFF;
    --background-alt: #F7F9FC;
    
    /* Utility colors */
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --info: #17A2B8;
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-size-base: 16px;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Border radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --border-radius-full: 999px;
    
    /* Box shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Container width */
    --container-width: 1200px;
}

/* ===== RESET & BASE STYLES ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--background);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    font-family: var(--font-primary);
    border: none;
    outline: none;
}

input, textarea {
    font-family: var(--font-primary);
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

section {
    padding: var(--spacing-xxl) 0;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.hidden {
    display: none;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: var(--spacing-md) auto;
    border-radius: var(--border-radius-full);
}

.section-subheading {
    font-size: 1.1rem;
    color: var(--text-medium);
    max-width: 700px;
    margin: 0 auto;
}

/* ===== BUTTONS ===== */
.primary-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-normal);
    box-shadow: 0 4px 6px rgba(93, 63, 211, 0.25);
}

.primary-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(93, 63, 211, 0.3);
}

.secondary-button {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    padding: 11px 23px;
    border-radius: var(--border-radius-md);
    font-weight: var(--font-weight-medium);
    border: 2px solid var(--primary-color);
    transition: all var(--transition-normal);
}

.secondary-button:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius-full);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-normal);
    box-shadow: 0 4px 6px rgba(93, 63, 211, 0.25);
}

.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(93, 63, 211, 0.3);
}

.submit-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 14px 32px;
    border-radius: var(--border-radius-md);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-normal);
    box-shadow: 0 4px 6px rgba(93, 63, 211, 0.25);
    width: 100%;
    margin-top: var(--spacing-md);
}

.submit-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(93, 63, 211, 0.3);
}

/* ===== HEADER ===== */
#header {
    position: fixed;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

#header.scrolled {
    padding: 0.7rem 0;
    box-shadow: var(--shadow-md);
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
}

nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    margin-right: var(--spacing-lg);
}

.nav-links li {
    margin-left: var(--spacing-lg);
}

.nav-links a {
    color: var(--text-dark);
    font-weight: var(--font-weight-medium);
    position: relative;
    padding: 6px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 2px 0;
    border-radius: var(--border-radius-full);
    transition: all var(--transition-normal);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: white;
    z-index: 999;
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg) 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu ul {
    padding: 0 var(--spacing-lg);
}

.mobile-menu li {
    margin-bottom: var(--spacing-md);
}

.mobile-menu li:last-child {
    margin-top: var(--spacing-lg);
}

.mobile-link {
    color: var(--text-dark);
    font-weight: var(--font-weight-medium);
    font-size: 1.1rem;
    display: block;
    padding: var(--spacing-sm) 0;
}

.mobile-link:hover {
    color: var(--primary-color);
}

.mobile-cta {
    width: 100%;
    text-align: center;
    padding: 12px;
}

/* ===== HERO SECTION ===== */
.hero {
    padding-top: 120px;
    padding-bottom: var(--spacing-xxl);
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(247,249,252,1) 100%);
    overflow: hidden;
    position: relative;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: var(--spacing-lg);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
}

.hero-image {
    flex: 1;
    max-width: 500px;
    position: relative;
    margin-left: var(--spacing-xl);
}

.hero-shape {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    position: absolute;
    top: -30px;
    right: -30px;
    z-index: -1;
    opacity: 0.15;
    animation: morphShape 15s linear infinite alternate;
}

.code-block {
    background-color: #282a36;
    color: #f8f8f2;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    font-family: 'Courier New', monospace;
    overflow: hidden;
}

.code-block::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.3;
    top: -20px;
    right: -20px;
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
}

.code-block .success {
    color: var(--success);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes morphShape {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

/* ===== ABOUT SECTION ===== */
.about {
    background-color: var(--background);
    position: relative;
    overflow: hidden;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xxl);
}

.about-image {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.blob-shape {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0.1;
    animation: rotateBlob 20s linear infinite;
}

.stats-card {
    background-color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-lg);
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.stat {
    flex: 1;
    text-align: center;
    min-width: 100px;
}

.stat .count {
    display: block;
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.stat .label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-medium);
}

.about-text {
    flex: 1;
    max-width: 600px;
}

.about-text h3 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    color: var(--text-medium);
    margin-bottom: var(--spacing-lg);
}

.values {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-lg);
}

.value-item {
    text-align: center;
    flex: 1;
}

.value-item i {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.value-item h4 {
    color: var(--text-dark);
    font-weight: var(--font-weight-medium);
}

@keyframes rotateBlob {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ===== SERVICES SECTION ===== */
.services {
    background-color: var(--background-alt);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xxl);
}

.service-card {
    background-color: white;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-normal);
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

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

.service-icon {
    background-color: rgba(93, 63, 211, 0.1);
    width: 70px;
    height: 70px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.service-icon i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    color: var(--text-medium);
    line-height: 1.6;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.cta-section h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-lg);
}

.cta-section .primary-button {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cta-section .primary-button:hover {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ===== CONTACT SECTION ===== */
.contact {
    background-color: var(--background);
    position: relative;
}

.contact-content {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-xl);
}

.contact-info {
    flex: 1;
    max-width: 400px;
}

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-dark);
    margin-bottom: var(--spacing-lg);
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.info-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: var(--spacing-md);
    margin-top: 3px;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(93, 63, 211, 0.1);
    border-radius: 50%;
    color: var(--primary-color);
    transition: all var(--transition-normal);
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.contact-form {
    flex: 1;
    max-width: 600px;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    transition: all var(--transition-fast);
    background-color: #f9f9f9;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(93, 63, 211, 0.2);
    background-color: white;
}

/* ===== FOOTER ===== */
footer {
    background-color: #222;
    color: white;
    padding-top: var(--spacing-xxl);
}

.footer-content {
    width: 100%;
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    flex: 1;
    max-width: 400px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: var(--spacing-md);
}

.footer-logo p {
    color: #fff;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: var(--spacing-xl);
    justify-content: space-between;
}

.footer-column h4 {
    color: white;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.footer-column ul li {
    margin-bottom: var(--spacing-sm);
}

.footer-column ul li a {
    color: #aaa;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-column ul li a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) 0;
}

.footer-bottom p {
    color: #777;
    font-size: 0.9rem;
}

.legal-links {
    display: flex;
    gap: var(--spacing-lg);
}

.legal-links a {
    color: #777;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.legal-links a:hover {
    color: var(--primary-light);
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ===== ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
}

.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .about-content,
    .contact-content {
        flex-direction: column;
    }
    
    .about-image,
    .contact-info {
        max-width: 100%;
        margin-bottom: var(--spacing-xl);
    }
    
    .about-text,
    .contact-form {
        max-width: 100%;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
        margin-bottom: var(--spacing-xl);
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        max-width: 100%;
        margin-left: 0;
    }
    
    .nav-links, .cta-button {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-logo {
        max-width: 100%;
        margin-bottom: var(--spacing-lg);
    }
    
    .footer-links {
        width: 100%;
        justify-content: space-between;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .legal-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .section-header h2 {
        font-size: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .primary-button,
    .secondary-button {
        width: 100%;
        text-align: center;
    }
    
    .about-content {
        gap: var(--spacing-lg);
    }
    
    .values {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
}
