/* 
   Creative Safe Spaces - Redesigned Stylesheet
   Abstract, artistic design with warm aesthetics
*/

/* Import custom fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Dancing+Script:wght@700&family=Pacifico&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Montserrat:wght@300;400;600;700&display=swap');

/* ===== Base Styles ===== */
:root {
    /* Color Variables */
    --primary-color: #091AFF; /* Blue */
    --primary-dark: #0715cc;
    --primary-light: #4d59ff;
    --secondary-color: #F15A22; /* Orange */
    --secondary-dark: #d4481a;
    --secondary-light: #f47e52;
    --accent-color: #15D128; /* Green */
    --accent-dark: #11a820;
    --accent-light: #4ddf5c;
    --highlight-color: #FFF500; /* Yellow */
    --highlight-dark: #d9d000;
    --highlight-light: #fff84d;
    --dark-color: #333333;
    --light-color: #FCFAFD; /* Light purple/white */
    --gray-100: #F9F6F0;
    --gray-200: #EFE9E0;
    --gray-300: #E0D8CC;
    --gray-400: #C5B9A8;
    --gray-500: #A69985;
    --gray-600: #857969;
    --gray-700: #635A4F;
    --gray-800: #433D35;
    --gray-900: #2A2722;
    --success-color: #7FB069;
    --warning-color: #F9A03F;
    --error-color: #E94F37;
    
    /* Typography */
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Montserrat', sans-serif;
    --accent-font: 'Dancing Script', cursive;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Border Radius */
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(61, 59, 60, 0.07);
    --shadow-md: 0 4px 12px rgba(61, 59, 60, 0.1), 0 2px 4px rgba(61, 59, 60, 0.06);
    --shadow-lg: 0 10px 25px rgba(61, 59, 60, 0.12), 0 4px 10px rgba(61, 59, 60, 0.08);
    --shadow-xl: 0 20px 40px rgba(61, 59, 60, 0.15), 0 10px 20px rgba(61, 59, 60, 0.1);
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-normal: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Garet Bold font */
@font-face {
    font-family: 'Garet Bold';
    src: url('../fonts/Garet-Bold.woff2') format('woff2'),
         url('../fonts/Garet-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--light-color);
    overflow-x: hidden;
    position: relative;
}

/* Artistic background texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23e94f37' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E"),
        radial-gradient(circle at 10% 20%, rgba(233, 79, 55, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(249, 160, 63, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(140, 94, 88, 0.03) 0%, transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(242, 227, 188, 0.03) 0%, transparent 20%);
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--gray-900);
    letter-spacing: 0.02em;
    position: relative;
}

/* Artistic underline for headings */
h1::after, h2::after, h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
    transform: scaleX(0.5) translateX(10px);
    transform-origin: left;
    transition: transform 0.5s ease;
    mask-image: url("data:image/svg+xml,%3Csvg width='100' height='8' viewBox='0 0 100 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 4C20 4 20 7 40 7C60 7 60 1 80 1C100 1 100 4 120 4' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='100' height='8' viewBox='0 0 100 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 4C20 4 20 7 40 7C60 7 60 1 80 1C100 1 100 4 120 4' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
    -webkit-mask-size: 100% 100%;
}

h1:hover::after, h2:hover::after, h3:hover::after {
    transform: scaleX(1) translateX(0);
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    font-style: italic;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.05);
}

h2 {
    font-size: 2.5rem;
    font-style: italic;
}

h3 {
    font-size: 1.8rem;
}

h4 {
    font-size: 1.4rem;
}

p {
    margin-bottom: var(--spacing-md);
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.8;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

a:hover {
    color: var(--primary-dark);
}

a:not(.btn, .logo a, .nav-links a, .social-icons a)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

a:not(.btn, .logo a, .nav-links a, .social-icons a):hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
    padding-bottom: var(--spacing-md);
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
    transform-origin: center;
    animation: pulse 3s infinite alternate;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
        transform: scaleX(0.7) translateX(10px);
    }
    100% {
        opacity: 1;
        transform: scaleX(1) translateX(0);
    }
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    border-radius: 0;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    font-family: var(--body-font);
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    z-index: 1;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        var(--primary-color), 
        var(--secondary-color), 
        var(--accent-color));
    z-index: -1;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: scaleX(0);
    transform-origin: right;
}

.btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    color: white;
    transform: translateY(-3px) rotate(-1deg);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    color: white;
    transform: translateY(-3px) rotate(1deg);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    clip-path: polygon(5% 0, 95% 0, 100% 100%, 0% 100%);
}

.btn-outline:hover {
    color: white;
    transform: translateY(-3px) rotate(-1deg);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:hover::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* ===== Header & Navigation ===== */
header {
    background-color: rgba(255, 250, 240, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--spacing-md) 0;
    transition: all 0.3s ease;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

header.scrolled {
    padding: var(--spacing-sm) 0;
    background-color: rgba(255, 250, 240, 0.98);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    width: 50px;
    height: 50px;
    border-radius: 0;
    border: none;
    object-fit: cover;
    margin-right: 15px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    transform: rotate(-5deg);
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
}

.logo a:hover .logo-image {
    transform: rotate(5deg) scale(1.1);
}

.logo-text {
    font-family: var(--accent-font);
    font-size: 2.2rem;
    font-weight: 700;
    position: relative;
    margin-left: 5px;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.1);
    transition: all var(--transition-normal);
    background-image: linear-gradient(
        to right, 
        var(--primary-color), 
        var(--secondary-color), 
        var(--accent-color)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        to right, 
        var(--primary-color), 
        var(--secondary-color), 
        var(--accent-color)
    );
    transform: scaleX(0.7) translateX(5px);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.logo a:hover .logo-text {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.logo a:hover .logo-text::after {
    transform: scaleX(1) translateX(0);
}

nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-links li:nth-child(1) a {
    color: var(--primary-color);
}

.nav-links li:nth-child(2) a {
    color: var(--secondary-color);
}

.nav-links li:nth-child(3) a {
    color: var(--accent-color);
}

.nav-links li:nth-child(4) a {
    color: var(--primary-dark);
}

.nav-links li:nth-child(5) a {
    color: var(--secondary-dark);
}

.nav-links a {
    font-weight: 600;
    position: relative;
    padding: var(--spacing-xs) 0;
    font-family: var(--body-font);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform: scaleX(0) translateX(10px);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-links a:hover {
    transform: translateY(-2px) rotate(-1deg);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1) translateX(0);
    transform-origin: left;
}

.nav-links a.active {
    font-weight: 700;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--gray-700);
    margin-bottom: 5px;
    border-radius: var(--border-radius-full);
    transition: all var(--transition-fast);
}

/* ===== Hero Section ===== */
.hero {
    background-color: var(--primary-dark);
    background-image: url("../images/photo3.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: var(--spacing-xxl) 0 calc(var(--spacing-xxl) * 2);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
    will-change: transform; /* Optimize for animations */
    contain: layout paint; /* Improve rendering performance */
}

/* Apply fixed background only on desktop for better performance */
@media (min-width: 992px) {
    .hero {
        background-attachment: fixed;
    }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 var(--spacing-xl);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    color: white;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.2);
    animation: fadeInUp 1s ease-out;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    transform: rotate(-1deg);
    display: inline-block;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-xl);
    color: white;
    animation: fadeInUp 1s ease-out 0.3s both;
    max-width: 700px;
    line-height: 1.8;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    animation: fadeInUp 1s ease-out 0.6s both;
    margin-top: var(--spacing-xl);
}

.hero-buttons .btn {
    min-width: 160px;
}

/* Displaced images in hero section */
.hero-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s ease;
    overflow: hidden;
    opacity: 0.7;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

.hero-image-1 {
    width: 250px;
    height: 350px;
    top: 15%;
    right: 15%;
    transform: rotate(5deg);
    z-index: 3;
}

.hero-image-2 {
    width: 200px;
    height: 300px;
    top: 10%;
    left: 15%;
    transform: rotate(-3deg);
    z-index: 2;
}

.hero-image-3 {
    width: 180px;
    height: 250px;
    bottom: 15%;
    right: 25%;
    transform: rotate(8deg);
    z-index: 1;
}

/* Community Focus Section */
.community-focus {
    padding: var(--spacing-xxl) 0;
    background-color: var(--light-color);
    position: relative;
}

.community-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.community-text {
    padding-right: var(--spacing-xl);
}

.community-text h2 {
    color: var(--primary-dark);
    margin-bottom: var(--spacing-lg);
    font-size: 2.5rem;
}

.community-text p {
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
    line-height: 1.8;
}

.community-text .btn {
    margin-top: var(--spacing-md);
}

.community-image {
    position: relative;
}

.image-collage {
    position: relative;
    height: 400px;
}

.collage-item {
    position: absolute;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s ease;
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.collage-item:hover {
    transform: translateY(-10px);
}

.collage-item:hover img {
    transform: scale(1.05);
}

.collage-item-1 {
    width: 60%;
    height: 70%;
    top: 0;
    left: 0;
    z-index: 2;
}

.collage-item-2 {
    width: 50%;
    height: 60%;
    bottom: 0;
    right: 0;
    z-index: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.creative-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    animation: float 15s infinite ease-in-out;
    will-change: transform, opacity; /* Optimize for animations */
}

/* ===== Features Section ===== */
.features {
    padding: var(--spacing-xxl) 0;
    background-color: var(--light-color);
    position: relative;
    margin-top: -50px;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4z' fill='%23f9a03f' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: -1;
    pointer-events: none;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    position: relative;
}

@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background-color: var(--gray-100);
    padding: var(--spacing-lg);
    border-radius: 0;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transform: rotate(-2deg);
    clip-path: polygon(5% 0%, 95% 0%, 100% 5%, 100% 95%, 95% 100%, 5% 100%, 0% 95%, 0% 5%);
}

.feature-card:nth-child(even) {
    transform: rotate(2deg);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    z-index: -1;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.feature-card:hover {
    transform: translateY(-15px) rotate(0deg);
    box-shadow: var(--shadow-xl);
}

.feature-card:nth-child(even):hover {
    transform: translateY(-15px) rotate(0deg);
}

.feature-card:hover::after {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    transition: all var(--transition-normal);
    display: inline-block;
    position: relative;
}

.feature-icon::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: var(--highlight-light);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0.5;
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
    color: var(--primary-dark);
}

.feature-card h3 {
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
    font-size: 1.4rem;
}

.feature-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background-color: var(--gray-300);
    transition: all var(--transition-normal);
}

.feature-card:hover h3::after {
    width: 80px;
    background-color: var(--primary-color);
}

/* ===== CTA Section ===== */
.cta {
    background-color: var(--primary-dark);
    color: white;
    padding: var(--spacing-xxl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 15%, 100% 0, 100% 85%, 0 100%);
    margin-top: -50px;
    margin-bottom: -50px;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, 
            rgba(233, 79, 55, 0.3) 0%, 
            transparent 30%,
            rgba(249, 160, 63, 0.3) 70%, 
            transparent 100%);
    z-index: 0;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: var(--spacing-xxl) 0;
}

.cta h2 {
    color: white;
    margin-bottom: var(--spacing-md);
    font-size: 3rem;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.2);
    letter-spacing: 0.05em;
    font-weight: 800;
    transform: rotate(-2deg);
}

.grow-letter {
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 800;
    display: inline-block;
    transform: rotate(5deg);
}

.cta p {
    margin-bottom: var(--spacing-xl);
    color: white;
    font-size: 1.2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta .btn {
    margin: 0 10px;
    min-width: 180px;
}

/* ===== Footer ===== */
footer {
    background-color: var(--gray-900);
    color: var(--gray-300);
    padding: var(--spacing-xxl) 0 var(--spacing-md);
    position: relative;
    z-index: 1;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.footer-logo h3 {
    color: white;
    margin-bottom: var(--spacing-sm);
    font-family: var(--accent-font);
    font-size: 2rem;
    background-image: linear-gradient(
        to right, 
        var(--primary-color), 
        var(--secondary-color), 
        var(--accent-color)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.footer-links h4,
.footer-social h4 {
    color: white;
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
}

.footer-links h4::after,
.footer-social h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-links a {
    color: var(--gray-400);
    transition: all var(--transition-fast);
    position: relative;
    padding-left: var(--spacing-md);
}

.footer-links a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    transform: translateY(-50%) rotate(45deg);
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-links a:hover::before {
    background-color: var(--secondary-color);
    transform: translateY(-50%) rotate(135deg);
}

.social-icons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--gray-800);
    color: white;
    border-radius: 0;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    transform: rotate(-5deg);
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
}

.social-icons a:nth-child(even) {
    transform: rotate(5deg);
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        var(--primary-color), 
        var(--secondary-color), 
        var(--accent-color));
    z-index: -1;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: scaleX(0);
    transform-origin: right;
}

.social-icons a:hover {
    transform: translateY(-3px) rotate(0deg);
    box-shadow: var(--shadow-lg);
}

.social-icons a:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--gray-800);
    position: relative;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
}

/* ===== Page Header ===== */
.page-header {
    background-color: var(--primary-dark);
    color: white;
    padding: var(--spacing-xxl) 0;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Apply fixed background only on desktop for better performance */
@media (min-width: 992px) {
    .page-header {
        background-attachment: fixed;
    }
}

/* Page-specific header backgrounds */
.page-header-about {
    background-image: url("../images/photo1.jpg");
}

.page-header-contact {
    background-image: url("../images/photo2.jpg");
}

.page-header-services {
    background-image: url("../images/photo3.jpg");
}

.page-header-who {
    background-image: url("../images/hero-bg.jpg");
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    text-shadow: 3px 3px 0px rgba(0,0,0,0.2);
    animation: fadeInUp 1s ease-out;
    display: inline-block;
}

.page-header p {
    color: white;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* ===== Contact Info Section ===== */
.contact-info {
    padding: var(--spacing-xxl) 0;
    background-color: var(--light-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    background-color: white;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-normal);
    transform: rotate(-1deg);
    overflow: hidden;
    position: relative;
}

.contact-card:nth-child(even) {
    transform: rotate(1deg);
}

.contact-card:hover {
    transform: translateY(-10px) rotate(0);
    box-shadow: var(--shadow-lg);
}

.contact-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.contact-card:hover::after {
    transform: scaleX(1);
}

.contact-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.contact-card:nth-child(2) .contact-icon {
    color: var(--secondary-color);
}

.contact-card:nth-child(3) .contact-icon {
    color: var(--accent-color);
}

.contact-card:nth-child(4) .contact-icon {
    color: var(--highlight-color);
}

.contact-card h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.4rem;
}

.contact-social {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.contact-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--gray-100);
    color: var(--primary-color);
    border-radius: var(--border-radius-full);
    transition: all var(--transition-normal);
}

.contact-social a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* ===== Contact Form Section ===== */
.contact-form-section {
    padding: var(--spacing-xxl) 0;
    background-color: var(--gray-100);
    position: relative;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.form-container h2 {
    margin-bottom: var(--spacing-md);
    color: var(--primary-dark);
    text-align: center;
}

.form-container p {
    margin-bottom: var(--spacing-xl);
    text-align: center;
    color: var(--gray-600);
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--gray-700);
}

.form-group .required {
    color: var(--error-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-md);
    font-family: var(--body-font);
    font-size: 1rem;
    transition: all var(--transition-fast);
    background-color: var(--gray-100);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(9, 26, 255, 0.1);
    background-color: white;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
}

.checkbox-group label {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.contact-form button {
    padding: 12px 24px;
    font-size: 1rem;
    margin-top: var(--spacing-md);
}

/* ===== Map Section ===== */
.map-section {
    padding: var(--spacing-xxl) 0;
    background-color: var(--light-color);
}

.map-container {
    height: 400px;
    background-color: var(--gray-200);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
}

.map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: var(--gray-200);
    color: var(--gray-700);
    font-weight: 500;
    text-align: center;
    padding: var(--spacing-xl);
}

/* ===== FAQ Section ===== */
.faq-section {
    padding: var(--spacing-xxl) 0;
    background-color: var(--gray-100);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: var(--spacing-md);
    background-color: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.faq-question {
    padding: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.faq-question h3 {
    margin-bottom: 0;
    font-size: 1.2rem;
    color: var(--primary-dark);
}

.faq-toggle {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* ===== Float Animation ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* Optimize animations by using hardware acceleration */
.feature-card, .btn, .hero h1, .hero p, .hero-buttons {
    will-change: transform, opacity;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* ===== Responsive Styles ===== */
/* Tablet Styles (992px and below) */
@media (max-width: 992px) {
    html {
        font-size: 15px; /* Slightly reduce base font size for tablets */
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .hero h1 {
        font-size: 3.2rem;
    }
    
    .hero-content {
        padding-left: 0;
        text-align: center;
    }
    
    .hero p {
        left: 0;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero .btn {
        margin-left: 0;
    }
    
    .hero-images {
        display: none;
    }
    
    /* Improve spacing for tablet view */
    .features-grid,
    .benefits-grid,
    .values-grid,
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Adjust padding for better tablet experience */
    .hero,
    .features,
    .benefits,
    .testimonials,
    .our-story,
    .mission-vision,
    .team,
    .values,
    .contact-info,
    .contact-form-section,
    .map-section,
    .faq-section {
        padding: var(--spacing-xl) 0;
    }
    
    /* Ensure buttons are easily tappable on tablets */
    .btn {
        padding: 0.8rem 1.6rem;
    }
    
    .cta {
        clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
    }
}

/* Mobile Landscape Styles (768px and below) */
@media (max-width: 768px) {
    html {
        font-size: 14px; /* Further reduce base font size for mobile */
    }
    
    /* Mobile Navigation */
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: rgba(255, 250, 240, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        padding: var(--spacing-lg) 0;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        transition: transform var(--transition-normal);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links li {
        margin: var(--spacing-sm) 0;
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: var(--spacing-md);
        width: 100%;
        font-size: 1.1rem;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* When hamburger is active, transform it to an X */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* Adjust grid layouts for mobile */
    .features-grid,
    .benefits-grid,
    .values-grid,
    .team-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Make form full width on mobile */
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    /* Ensure testimonials stack nicely */
    .testimonial-slider {
        grid-template-columns: 1fr;
    }
    
    /* Adjust spacing between sections */
    .section-title {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Make buttons more prominent on mobile */
    .btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.9rem 1rem;
        margin-bottom: var(--spacing-sm);
    }
    
    /* Ensure CTA buttons don't take full width */
    .cta .btn {
        display: inline-block;
        width: auto;
        margin-bottom: 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .cta h2 {
        font-size: 2.2rem;
    }
}

/* Mobile Portrait Styles (576px and below) */
@media (max-width: 576px) {
    html {
        font-size: 13px; /* Smallest base font size for small mobile devices */
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    /* Adjust footer for small screens */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-lg);
    }
    
    .footer-links h4::after,
    .footer-social h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .footer-links a {
        display: inline-block;
    }
    
    .footer-links ul {
        align-items: center;
    }
    
    /* Adjust card padding */
    .feature-card,
    .benefit-card,
    .value-card,
    .contact-card {
        padding: var(--spacing-lg);
    }
    
    .cta {
        clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%);
    }
}

/* Ensure touch targets are large enough on all mobile devices */
@media (hover: none) and (pointer: coarse) {
    .nav-links a,
    .btn,
    .social-icons a,
    .faq-question,
    input[type="checkbox"],
    input[type="radio"] {
        min-height: 44px; /* Apple's recommended minimum touch target size */
    }
    
    .social-icons a,
    .member-social a,
    .contact-social a {
        width: 44px;
        height: 44px;
    }
}

/* Fix for iOS form elements */
@supports (-webkit-touch-callout: none) {
    input,
    textarea {
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
}
