/* ===================================
   Gifted Hands AFH - Main Stylesheet
   =================================== */

/* CSS Variables for Easy Theming */
:root {
    --primary-color: #2c5f7c;
    --secondary-color: #4a90a4;
    --accent-color: #e8a87c;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Accessibility Features */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
    top: 0;
}

/* Accessibility Toolbar */
.accessibility-toolbar {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    z-index: 9999;
    padding: 10px;
}

.accessibility-toolbar button {
    display: block;
    width: 45px;
    height: 45px;
    margin: 5px 0;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.accessibility-toolbar button:hover,
.accessibility-toolbar button:focus {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Font Size Classes */
body.font-size-normal {
    font-size: 16px;
}

body.font-size-large {
    font-size: 18px;
}

body.font-size-xlarge {
    font-size: 20px;
}

/* High Contrast Mode */
body.high-contrast {
    background: #000;
    color: #fff;
}

body.high-contrast .header,
body.high-contrast .footer {
    background: #000;
    border: 2px solid #fff;
}

body.high-contrast a {
    color: #ffff00;
}

body.high-contrast .btn {
    background: #fff;
    color: #000;
    border: 2px solid #fff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover,
a:focus {
    color: var(--secondary-color);
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0;
}

/* Section Styling */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-color);
}

.section-title p {
    margin-top: 15px;
    font-size: 1.1rem;
}

/* Header Styles */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.top-bar {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.top-bar a {
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-bar a:hover {
    color: var(--accent-color);
    outline: none;
}

.top-bar i {
    font-size: 0.9rem;
}

/* Navigation */
.navbar {
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.logo-text h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--primary-color);
}

.logo-text p {
    font-size: 0.8rem;
    margin: 0;
    color: var(--text-light);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.mobile-menu-close {
    display: none;
}

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 95, 124, 0.85), rgba(74, 144, 164, 0.75));
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: var(--white);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus {
    background: #d69968;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--white);
    color: var(--primary-color);
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-body {
    padding: 25px;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card-text {
    color: var(--text-light);
}

/* Grid System */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Services Section */
.services {
    background: var(--bg-light);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.value-item {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.value-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.value-content h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.value-content p {
    font-size: 0.9rem;
    margin: 0;
}

/* Gallery Section */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 95, 124, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: var(--white);
    font-size: 2rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.contact-details p {
    margin: 0;
}

.contact-form {
    background: var(--bg-light);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 124, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* Map */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 50px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    display: block;
}

.footer-section a:hover {
    color: var(--accent-color);
    outline: none;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-link i {
    font-size: 20px;
    line-height: 1;
    display: block;
    text-align: center;
}

.social-link:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-section p {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Cascading Service Sections */
.cascade-section {
    padding: 80px 0;
}

.cascade-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.cascade-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.cascade-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.cascade-image:hover img {
    transform: scale(1.05);
}

.cascade-text {
    padding: 20px;
}

.cascade-badge {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.cascade-badge i {
    font-size: 2rem;
    color: var(--white);
}

.cascade-text h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.cascade-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 25px;
}

.cascade-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.cascade-list li {
    padding: 12px 0;
    font-size: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.cascade-list li i {
    color: var(--accent-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Reverse layout for alternating sections */
.cascade-reverse .cascade-content {
    direction: rtl;
}

.cascade-reverse .cascade-text {
    direction: ltr;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease;
}

/* Scroll Animations - Disabled for better visibility */
.animate-element {
    opacity: 1;
    transform: translateY(0);
}

.animate-element.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 80px 30px 30px;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        align-items: flex-start;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu-close {
        display: block;
        position: fixed;
        top: 20px;
        right: 20px;
        font-size: 2rem;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--primary-color);
        z-index: 1002;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .cascade-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .cascade-reverse .cascade-content {
        direction: ltr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .top-bar-left,
    .top-bar-right {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Hide social media links on mobile */
    .top-bar-right {
        display: none;
    }
    
    .hero {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .cascade-section {
        padding: 60px 0;
    }
    
    .cascade-text h3 {
        font-size: 1.5rem;
    }
    
    .cascade-text p {
        font-size: 1rem;
    }
    
    .cascade-badge {
        width: 60px;
        height: 60px;
    }
    
    .cascade-badge i {
        font-size: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .contact-form {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .logo-text h1 {
        font-size: 1.2rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .accessibility-toolbar {
        bottom: 0;
        top: auto;
        right: 0;
        transform: none;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
        display: flex;
        flex-direction: row;
        padding: 10px;
    }
    
    .accessibility-toolbar button {
        margin: 0 5px;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .accessibility-toolbar,
    .mobile-menu-toggle {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    a {
        text-decoration: underline;
    }
}