/* === CSS Custom Properties === */
:root {
    --primary: #6B21A8;
    --primary-dark: #3B0764;
    --primary-deep: #1E0338;
    --primary-light: #A855F7;
    --accent: #9333EA;
    --accent-light: #C084FC;
    --accent-glow: #D8B4FE;
    --bg: #FAFAF9;
    --bg-alt: #F5F3FF;
    --text: #1C1917;
    --text-light: #78716C;
}

/* === Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--accent-light);
    color: white;
}

/* === Header === */
#header {
    background: transparent;
}

#header.scrolled {
    background: var(--primary-dark)/95;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(59, 7, 100, 0.3);
}

#header.scrolled {
    background: rgba(59, 7, 100, 0.95);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-light);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* === Buttons === */
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(147, 51, 234, 0.4);
}

.btn-primary::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.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(147, 51, 234, 0.6);
}

/* === Hero === */
.hero-float {
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(-2deg) translateY(-12px); }
}

.floating-card {
    animation: cardFloat 4s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.geo-circle {
    animation: geoFloat 8s ease-in-out infinite;
}

@keyframes geoFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 0.6; }
}

.geo-diamond {
    animation: geoDiamond 10s ease-in-out infinite;
}

@keyframes geoDiamond {
    0%, 100% { transform: rotate(45deg) scale(1); opacity: 0.2; }
    50% { transform: rotate(225deg) scale(1.3); opacity: 0.5; }
}

/* === Service Cards === */
.service-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(147, 51, 234, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

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

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(147, 51, 234, 0.15);
    border-color: rgba(147, 51, 234, 0.2);
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--bg-alt), rgba(192, 132, 252, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
    transform: scale(1.1);
}

/* === Team Cards === */
.team-card {
    text-align: center;
}

/* === Testimonial Cards === */
.testimonial-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(147, 51, 234, 0.08);
    transition: all 0.4s ease;
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 5rem;
    font-family: Georgia, serif;
    color: var(--accent-light);
    opacity: 0.15;
    line-height: 1;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(147, 51, 234, 0.1);
}

/* === Gallery === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-item img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(59, 7, 100, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* === Contact Info Cards === */
.contact-info-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(147, 51, 234, 0.08);
    transition: all 0.3s ease;
}

.contact-info-card:hover {
    border-color: var(--accent-light);
    box-shadow: 0 8px 30px rgba(147, 51, 234, 0.1);
}

/* === Form Inputs === */
.form-input {
    font-family: 'Nunito Sans', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus {
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.1);
}

/* === WhatsApp Floating Button === */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 90;
    transition: all 0.3s ease;
    animation: whatsappPulse 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

@keyframes whatsappPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 15px rgba(37, 211, 102, 0.1); }
}

/* === Reveal Animations === */
.reveal,
.reveal-left,
.reveal-right,
.reveal-stagger {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-60px);
}

.reveal-right {
    transform: translateX(60px);
}

.reveal-stagger {
    transform: translateY(30px);
    transition-delay: calc(var(--delay, 0) * 0.1s);
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-stagger.visible {
    opacity: 1;
    transform: translate(0);
}

/* === Lightbox === */
#lightbox.active {
    display: flex;
}

#lightbox img {
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* === Responsive === */
@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .gallery-item {
        border-radius: 0.5rem;
    }
}
