/* ======= Page Base ======= */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fc;
    margin: 0;
    padding: 80px 0 0 0;
    color: #1a1a2e;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ======= Header Section ======= */
.residential-header {
    background: linear-gradient(135deg, #2b4e87 0%, #77c7b5 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.residential-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(119, 199, 181, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(244, 198, 50, 0.15) 0%, transparent 50%);
}

.residential-header .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.residential-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-subtitle {
    font-size: 1.4rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.header-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.header-tagline {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    margin-top: 1rem;
    border-left: 3px solid #f4c632;
    padding-left: 1rem;
}

.header-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* ======= Main Content Section ======= */
.main-content-section {
    padding: 80px 0;
    background: white;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.content-text h2 {
    font-size: 2.2rem;
    color: #2b4e87;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.content-text p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.key-highlights {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid #13518b;
}

.key-highlights h3 {
    color: #13518b;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.key-highlights ul {
    list-style: none;
    padding: 0;
}

.key-highlights li {
    padding: 0.5rem 0;
    color: #555;
    font-size: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.key-highlights li:before {
    content: '✓';
    color: #1076a5;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.content-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-highlight {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease;
}

.feature-highlight:hover {
    transform: translateY(-5px);
}

.highlight-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-highlight h4 {
    color: #2b4e87;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.feature-highlight p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* ======= Section Headers ======= */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #1a1a2e;
    font-weight: 800;
    background: linear-gradient(135deg, #2b4e87 0%, #77c7b5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ======= Features Section ======= */
.features-section {
    padding: 100px 0;
    background: #f8f9fa;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    border: 1px solid rgba(43, 78, 135, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 320px;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(43, 78, 135, 0.15);
    border-color: rgba(43, 78, 135, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.3);
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #8B4513;
    font-weight: 700;
    line-height: 1.4;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card p {
    color: #666;
    line-height: 1.7;
    font-size: 0.98rem;
    margin: 0;
}

/* ======= CTA Section ======= */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #2b4e87 0%, #77c7b5 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.cta-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ======= Buttons ======= */
.btn-primary {
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 69, 19, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    display: inline-block;
}

.btn-secondary:hover {
    background: white;
    color: #2b4e87;
    transform: translateY(-2px);
}

/* ======= Footer ======= */
footer {
    background: #0d1321;
    color: white;
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section h3 {
    color: #77c7b5;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-section p, 
.footer-section li a {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a:hover {
    color: #77c7b5;
}

.footer-bottom {
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-legal {
    margin-top: 1rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 1rem;
    text-decoration: none;
    font-size: 0.85rem;
}

.footer-legal a:hover {
    color: #77c7b5;
}

/* ======= Responsive Design ======= */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .content-features {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .residential-header .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .residential-header h1 {
        font-size: 2.5rem;
    }
    
    .header-subtitle {
        font-size: 1.2rem;
    }
    
    .image-placeholder {
        width: 200px;
        height: 200px;
        font-size: 5rem;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .content-features {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .residential-header {
        padding: 100px 0 60px;
    }
    
    .residential-header h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .feature-card {
        padding: 2rem;
        min-height: 280px;
    }
    
    .key-highlights {
        padding: 1.5rem;
    }
}

/* ======= Main Content Section ======= */
.main-content-section {
    padding: 80px 0;
    background: white;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: start;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.content-text h2 {
    font-size: 2.2rem;
    color: #2b4e87;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.content-text p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 3rem;
}

.key-highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.key-highlight-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    border: 1px solid rgba(43, 78, 135, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 280px;
}

.key-highlight-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(43, 78, 135, 0.15);
    border-color: rgba(43, 78, 135, 0.3);
}

.key-highlight-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2b4e87 0%, #77c7b5 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    box-shadow: 0 4px 20px rgba(43, 78, 135, 0.3);
}

.key-highlight-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2b4e87;
    font-weight: 700;
    line-height: 1.4;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-highlight-card p {
    color: #666;
    line-height: 1.7;
    font-size: 0.98rem;
    margin: 0;
}

/* Center only the 4th key-highlight-card (Universal EV Compatibility) */
.key-highlight-card:nth-child(4) {
    grid-column: 1 / -1; /* Make it span all columns */
    max-width: 400px; /* Set a maximum width */
    margin: 0 auto; /* Center it horizontally */
    justify-self: center; /* Center within grid cell */
    width: 100%; /* Ensure it takes full width of its container */
}

/* ======= Header Image Styles ======= */
.header-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container {
    width: 100%;
    max-width: 450px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
}

.header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    transition: transform 0.5s ease;
}

.header-img:hover {
    transform: scale(1.05);
}

/* Fallback styling if image doesn't load */
.image-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(43, 78, 135, 0.9), rgba(119, 199, 181, 0.9));
    color: white;
    text-align: center;
    padding: 20px;
    border-radius: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container img:not([src]) + .image-fallback,
.image-container img[src=""] + .image-fallback {
    opacity: 1;
}

.image-fallback span {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.image-fallback p {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

/* Image caption style (optional) */
.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    font-size: 0.85rem;
    text-align: center;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container:hover .image-caption {
    opacity: 1;
}

/* Alternative: Circular image container */
.image-container.circular {
    border-radius: 50%;
    max-width: 350px;
    height: 350px;
}

.image-container.circular .header-img {
    border-radius: 50%;
}

/* Alternative: Modern card style */
.image-container.card-style {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: none;
    overflow: visible;
}

.image-container.card-style .header-img {
    border: 5px solid white;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Alternative: Minimal style */
.image-container.minimal {
    background: transparent;
    backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ======= Responsive Adjustments ======= */
@media (max-width: 768px) {
    .residential-header .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .image-container {
        max-width: 350px;
        height: 250px;
        margin: 0 auto;
    }
    
    .image-fallback span {
        font-size: 3rem;
    }
    
    .image-fallback p {
        font-size: 1rem;
    }
    
    /* Circular container on mobile */
    .image-container.circular {
        max-width: 250px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .image-container {
        max-width: 280px;
        height: 200px;
    }
    
    .image-fallback span {
        font-size: 2.5rem;
    }
    
    .image-fallback p {
        font-size: 0.9rem;
    }
    
    /* Circular container on small mobile */
    .image-container.circular {
        max-width: 200px;
        height: 200px;
    }
}

/* Animation for image loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-container {
    animation: fadeInUp 0.8s ease-out;
}

/* Header Icon Section */
.residential-header .header-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-container {
    width: 100%;
    max-width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon {
    font-size: 10rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.header-icon:hover {
    transform: scale(1.05);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Responsive adjustments for the icon */
@media (max-width: 768px) {
    .icon-container {
        max-width: 200px;
        height: 200px;
    }
    
    .header-icon {
        font-size: 7rem;
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .icon-container {
        max-width: 150px;
        height: 150px;
    }
    
    .header-icon {
        font-size: 5rem;
        width: 130px;
        height: 130px;
    }
}

/* Header Icon Section - SQUARE OUTLINE */
.residential-header .header-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-container {
    width: 100%;
    max-width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon {
    font-size: 10rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px; /* Changed from 50% to 20px for square with rounded corners */
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.header-icon:hover {
    transform: scale(1.05);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.2);
}

/* Optional: Different square styles */

/* 1. Sharp square (no rounding) */
.header-icon.sharp-square {
    border-radius: 0;
}

/* 2. Rounded square (more rounded) */
.header-icon.rounded-square {
    border-radius: 30px;
}

/* 3. Square with inner glow */
.header-icon.glow-square {
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(255, 255, 255, 0.1);
}

/* 4. Minimal square (thin border) */
.header-icon.minimal-square {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

/* Responsive adjustments for the icon */
@media (max-width: 768px) {
    .icon-container {
        max-width: 200px;
        height: 200px;
    }
    
    .header-icon {
        font-size: 7rem;
        width: 180px;
        height: 180px;
        border-radius: 15px; /* Adjusted for smaller size */
    }
    
    /* Adjust different styles for mobile */
    .header-icon.rounded-square {
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .icon-container {
        max-width: 150px;
        height: 150px;
    }
    
    .header-icon {
        font-size: 5rem;
        width: 130px;
        height: 130px;
        border-radius: 12px; /* Adjusted for mobile */
    }
    
    /* Adjust different styles for mobile */
    .header-icon.rounded-square {
        border-radius: 15px;
    }
}