/* Custom CSS for Abhaya Power Systems */

/* 1. Variables & Global */
:root {
    --primary-color: #1e46a1;
    --secondary-color: #dd2b1c;
    --text-dark: #111827;
    --text-gray: #4b5563;
    --text-light: #9ca3af;
    --white: #ffffff;
    --bg-light: #f9fafb;
    --bg-blue-50: #eff6ff;
    --bg-red-50: #fef2f2;
    --bg-blue-100: #c9def8;
    --bg-red-100: #fbcbcb;
    --border-gray: #e5e7eb;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease-in-out;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: 0.5em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

input, textarea, select, button {
    font-family: inherit;
    font-size: 1rem;
}

/* 2. Layout & Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.grid { display: grid; }
.hidden { display: none; }

.mt-2 { margin-top: 0.5rem; }
.mt-12 { margin-top: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-6 { padding-top: 1.5rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-white { color: var(--white); }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-gray-600 { color: var(--text-gray); }

.bg-white { background-color: var(--white); }
.bg-gray-50 { background-color: var(--bg-light); }
.bg-primary { background-color: var(--primary-color); }

/* 3. Header & Navigation */
.main-header {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.025em;
}

.desktop-nav {
    display: none;
}

.nav-link {
    color: var(--text-gray);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s ease-in-out;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
}

.mobile-menu {
    background-color: var(--white);
    border-top: 1px solid var(--border-gray);
    display: none;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-gray);
}

.mobile-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.mobile-menu a.active {
    background-color: var(--bg-blue-50);
    color: var(--primary-color);
    font-weight: 600;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
        gap: 2rem;
    }
    .mobile-menu-btn { display: none; }
    .mobile-menu { display: none !important; }
}

/* 4. Footer */
.main-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.footer-heading {
    font-size: 1.125rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-heading.sec { color: var(--secondary-color); }

.footer-text {
    font-size: 0.875rem;
    color: #bfdbfe; /* blue-100 */
    line-height: 1.6;
}

.footer-links a {
    display: block;
    color: #bfdbfe;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #1e3a8a; /* darker blue */
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.main-footer .nav-brand img {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 0.5rem;
    background-color: var(--white);
    box-shadow: var(--shadow-md);
}

/* 5. Components: Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 9999px; /* full rounded */
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.btn:hover {
    transform: translateY(-4px);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    background-color: #b91c1c; /* darker red */
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* 6. Page: Home (Index) */
.hero-section {
    position: relative;
    padding: 6rem 0;
    color: var(--white);
    overflow: hidden;
    /* background-color: var(--primary-color); */
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('../images/home-hero.png');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.33);
    z-index: 1;
}

/* ... existing styles ... */

@media (min-width: 768px) {
    .hero-section { padding: 8rem 0; }
    .hero-title { font-size: 3.75rem; }
    .hero-buttons { flex-direction: row; }
}

/* ... existing styles ... */

/* 7. Page: About & Others Header */
.page-header {
    position: relative;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8rem 0;
    text-align: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

@media (min-width: 768px) {
    .page-header {
        padding: 8rem 0;
    }
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.379);
    z-index: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.header-about { background-image: url('../images/hero-about.jpg'); }
.header-partners { background-image: url('../images/hero-partner.jpg'); }
.header-contact { background-image: url('../images/hero-contact.png'); }


.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-title span { color: var(--secondary-color); }

.hero-text {
    font-size: 1.125rem;
    color: #ffffff;
    margin-bottom: 2.5rem;
    max-width: 42rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .hero-section { padding: 8rem 0; }
    .hero-title { font-size: 3.75rem; }
    .hero-buttons { flex-direction: row; }
}

/* Overview Section */
.overview-flex {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

.overview-img img {
    border-radius: 0.75rem;
    box-shadow: var(--shadow-2xl);
}

.overview-content h4 {
    font-size: 0.875rem;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary-color);
}

.overview-content h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .overview-flex { flex-direction: row; }
    .overview-img, .overview-content { flex: 1; }
}

/* Core Solutions */
.solutions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.solution-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 4px solid transparent;
}

/* .solution-card:hover {
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary-color);
} */

.icon-box {
    width: 3.5rem;
    height: 3.5rem;
    background-color: var(--bg-blue-50);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.solution-card:hover .icon-box {
    background-color: var(--primary-color);
    color: var(--white);
}

@media (min-width: 768px) {
    .solutions-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .solutions-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Partners Teaser */
.partners-teaser {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    /* opacity: 0.7; */
    /* filter: grayscale(100%); */
    transition: 0.5s;
}

@media (max-width: 640px) {
    .partners-teaser {
        gap: 2rem; /* Reduce gap on mobile */
        flex-direction: column; /* Stack items vertically */
    }
    .partners-teaser img {
        height: 2.5rem !important; /* Slightly smaller logos on mobile, override inline style */
        max-width: 100%; /* Ensure no overflow */
    }
}

/* .partners-teaser:hover {
    opacity: 1;
    filter: grayscale(0%);
} */

/* 7. Page: About */


.page-title {
    font-size: 2.25rem;
    font-weight: 700;
}

.page-subtitle {
    color: #ffffff;
    margin-top: 0.5rem;
}

.prose {
    max-width: 65ch;
    margin: 0 auto;
    color: var(--text-gray);
    font-size: 1.125rem;
}

.prose p { margin-bottom: 1.5rem; }

/* About Page Specifics */
.about-grid {
    display: grid;
    gap: 4rem;
    align-items: center;
}

.about-content .lead-text {
    font-size: 1.25rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: 1rem;
    box-shadow: var(--shadow-2xl);
}

.stat-badge {
    position: absolute;
    bottom: -2rem;
    right: -2rem;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    text-align: center;
    min-width: 150px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 640px) {
    .stat-badge {
        right: -1rem;
        bottom: -1rem;
        padding: 1rem;
        min-width: 120px;
    }
    .stat-number {
        font-size: 1.75rem;
    }
}

.stat-metric {
    font-family: var(--font-body) !important;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
    border-left: 4px solid var(--secondary-color);
    padding-left: 1rem;
}

.vision-card, .mission-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border-top: 8px solid;
}

.vision-card { border-color: var(--primary-color); }
.mission-card { border-color: var(--secondary-color); }

/* 8. Page: Partners */
.partner-block {
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-gray);
    margin-bottom: 4rem;
}

.partner-logo-area {
    background-color: var(--bg-blue-50);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.partner-logo-text {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.partner-content { padding: 2.5rem; }

@media (min-width: 768px) {
    .partner-block { flex-direction: row; }
    .partner-logo-area { width: 33.333%; }
    .partner-content { width: 66.666%; }
}

/* 9. Page: Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

.contact-info-box {
    background-color: var(--bg-gray-50);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-gray);
}

.form-box {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-gray);
}

.form-group { margin-bottom: 1.5rem; }

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db; /* gray-300 */
    outline: none;
    transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 70, 161, 0.2);
}

.btn-block {
    width: 100%;
    display: block;
}

@media (min-width: 1024px) {
    .contact-grid { grid-template-columns: 1fr 1fr; }
}

/* 10. Section: Why Choose Us */
.why-choose-section {
    background-color: var(--white);
    position: relative;
    overflow: hidden;
}

/* Optional background pattern */
.why-choose-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(30, 70, 161, 0.05) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 640px) {
    .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .why-grid { grid-template-columns: repeat(4, 1fr); }
}

.why-card {
    background-color: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.why-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.why-icon-wrapper {
    width: 4rem;
    height: 4rem;
    background-color: var(--bg-blue-50);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    transition: var(--transition);
}

.why-card:hover .why-icon-wrapper {
    background-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.why-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.why-card p {
    font-size: 0.875rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0;
}
