/* Services Page - Full Screen Layout */

/* Background animations */
@keyframes codeTyping {
    0% { content: ''; }
    10% { content: 'const'; }
    20% { content: 'const design'; }
    30% { content: 'const design = {'; }
    40% { content: 'const design = {\A  creative:'; }
    50% { content: 'const design = {\A  creative: true,'; }
    60% { content: 'const design = {\A  creative: true,\A  innovative:'; }
    70% { content: 'const design = {\A  creative: true,\A  innovative: true,'; }
    80% { content: 'const design = {\A  creative: true,\A  innovative: true,\A  responsive:'; }
    90% { content: 'const design = {\A  creative: true,\A  innovative: true,\A  responsive: true'; }
    100% { content: 'const design = {\A  creative: true,\A  innovative: true,\A  responsive: true\A};'; }
}

/* Remove the CSS animation - handled by JavaScript instead */

/* Network animation for social media */
.network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}

.services-page {
    height: 100vh;
    overflow: hidden;
}

/* Disable header compact on services page */
.services-page header.compact {
    padding: 1rem 2rem !important;
    transform: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    box-shadow: none !important;
}

/* Page entrance animation */
@keyframes pageSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.services-page {
    animation: pageSlideIn 0.8s ease-out;
}

.services-container {
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px; /* Account for fixed header */
    box-sizing: border-box;
}

.services-grid {
    display: flex;
    width: 100%;
    height: calc(100vh - 80px);
    gap: 0;
    max-width: 1920px;
    margin: 0 auto;
}

.service-section {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(10px);
    flex: 1;
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(50px) rotateX(10deg);
    animation: serviceSlideIn 0.8s ease-out forwards;
}

@keyframes serviceSlideIn {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

.service-section:nth-child(1) {
    animation-delay: 0.1s;
}

.service-section:nth-child(2) {
    animation-delay: 0.2s;
}

.service-section:nth-child(3) {
    animation-delay: 0.3s;
}

.service-section:nth-child(4) {
    animation-delay: 0.4s;
}

.service-section:nth-child(5) {
    animation-delay: 0.5s;
}

.service-section:nth-child(1) {
    background: linear-gradient(135deg, var(--gray-60) 0%, var(--dark-bg) 100%);
}

.service-section:nth-child(2) {
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--gray-60) 100%);
}

.service-section:nth-child(3) {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--gray-60) 100%);
}

.service-section:nth-child(4) {
    background: linear-gradient(135deg, var(--gray-60) 0%, var(--dark-bg) 100%);
    position: relative;
    overflow: hidden;
}

.service-section:nth-child(5) {
    background: linear-gradient(135deg, var(--gray-60) 0%, var(--dark-bg) 100%);
}

/* Preview State */
.service-preview {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    transition: opacity 0.3s ease;
}

.service-preview h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(20px);
    animation: titleSlideUp 0.8s ease-out 0.6s forwards;
}

@keyframes titleSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-preview h3 span {
    color: var(--primary-yellow);
    text-shadow: 0 0 15px rgba(252, 207, 3, 0.6);
}

.service-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.8;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: iconFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(252, 207, 3, 0.3));
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-5px) rotate(2deg);
    }
    66% {
        transform: translateY(-2px) rotate(-1deg);
    }
}

/* Expanded State */
.service-expanded {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    background: inherit;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
}

.service-expanded h3 {
    transform: translateX(-30px);
    opacity: 0;
    transition: all 0.4s ease 0.1s;
}

.service-expanded p {
    transform: translateX(-30px);
    opacity: 0;
    transition: all 0.4s ease 0.2s;
}

.service-expanded .service-features {
    transform: translateX(-30px);
    opacity: 0;
    transition: all 0.4s ease 0.3s;
}

.service-expanded .service-visual {
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s ease 0.4s;
}

.service-expanded h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.service-expanded h3 span {
    color: var(--primary-yellow);
    text-shadow: 0 0 15px rgba(252, 207, 3, 0.6);
}

.service-expanded p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.service-features {
    list-style: none;
    margin-bottom: 2rem;
}

.service-features li {
    color: var(--text-light);
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    font-size: 1rem;
    opacity: 0;
    transform: translateX(-20px);
    animation: featureSlideIn 0.4s ease-out forwards;
}

.service-features li:nth-child(1) { animation-delay: 0.1s; }
.service-features li:nth-child(2) { animation-delay: 0.2s; }
.service-features li:nth-child(3) { animation-delay: 0.3s; }
.service-features li:nth-child(4) { animation-delay: 0.4s; }

@keyframes featureSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.service-features li::before {
    content: '→';
    color: var(--primary-yellow);
    position: absolute;
    left: 0;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: arrowPulse 2s ease-in-out infinite;
}

.service-features li:hover::before {
    transform: translateX(5px) scale(1.2);
    color: var(--accent-orange);
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.service-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.service-visual img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.service-emoji {
    font-size: 3rem;
    text-align: center;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* SEO Graph Visualization */
.seo-graph {
    display: flex;
    align-items: end;
    gap: 1rem;
    height: 150px;
    justify-content: center;
}

.graph-bar {
    width: 30px;
    background: linear-gradient(180deg, var(--primary-yellow) 0%, var(--accent-orange) 100%);
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    animation: growBar 1s ease-out;
    box-shadow: 0 0 10px rgba(252, 207, 3, 0.3);
    position: relative;
}

.graph-bar::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: 0;
    background: linear-gradient(180deg, var(--primary-yellow) 0%, var(--accent-orange) 100%);
    border-radius: 6px 6px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.graph-bar:hover::after {
    opacity: 0.5;
    animation: barGlow 1s ease-in-out infinite alternate;
}

@keyframes barGlow {
    from { box-shadow: 0 0 5px rgba(252, 207, 3, 0.5); }
    to { box-shadow: 0 0 20px rgba(252, 207, 3, 0.8); }
}

@keyframes growBar {
    from { height: 0; }
    to { height: var(--target-height, 100%); }
}

/* Network nodes for social media background */
.network-node {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary-yellow);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(252, 207, 3, 0.5);
}

.network-node.white {
    background: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.network-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(252, 207, 3, 0.3), transparent);
    transform-origin: left center;
    pointer-events: none;
}

/* Social Icons */
.social-icons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 200px;
}

.social-icon {
    width: 60px;
    height: 60px;
    background: rgba(252, 207, 3, 0.1);
    border: 2px solid var(--primary-yellow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: socialFloat 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.social-icon:hover::before {
    left: 100%;
}

.social-icon:nth-child(1) { animation-delay: 0s; }
.social-icon:nth-child(2) { animation-delay: 0.5s; }
.social-icon:nth-child(3) { animation-delay: 1s; }
.social-icon:nth-child(4) { animation-delay: 1.5s; }

@keyframes socialFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        border-color: var(--primary-yellow);
    }
    25% {
        transform: translateY(-3px) rotate(1deg);
        border-color: var(--accent-orange);
    }
    50% {
        transform: translateY(-5px) rotate(0deg);
        border-color: var(--primary-yellow);
    }
    75% {
        transform: translateY(-3px) rotate(-1deg);
        border-color: var(--accent-orange);
    }
}

.social-icon:hover {
    transform: scale(1.15) rotate(5deg);
    background: rgba(252, 207, 3, 0.3);
    box-shadow: 0 8px 25px rgba(252, 207, 3, 0.4);
    border-color: var(--accent-orange);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Hover Effects */
.service-section:hover {
    flex: 7;
    z-index: 10;
    box-shadow: 
        0 20px 60px rgba(252, 207, 3, 0.3),
        0 0 40px rgba(252, 207, 3, 0.1);
    transform: translateY(-5px);
}

.service-section:hover .service-preview {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9) translateY(-20px);
}

.service-section:hover .service-expanded {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.service-section:hover .service-expanded h3,
.service-section:hover .service-expanded p,
.service-section:hover .service-expanded .service-features,
.service-section:hover .service-expanded .service-visual {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

.service-section:hover ~ .service-section,
.service-section:has(~ .service-section:hover) {
    flex: 0.75;
    opacity: 0.3;
    filter: blur(1px);
    transform: scale(0.98);
}

.service-section:hover .service-icon {
    transform: scale(1.3) rotate(15deg);
    filter: drop-shadow(0 8px 20px rgba(252, 207, 3, 0.5));
    animation: iconBounce 0.6s ease-out;
}

@keyframes iconBounce {
    0% { transform: scale(1.3) rotate(15deg) translateY(0); }
    50% { transform: scale(1.4) rotate(15deg) translateY(-10px); }
    100% { transform: scale(1.3) rotate(15deg) translateY(0); }
}

/* Navigation Active State */
nav li.active {
    color: var(--text-light);
    background: rgba(0, 0, 0, 0.2);
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1600px) {
    .service-expanded h3 {
        font-size: 2rem;
    }
    
    .service-expanded p {
        font-size: 1rem;
    }
    
    .service-visual img {
        max-height: 150px;
    }
}

@media (max-width: 1200px) {
    .services-grid {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
        height: calc(100vh - 100px);
    }
    
    .service-section {
        border-radius: 15px;
    }
    
    .service-section:hover {
        flex: 7;
    }
    
    .service-section:hover ~ .service-section,
    .service-section:has(~ .service-section:hover) {
        flex: 0.75;
        opacity: 0.3;
    }
    
    .service-preview h3 {
        font-size: 1.4rem;
    }
    
    .service-icon {
        font-size: 2.5rem;
    }
    
    .service-expanded {
        padding: 2rem;
    }
    
    .service-expanded h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .services-page {
        height: auto;
        overflow: auto;
    }
    
    .services-container {
        height: auto;
        min-height: 100vh;
        padding: 100px 1rem 2rem;
    }
    
    .services-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        height: auto;
    }
    
    .service-section {
        min-height: 200px;
        position: static;
    }
    
    .service-section:hover {
        flex: 7;
        min-height: 400px;
    }
    
    .service-section:hover ~ .service-section,
    .service-section:has(~ .service-section:hover) {
        flex: 0.75;
        min-height: 200px;
        opacity: 1;
    }
    
    .service-expanded {
        position: static;
        opacity: 1;
        visibility: visible;
        padding: 2rem;
        display: none;
    }
    
    .service-section:hover .service-expanded {
        display: flex;
    }
    
    .service-section:hover .service-preview {
        display: none;
    }
}