/* ========================================
   ORTINO PAISAGISMO - Custom Styles
   ======================================== */

/* CSS Variables */
:root {
    --ortino-green: #2d6a4f;
    --ortino-dark: #1b4332;
    --ortino-light: #95d5b2;
    --ortino-pale: #d8f3dc;
    --ortino-earth: #8b7355;
    --ortino-cream: #f5f0e8;
}

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--ortino-green);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--ortino-dark);
}

/* ============ PRELOADER ============ */
.loader-leaf {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(149, 213, 178, 0.3);
    border-top-color: #95d5b2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#preloader.loaded {
    opacity: 0;
    pointer-events: none;
}

/* ============ NAVBAR ============ */
#navbar {
    transition: all 0.4s ease;
}

#navbar.scrolled {
    background: rgba(27, 67, 50, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-link {
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: color 0.3s ease;
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    color: #95d5b2;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #95d5b2, #2d6a4f);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-logo-text {
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-logo-text {
    color: white;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, rgba(149, 213, 178, 0.2), rgba(45, 106, 79, 0.3));
    border: 1px solid rgba(149, 213, 178, 0.4);
    border-radius: 50px;
    color: #95d5b2;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-login:hover {
    background: linear-gradient(135deg, #95d5b2, #2d6a4f);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.4);
}

/* Hamburger */
.hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 7px);
}
.hamburger-icon.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -7px);
}

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

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

.glass-dark {
    background: rgba(27, 67, 50, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #95d5b2;
    background: rgba(149, 213, 178, 0.1);
}

/* ============ HERO ============ */
.hero-content .reveal-up {
    opacity: 0;
    transform: translateY(30px);
    animation: revealUp 0.8s ease forwards;
}

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Particles */
.particle {
    position: absolute;
    animation: floatDown var(--dur) linear infinite;
    animation-delay: var(--delay);
    left: var(--x);
    pointer-events: none;
}

@keyframes floatDown {
    0% {
        transform: translateY(-10%) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

.scroll-indicator {
    animation: fadeInUp 1s ease 1.5s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    to { opacity: 1; }
}

/* Parallax */
.parallax-bg {
    will-change: transform;
}

/* ============ BUTTONS ============ */
.btn-primary-animated {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #2d6a4f, #1b4332);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #95d5b2, #2d6a4f);
    transition: left 0.4s ease;
    z-index: 0;
}

.btn-primary-animated:hover::before {
    left: 0;
}

.btn-primary-animated span,
.btn-primary-animated i {
    position: relative;
    z-index: 1;
}

.btn-primary-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 106, 79, 0.4);
}

.btn-outline-animated {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px;
    transition: all 0.4s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-outline-animated:hover {
    background: white;
    color: #1b4332;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* ============ GLASS CARDS ============ */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.5s ease;
}

.glass-card:hover {
    box-shadow: 0 20px 40px rgba(45, 106, 79, 0.1);
}

.glass-card-dark {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ============ 3D SERVICE CARDS ============ */
.service-card-3d {
    perspective: 1000px;
}

.service-card-3d .glass-card {
    transform-style: preserve-3d;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.service-card-3d:hover .glass-card {
    transform: rotateX(2deg) rotateY(-2deg);
    box-shadow: 0 20px 40px rgba(45, 106, 79, 0.15);
}

/* ============ PORTFOLIO ============ */
.portfolio-filter {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    background: white;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-filter:hover,
.portfolio-filter.active {
    background: linear-gradient(135deg, #2d6a4f, #1b4332);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
}

.portfolio-item {
    transition: all 0.5s ease;
}

.portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.portfolio-item.visible {
    opacity: 1;
    transform: scale(1);
}

/* ============ PROJECT MODAL ============ */
#project-modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#project-modal.active {
    opacity: 1;
    visibility: visible;
    display: flex;
}

#project-modal .modal-content {
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#project-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

/* ============ FLOATING LABELS ============ */
.floating-label-group {
    position: relative;
}

.floating-input {
    width: 100%;
    padding: 1rem 1rem 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    background: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.floating-input:focus {
    border-color: #2d6a4f;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.floating-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.95rem;
    pointer-events: none;
    transition: all 0.3s ease;
    background: white;
    padding: 0 0.25rem;
}

.floating-input:focus + .floating-label,
.floating-input:not(:placeholder-shown) + .floating-label {
    top: 0;
    font-size: 0.75rem;
    color: #2d6a4f;
}

textarea.floating-input + .floating-label {
    top: 1rem;
    transform: none;
}

textarea.floating-input:focus + .floating-label,
textarea.floating-input:not(:placeholder-shown) + .floating-label {
    top: -0.5rem;
    transform: none;
}

.select-styled {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Dark floating labels */
.floating-label-group-dark {
    position: relative;
}

.floating-input-dark {
    width: 100%;
    padding: 1rem 1rem 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.floating-input-dark:focus {
    border-color: #95d5b2;
    box-shadow: 0 0 0 3px rgba(149, 213, 178, 0.2);
}

.floating-label-dark {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0 0.25rem;
}

.floating-input-dark:focus + .floating-label-dark,
.floating-input-dark:not(:placeholder-shown) + .floating-label-dark {
    top: 0;
    font-size: 0.75rem;
    color: #95d5b2;
}

/* ============ SOCIAL BUTTONS ============ */
.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d6a4f, #1b4332);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #95d5b2, #2d6a4f);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(45, 106, 79, 0.4);
}

.social-btn:hover::before {
    opacity: 1;
}

.social-btn i {
    position: relative;
    z-index: 1;
}

.social-btn-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-btn-sm:hover {
    background: #95d5b2;
    color: #1b4332;
    transform: translateY(-2px);
}

/* ============ WHATSAPP ============ */
.whatsapp-float {
    animation: whatsappFloat 3s ease-in-out infinite;
}

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

/* ============ SCROLL REVEAL ============ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============ FLOATING TEXT ============ */
.floating-text {
    animation: floatText 4s ease-in-out infinite;
}

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

/* ============ COUNTER ANIMATION ============ */
.counter {
    transition: all 0.3s ease;
}

/* ============ SPA TRANSITIONS ============ */
.spa-section {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.spa-section.section-enter {
    opacity: 0;
    transform: translateY(30px);
}

.spa-section.section-active {
    opacity: 1;
    transform: translateY(0);
}

/* ============ FLOATING BLOB ============ */
@keyframes floatSlow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -20px) rotate(5deg); }
    50% { transform: translate(0, -40px) rotate(0deg); }
    75% { transform: translate(-20px, -20px) rotate(-5deg); }
}

.animate-float-slow {
    animation: floatSlow 10s ease-in-out infinite;
}

/* ============ SWIPER CUSTOMIZATIONS ============ */
.project-swiper {
    border-radius: 1rem;
    overflow: hidden;
}

.project-swiper .swiper-button-next,
.project-swiper .swiper-button-prev {
    color: #2d6a4f;
    background: rgba(255, 255, 255, 0.8);
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.project-swiper .swiper-button-next::after,
.project-swiper .swiper-button-prev::after {
    font-size: 14px;
}

.project-swiper .swiper-pagination-bullet-active {
    background: #2d6a4f;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .floating-label-group .floating-label {
        font-size: 0.85rem;
    }
    
    .glass-card {
        background: rgba(255, 255, 255, 0.85);
    }
    
    .service-card-3d:hover .glass-card {
        transform: none;
    }
}

/* ============ VALIDATION STYLES ============ */
.floating-input:invalid:not(:placeholder-shown):not(:focus) {
    border-color: #ef4444;
}

.floating-input:valid:not(:placeholder-shown) {
    border-color: #2d6a4f;
}

/* ============ SUCCESS ANIMATION ============ */
@keyframes successPop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

#form-success.show {
    animation: successPop 0.5s ease forwards;
}

/* ============ BACK TO TOP ============ */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ LOADING SHIMMER ============ */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.img-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ============ PRINT ============ */
@media print {
    #navbar, #whatsapp-btn, #back-to-top, .scroll-indicator, .particles-container {
        display: none !important;
    }
}