:root {
    --color-primary: #0070f3;
    --color-secondary: #ff4081;
    --color-background: #f9fafb;
    --color-midtext: #6b7280;
    --color-darktext: #111827;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

body {
    background-color: var(--color-background);
    font-family: var(--font-body);
    color: var(--color-midtext);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-darktext);
}

/* Text colors */
.text-primary {
    color: var(--color-primary) !important;
}

.text-secondary {
    color: var(--color-secondary) !important;
}

.text-midtext {
    color: var(--color-midtext);
}

.text-darktext {
    color: var(--color-darktext);
}

/* Background colors */
.bg-primary {
    background-color: var(--color-primary) !important;
}

.bg-secondary {
    background-color: var(--color-secondary) !important;
}

/* Fonts */
.font-heading {
    font-family: var(--font-heading);
}

.font-body {
    font-family: var(--font-body);
}

section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.container {
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Navigation styles */
nav ul li a,
.nav-link {
    padding: 0.5rem 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    position: relative;
    color: var(--color-darktext);
    transition: color 0.3s ease;
}

/* Navbar link hover effect with underline */
nav ul li a:hover,
.nav-link:hover {
    color: var(--color-primary);
}

nav ul li a::after,
.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.active-link {
    color: var(--color-primary);
    font-weight: 700;
}

.active-link::after {
    width: 100%; /* fully visible underline */
}

nav ul li a:hover::after,
.nav-link:hover::after {
    width: 100%;
}

#hero {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 20px;
}

#hero h1 {
    font-weight: 800;
    line-height: 1.1;
}

#hero p {
    font-size: 1.125rem;
    max-width: 28rem;
    margin-bottom: 1.5rem;
}

#hero a {
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
}

#hero .btn-primary {
    background-color: white !important;
    color: var(--color-secondary) !important;
}

#hero .btn-primary:hover {
    background-color: var(--color-secondary) !important;
    color: white !important;
}

/* Smooth transition helper */
.transition-smooth {
    transition: all 0.3s ease;
}

/* Section padding for consistent spacing */
section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.875rem; /* text-3xl */
    margin-bottom: 1rem;
    color: var(--color-darktext);
    position: relative;
    padding-bottom: 0.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

/* Underline for section titles (default hidden) */
.section-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.875rem; /* text-3xl */
    margin-bottom: 1rem;
    color: var(--color-darktext);
    position: relative;
    padding-bottom: 0.5rem;
    cursor: pointer;
    transition: color 0.3s ease;

    display: inline-block; /* important: shrink to text width */
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.section-title:hover {
    color: var(--color-primary);
}

.section-title:hover::after {
    width: 100%; /* now 100% of text width */
}

.main-text {
    text-align: justify;
}

/* About images */
/* Floating animation keyframes */
@keyframes floatUpDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating-image {
    width: 100%; /* Make images fill their grid cell */
    height: 250px; /* fixed height for uniform size */
    object-fit: cover; /* crop to fit nicely */
    border: 4px solid white; /* white frame */
    border-radius: 12px; /* rounded corners */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* subtle shadow */

    animation: floatUpDown 6s ease-in-out infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    animation-play-state: paused;
}

/* Individual animation delays */
.floating-image:nth-child(1) {
    animation-delay: 0s;
}

.floating-image:nth-child(2) {
    animation-delay: 1.5s;
}

.floating-image:nth-child(3) {
    animation-delay: 3s;
}

.floating-image:nth-child(4) {
    animation-delay: 4.5s;
}

.testimonial-block {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    padding: 2rem;
    width: 300px;
    position: relative;
    transition: transform 0.4s ease, opacity 0.4s ease;
    will-change: transform, opacity;

    /* Use CSS variables for offsets */
    transform-origin: center center;
    transform: translateY(var(--y-offset)) rotate(var(--rotate)) skewX(var(--skew-x)) skewY(var(--skew-y));
}

#flash-message {
    transition: opacity 0.5s, transform 0.5s;
}

