/* ===================================
   MSDG.MU - Combined CSS Stylesheet
   For both Homepage and Grid Code page
   =================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

:root {
    --primary-color: #2d5f3f;
    --secondary-color: #3a7f5f;
    --gray: #666;
}

/* Prevent page movement on mobile */
html, body {
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}

* {
    -webkit-tap-highlight-color: transparent;
}

/* Prevent scrolling when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Header */
.header {
    background: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    max-width: 100vw;
    top: 0;
    z-index: 1000;
    overflow-x: hidden;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2d5f3f;
    text-decoration: none;
}

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

.nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: #2d5f3f;
}

.nav a.active {
    color: #2d5f3f;
    font-weight: 600;
}

.nav-language-switcher {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
}

.nav-language-switcher a {
    color: inherit;
    text-decoration: none;
}

.nav-language-switcher .is-active {
    color: #2d5f3f;
    font-weight: 600;
}

.language-divider {
    opacity: 0.6;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #2d5f3f;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(49deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-48deg) translate(8px, -7px);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(45, 95, 63, 0.85), rgba(45, 95, 63, 0.85)), url('../images/pexels-photo-356036.jpeg') center/cover;
    color: white;
    padding: 150px 2rem 100px;
    text-align: center;
    margin-top: 60px;
    position: relative;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Section */
.section {
    padding: 80px 0;
    width: 100%;
    overflow-x: hidden;
}

.section-title {
    font-size: 2.5rem;
    color: #2d5f3f;
    margin-bottom: 3rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Benefits Section */
.benefits {
    background: #f8f9fa;
    overflow-x: hidden;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.benefit-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    gap: 1.5rem;
}

.benefit-icon {
    width: 50px;
    height: 50px;
    background: #2d5f3f;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.benefit-content h3 {
    color: #2d5f3f;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.benefit-content p {
    color: #666;
    line-height: 1.6;
}

/* Solar Banner */
.solar-banner {
    width: 100%;
    max-width: 100vw;
    background: linear-gradient(135deg, #1e4029 0%, #2d5f3f 50%, #3a7f5f 100%);
    padding: 80px 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.solar-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.solar-banner-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.solar-icon-large {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.solar-banner-content h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.solar-banner-content p {
    font-size: 1.4rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.banner-section {
    width: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* Steps Section */
.steps-section {
    background: white;
    overflow-x: hidden;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

.steps-column h3 {
    color: #2d5f3f;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #2d5f3f;
}

.step-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: start;
}

.step-number {
    width: 35px;
    height: 35px;
    background: #2d5f3f;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    padding-top: 0.3rem;
}

/* Info Section */
.info-section {
    background: #f8f9fa;
    overflow-x: hidden;
}

.info-content {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.info-text h3 {
    color: #2d5f3f;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.info-text p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.info-content h3 {
    color: #2d5f3f;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.info-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.highlight-box {
    background: #e8f5e9;
    border-left: 4px solid #2d5f3f;
    padding: 1.5rem;
    margin: 2rem 0;
}

.highlight-box p {
    color: #2d5f3f;
    font-weight: 600;
    margin: 0;
}

.section-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

.info-grid {
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 4rem;
    align-items: center;
}

.info-text {
    padding: 0;
}

.info-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

/* Contact/Signup Section */
.contact-section {
    background: linear-gradient(rgba(45, 95, 63, 0.9), rgba(30, 64, 41, 0.9)), url('../images/pexels-photo-356036.jpeg') center/cover;
    padding: 100px 0;
    overflow-x: hidden;
    position: relative;
}

.signup-full-section {
    text-align: center;
    color: white;
}

.signup-content {
    max-width: 700px;
    margin: 0 auto;
}

.signup-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.signup-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    opacity: 0.95;
}

.btn-open-modal {
    background: #FFD700;
    color: #1a1a1a;
    padding: 1.2rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-open-modal:hover {
    background: #FFC700;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fefefe;
    margin: 3% auto;
    padding: 2.5rem 3rem;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
}

.modal-content h2 {
    color: #2d5f3f;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.modal-content .form-group {
    margin-bottom: 1rem;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.modal-content .form-group input,
.modal-content .form-group select,
.modal-content .form-group textarea {
    width: 100%;
    padding: 0.65rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.modal-content .form-group input:focus,
.modal-content .form-group select:focus,
.modal-content .form-group textarea:focus {
    outline: none;
    border-color: #2d5f3f;
}

.modal-content .form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.modal-content .form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.required-indicator {
    color: #b00020;
}

.form-spinner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.form-spinner[hidden] {
    display: none;
}

.form-spinner__dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--secondary-color);
    animation: pulse 1s ease-in-out infinite;
}

.form-message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 500;
}

.form-message[hidden] {
    display: none;
}

.form-message.success {
    color: #0f7a46;
    background: #e6f4ea;
}

.form-message.error {
    color: #b00020;
    background: #fdecea;
}

.form-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--gray);
    text-align: center;
}

.submit-button {
    width: 100%;
    background: #2d5f3f;
    color: white;
    padding: 0.85rem;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 0.5rem;
}

.submit-button:hover {
    background: #1e4029;
}

.radio-group {
    display: flex;
    gap: 2rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
}

.radio-label input[type="radio"] {
    width: auto;
    cursor: pointer;
}

.btn {
    background: #2d5f3f;
    color: white;
    padding: 1rem 3rem;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #1e4029;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 2rem 1.5rem;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.footer-section strong {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-bottom: 1rem;
}

.footer-bottom p {
    color: #999;
    font-size: 0.9rem;
}

/* Coming Soon Page (Grid Code) */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.coming-soon-container {
    max-width: 600px;
    text-align: center;
    background: white;
    padding: 4rem 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.icon {
    font-size: 5rem;
    margin-bottom: 2rem;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

.coming-soon-container h1 {
    font-size: 3rem;
    color: #2d5f3f;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.coming-soon-container p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.back-button {
    display: inline-block;
    background: #2d5f3f;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.3s, transform 0.2s;
}

.back-button:hover {
    background: #1e4029;
    transform: translateY(-2px);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 120px 1.5rem 80px;
    }

    .solar-banner {
        padding: 60px 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .benefits-grid {
        gap: 1.5rem;
    }

    .header {
        padding: 1rem 1.5rem;
    }

    .signup-content h2 {
        font-size: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-section:first-child {
        grid-column: 1 / -1;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .steps-container,
    .contact-grid,
    .info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Hamburger Menu Mobile */
    .hamburger {
        display: flex;
    }

    .nav {
        display: flex;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 0 2rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        gap: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease;
    }

    .nav.active {
        max-height: 500px;
        opacity: 1;
        padding: 2rem;
    }

    .nav li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    .nav li:last-child {
        border-bottom: none;
    }

    .nav a {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
    }

    .solar-banner {
        padding: 60px 1.5rem;
    }

    .solar-banner-content h2 {
        font-size: 1.8rem;
    }

    .solar-banner-content p {
        font-size: 1.1rem;
    }

    .solar-icon-large {
        font-size: 3.5rem;
    }

    .info-image-container {
        order: -1;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 2.2rem;
        line-height: 3rem;
    }

    .info-section {
        padding-bottom: 30px;
    }

    .modal-content {
    margin: 10% auto;
    padding: 2rem 1.5rem;
    width: 95%;
    max-height: 90vh;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

    .close-modal {
        right: 15px;
        top: 10px;
        font-size: 28px;
    }

    .modal-content h2 {
        font-size: 1.5rem;
        padding-right: 30px;
    }

    .btn-open-modal {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }

    .signup-content h2 {
        font-size: 2rem;
    }

    .signup-content p {
        font-size: 1rem;
    }

    .contact-section {
        padding: 60px 0;
    }

    .footer {
        padding: 2rem 1.5rem 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-section:first-child {
        grid-column: 1;
    }

    .footer-section h3 {
        font-size: 1.3rem;
    }

    .footer-section h4 {
        font-size: 1.1rem;
    }

    /* Coming Soon Page Mobile */
    .coming-soon-container {
        padding: 3rem 2rem;
    }

    .coming-soon-container h1 {
        font-size: 2.2rem;
    }

    .coming-soon-container p {
        font-size: 1.1rem;
    }

    .icon {
        font-size: 4rem;
    }

    .main-content {
        padding: 2rem 1rem;
    }
}
