/* Base Styles */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --text-color: #2d3748;
    --text-muted: #4a5568;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fefefe;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Ensure this is lower than modal */
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #8b5cf6;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: #8b5cf6;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.cta-button {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 50%, #ddd6fe 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23e5e7eb" opacity="0.3"/><circle cx="75" cy="75" r="1" fill="%23e5e7eb" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.4;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-content .highlight {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary {
    background: transparent;
    color: #8b5cf6;
    padding: 1rem 2rem;
    border: 2px solid #8b5cf6;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.4);
}

.btn-secondary:hover {
    background: #8b5cf6;
    color: white;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    transform: rotate(5deg);
}

.visual-card {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.visual-card:nth-child(even) {
    animation-delay: 1.5s;
}

.visual-card:hover {
    transform: scale(1.05);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* branches Section */
.branches {
    padding: 6rem 0;
    background: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}

.branch-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
    position: relative;
    overflow: hidden;
}

.branch-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.branch-card:hover::before {
    transform: scaleX(1);
}

.branch-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.branch-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.branch-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.branch-card p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.learn-more {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.branch-card .learn-more:hover {
    color: #2563eb;
    text-decoration: none;
}

.branch-card .learn-more i {
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.branch-card .learn-more:hover i {
    transform: translateX(3px);
}

/* Modal styles */
.modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.modal-header {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
    color: #4b5563;
    line-height: 1.7;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    background-color: #f9fafb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .branches-grid {
        grid-template-columns: 1fr;
    }
    
    .branch-card {
        margin-bottom: 1.5rem;
    }
}

/* About Section */
.about {
    padding: 6rem 0;
    background: #f8fafc;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.about-features {
    list-style: none;
    margin: 2rem 0;
}

.about-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #4b5563;
}

.about-features li::before {
    content: '✨';
    font-size: 1.25rem;
}

.about-visual {
    background: linear-gradient(135deg, #ddd6fe, #c7d2fe);
    border-radius: 20px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #8b5cf6;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 1rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container,
    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* ===== Branches Section ===== */
.branches {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

/* Branch Cards */
.branch-card {
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    background: white;
    box-shadow: var(--card-shadow);
}

.branch-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.branch-card .card-body {
    padding: 1.5rem;
}

.branch-card .card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.branch-card .card-title::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: #8b5cf6;
    transition: width 0.3s ease;
}

.branch-card:hover .card-title::after {
    width: 100%;
}

.branch-card .card-title {
    color: #4b5563;
    transition: color 0.3s ease;
}

.branch-card:hover .card-title {
    color: #8b5cf6;
}

.branch-card .card-text {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Custom Modal Styles */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999; /* Higher than everything else */
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal.show {
    display: block;
    opacity: 1;
}

.custom-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9998; /* Just below modal */
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7); /* Darker backdrop */
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px); /* Slight blur effect */
}

.custom-modal-backdrop.show {
    opacity: 1;
}

.custom-modal-dialog {
    position: relative;
    width: auto;
    margin: 2rem auto;
    max-width: 800px;
    pointer-events: none;
    z-index: 9999; /* Same as modal */
    padding: 20px 0; /* Add some vertical spacing */
}

.custom-modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    outline: 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin: 2rem 0;
}

.custom-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.5rem - 1px);
    border-top-right-radius: calc(0.5rem - 1px);
}

.custom-modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
    overflow-y: auto;
    max-height: 70vh;
}

.custom-modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    border-bottom-right-radius: calc(0.5rem - 1px);
    border-bottom-left-radius: calc(0.5rem - 1px);
}

.custom-close {
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
    background-color: transparent;
    border: 0;
    border-radius: 0.25rem;
    opacity: 0.5;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
}

.custom-close:hover {
    opacity: 0.75;
    text-decoration: none;
}

/* Ensure body doesn't scroll when modal is open */
body.modal-open {
    overflow: hidden;
    padding-right: 0 !important;
}

/* Responsive adjustments */
@media (min-width: 576px) {
    .custom-modal-dialog {
        max-width: 500px;
    }
}

/* Center modal */
.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.5rem - 1px);
    border-top-right-radius: calc(0.5rem - 1px);
}

/* Modal Body */
.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    border-bottom-right-radius: calc(0.5rem - 1px);
    border-bottom-left-radius: calc(0.5rem - 1px);
}

/* Close Button */
.btn-close {
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
    background-color: transparent;
    border: 0;
    border-radius: 0.25rem;
    opacity: 0.5;
    cursor: pointer;
}

.btn-close:hover {
    opacity: 0.75;
}

/* Responsive adjustments */
@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }
    
    .modal-dialog-centered {
        min-height: calc(100% - 3.5rem);
    }
}

.modal-content {
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    background-color: #f8f9fa;
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
}

/* Hover effects */
.btn-outline-primary {
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Ensure clickable area */
.card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
