/* ===== Base & Utilities ===== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-os-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

/* ===== Hero Shapes ===== */
.hero-shape-1 {
    animation: float 8s ease-in-out infinite;
}

.hero-shape-2 {
    animation: float 10s ease-in-out infinite reverse;
}

.hero-shape-3 {
    animation: rotate-slow 20s linear infinite;
}

.hero-shape-4 {
    animation: pulse-dot 3s ease-in-out infinite;
}

.hero-shape-5 {
    animation: pulse-dot 4s ease-in-out infinite 1s;
}

.hero-shape-6 {
    animation: pulse-dot 5s ease-in-out infinite 2s;
}

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

@keyframes rotate-slow {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488, #2dd4bf);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

.service-card:hover {
    transform: translateY(-4px);
}

/* ===== FAQ ===== */
.faq-item {
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.faq-icon {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    background-color: #0d9488;
}

.faq-item.active .faq-icon svg {
    stroke: white;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-content {
    max-height: 300px;
}

/* ===== Navbar ===== */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .menu-line {
    background: #1e293b;
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-line {
    transition: all 0.3s ease;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Diagonal Clip ===== */
.clip-diagonal {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 0% 100%);
}

/* ===== Input Focus ===== */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* ===== Button Ripple ===== */
button, a {
    cursor: pointer;
}

/* ===== Selection ===== */
::selection {
    background: #0d9488;
    color: white;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .clip-diagonal {
        clip-path: none;
    }
}

/* ===== Print ===== */
@media print {
    nav, #contact, .hero-shape-1, .hero-shape-2, .hero-shape-3 {
        display: none;
    }
}
