/* General Styles */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header Styles */
header {
    background-color: #062f66;
    color: white;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-left h1 {
    margin: 0;
    font-size: 28px;
}

.header-left a {
    text-decoration: none;
    color: #fbff00;
}

.header-left a:hover {
    color: #ffffff;
}

.header-left p {
    margin: 5px 0 0;
    font-size: 14px;
    opacity: 0.9;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ffcc00;
}

#search-bar {
    width: 300px;
    padding: 10px;
    border: none;
    border-radius: 4px;
    margin-top: 12px;
    margin-left: 20px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* W2 Calculator Section */
.W2container {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.W2h1 {
    font-size: 28px;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

.W2h2 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 15px;
}

/* Form Styles */
#W2taxForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.W2form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.W2form-group label {
    font-size: 16px;
    color: #34495e;
    font-weight: 500;
}

.W2form-group input,
.W2form-group select {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%; /* Ensures all inputs/selects take full width */
    box-sizing: border-box; /* Prevents padding from affecting width */
    transition: border-color 0.3s;
}

.W2form-group input:focus,
.W2form-group select:focus {
    border-color: #3498db;
    outline: none;
}

.W2form-group input[type="checkbox"] {
    width: auto; /* Keep checkbox width natural */
    margin-right: 10px;
}

/* Ensure checkbox container aligns with other inputs */
.W2form-group.checkbox-container {
    display: flex;
    align-items: center; /* Vertically align checkbox and label */
    gap: 10px;
}
  
  /* Buttons */
  #W2calculate,
  #W2reset {
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  #W2calculate {
    background-color: #3498db;
    color: #fff;
  }
  
  #W2calculate:hover {
    background-color: #2980b9;
  }
  
  #W2reset {
    background-color: #e74c3c;
    color: #fff;
  }
  
  #W2reset:hover {
    background-color: #c0392b;
  }
  
  /* Results Section */
  #W2results {
    margin-top: 20px;
    padding: 15px;
    background: #ecf0f1;
    border-radius: 5px;
  }
  
  #W2results p {
    font-size: 16px;
    margin: 8px 0;
  }
  
  #W2results strong {
    color: #2c3e50;
  }
  
  /* Hidden Class */
  .W2hidden {
    display: none;
  }
  
  /* EMI and W2 Info Sections */
  .w2section {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 15px;
  }
  
  .w2h3 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 10px;
  }
  
  .w2p {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
  }
  
  .w2ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 15px;
  }
  
  .w2ul li {
    font-size: 16px;
    color: #555;
    margin-bottom: 8px;
  }


/* Footer */
footer {
    background-color: #062f66;
    color: white;
    padding: 30px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.footer-left, .footer-middle {
    flex: 1;
}

.footer-left h3 {
    margin: 5px 10px;
    font-size: 24px;
}

.footer-left p {
    margin: 5px 10px 10px;
    font-size: 14px;
}

.privacy a {
    color: #ffffff;
    font-size: 12px;
    text-decoration: none;
}

.privacy p {
    color: #ffffff;
    font-size: 13px;
}

.social-icons p {
    font-weight: bold;
    margin: 8px 50px 10px;
}

.social-icons i {
    font-size: 30px;
    color: #ffffff;
    margin: 0 5px;
    transition: color 0.3s ease;
}

.social-icons i:hover {
    color: #ffcc00;
}

.footer-middle h3 {
    margin: 0 0 15px;
    font-size: 20px;
    margin-left: 70px;
    border-bottom: 2px solid #ffffff;
    padding-bottom: 10px;
}

.footer-middle ul {
    list-style: none;
    padding: 0;
    margin-left: 70px;
}

.footer-middle ul li {
    margin-bottom: 10px;
}

.footer-middle ul li a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-middle ul li a:hover {
    color: #ffcc00;
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Header */
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 15px;
    }

    .header-left h1 {
        font-size: 24px;
    }

    .header-left p {
        font-size: 12px;
    }

    .header-right {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        width: 100%;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        padding: 10px 0;
    }

    nav ul li {
        margin: 10px 0;
        text-align: center;
    }

    #search-bar {
        width: 100%;
        margin-top: 10px;
    }

    @media (max-width: 768px) {
        .W2container {
          margin: 15px;
          padding: 15px;
        }
      
        .W2h1 {
          font-size: 24px;
        }
      
        .W2h2 {
          font-size: 20px;
        }
      
        .w2h2 {
          font-size: 20px;
        }
      
        .w2h3 {
          font-size: 18px;
        }
      
        p,
        .w2ul li,
        .W2form-group label,
        .W2form-group input,
        .W2form-group select {
          font-size: 14px;
        }
      
        #W2calculate,
        #W2reset {
          padding: 10px;
          font-size: 14px;
        }
      
        section {
          padding: 0 10px;
        }
      }
      
      @media (max-width: 480px) {
        .W2container {
          margin: 10px;
          padding: 10px;
        }
      
        .W2h1 {
          font-size: 20px;
        }
      
        .W2h2 {
          font-size: 18px;
        }
      
        .w2h2 {
          font-size: 18px;
        }
      
        .w2h3 {
          font-size: 16px;
        }
      
        p,
        ul li,
        .W2form-group label,
        .W2form-group input,
        .W2form-group select {
          font-size: 13px;
        }
      
        #W2calculate,
        #W2reset {
          padding: 8px;
          font-size: 13px;
        }
      }

    /* Footer */
    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-middle {
        margin-bottom: 20px;
    }

    .footer-middle h3 {
        margin-left: 0;
    }

    .footer-middle ul {
        margin-left: 0;
    }
}
