/* ===== Custom Styles for Refugi Sant Andreu de Farena ===== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
    background-color: #97c5a3;
    color: #193a21;
}

/* ===== Geometric Background Shapes ===== */
.geo-shape {
    position: absolute;
    opacity: 0.15;
    pointer-events: none;
}

.shape-circle-1 {
    width: 300px;
    height: 300px;
    border: 3px solid #97c5a3;
    border-radius: 50%;
    top: 10%;
    left: -5%;
    animation: float-slow 8s ease-in-out infinite;
}

.shape-circle-2 {
    width: 150px;
    height: 150px;
    background: #c5dfca;
    border-radius: 50%;
    top: 60%;
    right: 5%;
    animation: float-slow 6s ease-in-out infinite reverse;
}

.shape-square-1 {
    width: 80px;
    height: 80px;
    background: #97c5a3;
    top: 25%;
    right: 15%;
    transform: rotate(45deg);
    animation: spin-slow 12s linear infinite;
}

.shape-triangle-1 {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid #c5dfca;
    top: 45%;
    left: 8%;
    animation: float-slow 7s ease-in-out infinite;
}

.shape-ring-1 {
    width: 200px;
    height: 200px;
    border: 4px solid #6aa87a;
    border-radius: 50%;
    bottom: 15%;
    right: 10%;
    animation: spin-slow 15s linear infinite reverse;
}

.shape-dots-1 {
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, #97c5a3 2px, transparent 2px);
    background-size: 15px 15px;
    top: 70%;
    left: 3%;
    opacity: 0.3;
}

/* ===== Floating Cards Animation ===== */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

.card-stats {
    animation-delay: 0s;
}

.card-legal {
    animation-delay: 1.3s;
}

.card-finance {
    animation-delay: 2.6s;
}

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

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

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-slow-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    transform: translateY(0);
}

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

/* ===== Difference Cards ===== */
.diff-card {
    position: relative;
    transform: translateY(0);
}

.diff-card:hover {
    transform: translateY(-8px);
}

/* ===== Navbar Scroll Effect ===== */
#navbar.scrolled {
    background: rgba(250, 250, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-heading {
    color: #1a1a1a !important;
}

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

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

/* Staggered reveal delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

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

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

/* ===== Form Focus Styles ===== */
input:focus,
select:focus,
textarea:focus {
    border-color: #97c5a3 !important;
    box-shadow: 0 0 0 4px rgba(151, 197, 163, 0.2) !important;
}

/* ===== Button Hover Glow ===== */
button:hover,
a:hover {
    transition: all 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: #FAFAF7;
}

::-webkit-scrollbar-thumb {
    background: #c5dfca;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #97c5a3;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
    
    .shape-circle-1,
    .shape-circle-2,
    .shape-square-1,
    .shape-triangle-1,
    .shape-ring-1,
    .shape-dots-1 {
        display: none;
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
}

/* ===== Print styles ===== */
@media print {
    nav, #contact-form, .floating-card, .geo-shape {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
