/*
 * This file contains custom CSS for animations and components that are not directly handled by Tailwind CSS classes.
 * It is a consolidated stylesheet for the entire Karachi Renovators website project.
 */

/* ================== General Styles & Accessibility ================== */

/* Ensure the main content takes up space and avoids overlap with the fixed header */
main {
    min-height: 100vh;
}

/* Global box-sizing for consistent layout calculations */
html {
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: border-box;
}

/* Improve focus state for keyboard navigation (crucial for accessibility) */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
  outline: 2px solid #D97706; /* secondary color */
  outline-offset: 2px;
}

/* Skip-to-content link for accessibility */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #1E3A8A;
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  transition: top 0.3s ease-in-out;
}
.skip-to-content:focus {
  top: 0;
}

/* ================== Animations ================== */

/* Animation for a subtle fade-in effect from the bottom */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation for a simple fade-in effect */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Apply the fadeInUp animation to specific sections */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.3s; /* Delay the animation slightly */
}

/*
 * The AOS (Animate on Scroll) library will handle
 * the animations for most other elements as the user scrolls.
 */

/* ================== Homepage & General Components ================== */

/* Hero Slider */
.slider-image {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.slider-image.active {
    opacity: 1;
    visibility: visible;
}

/* Slider Dots */
#slider-dots .slider-dot {
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#slider-dots .slider-dot.active {
    background-color: #FCD34D; /* Use accent color for active dot */
    transform: scale(1.2); /* Make the active dot slightly larger */
    background-opacity: 1;
}

/* Mobile Menu & Accordion */
#mobile-menu-toggle {
    transition: transform 0.3s ease;
}

.accordion-header .chevron-icon {
    transition: transform 0.3s ease-in-out;
}

.accordion-header.active .chevron-icon {
    transform: rotate(90deg);
}

/* Form Submission Message */
#formMessage {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#formMessage.show {
    opacity: 1;
    visibility: visible;
}

/* FAQ Section Styles */
#homepage-faq {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.faq-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    padding: 1.5rem;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f7fafc;
    color: var(--text);
}

.faq-item h3::after {
    content: '+';
    font-size: 2rem;
    font-weight: 400;
    transition: transform 0.3s ease-in-out;
}

.faq-item.active h3::after {
    content: '-';
    transform: rotate(0deg);
}

.faq-item p {
    padding: 0 1.5rem 1.5rem;
    margin: 0;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.faq-item.active p {
    max-height: 200px;
    opacity: 1;
}

/* General CTA Section */
.cta {
    text-align: center;
}

/* ================== Services Pages ================== */

/* Service Card Hover Effects */
.service-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-5px);
}

/* Pricing Table List Item Icons */
.pricing-table .feature-list li::before {
  content: '✓';
  color: #1E3A8A; /* primary color */
  margin-right: 8px;
}

/* ================== Portfolio Page ================== */

/* Portfolio Section styles */
.portfolio-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.portfolio-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.portfolio-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.portfolio-section p {
    font-size: 1.125rem;
    color: #4B5563; /* gray-600 */
}

/* Tabs styles */
.tabs-container {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}
.tabs-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.tabs-list {
    white-space: nowrap;
    display: flex;
    justify-content: center;
}
.tab-item {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px; /* full rounded */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: 1px solid transparent;
}
.tab-item:hover {
    background-color: #DBEAFE; /* blue-100 */
    color: #1E3A8A; /* blue-900 */
}
.tab-item.active {
    background-color: #1E3A8A; /* blue-900 */
    color: #fff;
    font-weight: 700;
}

/* Tab content styles */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out forwards;
}
.tab-content.active {
    display: block;
}

/* Card styles */
.card {
    background-color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1F2937; /* gray-800 */
}

.card-content p.location,
.card-content p.duration,
.card-content p.budget,
.card-content p.style,
.card-content p.focus,
.card-content p.work-type,
.card-content p.material,
.card-content p.system {
    font-size: 0.875rem;
    color: #6B7280; /* gray-500 */
    margin-bottom: 0.5rem;
}

.card-content ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.card-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.25rem;
}

.card-content li::before {
    content: '•';
    color: #FBBF24; /* yellow-400 */
    font-weight: bold;
    position: absolute;
    left: 0;
}

.card-content .images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-image {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    object-fit: cover;
}

blockquote {
    border-left: 4px solid #FBBF24; /* yellow-400 */
    padding-left: 1rem;
    font-style: italic;
    color: #6B7280;
    margin: 1.5rem 0;
}

/* ================== Utility Classes ================== */

/* Button and Link Overrides */
.btn-arrow {
  position: relative;
  padding-right: 25px;
}
.btn-arrow::after {
  content: '→';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: right 0.2s ease-in-out;
}
.btn-arrow:hover::after {
  right: -5px;
}

/* Divider Lines */
.section-divider {
  width: 50px;
  height: 4px;
  background-color: #D97706; /* secondary color */
  margin: 2rem auto;
  border-radius: 2px;
}
/* _contact.css */

/* Hero Section specific to Contact Page */
.contact-hero-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #0A3D62 0%, #0056b3 100%); /* Blue gradient background */
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 2rem 2rem; /* Soft bottom corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.contact-hero-section p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* General Section Headings for Contact Page */
.contact-form-section h2,
.contact-info-section h2,
.map-section h2,
.cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 2.5rem;
    text-align: center;
}

/* Contact Form Section */
.contact-form-section {
    padding: 4rem 0;
    background-color: #f8f8f8;
}

.contact-form-section form {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    background-color: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form-section input[type="text"],
.contact-form-section input[type="email"],
.contact-form-section input[type="tel"], /* Changed from type="text" for phone */
.contact-form-section textarea {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fcfcfc;
}

.contact-form-section input:focus,
.contact-form-section textarea:focus {
    border-color: #0A3D62;
    box-shadow: 0 0 0 4px rgba(10, 61, 98, 0.15);
    outline: none;
    background-color: #fff;
}

.contact-form-section textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form-section button[type="submit"] {
    padding: 1.2rem 2.5rem;
    background-color: #0A3D62;
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    align-self: center; /* Center the button */
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-form-section button[type="submit"]:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

#formMessage {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem;
    border-radius: 0.75rem;
    opacity: 0; /* Hidden by default */
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#formMessage.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    opacity: 1;
    transform: translateY(0);
}

#formMessage.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    opacity: 1;
    transform: translateY(0);
}

/* Contact Info Section */
.contact-info-section {
    padding: 4rem 0;
    background-color: #fff;
}

.contact-info-section .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info-card {
    background-color: #f0f8ff; /* Light blue tint */
    padding: 2.5rem;
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0f0ff;
}

.contact-info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.contact-info-card i {
    font-size: 3.5rem;
    color: #0A3D62;
    margin-bottom: 1.5rem;
}

.contact-info-card h3 {
    font-size: 1.8rem;
    color: #1E1F25;
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-info-card p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.contact-info-card a {
    color: #0A3D62;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-info-card a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Map Section */
.map-section {
    padding: 4rem 0;
    background-color: #f8f8f8;
}

.map-container {
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
}

.map-container iframe {
    width: 100%;
    height: 450px; /* Increased map height for better visibility */
    border: 0;
    border-radius: 1.5rem; /* Match container border-radius */
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .contact-hero-section h1 {
        font-size: 2.8rem;
    }
    .contact-hero-section p {
        font-size: 1.1rem;
    }
    .contact-form-section form {
        padding: 2rem;
        border-radius: 1rem;
    }
    .contact-form-section button[type="submit"] {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    .contact-info-section .container {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
    .contact-info-card {
        padding: 2rem;
        border-radius: 1rem;
    }
    .map-container iframe {
        height: 300px; /* Reduce map height for mobile */
    }
    .cta button {
        padding: 1rem 2.5rem;
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .contact-hero-section h1 {
        font-size: 2.2rem;
    }
    .contact-hero-section p {
        font-size: 1rem;
    }
    .contact-form-section input,
    .contact-form-section textarea {
        padding: 1rem;
        font-size: 1rem;
    }
    .contact-form-section button[type="submit"] {
        font-size: 1rem;
    }
}
/* Update the button color */
.cta button {
    background-color: #5cb85c; /* Example: Green background color */
    color: #ffffff; /* Example: White text color */
    border: none; /* Removes any default button border */
    padding: 1rem 2rem;
    font-size: 1.15rem;
    border-radius: 9999px; /* This gives it a full rounded shape */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Add a hover effect for a more interactive feel */
.cta button:hover {
    background-color: #4cae4c; /* A darker green on hover */
}

/* Update the arrow to match the new button color */
.btn-arrow::after {
  content: '→';
  color: #ffffff; /* Ensures the arrow is visible on the new background */
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: right 0.2s ease-in-out;
}